From b3654707c2e897ccc7d8578437f310ce41f5c54d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 8 Aug 2024 20:01:33 +0000 Subject: [PATCH 1/2] chore: Address reserved keyword collisions and formatting updates PiperOrigin-RevId: 660861615 Source-Link: https://github.com/googleapis/googleapis/commit/6a4a5720c01e0146114205de1095e1f192428f41 Source-Link: https://github.com/googleapis/googleapis-gen/commit/452b78c409ca667001df7b7e43ea34e1d53b428a Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiNDUyYjc4YzQwOWNhNjY3MDAxZGY3YjdlNDNlYTM0ZTFkNTNiNDI4YSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLy5Pd2xCb3QueWFtbCIsImgiOiI0NTJiNzhjNDA5Y2E2NjcwMDFkZjdiN2U0M2VhMzRlMWQ1M2I0MjhhIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjQ1MmI3OGM0MDljYTY2NzAwMWRmN2I3ZTQzZWEzNGUxZDUzYjQyOGEifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC8uT3dsQm90LnlhbWwiLCJoIjoiNDUyYjc4YzQwOWNhNjY3MDAxZGY3YjdlNDNlYTM0ZTFkNTNiNDI4YSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW5vdGlmaWNhdGlvbnMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI0NTJiNzhjNDA5Y2E2NjcwMDFkZjdiN2U0M2VhMzRlMWQ1M2I0MjhhIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW5vdGlmaWNhdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6IjQ1MmI3OGM0MDljYTY2NzAwMWRmN2I3ZTQzZWEzNGUxZDUzYjQyOGEifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiNDUyYjc4YzQwOWNhNjY3MDAxZGY3YjdlNDNlYTM0ZTFkNTNiNDI4YSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLy5Pd2xCb3QueWFtbCIsImgiOiI0NTJiNzhjNDA5Y2E2NjcwMDFkZjdiN2U0M2VhMzRlMWQ1M2I0MjhhIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb21vdGlvbnMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI0NTJiNzhjNDA5Y2E2NjcwMDFkZjdiN2U0M2VhMzRlMWQ1M2I0MjhhIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb21vdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6IjQ1MmI3OGM0MDljYTY2NzAwMWRmN2I3ZTQzZWEzNGUxZDUzYjQyOGEifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXF1b3RhLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiNDUyYjc4YzQwOWNhNjY3MDAxZGY3YjdlNDNlYTM0ZTFkNTNiNDI4YSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXF1b3RhLy5Pd2xCb3QueWFtbCIsImgiOiI0NTJiNzhjNDA5Y2E2NjcwMDFkZjdiN2U0M2VhMzRlMWQ1M2I0MjhhIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJlcG9ydHMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI0NTJiNzhjNDA5Y2E2NjcwMDFkZjdiN2U0M2VhMzRlMWQ1M2I0MjhhIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJlcG9ydHMvLk93bEJvdC55YW1sIiwiaCI6IjQ1MmI3OGM0MDljYTY2NzAwMWRmN2I3ZTQzZWEzNGUxZDUzYjQyOGEifQ== --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 143 ++ .../Rakefile | 169 +++ .../gapic_metadata.json | 57 + ...opping-merchant-inventories-v1beta.gemspec | 29 + ...le-shopping-merchant-inventories-v1beta.rb | 21 + .../shopping/merchant/inventories/v1beta.rb | 48 + .../v1beta/local_inventory_service.rb | 57 + .../v1beta/local_inventory_service/client.rb | 663 +++++++++ .../local_inventory_service/credentials.rb | 49 + .../v1beta/local_inventory_service/paths.rb | 71 + .../v1beta/local_inventory_service/rest.rb | 54 + .../local_inventory_service/rest/client.rb | 616 ++++++++ .../rest/service_stub.rb | 249 ++++ .../inventories/v1beta/localinventory_pb.rb | 58 + .../v1beta/localinventory_services_pb.rb | 68 + .../v1beta/regional_inventory_service.rb | 58 + .../regional_inventory_service/client.rb | 663 +++++++++ .../regional_inventory_service/credentials.rb | 49 + .../regional_inventory_service/paths.rb | 71 + .../v1beta/regional_inventory_service/rest.rb | 55 + .../regional_inventory_service/rest/client.rb | 616 ++++++++ .../rest/service_stub.rb | 249 ++++ .../v1beta/regionalinventory_pb.rb | 58 + .../v1beta/regionalinventory_services_pb.rb | 69 + .../merchant/inventories/v1beta/rest.rb | 40 + .../merchant/inventories/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 403 +++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 +++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 ++ .../inventories/v1beta/localinventory.rb | 164 +++ .../inventories/v1beta/regionalinventory.rb | 142 ++ .../proto_docs/google/shopping/type/types.rb | 210 +++ .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../delete_local_inventory.rb | 47 + .../insert_local_inventory.rb | 47 + .../list_local_inventories.rb | 51 + .../delete_regional_inventory.rb | 47 + .../insert_regional_inventory.rb | 47 + .../list_regional_inventories.rb | 51 + ....shopping.merchant.inventories.v1beta.json | 255 ++++ .../local_inventory_service_paths_test.rb | 59 + .../local_inventory_service_rest_test.rb | 256 ++++ .../v1beta/local_inventory_service_test.rb | 261 ++++ .../regional_inventory_service_paths_test.rb | 59 + .../regional_inventory_service_rest_test.rb | 256 ++++ .../v1beta/regional_inventory_service_test.rb | 261 ++++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 13 + .../LICENSE.md | 201 +++ .../README.md | 103 ++ .../Rakefile | 169 +++ ...ogle-shopping-merchant-inventories.gemspec | 27 + .../google-shopping-merchant-inventories.rb | 19 + .../google/shopping/merchant/inventories.rb | 105 ++ .../shopping/merchant/inventories/version.rb | 28 + .../merchant/inventories/client_test.rb | 73 + .../merchant/inventories/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 143 ++ .../Rakefile | 169 +++ .../gapic_metadata.json | 66 + ...oogle-shopping-merchant-lfp-v1beta.gemspec | 29 + .../google-shopping-merchant-lfp-v1beta.rb | 21 + .../google/shopping/merchant/lfp/v1beta.rb | 49 + .../lfp/v1beta/lfp_inventory_service.rb | 59 + .../v1beta/lfp_inventory_service/client.rb | 439 ++++++ .../lfp_inventory_service/credentials.rb | 49 + .../lfp/v1beta/lfp_inventory_service/paths.rb | 70 + .../lfp/v1beta/lfp_inventory_service/rest.rb | 56 + .../lfp_inventory_service/rest/client.rb | 406 ++++++ .../rest/service_stub.rb | 131 ++ .../merchant/lfp/v1beta/lfp_sale_service.rb | 59 + .../lfp/v1beta/lfp_sale_service/client.rb | 437 ++++++ .../v1beta/lfp_sale_service/credentials.rb | 49 + .../lfp/v1beta/lfp_sale_service/paths.rb | 52 + .../lfp/v1beta/lfp_sale_service/rest.rb | 56 + .../v1beta/lfp_sale_service/rest/client.rb | 404 ++++++ .../lfp_sale_service/rest/service_stub.rb | 131 ++ .../merchant/lfp/v1beta/lfp_store_service.rb | 59 + .../lfp/v1beta/lfp_store_service/client.rb | 741 ++++++++++ .../v1beta/lfp_store_service/credentials.rb | 49 + .../lfp/v1beta/lfp_store_service/paths.rb | 68 + .../lfp/v1beta/lfp_store_service/rest.rb | 56 + .../v1beta/lfp_store_service/rest/client.rb | 687 +++++++++ .../lfp_store_service/rest/service_stub.rb | 308 ++++ .../merchant/lfp/v1beta/lfpinventory_pb.rb | 54 + .../lfp/v1beta/lfpinventory_services_pb.rb | 51 + .../merchant/lfp/v1beta/lfpsale_pb.rb | 55 + .../lfp/v1beta/lfpsale_services_pb.rb | 49 + .../merchant/lfp/v1beta/lfpstore_pb.rb | 56 + .../lfp/v1beta/lfpstore_services_pb.rb | 57 + .../shopping/merchant/lfp/v1beta/rest.rb | 41 + .../shopping/merchant/lfp/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 403 +++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/field_info.rb | 88 ++ .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 +++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 ++ .../merchant/lfp/v1beta/lfpinventory.rb | 113 ++ .../shopping/merchant/lfp/v1beta/lfpsale.rb | 96 ++ .../shopping/merchant/lfp/v1beta/lfpstore.rb | 185 +++ .../proto_docs/google/shopping/type/types.rb | 210 +++ .../snippets/Gemfile | 32 + .../insert_lfp_inventory.rb | 47 + .../lfp_sale_service/insert_lfp_sale.rb | 47 + .../lfp_store_service/delete_lfp_store.rb | 47 + .../lfp_store_service/get_lfp_store.rb | 47 + .../lfp_store_service/insert_lfp_store.rb | 47 + .../lfp_store_service/list_lfp_stores.rb | 51 + ...a_google.shopping.merchant.lfp.v1beta.json | 255 ++++ .../lfp_inventory_service_paths_test.rb | 59 + .../v1beta/lfp_inventory_service_rest_test.rb | 146 ++ .../lfp/v1beta/lfp_inventory_service_test.rb | 136 ++ .../lfp/v1beta/lfp_sale_service_paths_test.rb | 47 + .../lfp/v1beta/lfp_sale_service_rest_test.rb | 146 ++ .../lfp/v1beta/lfp_sale_service_test.rb | 136 ++ .../v1beta/lfp_store_service_paths_test.rb | 59 + .../lfp/v1beta/lfp_store_service_rest_test.rb | 311 ++++ .../lfp/v1beta/lfp_store_service_test.rb | 321 ++++ .../test/helper.rb | 25 + .../google-shopping-merchant-lfp/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-shopping-merchant-lfp/.rubocop.yml | 39 + .../google-shopping-merchant-lfp/.toys.rb | 28 + .../google-shopping-merchant-lfp/.yardopts | 11 + .../AUTHENTICATION.md | 122 ++ .../google-shopping-merchant-lfp/CHANGELOG.md | 2 + .../google-shopping-merchant-lfp/Gemfile | 13 + .../google-shopping-merchant-lfp/LICENSE.md | 201 +++ .../google-shopping-merchant-lfp/README.md | 103 ++ .../google-shopping-merchant-lfp/Rakefile | 169 +++ .../google-shopping-merchant-lfp.gemspec | 27 + .../lib/google-shopping-merchant-lfp.rb | 19 + .../lib/google/shopping/merchant/lfp.rb | 144 ++ .../google/shopping/merchant/lfp/version.rb | 28 + .../shopping/merchant/lfp/client_test.rb | 92 ++ .../shopping/merchant/lfp/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 143 ++ .../Rakefile | 169 +++ .../gapic_metadata.json | 43 + ...ping-merchant-notifications-v1beta.gemspec | 29 + ...-shopping-merchant-notifications-v1beta.rb | 21 + .../shopping/merchant/notifications/v1beta.rb | 47 + .../v1beta/notifications_api_service.rb | 57 + .../notifications_api_service/client.rb | 834 +++++++++++ .../notifications_api_service/credentials.rb | 49 + .../v1beta/notifications_api_service/paths.rb | 66 + .../v1beta/notifications_api_service/rest.rb | 54 + .../notifications_api_service/rest/client.rb | 773 ++++++++++ .../rest/service_stub.rb | 368 +++++ .../v1beta/notificationsapi_pb.rb | 64 + .../v1beta/notificationsapi_services_pb.rb | 66 + .../merchant/notifications/v1beta/rest.rb | 39 + .../merchant/notifications/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 403 +++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 +++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 +++ .../notifications/v1beta/notificationsapi.rb | 215 +++ .../proto_docs/google/shopping/type/types.rb | 210 +++ .../snippets/Gemfile | 32 + .../create_notification_subscription.rb | 47 + .../delete_notification_subscription.rb | 47 + .../get_notification_subscription.rb | 47 + .../list_notification_subscriptions.rb | 51 + .../update_notification_subscription.rb | 47 + ...hopping.merchant.notifications.v1beta.json | 215 +++ .../notifications_api_service_paths_test.rb | 59 + .../notifications_api_service_rest_test.rb | 365 +++++ .../v1beta/notifications_api_service_test.rb | 379 +++++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 13 + .../LICENSE.md | 201 +++ .../README.md | 103 ++ .../Rakefile | 169 +++ ...le-shopping-merchant-notifications.gemspec | 27 + .../google-shopping-merchant-notifications.rb | 19 + .../google/shopping/merchant/notifications.rb | 70 + .../merchant/notifications/version.rb | 28 + .../merchant/notifications/client_test.rb | 54 + .../merchant/notifications/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 143 ++ .../Rakefile | 169 +++ .../gapic_metadata.json | 47 + ...-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 | 547 +++++++ .../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 | 507 +++++++ .../rest/service_stub.rb | 190 +++ .../products/v1beta/productinputs_pb.rb | 56 + .../v1beta/productinputs_services_pb.rb | 58 + .../products/v1beta/products_common_pb.rb | 75 + .../merchant/products/v1beta/products_pb.rb | 56 + .../products/v1beta/products_service.rb | 58 + .../v1beta/products_service/client.rb | 552 +++++++ .../v1beta/products_service/credentials.rb | 49 + .../products/v1beta/products_service/paths.rb | 66 + .../products/v1beta/products_service/rest.rb | 55 + .../v1beta/products_service/rest/client.rb | 512 +++++++ .../products_service/rest/service_stub.rb | 189 +++ .../products/v1beta/products_services_pb.rb | 58 + .../shopping/merchant/products/v1beta/rest.rb | 40 + .../merchant/products/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 403 +++++ .../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 ++ .../merchant/products/v1beta/productinputs.rb | 152 ++ .../merchant/products/v1beta/products.rb | 152 ++ .../products/v1beta/products_common.rb | 899 ++++++++++++ .../proto_docs/google/shopping/type/types.rb | 210 +++ .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../delete_product_input.rb | 47 + .../insert_product_input.rb | 47 + .../snippets/products_service/get_product.rb | 47 + .../products_service/list_products.rb | 51 + ...gle.shopping.merchant.products.v1beta.json | 175 +++ .../product_inputs_service_paths_test.rb | 59 + .../product_inputs_service_rest_test.rb | 202 +++ .../v1beta/product_inputs_service_test.rb | 198 +++ .../v1beta/products_service_paths_test.rb | 59 + .../v1beta/products_service_rest_test.rb | 201 +++ .../products/v1beta/products_service_test.rb | 201 +++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../google-shopping-merchant-products/Gemfile | 13 + .../LICENSE.md | 201 +++ .../README.md | 103 ++ .../Rakefile | 169 +++ .../google-shopping-merchant-products.gemspec | 27 + .../lib/google-shopping-merchant-products.rb | 19 + .../lib/google/shopping/merchant/products.rb | 106 ++ .../shopping/merchant/products/version.rb | 28 + .../shopping/merchant/products/client_test.rb | 73 + .../merchant/products/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 143 ++ .../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 | 62 + .../promotions/v1beta/promotions_pb.rb | 57 + .../promotions/v1beta/promotions_service.rb | 57 + .../v1beta/promotions_service/client.rb | 642 ++++++++ .../v1beta/promotions_service/credentials.rb | 49 + .../v1beta/promotions_service/paths.rb | 52 + .../v1beta/promotions_service/rest.rb | 54 + .../v1beta/promotions_service/rest/client.rb | 595 ++++++++ .../promotions_service/rest/service_stub.rb | 249 ++++ .../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 | 403 +++++ .../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 | 210 +++ .../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 | 47 + .../v1beta/promotions_service_rest_test.rb | 257 ++++ .../v1beta/promotions_service_test.rb | 263 ++++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 13 + .../LICENSE.md | 201 +++ .../README.md | 103 ++ .../Rakefile | 169 +++ ...oogle-shopping-merchant-promotions.gemspec | 27 + .../google-shopping-merchant-promotions.rb | 19 + .../google/shopping/merchant/promotions.rb | 70 + .../shopping/merchant/promotions/version.rb | 28 + .../merchant/promotions/client_test.rb | 54 + .../merchant/promotions/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 143 ++ .../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 | 52 + .../merchant/quota/v1beta/quota_service.rb | 57 + .../quota/v1beta/quota_service/client.rb | 445 ++++++ .../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 | 412 ++++++ .../v1beta/quota_service/rest/service_stub.rb | 130 ++ .../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 | 403 +++++ .../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 | 47 + .../quota/v1beta/quota_service_rest_test.rb | 147 ++ .../quota/v1beta/quota_service_test.rb | 143 ++ .../test/helper.rb | 25 + .../google-shopping-merchant-quota/.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../google-shopping-merchant-quota/.toys.rb | 28 + .../google-shopping-merchant-quota/.yardopts | 11 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../google-shopping-merchant-quota/Gemfile | 13 + .../google-shopping-merchant-quota/LICENSE.md | 201 +++ .../google-shopping-merchant-quota/README.md | 103 ++ .../google-shopping-merchant-quota/Rakefile | 169 +++ .../google-shopping-merchant-quota.gemspec | 27 + .../lib/google-shopping-merchant-quota.rb | 19 + .../lib/google/shopping/merchant/quota.rb | 70 + .../google/shopping/merchant/quota/version.rb | 28 + .../shopping/merchant/quota/client_test.rb | 54 + .../shopping/merchant/quota/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 143 ++ .../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 | 453 ++++++ .../v1beta/report_service/credentials.rb | 49 + .../reports/v1beta/report_service/rest.rb | 54 + .../v1beta/report_service/rest/client.rb | 420 ++++++ .../report_service/rest/service_stub.rb | 131 ++ .../merchant/reports/v1beta/reports_pb.rb | 86 ++ .../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 | 403 +++++ .../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 | 210 +++ .../proto_docs/google/type/date.rb | 53 + .../snippets/Gemfile | 32 + .../snippets/report_service/search.rb | 51 + ...ogle.shopping.merchant.reports.v1beta.json | 55 + .../v1beta/report_service_rest_test.rb | 148 ++ .../reports/v1beta/report_service_test.rb | 145 ++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../google-shopping-merchant-reports/.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../google-shopping-merchant-reports/Gemfile | 13 + .../LICENSE.md | 201 +++ .../README.md | 103 ++ .../google-shopping-merchant-reports/Rakefile | 169 +++ .../google-shopping-merchant-reports.gemspec | 27 + .../lib/google-shopping-merchant-reports.rb | 19 + .../lib/google/shopping/merchant/reports.rb | 71 + .../shopping/merchant/reports/version.rb | 28 + .../shopping/merchant/reports/client_test.rb | 54 + .../shopping/merchant/reports/version_test.rb | 26 + .../test/helper.rb | 25 + 500 files changed, 53477 insertions(+) create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/google-shopping-merchant-inventories.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/lib/google-shopping-merchant-inventories.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/client_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/version_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-inventories/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/google-shopping-merchant-lfp.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/lib/google-shopping-merchant-lfp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/client_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/version_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-lfp/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/google-shopping-merchant-notifications.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/lib/google-shopping-merchant-notifications.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/client_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/version_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-notifications/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/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/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-products/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-products/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-products/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-products/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-products/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-products/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-products/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-products/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-products/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-products/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-products/google-shopping-merchant-products.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-products/lib/google-shopping-merchant-products.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/client_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/version_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products/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-promotions/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/google-shopping-merchant-promotions.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/lib/google-shopping-merchant-promotions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/client_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/version_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions/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-quota/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-quota/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-quota/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-quota/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-quota/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-quota/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-quota/google-shopping-merchant-quota.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-quota/lib/google-shopping-merchant-quota.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/client_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/version_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota/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-reports/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-reports/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-reports/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-reports/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-reports/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-reports/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-reports/google-shopping-merchant-reports.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-reports/lib/google-shopping-merchant-reports.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/client_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/version_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports/test/helper.rb diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..e750ced8add4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta", + "distribution_name": "google-shopping-merchant-inventories-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-inventories-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml new file mode 100644 index 000000000000..e4469fb37867 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-inventories-v1beta.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-inventories-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..3500f6dddbe8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-inventories-v1beta library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-inventories-v1beta library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/inventories/v1beta" + +client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/inventories/v1beta" + +::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-inventories-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/inventories/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile new file mode 100644 index 000000000000..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md new file mode 100644 index 000000000000..70d29beaee97 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md @@ -0,0 +1,143 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center accounts. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-inventories](https://rubygems.org/gems/google-shopping-merchant-inventories). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-inventories-v1beta +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/inventories/v1beta" + +client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new +request = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new # (request fields as keyword arguments...) +response = client.list_local_inventories request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for general usage information. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +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 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-inventories`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-inventories-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-inventories`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-shopping-merchant-inventories-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile new file mode 100644 index 000000000000..c37839e4270d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-inventories-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-shopping-merchant-inventories-v1beta gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-inventories-v1beta gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-inventories-v1beta gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-inventories-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-inventories-v1beta" + header "google-shopping-merchant-inventories-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-inventories-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-inventories-v1beta test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-inventories-v1beta smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-inventories-v1beta acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..dd89d64ee89b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json @@ -0,0 +1,57 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.inventories.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Inventories::V1beta", + "services": { + "LocalInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client", + "rpcs": { + "ListLocalInventories": { + "methods": [ + "list_local_inventories" + ] + }, + "InsertLocalInventory": { + "methods": [ + "insert_local_inventory" + ] + }, + "DeleteLocalInventory": { + "methods": [ + "delete_local_inventory" + ] + } + } + } + } + }, + "RegionalInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client", + "rpcs": { + "ListRegionalInventories": { + "methods": [ + "list_regional_inventories" + ] + }, + "InsertRegionalInventory": { + "methods": [ + "insert_regional_inventory" + ] + }, + "DeleteRegionalInventory": { + "methods": [ + "delete_regional_inventory" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec new file mode 100644 index 000000000000..9bf4192a5b55 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/inventories/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-inventories-v1beta" + gem.version = Google::Shopping::Merchant::Inventories::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-inventories-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb new file mode 100644 index 000000000000..290831ee9d55 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/shopping/merchant/inventories/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb new file mode 100644 index 000000000000..9b3bebe571e4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/inventories/v1beta/local_inventory_service" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" +require "google/shopping/merchant/inventories/v1beta/version" + +module Google + module Shopping + module Merchant + module Inventories + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1beta" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1beta" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/inventories/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb new file mode 100644 index 000000000000..e523ef3a89c7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/inventories/v1beta/version" + +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/client" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + ## + # Service to manage local inventory for products + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1beta/local_inventory_service" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + module LocalInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "local_inventory_service", "helpers.rb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb new file mode 100644 index 000000000000..af47154962a8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb @@ -0,0 +1,663 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/inventories/v1beta/localinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + ## + # Client for the LocalInventoryService service. + # + # Service to manage local inventory for products + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :local_inventory_service_stub + + ## + # Configure the LocalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LocalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Inventories", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LocalInventoryService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @local_inventory_service_stub.universe_domain + end + + ## + # Create a new LocalInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LocalInventoryService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/shopping/merchant/inventories/v1beta/localinventory_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @local_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + end + + # Service calls + + ## + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + # + # @overload list_local_inventories(request, options = nil) + # Pass arguments to `list_local_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_local_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The `name` of the parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new + # + # # Call the list_local_inventories method. + # result = client.list_local_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + # p item + # end + # + def list_local_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_local_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_local_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :list_local_inventories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + # + # @overload insert_local_inventory(request, options = nil) + # Pass arguments to `insert_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_local_inventory(parent: nil, local_inventory: nil) + # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory, ::Hash] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new + # + # # Call the insert_local_inventory method. + # result = client.insert_local_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + # p result + # + def insert_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :insert_local_inventory, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_local_inventory(request, options = nil) + # Pass arguments to `delete_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_local_inventory(name: nil) + # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new + # + # # Call the delete_local_inventory method. + # result = client.delete_local_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_local_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.call_rpc :delete_local_inventory, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LocalInventoryService API. + # + # This class represents the configuration for LocalInventoryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_local_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the LocalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_local_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_local_inventories + ## + # RPC-specific configuration for `insert_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_local_inventory + ## + # RPC-specific configuration for `delete_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_local_inventory + + # @private + def initialize parent_rpcs = nil + list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories + @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config + insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory + @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config + delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory + @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb new file mode 100644 index 000000000000..6386061f15fd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + # Credentials for the LocalInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb new file mode 100644 index 000000000000..185b4ba344ba --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + # Path helper methods for the LocalInventoryService API. + module Paths + ## + # Create a fully-qualified LocalInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # + # @param account [String] + # @param product [String] + # @param store_code [String] + # + # @return [::String] + def local_inventory_path account:, product:, store_code: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" + + "accounts/#{account}/products/#{product}/localInventories/#{store_code}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb new file mode 100644 index 000000000000..ef57fdbe953d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/inventories/v1beta/version" + +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + ## + # Service to manage local inventory for products + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + module LocalInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb new file mode 100644 index 000000000000..90eab7a7c6b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb @@ -0,0 +1,616 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/inventories/v1beta/localinventory_pb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + module Rest + ## + # REST client for the LocalInventoryService service. + # + # Service to manage local inventory for products + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :local_inventory_service_stub + + ## + # Configure the LocalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LocalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Inventories", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LocalInventoryService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @local_inventory_service_stub.universe_domain + end + + ## + # Create a new LocalInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LocalInventoryService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @local_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + end + + # Service calls + + ## + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + # + # @overload list_local_inventories(request, options = nil) + # Pass arguments to `list_local_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_local_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The `name` of the parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @param page_token [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new + # + # # Call the list_local_inventories method. + # result = client.list_local_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + # p item + # end + # + def list_local_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_local_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_local_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.list_local_inventories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, "local_inventories", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + # + # @overload insert_local_inventory(request, options = nil) + # Pass arguments to `insert_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_local_inventory(parent: nil, local_inventory: nil) + # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory, ::Hash] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new + # + # # Call the insert_local_inventory method. + # result = client.insert_local_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + # p result + # + def insert_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.insert_local_inventory request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_local_inventory(request, options = nil) + # Pass arguments to `delete_local_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_local_inventory(name: nil) + # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new + # + # # Call the delete_local_inventory method. + # result = client.delete_local_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_local_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_local_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_local_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_local_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_inventory_service_stub.delete_local_inventory request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LocalInventoryService REST API. + # + # This class represents the configuration for LocalInventoryService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_local_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_local_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the LocalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_local_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_local_inventories + ## + # RPC-specific configuration for `insert_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_local_inventory + ## + # RPC-specific configuration for `delete_local_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_local_inventory + + # @private + def initialize parent_rpcs = nil + list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories + @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config + insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory + @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config + delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory + @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..6864bf7f2116 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb @@ -0,0 +1,249 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/inventories/v1beta/localinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + module Rest + ## + # REST service stub for the LocalInventoryService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the list_local_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse] + # A result object deserialized from the server's reply + def list_local_inventories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_local_inventories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the insert_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # A result object deserialized from the server's reply + def insert_local_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_local_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_local_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_local_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_local_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_local_inventories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/inventories/v1beta/{parent}/localInventories", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_local_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/inventories/v1beta/{parent}/localInventories:insert", + body: "local_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_local_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_local_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/inventories/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/localInventories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb new file mode 100644 index 000000000000..45b970322c33 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1beta/localinventory.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n@google/shopping/merchant/inventories/v1beta/localinventory.proto\x12+google.shopping.merchant.inventories.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\x8d\x05\n\x0eLocalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12*\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nsale_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.Interval\x12\x19\n\x0c\x61vailability\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08quantity\x18\x08 \x01(\x03H\x01\x88\x01\x01\x12\x1a\n\rpickup_method\x18\t \x01(\tH\x02\x88\x01\x01\x12\x17\n\npickup_sla\x18\n \x01(\tH\x03\x88\x01\x01\x12%\n\x18instore_product_location\x18\x0b \x01(\tH\x04\x88\x01\x01\x12@\n\x11\x63ustom_attributes\x18\x0c \x03(\x0b\x32%.google.shopping.type.CustomAttribute:s\xea\x41p\n)merchantapi.googleapis.com/LocalInventory\x12\x43\x61\x63\x63ounts/{account}/products/{product}/localInventories/{store_code}B\x0f\n\r_availabilityB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x1b\n\x19_instore_product_location\"\x87\x01\n\x1bListLocalInventoriesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1cListLocalInventoriesResponse\x12V\n\x11local_inventories\x18\x01 \x03(\x0b\x32;.google.shopping.merchant.inventories.v1beta.LocalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbb\x01\n\x1bInsertLocalInventoryRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12Y\n\x0flocal_inventory\x18\x02 \x01(\x0b\x32;.google.shopping.merchant.inventories.v1beta.LocalInventoryB\x03\xe0\x41\x02\"^\n\x1b\x44\x65leteLocalInventoryRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/LocalInventory2\xb8\x06\n\x15LocalInventoryService\x12\x81\x02\n\x14ListLocalInventories\x12H.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest\x1aI.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/inventories/v1beta/{parent=accounts/*/products/*}/localInventories\x12\x82\x02\n\x14InsertLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest\x1a;.google.shopping.merchant.inventories.v1beta.LocalInventory\"c\x82\xd3\xe4\x93\x02]\"J/inventories/v1beta/{parent=accounts/*/products/*}/localInventories:insert:\x0flocal_inventory\x12\xcc\x01\n\x14\x44\x65leteLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/inventories/v1beta/{name=accounts/*/products/*/localInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xef\x01\n/com.google.shopping.merchant.inventories.v1betaB\x13LocalInventoryProtoP\x01ZWcloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespb\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.type.Interval", "google/type/interval.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + LocalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.LocalInventory").msgclass + ListLocalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest").msgclass + ListLocalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse").msgclass + InsertLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest").msgclass + DeleteLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb new file mode 100644 index 000000000000..40ceba820404 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb @@ -0,0 +1,68 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/inventories/v1beta/localinventory.proto for package 'google.shopping.merchant.inventories.v1beta' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/inventories/v1beta/localinventory_pb' + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module LocalInventoryService + # Service to manage local inventory for products + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.inventories.v1beta.LocalInventoryService' + + # Lists the `LocalInventory` resources for the given product in your merchant + # account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be used + # to obtain additional results. + # + # `LocalInventory` resources are listed per product for a given account. + rpc :ListLocalInventories, ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse + # Inserts a `LocalInventory` resource to a product in your merchant + # account. + # + # Replaces the full `LocalInventory` resource if an entry with the same + # [`storeCode`][google.shopping.merchant.inventories.v1beta.LocalInventory.store_code] + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `LocalInventory` + # resource to appear in products. + rpc :InsertLocalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory + # Deletes the specified `LocalInventory` from the given product in your + # merchant account. It might take a up to an hour for the + # `LocalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + rpc :DeleteLocalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb new file mode 100644 index 000000000000..cccaec166015 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/inventories/v1beta/version" + +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/client" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + ## + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + module RegionalInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "regional_inventory_service", "helpers.rb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb new file mode 100644 index 000000000000..6b923f3e2734 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb @@ -0,0 +1,663 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + ## + # Client for the RegionalInventoryService service. + # + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regional_inventory_service_stub + + ## + # Configure the RegionalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Inventories", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionalInventoryService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @regional_inventory_service_stub.universe_domain + end + + ## + # Create a new RegionalInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionalInventoryService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @regional_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + end + + # Service calls + + ## + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + # + # @overload list_regional_inventories(request, options = nil) + # Pass arguments to `list_regional_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The `name` of the parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new + # + # # Call the list_regional_inventories method. + # result = client.list_regional_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + # p item + # end + # + def list_regional_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_regional_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_regional_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :list_regional_inventories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + # + # @overload insert_regional_inventory(request, options = nil) + # Pass arguments to `insert_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) + # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory, ::Hash] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new + # + # # Call the insert_regional_inventory method. + # result = client.insert_regional_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + # p result + # + def insert_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :insert_regional_inventory, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_regional_inventory(request, options = nil) + # Pass arguments to `delete_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_regional_inventory(name: nil) + # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new + # + # # Call the delete_regional_inventory method. + # result = client.delete_regional_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_regional_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.call_rpc :delete_regional_inventory, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the RegionalInventoryService API. + # + # This class represents the configuration for RegionalInventoryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_regional_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the RegionalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_regional_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regional_inventories + ## + # RPC-specific configuration for `insert_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_regional_inventory + ## + # RPC-specific configuration for `delete_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_regional_inventory + + # @private + def initialize parent_rpcs = nil + list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories + @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config + insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory + @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config + delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory + @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb new file mode 100644 index 000000000000..e5a4abc7eb5d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + # Credentials for the RegionalInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb new file mode 100644 index 000000000000..3d57ddab57ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + # Path helper methods for the RegionalInventoryService API. + module Paths + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}` + # + # @param account [String] + # @param product [String] + # + # @return [::String] + def product_path account:, product: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/products/#{product}" + end + + ## + # Create a fully-qualified RegionalInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # + # @param account [String] + # @param product [String] + # @param region [String] + # + # @return [::String] + def regional_inventory_path account:, product:, region: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" + + "accounts/#{account}/products/#{product}/regionalInventories/#{region}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb new file mode 100644 index 000000000000..c547b55e5b04 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/inventories/v1beta/version" + +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + ## + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + module RegionalInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb new file mode 100644 index 000000000000..bf9927d902ac --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb @@ -0,0 +1,616 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + module Rest + ## + # REST client for the RegionalInventoryService service. + # + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :regional_inventory_service_stub + + ## + # Configure the RegionalInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegionalInventoryService clients + # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Inventories", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegionalInventoryService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @regional_inventory_service_stub.universe_domain + end + + ## + # Create a new RegionalInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegionalInventoryService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @regional_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + end + + # Service calls + + ## + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + # + # @overload list_regional_inventories(request, options = nil) + # Pass arguments to `list_regional_inventories` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The `name` of the parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @param page_size [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new + # + # # Call the list_regional_inventories method. + # result = client.list_regional_inventories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + # p item + # end + # + def list_regional_inventories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_regional_inventories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_regional_inventories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.list_regional_inventories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, "regional_inventories", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`} + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + # + # @overload insert_regional_inventory(request, options = nil) + # Pass arguments to `insert_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) + # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory, ::Hash] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new + # + # # Call the insert_regional_inventory method. + # result = client.insert_regional_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + # p result + # + def insert_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.insert_regional_inventory request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + # + # @overload delete_regional_inventory(request, options = nil) + # Pass arguments to `delete_regional_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_regional_inventory(name: nil) + # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/inventories/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new + # + # # Call the delete_regional_inventory method. + # result = client.delete_regional_inventory request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_regional_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_regional_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_regional_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_regional_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @regional_inventory_service_stub.delete_regional_inventory request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the RegionalInventoryService REST API. + # + # This class represents the configuration for RegionalInventoryService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_regional_inventories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_regional_inventories.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the RegionalInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_regional_inventories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_regional_inventories + ## + # RPC-specific configuration for `insert_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_regional_inventory + ## + # RPC-specific configuration for `delete_regional_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_regional_inventory + + # @private + def initialize parent_rpcs = nil + list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories + @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config + insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory + @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config + delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory + @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..9b5d8292df39 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb @@ -0,0 +1,249 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + module Rest + ## + # REST service stub for the RegionalInventoryService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the list_regional_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse] + # A result object deserialized from the server's reply + def list_regional_inventories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_regional_inventories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the insert_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # A result object deserialized from the server's reply + def insert_regional_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_regional_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_regional_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_regional_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_regional_inventories REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_regional_inventories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/inventories/v1beta/{parent}/regionalInventories", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_regional_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/inventories/v1beta/{parent}/regionalInventories:insert", + body: "regional_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_regional_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_regional_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/inventories/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb new file mode 100644 index 000000000000..5e53eb307f9f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/inventories/v1beta/regionalinventory.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\nCgoogle/shopping/merchant/inventories/v1beta/regionalinventory.proto\x12+google.shopping.merchant.inventories.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xd0\x03\n\x11RegionalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\x06region\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12*\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nsale_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.Interval\x12\x19\n\x0c\x61vailability\x18\x07 \x01(\tH\x00\x88\x01\x01\x12@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:u\xea\x41r\n,merchantapi.googleapis.com/RegionalInventory\x12\x42\x61\x63\x63ounts/{account}/products/{product}/regionalInventories/{region}B\x0f\n\r_availability\"\x8d\x01\n\x1eListRegionalInventoriesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1fListRegionalInventoriesResponse\x12\\\n\x14regional_inventories\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc7\x01\n\x1eInsertRegionalInventoryRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12_\n\x12regional_inventory\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventoryB\x03\xe0\x41\x02\"d\n\x1e\x44\x65leteRegionalInventoryRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,merchantapi.googleapis.com/RegionalInventory2\xdf\x06\n\x18RegionalInventoryService\x12\x8d\x02\n\x17ListRegionalInventories\x12K.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest\x1aL.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories\x12\x91\x02\n\x17InsertRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest\x1a>.google.shopping.merchant.inventories.v1beta.RegionalInventory\"i\x82\xd3\xe4\x93\x02\x63\"M/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories:insert:\x12regional_inventory\x12\xd5\x01\n\x17\x44\x65leteRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/inventories/v1beta/{name=accounts/*/products/*/regionalInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa4\x01\n/com.google.shopping.merchant.inventories.v1betaB\x16RegionalInventoryProtoP\x01ZWcloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.type.Interval", "google/type/interval.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + RegionalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.RegionalInventory").msgclass + ListRegionalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest").msgclass + ListRegionalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse").msgclass + InsertRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest").msgclass + DeleteRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb new file mode 100644 index 000000000000..234e1a0a45a2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb @@ -0,0 +1,69 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/inventories/v1beta/regionalinventory.proto for package 'google.shopping.merchant.inventories.v1beta' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/inventories/v1beta/regionalinventory_pb' + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + module RegionalInventoryService + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.inventories.v1beta.RegionalInventoryService' + + # Lists the `RegionalInventory` resources for the given product in your + # merchant account. The response might contain fewer items than specified by + # `pageSize`. If `pageToken` was returned in previous request, it can be + # used to obtain additional results. + # + # `RegionalInventory` resources are listed per product for a given account. + rpc :ListRegionalInventories, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse + # Inserts a `RegionalInventory` to a given product in your + # merchant account. + # + # Replaces the full `RegionalInventory` resource if an entry with the same + # [`region`][google.shopping.merchant.inventories.v1beta.RegionalInventory.region] + # already exists for the product. + # + # It might take up to 30 minutes for the new or updated `RegionalInventory` + # resource to appear in products. + rpc :InsertRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory + # Deletes the specified `RegionalInventory` resource from the given product + # in your merchant account. It might take up to an hour for the + # `RegionalInventory` to be deleted from the specific product. + # Once you have received a successful delete response, wait for that + # period before attempting a delete again. + rpc :DeleteRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb new file mode 100644 index 000000000000..039ea4e3868c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" +require "google/shopping/merchant/inventories/v1beta/version" + +module Google + module Shopping + module Merchant + module Inventories + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/inventories/v1beta/rest" + # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb new file mode 100644 index 000000000000..d6d1ec380433 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..e0b26a33b4b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..b03587481349 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..38b4b61e6061 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..935946d52792 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..b5731a824060 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..8c6b19d52e3d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..4ac9c4801a3f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb new file mode 100644 index 000000000000..a5a5c276b78c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb @@ -0,0 +1,164 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + # Local inventory information for the product. Represents in-store information + # for a specific product at the store specified by + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`}. + # For a list of all accepted attribute values, see the [local product inventory + # data specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the `LocalInventory` resource. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # @!attribute [r] account + # @return [::Integer] + # Output only. The account that owns the product. This field will be ignored + # if set by the client. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. Store code (the store ID from your Business Profile) + # of the physical store the product is sold in. See the [Local product + # inventory data + # specification](https://support.google.com/merchants/answer/3061342) for + # more information. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Price of the product at this store. + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Sale price of the product at this store. Mandatory if + # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#sale_price_effective_date `salePriceEffectiveDate`} + # is defined. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # The `TimePeriod` of the + # sale at this store. + # @!attribute [rw] availability + # @return [::String] + # Availability of the product at this store. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] quantity + # @return [::Integer] + # Quantity of the product available at this store. Must be greater than or + # equal to zero. + # @!attribute [rw] pickup_method + # @return [::String] + # Supported pickup method for this product. Unless the value is `"not + # supported"`, this field must be submitted together with + # `pickupSla`. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] pickup_sla + # @return [::String] + # Relative time period from the order date for an order for this product, + # from this store, to be ready for pickup. Must be submitted with + # `pickupMethod`. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] instore_product_location + # @return [::String] + # Location of the product inside the store. Maximum length is 20 bytes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # A list of custom (merchant-provided) attributes. You can also use + # `CustomAttribute` to submit any attribute of the data specification in its + # generic form. + class LocalInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListLocalInventories` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `name` of the parent product to list local inventories for. + # Format: + # `accounts/{account}/products/{product}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of `LocalInventory` resources for the given + # product to return. The service returns fewer than this value if the number + # of inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 25000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListLocalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLocalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListLocalInventoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListLocalInventories` method. + # @!attribute [rw] local_inventories + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] + # The `LocalInventory` resources for the given product from the specified + # account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListLocalInventoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertLocalInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] local_inventory + # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] + # Required. Local inventory information of the product. If the product + # already has a `LocalInventory` resource for the same `storeCode`, full + # replacement of the `LocalInventory` resource is performed. + class InsertLocalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteLocalInventory` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the local inventory for the given product to delete. + # Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + class DeleteLocalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb new file mode 100644 index 000000000000..c59bf0b46ed9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Inventories + module V1beta + # Regional inventory information for the product. Represents specific + # information like price and availability for a given product in a specific + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`}. + # For a list of all accepted attribute values, see the [regional product + # inventory data + # specification](https://support.google.com/merchants/answer/9698880). + # @!attribute [r] name + # @return [::String] + # Output only. The name of the `RegionalInventory` resource. + # Format: + # `{regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}` + # @!attribute [r] account + # @return [::Integer] + # Output only. The account that owns the product. This field will be ignored + # if set by the client. + # @!attribute [rw] region + # @return [::String] + # Required. Immutable. ID of the region for this + # `RegionalInventory` resource. See the [Regional availability and + # pricing](https://support.google.com/merchants/answer/9698880) for more + # details. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Price of the product in this region. + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Sale price of the product in this region. Mandatory if + # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#sale_price_effective_date `salePriceEffectiveDate`} + # is defined. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # The `TimePeriod` of the + # sale price in this region. + # @!attribute [rw] availability + # @return [::String] + # Availability of the product in this region. + # For accepted attribute values, see the [regional product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # A list of custom (merchant-provided) attributes. You can also use + # `CustomAttribute` to submit any attribute of the data specification in its + # generic form. + class RegionalInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListRegionalInventories` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `name` of the parent product to list `RegionalInventory` + # resources for. Format: `accounts/{account}/products/{product}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of `RegionalInventory` resources for the given product + # to return. The service returns fewer than this value if the number of + # inventories for the given product is less that than the `pageSize`. The + # default value is 25000. The maximum value is 100000; If a value higher than + # the maximum is specified, then the `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRegionalInventories` call. + # Provide the page token to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRegionalInventories` + # must match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListRegionalInventoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListRegionalInventories` method. + # @!attribute [rw] regional_inventories + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] + # The `RegionalInventory` resources for the given product from the specified + # account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRegionalInventoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertRegionalInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account and product where this inventory will be inserted. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] regional_inventory + # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] + # Required. Regional inventory information to add to the product. If the + # product already has a `RegionalInventory` resource for the same `region`, + # full replacement of the `RegionalInventory` resource is performed. + class InsertRegionalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteRegionalInventory` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `RegionalInventory` resource to delete. + # Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + class DeleteRegionalInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..7c4fd780655b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + 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 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 + # 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 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..ba88575c495d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..3ce23806cf79 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-shopping-merchant-inventories-v1beta", path: "../" +else + gem "google-shopping-merchant-inventories-v1beta" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb new file mode 100644 index 000000000000..b3f6412401ef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the delete_local_inventory call in the LocalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory. +# +def delete_local_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new + + # Call the delete_local_inventory method. + result = client.delete_local_inventory request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb new file mode 100644 index 000000000000..8f09761abc4d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the insert_local_inventory call in the LocalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory. +# +def insert_local_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new + + # Call the insert_local_inventory method. + result = client.insert_local_inventory request + + # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + p result +end +# [END merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb new file mode 100644 index 000000000000..09fa0d8dd173 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the list_local_inventories call in the LocalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories. +# +def list_local_inventories + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new + + # Call the list_local_inventories method. + result = client.list_local_inventories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. + p item + end +end +# [END merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb new file mode 100644 index 000000000000..e59e0d65e072 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the delete_regional_inventory call in the RegionalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory. +# +def delete_regional_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new + + # Call the delete_regional_inventory method. + result = client.delete_regional_inventory request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb new file mode 100644 index 000000000000..c5dce5c3b443 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the insert_regional_inventory call in the RegionalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory. +# +def insert_regional_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new + + # Call the insert_regional_inventory method. + result = client.insert_regional_inventory request + + # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + p result +end +# [END merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb new file mode 100644 index 000000000000..9814e15efae0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync] +require "google/shopping/merchant/inventories/v1beta" + +## +# Snippet for the list_regional_inventories call in the RegionalInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories. +# +def list_regional_inventories + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new + + # Call the list_regional_inventories method. + result = client.list_regional_inventories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. + p item + end +end +# [END merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json new file mode 100644 index 000000000000..01d13ac306c5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-inventories-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.inventories.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync", + "title": "Snippet for the list_local_inventories call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories.", + "file": "local_inventory_service/list_local_inventories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_local_inventories", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" + }, + "method": { + "short_name": "ListLocalInventories", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.ListLocalInventories", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync", + "title": "Snippet for the insert_local_inventory call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory.", + "file": "local_inventory_service/insert_local_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_local_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" + }, + "method": { + "short_name": "InsertLocalInventory", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.InsertLocalInventory", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync", + "title": "Snippet for the delete_local_inventory call in the LocalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory.", + "file": "local_inventory_service/delete_local_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_local_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "LocalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" + }, + "method": { + "short_name": "DeleteLocalInventory", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.DeleteLocalInventory", + "service": { + "short_name": "LocalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync", + "title": "Snippet for the list_regional_inventories call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories.", + "file": "regional_inventory_service/list_regional_inventories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_regional_inventories", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" + }, + "method": { + "short_name": "ListRegionalInventories", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.ListRegionalInventories", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync", + "title": "Snippet for the insert_regional_inventory call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory.", + "file": "regional_inventory_service/insert_regional_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_regional_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" + }, + "method": { + "short_name": "InsertRegionalInventory", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.InsertRegionalInventory", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync", + "title": "Snippet for the delete_regional_inventory call in the RegionalInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory.", + "file": "regional_inventory_service/delete_regional_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_regional_inventory", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegionalInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" + }, + "method": { + "short_name": "DeleteRegionalInventory", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.DeleteRegionalInventory", + "service": { + "short_name": "RegionalInventoryService", + "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb new file mode 100644 index 000000000000..b9e575647ee8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/inventories/v1beta/local_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_local_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.local_inventory_path account: "value0", product: "value1", store_code: "value2" + assert_equal "accounts/value0/products/value1/localInventories/value2", path + end + end + + def test_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb new file mode 100644 index 000000000000..0e9db691f7d7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb @@ -0,0 +1,256 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/inventories/v1beta/localinventory_pb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_local_inventories + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_local_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_list_local_inventories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_local_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_local_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_local_inventories parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_local_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_local_inventories({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_local_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_local_inventories_client_stub.call_count + end + end + end + + def test_insert_local_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + local_inventory = {} + + insert_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_insert_local_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_local_inventory_client_stub.call_count + end + end + end + + def test_delete_local_inventory + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_delete_local_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_local_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_local_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_local_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_local_inventory_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb new file mode 100644 index 000000000000..4b6df7b218ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb @@ -0,0 +1,261 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/inventories/v1beta/localinventory_pb" +require "google/shopping/merchant/inventories/v1beta/localinventory_services_pb" +require "google/shopping/merchant/inventories/v1beta/local_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_local_inventories + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_local_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_local_inventories, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_local_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_local_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_local_inventories parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_local_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_local_inventories({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_local_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_local_inventories_client_stub.call_rpc_count + end + end + + def test_insert_local_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + local_inventory = {} + + insert_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_local_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory), request["local_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_local_inventory parent: parent, local_inventory: local_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_local_inventory_client_stub.call_rpc_count + end + end + + def test_delete_local_inventory + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_local_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_local_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_local_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_local_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_local_inventory({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_local_inventory_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb new file mode 100644 index 000000000000..88c3367d5d24 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path account: "value0", product: "value1" + assert_equal "accounts/value0/products/value1", path + end + end + + def test_regional_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.regional_inventory_path account: "value0", product: "value1", region: "value2" + assert_equal "accounts/value0/products/value1/regionalInventories/value2", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb new file mode 100644 index 000000000000..1be5fd500d6c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb @@ -0,0 +1,256 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_regional_inventories + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_regional_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_list_regional_inventories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_regional_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_regional_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_regional_inventories parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_regional_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_regional_inventories({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_regional_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_regional_inventories_client_stub.call_count + end + end + end + + def test_insert_regional_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + regional_inventory = {} + + insert_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_insert_regional_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_regional_inventory_client_stub.call_count + end + end + end + + def test_delete_regional_inventory + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_delete_regional_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_regional_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_regional_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_regional_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_regional_inventory_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb new file mode 100644 index 000000000000..5cc8597424e0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb @@ -0,0 +1,261 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" +require "google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb" +require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" + +class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_regional_inventories + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_regional_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_regional_inventories, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_regional_inventories_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_regional_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_regional_inventories parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_regional_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_regional_inventories({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_regional_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_regional_inventories_client_stub.call_rpc_count + end + end + + def test_insert_regional_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + regional_inventory = {} + + insert_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_regional_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory), request["regional_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_regional_inventory_client_stub.call_rpc_count + end + end + + def test_delete_regional_inventory + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_regional_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_regional_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_regional_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_regional_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_regional_inventory({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_regional_inventory_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.gitignore b/owl-bot-staging/google-shopping-merchant-inventories/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-inventories/.repo-metadata.json new file mode 100644 index 000000000000..9b1473e3d0c6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-inventories", + "distribution_name": "google-shopping-merchant-inventories", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant 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.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-inventories/.rubocop.yml new file mode 100644 index 000000000000..9b86de31b0a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-inventories.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-inventories.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.toys.rb b/owl-bot-staging/google-shopping-merchant-inventories/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.yardopts b/owl-bot-staging/google-shopping-merchant-inventories/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-inventories/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-inventories/AUTHENTICATION.md new file mode 100644 index 000000000000..f42b32326ae4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-inventories library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-inventories library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/inventories" + +client = Google::Shopping::Merchant::Inventories.local_inventory_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/inventories" + +Google::Shopping::Merchant::Inventories.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::Inventories.local_inventory_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-inventories +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/inventories" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::Inventories.local_inventory_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-inventories/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-inventories/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-inventories/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories/Gemfile new file mode 100644 index 000000000000..b0567b7a0ddd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/Gemfile @@ -0,0 +1,13 @@ +source "https://rubygems.org" + +gemspec + +gem "google-shopping-merchant-inventories-v1beta", path: "../google-shopping-merchant-inventories-v1beta" + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-inventories/LICENSE.md b/owl-bot-staging/google-shopping-merchant-inventories/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-inventories/README.md b/owl-bot-staging/google-shopping-merchant-inventories/README.md new file mode 100644 index 000000000000..b4f26b43f6d0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/README.md @@ -0,0 +1,103 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center accounts. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-inventories-v*`. +The gem `google-shopping-merchant-inventories` is the main client library that brings the +verisoned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-inventories) +for this library, google-shopping-merchant-inventories, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-inventories-v1beta](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-inventories +``` + +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) + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-inventories`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-inventories-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-inventories`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-shopping-merchant-inventories-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-inventories/Rakefile b/owl-bot-staging/google-shopping-merchant-inventories/Rakefile new file mode 100644 index 000000000000..0c957483ff95 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-inventories acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" + ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-shopping-merchant-inventories gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-inventories gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-inventories gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-inventories gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-inventories" + header "google-shopping-merchant-inventories rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-inventories yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-inventories test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-inventories smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-inventories acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/google-shopping-merchant-inventories.gemspec b/owl-bot-staging/google-shopping-merchant-inventories/google-shopping-merchant-inventories.gemspec new file mode 100644 index 000000000000..5fef8b0e1ba3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/google-shopping-merchant-inventories.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/inventories/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-inventories" + gem.version = Google::Shopping::Merchant::Inventories::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-inventories-v1beta", ">= 0.2", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/lib/google-shopping-merchant-inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories/lib/google-shopping-merchant-inventories.rb new file mode 100644 index 000000000000..a2288cb0b57e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/lib/google-shopping-merchant-inventories.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/inventories" unless defined? Google::Shopping::Merchant::Inventories::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories.rb new file mode 100644 index 000000000000..39b924385f70 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/inventories/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module Inventories + ## + # Create a new client object for LocalInventoryService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta/Google/Shopping/Merchant/Inventories/V1beta/LocalInventoryService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the LocalInventoryService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About LocalInventoryService + # + # Service to manage local inventory for products + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.local_inventory_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/inventories/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Inventories + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Inventories.const_get(package_name).const_get(:LocalInventoryService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for RegionalInventoryService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta/Google/Shopping/Merchant/Inventories/V1beta/RegionalInventoryService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the RegionalInventoryService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About RegionalInventoryService + # + # Service to manage regional inventory for products. There is also separate + # `regions` resource and API to manage regions definitions. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.regional_inventory_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/inventories/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Inventories + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Inventories.const_get(package_name).const_get(:RegionalInventoryService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + end + end + end +end + +helper_path = ::File.join __dir__, "inventories", "helpers.rb" +require "google/shopping/merchant/inventories/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories/version.rb b/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories/version.rb new file mode 100644 index 000000000000..0c575eedf735 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Inventories + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/client_test.rb b/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/client_test.rb new file mode 100644 index 000000000000..ca90eb78b051 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/client_test.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/inventories" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::Inventories::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_local_inventory_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Inventories.local_inventory_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client, client + end + end + + def test_local_inventory_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Inventories.local_inventory_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client, client + end + end + + def test_regional_inventory_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Inventories.regional_inventory_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client, client + end + end + + def test_regional_inventory_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Inventories.regional_inventory_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/version_test.rb b/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/version_test.rb new file mode 100644 index 000000000000..54dbc1824a72 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/inventories/version" + +class Google::Shopping::Merchant::Inventories::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::Inventories::VERSION + end +end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/test/helper.rb b/owl-bot-staging/google-shopping-merchant-inventories/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..d1991995c1df --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta", + "distribution_name": "google-shopping-merchant-lfp-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-lfp-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml new file mode 100644 index 000000000000..5bfed50cae80 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-lfp-v1beta.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-lfp-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..f2270ceb15f9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-lfp-v1beta library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-lfp-v1beta library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/lfp/v1beta" + +client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/lfp/v1beta" + +::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-lfp-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/lfp/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile new file mode 100644 index 000000000000..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md new file mode 100644 index 000000000000..186a8337b6b2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md @@ -0,0 +1,143 @@ +# 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-lfp](https://rubygems.org/gems/google-shopping-merchant-lfp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-lfp-v1beta +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/lfp/v1beta" + +client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new +request = ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new # (request fields as keyword arguments...) +response = client.insert_lfp_inventory request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for general usage information. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +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 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-lfp`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-lfp-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-lfp`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-shopping-merchant-lfp-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile new file mode 100644 index 000000000000..566fa6b6b9b2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-lfp-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" + ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-shopping-merchant-lfp-v1beta gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-lfp-v1beta gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-lfp-v1beta gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-lfp-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-lfp-v1beta" + header "google-shopping-merchant-lfp-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-lfp-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-lfp-v1beta test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-lfp-v1beta smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-lfp-v1beta acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..ea08ef885e20 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json @@ -0,0 +1,66 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.lfp.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Lfp::V1beta", + "services": { + "LfpInventoryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client", + "rpcs": { + "InsertLfpInventory": { + "methods": [ + "insert_lfp_inventory" + ] + } + } + } + } + }, + "LfpSaleService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client", + "rpcs": { + "InsertLfpSale": { + "methods": [ + "insert_lfp_sale" + ] + } + } + } + } + }, + "LfpStoreService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client", + "rpcs": { + "GetLfpStore": { + "methods": [ + "get_lfp_store" + ] + }, + "InsertLfpStore": { + "methods": [ + "insert_lfp_store" + ] + }, + "DeleteLfpStore": { + "methods": [ + "delete_lfp_store" + ] + }, + "ListLfpStores": { + "methods": [ + "list_lfp_stores" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec new file mode 100644 index 000000000000..9d9056123bfd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/lfp/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-lfp-v1beta" + gem.version = Google::Shopping::Merchant::Lfp::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-lfp-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb new file mode 100644 index 000000000000..3f6901699442 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/shopping/merchant/lfp/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb new file mode 100644 index 000000000000..4a08d15ef8b6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service" +require "google/shopping/merchant/lfp/v1beta/version" + +module Google + module Shopping + module Merchant + module Lfp + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1beta" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1beta" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/lfp/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb new file mode 100644 index 000000000000..dd19348e914c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + module LfpInventoryService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_inventory_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb new file mode 100644 index 000000000000..f47e3e3bbc8e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb @@ -0,0 +1,439 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + ## + # Client for the LfpInventoryService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_inventory_service_stub + + ## + # Configure the LfpInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpInventoryService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpInventoryService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @lfp_inventory_service_stub.universe_domain + end + + ## + # Create a new LfpInventoryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpInventoryService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @lfp_inventory_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + end + + # Service calls + + ## + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + # + # @overload insert_lfp_inventory(request, options = nil) + # Pass arguments to `insert_lfp_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) + # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory, ::Hash] + # Required. The inventory to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new + # + # # Call the insert_lfp_inventory method. + # result = client.insert_lfp_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. + # p result + # + def insert_lfp_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_inventory_service_stub.call_rpc :insert_lfp_inventory, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpInventoryService API. + # + # This class represents the configuration for LfpInventoryService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_lfp_inventory to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the LfpInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_lfp_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_inventory + + # @private + def initialize parent_rpcs = nil + insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory + @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb new file mode 100644 index 000000000000..c65dcf4dc629 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + # Credentials for the LfpInventoryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb new file mode 100644 index 000000000000..f76ace026e35 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + # Path helper methods for the LfpInventoryService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified LfpInventory resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` + # + # @param account [String] + # @param target_merchant [String] + # @param store_code [String] + # @param offer [String] + # + # @return [::String] + def lfp_inventory_path account:, target_merchant:, store_code:, offer: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" + raise ::ArgumentError, "store_code cannot contain /" if store_code.to_s.include? "/" + + "accounts/#{account}/lfpInventories/#{target_merchant}~#{store_code}~#{offer}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb new file mode 100644 index 000000000000..1bfbde4d0c29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + module LfpInventoryService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb new file mode 100644 index 000000000000..3ec94b2563f3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb @@ -0,0 +1,406 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + module Rest + ## + # REST client for the LfpInventoryService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_inventory_service_stub + + ## + # Configure the LfpInventoryService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpInventoryService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpInventoryService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @lfp_inventory_service_stub.universe_domain + end + + ## + # Create a new LfpInventoryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpInventoryService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @lfp_inventory_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + end + + # Service calls + + ## + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + # + # @overload insert_lfp_inventory(request, options = nil) + # Pass arguments to `insert_lfp_inventory` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) + # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory, ::Hash] + # Required. The inventory to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new + # + # # Call the insert_lfp_inventory method. + # result = client.insert_lfp_inventory request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. + # p result + # + def insert_lfp_inventory request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_inventory_service_stub.insert_lfp_inventory request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpInventoryService REST API. + # + # This class represents the configuration for LfpInventoryService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_lfp_inventory to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_inventory.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the LfpInventoryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_lfp_inventory` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_inventory + + # @private + def initialize parent_rpcs = nil + insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory + @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb new file mode 100644 index 000000000000..1e703ffbd423 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + module Rest + ## + # REST service stub for the LfpInventoryService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the insert_lfp_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # A result object deserialized from the server's reply + def insert_lfp_inventory request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_inventory_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_lfp_inventory REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_inventory_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1beta/{parent}/lfpInventories:insert", + body: "lfp_inventory", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb new file mode 100644 index 000000000000..1d564b85fdc3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/client" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new + # + module LfpSaleService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_sale_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb new file mode 100644 index 000000000000..60530f7cde49 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb @@ -0,0 +1,437 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + ## + # Client for the LfpSaleService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_sale_service_stub + + ## + # Configure the LfpSaleService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpSaleService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpSaleService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @lfp_sale_service_stub.universe_domain + end + + ## + # Create a new LfpSaleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpSaleService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/shopping/merchant/lfp/v1beta/lfpsale_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @lfp_sale_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + end + + # Service calls + + ## + # Inserts a `LfpSale` for the given merchant. + # + # @overload insert_lfp_sale(request, options = nil) + # Pass arguments to `insert_lfp_sale` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) + # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale, ::Hash] + # Required. The sale to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new + # + # # Call the insert_lfp_sale method. + # result = client.insert_lfp_sale request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. + # p result + # + def insert_lfp_sale request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_lfp_sale.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_sale.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_sale_service_stub.call_rpc :insert_lfp_sale, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpSaleService API. + # + # This class represents the configuration for LfpSaleService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_lfp_sale to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the LfpSaleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_lfp_sale` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_sale + + # @private + def initialize parent_rpcs = nil + insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale + @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb new file mode 100644 index 000000000000..003e33388e6f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + # Credentials for the LfpSaleService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb new file mode 100644 index 000000000000..39dab5a49ede --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + # Path helper methods for the LfpSaleService API. + module Paths + ## + # Create a fully-qualified LfpSale resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpSales/{sale}` + # + # @param account [String] + # @param sale [String] + # + # @return [::String] + def lfp_sale_path account:, sale: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/lfpSales/#{sale}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb new file mode 100644 index 000000000000..a951dd3591ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new + # + module LfpSaleService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb new file mode 100644 index 000000000000..43ccf822d585 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb @@ -0,0 +1,404 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + module Rest + ## + # REST client for the LfpSaleService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_sale_service_stub + + ## + # Configure the LfpSaleService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpSaleService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpSaleService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @lfp_sale_service_stub.universe_domain + end + + ## + # Create a new LfpSaleService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpSaleService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @lfp_sale_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + end + + # Service calls + + ## + # Inserts a `LfpSale` for the given merchant. + # + # @overload insert_lfp_sale(request, options = nil) + # Pass arguments to `insert_lfp_sale` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) + # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale, ::Hash] + # Required. The sale to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new + # + # # Call the insert_lfp_sale method. + # result = client.insert_lfp_sale request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. + # p result + # + def insert_lfp_sale request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_lfp_sale.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_sale.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_sale_service_stub.insert_lfp_sale request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpSaleService REST API. + # + # This class represents the configuration for LfpSaleService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # insert_lfp_sale to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_lfp_sale.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the LfpSaleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_lfp_sale` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_sale + + # @private + def initialize parent_rpcs = nil + insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale + @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb new file mode 100644 index 000000000000..e227102d07a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + module Rest + ## + # REST service stub for the LfpSaleService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the insert_lfp_sale REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # A result object deserialized from the server's reply + def insert_lfp_sale request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_sale_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_lfp_sale REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_sale_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1beta/{parent}/lfpSales:insert", + body: "lfp_sale", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb new file mode 100644 index 000000000000..4d063abe878c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/client" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_store_service" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + module LfpStoreService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp_store_service", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb new file mode 100644 index 000000000000..c26afe89879f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb @@ -0,0 +1,741 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + ## + # Client for the LfpStoreService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_store_service_stub + + ## + # Configure the LfpStoreService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpStoreService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpStoreService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @lfp_store_service_stub.universe_domain + end + + ## + # Create a new LfpStoreService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpStoreService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/shopping/merchant/lfp/v1beta/lfpstore_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @lfp_store_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + end + + # Service calls + + ## + # Retrieves information about a store. + # + # @overload get_lfp_store(request, options = nil) + # Pass arguments to `get_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lfp_store(name: nil) + # Pass arguments to `get_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new + # + # # Call the get_lfp_store method. + # result = client.get_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p result + # + def get_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :get_lfp_store, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + # + # @overload insert_lfp_store(request, options = nil) + # Pass arguments to `insert_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload insert_lfp_store(parent: nil, lfp_store: nil) + # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore, ::Hash] + # Required. The store to insert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new + # + # # Call the insert_lfp_store method. + # result = client.insert_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p result + # + def insert_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.insert_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :insert_lfp_store, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a store for a target merchant. + # + # @overload delete_lfp_store(request, options = nil) + # Pass arguments to `delete_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_lfp_store(name: nil) + # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new + # + # # Call the delete_lfp_store method. + # result = client.delete_lfp_store request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_lfp_store.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :delete_lfp_store, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + # + # @overload list_lfp_stores(request, options = nil) + # Pass arguments to `list_lfp_stores` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @param target_account [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new + # + # # Call the list_lfp_stores method. + # result = client.list_lfp_stores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p item + # end + # + def list_lfp_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_lfp_stores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lfp_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.call_rpc :list_lfp_stores, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpStoreService API. + # + # This class represents the configuration for LfpStoreService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the LfpStoreService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_store + ## + # RPC-specific configuration for `insert_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_store + ## + # RPC-specific configuration for `delete_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lfp_store + ## + # RPC-specific configuration for `list_lfp_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lfp_stores + + # @private + def initialize parent_rpcs = nil + get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store + @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config + insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store + @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config + delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store + @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config + list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores + @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb new file mode 100644 index 000000000000..537bef4e2fa4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + # Credentials for the LfpStoreService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb new file mode 100644 index 000000000000..eccaaaef2cbc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + # Path helper methods for the LfpStoreService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified LfpStore resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # + # @param account [String] + # @param target_merchant [String] + # @param store_code [String] + # + # @return [::String] + def lfp_store_path account:, target_merchant:, store_code: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" + + "accounts/#{account}/lfpStores/#{target_merchant}~#{store_code}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb new file mode 100644 index 000000000000..53a918964596 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/lfp/v1beta/version" + +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/paths" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + ## + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + module LfpStoreService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb new file mode 100644 index 000000000000..5c23d60663d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb @@ -0,0 +1,687 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + module Rest + ## + # REST client for the LfpStoreService service. + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lfp_store_service_stub + + ## + # Configure the LfpStoreService Client class. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LfpStoreService clients + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LfpStoreService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @lfp_store_service_stub.universe_domain + end + + ## + # Create a new LfpStoreService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LfpStoreService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @lfp_store_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + end + + # Service calls + + ## + # Retrieves information about a store. + # + # @overload get_lfp_store(request, options = nil) + # Pass arguments to `get_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lfp_store(name: nil) + # Pass arguments to `get_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new + # + # # Call the get_lfp_store method. + # result = client.get_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p result + # + def get_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.get_lfp_store request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + # + # @overload insert_lfp_store(request, options = nil) + # Pass arguments to `insert_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload insert_lfp_store(parent: nil, lfp_store: nil) + # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore, ::Hash] + # Required. The store to insert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new + # + # # Call the insert_lfp_store method. + # result = client.insert_lfp_store request + # + # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p result + # + def insert_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.insert_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.insert_lfp_store request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a store for a target merchant. + # + # @overload delete_lfp_store(request, options = nil) + # Pass arguments to `delete_lfp_store` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_lfp_store(name: nil) + # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new + # + # # Call the delete_lfp_store method. + # result = client.delete_lfp_store request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_lfp_store request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_lfp_store.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_lfp_store.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lfp_store.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.delete_lfp_store request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + # + # @overload list_lfp_stores(request, options = nil) + # Pass arguments to `list_lfp_stores` via a request object, either of type + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @param target_account [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @param page_size [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/lfp/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new + # + # # Call the list_lfp_stores method. + # result = client.list_lfp_stores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + # p item + # end + # + def list_lfp_stores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_lfp_stores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lfp_stores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lfp_store_service_stub.list_lfp_stores request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, "lfp_stores", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LfpStoreService REST API. + # + # This class represents the configuration for LfpStoreService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_lfp_store to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_lfp_store.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the LfpStoreService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lfp_store + ## + # RPC-specific configuration for `insert_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_lfp_store + ## + # RPC-specific configuration for `delete_lfp_store` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lfp_store + ## + # RPC-specific configuration for `list_lfp_stores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lfp_stores + + # @private + def initialize parent_rpcs = nil + get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store + @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config + insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store + @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config + delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store + @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config + list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores + @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb new file mode 100644 index 000000000000..ae689af6b895 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb @@ -0,0 +1,308 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + module Rest + ## + # REST service stub for the LfpStoreService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the get_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # A result object deserialized from the server's reply + def get_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_store_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the insert_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # A result object deserialized from the server's reply + def insert_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_store_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_lfp_store request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lfp_store_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_lfp_stores REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse] + # A result object deserialized from the server's reply + def list_lfp_stores request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lfp_stores_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_insert_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/lfp/v1beta/{parent}/lfpStores:insert", + body: "lfp_store", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lfp_store REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_lfp_store_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/lfp/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lfp_stores REST call + # + # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_lfp_stores_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/lfp/v1beta/{parent}/lfpStores", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb new file mode 100644 index 000000000000..5d95749dccc4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1beta/lfpinventory.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n6google/shopping/merchant/lfp/v1beta/lfpinventory.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa2\x05\n\x0cLfpInventory\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x19\n\x0c\x61vailability\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x08quantity\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x38\n\x0f\x63ollection_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x1f\n\rpickup_method\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1c\n\npickup_sla\x18\r \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0e \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:\x95\x01\xea\x41\x91\x01\n\'merchantapi.googleapis.com/LfpInventory\x12Haccounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}*\x0elfpInventories2\x0clfpInventoryB\x07\n\x05_gtinB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\r\n\x0b_feed_label\"\xab\x01\n\x19InsertLfpInventoryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'merchantapi.googleapis.com/LfpInventory\x12M\n\rlfp_inventory\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.lfp.v1beta.LfpInventoryB\x03\xe0\x41\x02\x32\xb6\x02\n\x13LfpInventoryService\x12\xd5\x01\n\x12InsertLfpInventory\x12>.google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest\x1a\x31.google.shopping.merchant.lfp.v1beta.LfpInventory\"L\x82\xd3\xe4\x93\x02\x46\"5/lfp/v1beta/{parent=accounts/*}/lfpInventories:insert:\rlfp_inventory\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xba\x01\n\'com.google.shopping.merchant.lfp.v1betaB\x11LfpInventoryProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + LfpInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpInventory").msgclass + InsertLfpInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb new file mode 100644 index 000000000000..9395c7140c6d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1beta/lfpinventory.proto for package 'google.shopping.merchant.lfp.v1beta' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/lfp/v1beta/lfpinventory_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpInventoryService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpInventoryService' + + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory + # automatically expires after 30 days. + rpc :InsertLfpInventory, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb new file mode 100644 index 000000000000..775eb3d1da5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1beta/lfpsale.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n1google/shopping/merchant/lfp/v1beta/lfpsale.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xe8\x03\n\x07LfpSale\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08offer_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\t \x01(\x03\x42\x03\xe0\x41\x02\x12\x32\n\tsale_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x1d\n\x03uid\x18\x0b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01H\x00\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01:^\xea\x41[\n\"merchantapi.googleapis.com/LfpSale\x12\"accounts/{account}/lfpSales/{sale}*\x08lfpSales2\x07lfpSaleB\x06\n\x04_uidB\r\n\x0b_feed_label\"p\n\x14InsertLfpSaleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x08lfp_sale\x18\x02 \x01(\x0b\x32,.google.shopping.merchant.lfp.v1beta.LfpSaleB\x03\xe0\x41\x02\x32\x97\x02\n\x0eLfpSaleService\x12\xbb\x01\n\rInsertLfpSale\x12\x39.google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest\x1a,.google.shopping.merchant.lfp.v1beta.LfpSale\"A\x82\xd3\xe4\x93\x02;\"//lfp/v1beta/{parent=accounts/*}/lfpSales:insert:\x08lfp_sale\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentBz\n\'com.google.shopping.merchant.lfp.v1betaB\x0cLfpSaleProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + LfpSale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpSale").msgclass + InsertLfpSaleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb new file mode 100644 index 000000000000..91e55d7ac5ce --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1beta/lfpsale.proto for package 'google.shopping.merchant.lfp.v1beta' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/lfp/v1beta/lfpsale_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpSaleService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpSaleService' + + # Inserts a `LfpSale` for the given merchant. + rpc :InsertLfpSale, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb new file mode 100644 index 000000000000..36683530fca2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/lfp/v1beta/lfpstore.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n2google/shopping/merchant/lfp/v1beta/lfpstore.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe6\x05\n\x08LfpStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\rstore_address\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nstore_name\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1e\n\x0cphone_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bwebsite_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1a\n\rgcid_category\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\x08place_id\x18\t \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12`\n\x0ematching_state\x18\n \x01(\x0e\x32@.google.shopping.merchant.lfp.v1beta.LfpStore.StoreMatchingStateB\x06\xe0\x41\x01\xe0\x41\x03\x12(\n\x13matching_state_hint\x18\x0b \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\x04\x88\x01\x01\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02:z\xea\x41w\n#merchantapi.googleapis.com/LfpStore\x12;accounts/{account}/lfpStores/{target_merchant}~{store_code}*\tlfpStores2\x08lfpStoreB\r\n\x0b_store_nameB\x0f\n\r_phone_numberB\x0e\n\x0c_website_uriB\x0b\n\t_place_idB\x16\n\x14_matching_state_hint\"O\n\x12GetLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\x9b\x01\n\x15InsertLfpStoreRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x45\n\tlfp_store\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.lfp.v1beta.LfpStoreB\x03\xe0\x41\x02\"R\n\x15\x44\x65leteLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\xa1\x01\n\x14ListLfpStoresRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"s\n\x15ListLfpStoresResponse\x12\x41\n\nlfp_stores\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.lfp.v1beta.LfpStore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xc8\x06\n\x0fLfpStoreService\x12\xaf\x01\n\x0bGetLfpStore\x12\x37.google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest\x1a-.google.shopping.merchant.lfp.v1beta.LfpStore\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/lfp/v1beta/{name=accounts/*/lfpStores/*}\x12\xd3\x01\n\x0eInsertLfpStore\x12:.google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest\x1a-.google.shopping.merchant.lfp.v1beta.LfpStore\"V\xda\x41\x10parent,lfp_store\x82\xd3\xe4\x93\x02=\"0/lfp/v1beta/{parent=accounts/*}/lfpStores:insert:\tlfp_store\x12\x9e\x01\n\x0e\x44\x65leteLfpStore\x12:.google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest\x1a\x16.google.protobuf.Empty\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/lfp/v1beta/{name=accounts/*/lfpStores/*}\x12\xc2\x01\n\rListLfpStores\x12\x39.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest\x1a:.google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/lfp/v1beta/{parent=accounts/*}/lfpStores\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB{\n\'com.google.shopping.merchant.lfp.v1betaB\rLfpStoreProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + LfpStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpStore").msgclass + LfpStore::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpStore.StoreMatchingState").enummodule + GetLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest").msgclass + InsertLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest").msgclass + DeleteLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest").msgclass + ListLfpStoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest").msgclass + ListLfpStoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb new file mode 100644 index 000000000000..e3e7e2fc411a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/lfp/v1beta/lfpstore.proto for package 'google.shopping.merchant.lfp.v1beta' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/lfp/v1beta/lfpstore_pb' + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + module LfpStoreService + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpStoreService' + + # Retrieves information about a store. + rpc :GetLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore + # Inserts a store for the target merchant. If the store with the same store + # code already exists, it will be replaced. + rpc :InsertLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore + # Deletes a store for a target merchant. + rpc :DeleteLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Google::Protobuf::Empty + # Lists the stores of the target merchant, specified by the filter in + # `ListLfpStoresRequest`. + rpc :ListLfpStores, ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb new file mode 100644 index 000000000000..c092e4264418 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" +require "google/shopping/merchant/lfp/v1beta/version" + +module Google + module Shopping + module Merchant + module Lfp + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/lfp/v1beta/rest" + # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb new file mode 100644 index 000000000000..7b4a98b85f6f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..e0b26a33b4b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..b03587481349 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..d558fed6cef1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..38b4b61e6061 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..935946d52792 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..b5731a824060 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..8c6b19d52e3d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..4ac9c4801a3f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb new file mode 100644 index 000000000000..a6af22574258 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + # Local Inventory for the merchant. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name for the `LfpInventory` resource. + # Format: + # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center ID of the merchant to submit the inventory + # for. + # @!attribute [rw] store_code + # @return [::String] + # Required. The identifier of the merchant's store. Either the store code + # inserted through `InsertLfpStore` or the store code in the Business + # Profile. + # @!attribute [rw] offer_id + # @return [::String] + # Required. Immutable. A unique identifier for the product. If both + # inventories and sales are submitted for a merchant, this id should match + # for the same product. + # + # **Note**: if the merchant sells the same product new and used, they should + # have different IDs. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country where the product is sold. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter ISO 639-1 language code for the item. + # @!attribute [rw] gtin + # @return [::String] + # Optional. The Global Trade Item Number of the product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Optional. The current price of the product. + # @!attribute [rw] availability + # @return [::String] + # Required. Availability of the product at this store. + # For accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342) + # @!attribute [rw] quantity + # @return [::Integer] + # Optional. Quantity of the product available at this store. Must be greater + # than or equal to zero. + # @!attribute [rw] collection_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time when the inventory is collected. If not set, it will be + # set to the time when the inventory is submitted. + # @!attribute [rw] pickup_method + # @return [::String] + # Optional. Supported pickup method for this offer. Unless the value is "not + # supported", this field must be submitted together with `pickupSla`. For + # accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] pickup_sla + # @return [::String] + # Optional. Expected date that an order will be ready for pickup relative to + # the order date. Must be submitted together with `pickupMethod`. For + # accepted attribute values, see the [local product inventory data + # specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] feed_label + # @return [::String] + # Optional. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the product. If this is not set, it will default to `regionCode`. + class LfpInventory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertLfpInventory` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account. + # Format: `accounts/{account}` + # @!attribute [rw] lfp_inventory + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] + # Required. The inventory to insert. + class InsertLfpInventoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb new file mode 100644 index 000000000000..e6c00478c936 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + # A sale for the merchant. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the `LfpSale` resource. + # Format: + # `accounts/{account}/lfpSales/{sale}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center ID of the merchant to submit the sale for. + # @!attribute [rw] store_code + # @return [::String] + # Required. The identifier of the merchant's store. Either a `storeCode` + # inserted through the API or the code of the store in the Business Profile. + # @!attribute [rw] offer_id + # @return [::String] + # Required. A unique identifier for the product. If both inventories and + # sales are submitted for a merchant, this id should match for the same + # product. + # + # **Note**: if the merchant sells the same product new and used, they should + # have different IDs. + # @!attribute [rw] region_code + # @return [::String] + # Required. The [CLDR territory + # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) + # for the country where the product is sold. + # @!attribute [rw] content_language + # @return [::String] + # Required. The two-letter ISO 639-1 language code for the item. + # @!attribute [rw] gtin + # @return [::String] + # Required. The Global Trade Item Number of the sold product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Required. The unit price of the product. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The relative change of the available quantity. Negative for items + # returned. + # @!attribute [rw] sale_time + # @return [::Google::Protobuf::Timestamp] + # Required. The timestamp for the sale. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the `LfpSale`. + # @!attribute [rw] feed_label + # @return [::String] + # Optional. The [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the product. If this is not set, it will default to `regionCode`. + class LfpSale + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertLfpSale method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account. + # Format: `accounts/{lfp_partner}` + # @!attribute [rw] lfp_sale + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] + # Required. The sale to insert. + class InsertLfpSaleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb new file mode 100644 index 000000000000..927293d9510b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + module V1beta + # A store for the merchant. This will be used to match to a store under the + # Google Business Profile of the target merchant. If a matching store can't be + # found, the inventories or sales submitted with the store code will not be + # used. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the `LfpStore` resource. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center id of the merchant to submit the store for. + # @!attribute [rw] store_code + # @return [::String] + # Required. Immutable. A store identifier that is unique for the target + # merchant. + # @!attribute [rw] store_address + # @return [::String] + # Required. The street address of the store. + # Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA. + # @!attribute [rw] store_name + # @return [::String] + # Optional. The merchant or store name. + # @!attribute [rw] phone_number + # @return [::String] + # Optional. The store phone number in + # [E.164](https://en.wikipedia.org/wiki/E.164) format. Example: + # `+15556767888` + # @!attribute [rw] website_uri + # @return [::String] + # Optional. The website URL for the store or merchant. + # @!attribute [rw] gcid_category + # @return [::Array<::String>] + # Optional. [Google My Business category + # id](https://gcid-explorer.corp.google.com/static/gcid.html). + # @!attribute [rw] place_id + # @return [::String] + # Optional. The [Google Place + # Id](https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview) + # of the store location. + # @!attribute [r] matching_state + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore::StoreMatchingState] + # Optional. Output only. The state of matching to a Google Business Profile. + # See + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStore#matching_state_hint matchingStateHint} + # for further details if no match is found. + # @!attribute [r] matching_state_hint + # @return [::String] + # Optional. Output only. The hint of why the matching has failed. This is + # only set when + # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStore#matching_state matchingState}=`STORE_MATCHING_STATE_FAILED`. + # + # Possible values are: + # + # - "`linked-store-not-found`": There aren't any Google Business + # Profile stores available for matching. + # - "`store-match-not-found`": The provided `LfpStore` couldn't be matched to + # any of the connected Google Business Profile stores. Merchant Center + # account is connected correctly and stores are available on Google Business + # Profile, but the `LfpStore` location address does not match with Google + # Business Profile stores' addresses. Update the `LfpStore` address or Google + # Business Profile store address to match correctly. + # - "`store-match-unverified`": The provided `LfpStore` couldn't be matched + # to any of the connected Google Business Profile stores, as the matched + # Google Business Profile store is unverified. Go through the Google Business + # Profile verification process to match correctly. + class LfpStore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of matching `LfpStore` to a Google Business Profile. + module StoreMatchingState + # Store matching state unspecified. + STORE_MATCHING_STATE_UNSPECIFIED = 0 + + # The `LfpStore` is successfully matched with a Google Business Profile + # store. + STORE_MATCHING_STATE_MATCHED = 1 + + # The `LfpStore` is not matched with a Google Business Profile store. + STORE_MATCHING_STATE_FAILED = 2 + end + end + + # Request message for the `GetLfpStore` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the store to retrieve. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + class GetLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertLfpStore method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP provider account + # Format: `accounts/{account}` + # @!attribute [rw] lfp_store + # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] + # Required. The store to insert. + class InsertLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteLfpStore method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` + class DeleteLfpStoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListLfpStores method. + # @!attribute [rw] parent + # @return [::String] + # Required. The LFP partner. + # Format: `accounts/{account}` + # @!attribute [rw] target_account + # @return [::Integer] + # Required. The Merchant Center id of the merchant to list stores for. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of `LfpStore` resources for the given account + # to return. The service returns fewer than this value if the number of + # stores for the given account is less than the `pageSize`. The default value + # is 250. The maximum value is 1000; If a value higher than the maximum is + # specified, then the `pageSize` will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListLfpStoresRequest` + # call. Provide the page token to retrieve the subsequent page. When + # paginating, all other parameters provided to `ListLfpStoresRequest` must + # match the call that provided the page token. The token returned as + # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} + # in the response to the previous request. + class ListLfpStoresRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListLfpStores method. + # @!attribute [rw] lfp_stores + # @return [::Array<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] + # The stores from the specified merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `pageToken` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListLfpStoresResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..7c4fd780655b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + 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 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 + # 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 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..59691d8f906c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-shopping-merchant-lfp-v1beta", path: "../" +else + gem "google-shopping-merchant-lfp-v1beta" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb new file mode 100644 index 000000000000..46400ecc1e72 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the insert_lfp_inventory call in the LfpInventoryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory. +# +def insert_lfp_inventory + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new + + # Call the insert_lfp_inventory method. + result = client.insert_lfp_inventory request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. + p result +end +# [END merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb new file mode 100644 index 000000000000..3ba60858f37a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the insert_lfp_sale call in the LfpSaleService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale. +# +def insert_lfp_sale + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new + + # Call the insert_lfp_sale method. + result = client.insert_lfp_sale request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. + p result +end +# [END merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb new file mode 100644 index 000000000000..cb33a80b368a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the delete_lfp_store call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store. +# +def delete_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new + + # Call the delete_lfp_store method. + result = client.delete_lfp_store request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb new file mode 100644 index 000000000000..f0397620d007 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the get_lfp_store call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store. +# +def get_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new + + # Call the get_lfp_store method. + result = client.get_lfp_store request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + p result +end +# [END merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb new file mode 100644 index 000000000000..f5170c9aeb4f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the insert_lfp_store call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store. +# +def insert_lfp_store + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new + + # Call the insert_lfp_store method. + result = client.insert_lfp_store request + + # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + p result +end +# [END merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb new file mode 100644 index 000000000000..614c32536657 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync] +require "google/shopping/merchant/lfp/v1beta" + +## +# Snippet for the list_lfp_stores call in the LfpStoreService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores. +# +def list_lfp_stores + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new + + # Call the list_lfp_stores method. + result = client.list_lfp_stores request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. + p item + end +end +# [END merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json new file mode 100644 index 000000000000..81867a4ac716 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-shopping-merchant-lfp-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.lfp.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync", + "title": "Snippet for the insert_lfp_inventory call in the LfpInventoryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory.", + "file": "lfp_inventory_service/insert_lfp_inventory.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_inventory", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory", + "client": { + "short_name": "LfpInventoryService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client" + }, + "method": { + "short_name": "InsertLfpInventory", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpInventoryService.InsertLfpInventory", + "service": { + "short_name": "LfpInventoryService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpInventoryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync", + "title": "Snippet for the insert_lfp_sale call in the LfpSaleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale.", + "file": "lfp_sale_service/insert_lfp_sale.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_sale", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSale", + "client": { + "short_name": "LfpSaleService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client" + }, + "method": { + "short_name": "InsertLfpSale", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpSaleService.InsertLfpSale", + "service": { + "short_name": "LfpSaleService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpSaleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync", + "title": "Snippet for the get_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store.", + "file": "lfp_store_service/get_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStore", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" + }, + "method": { + "short_name": "GetLfpStore", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.GetLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync", + "title": "Snippet for the insert_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store.", + "file": "lfp_store_service/insert_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStore", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" + }, + "method": { + "short_name": "InsertLfpStore", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.InsertLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync", + "title": "Snippet for the delete_lfp_store call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store.", + "file": "lfp_store_service/delete_lfp_store.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lfp_store", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" + }, + "method": { + "short_name": "DeleteLfpStore", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.DeleteLfpStore", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync", + "title": "Snippet for the list_lfp_stores call in the LfpStoreService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores.", + "file": "lfp_store_service/list_lfp_stores.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lfp_stores", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse", + "client": { + "short_name": "LfpStoreService::Client", + "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" + }, + "method": { + "short_name": "ListLfpStores", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.ListLfpStores", + "service": { + "short_name": "LfpStoreService", + "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb new file mode 100644 index 000000000000..546a67b3338b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_lfp_inventory_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_inventory_path account: "value0", target_merchant: "value1", store_code: "value2", offer: "value3" + assert_equal "accounts/value0/lfpInventories/value1~value2~value3", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb new file mode 100644 index 000000000000..2b509848be47 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb @@ -0,0 +1,146 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_insert_lfp_inventory + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_inventory = {} + + insert_lfp_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ServiceStub.stub :transcode_insert_lfp_inventory_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_inventory_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb new file mode 100644 index 000000000000..959e64306b92 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb @@ -0,0 +1,136 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" +require "google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_insert_lfp_inventory + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_inventory = {} + + insert_lfp_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_inventory, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory), request["lfp_inventory"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_inventory_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_inventory_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb new file mode 100644 index 000000000000..adf95b8edb6b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_lfp_sale_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_sale_path account: "value0", sale: "value1" + assert_equal "accounts/value0/lfpSales/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb new file mode 100644 index 000000000000..05340ee25079 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb @@ -0,0 +1,146 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_insert_lfp_sale + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_sale = {} + + insert_lfp_sale_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ServiceStub.stub :transcode_insert_lfp_sale_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_sale_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_sale_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb new file mode 100644 index 000000000000..d213abb9b87f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb @@ -0,0 +1,136 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" +require "google/shopping/merchant/lfp/v1beta/lfpsale_services_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_insert_lfp_sale + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_sale = {} + + insert_lfp_sale_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_sale, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale), request["lfp_sale"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_sale_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_sale_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb new file mode 100644 index 000000000000..734121ff45ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1beta/lfp_store_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_lfp_store_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lfp_store_path account: "value0", target_merchant: "value1", store_code: "value2" + assert_equal "accounts/value0/lfpStores/value1~value2", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb new file mode 100644 index 000000000000..69be3efc6f75 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb @@ -0,0 +1,311 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" + + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_get_lfp_store + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_get_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lfp_store_client_stub.call_count + end + end + end + + def test_insert_lfp_store + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_store = {} + + insert_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_insert_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_lfp_store_client_stub.call_count + end + end + end + + def test_delete_lfp_store + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_delete_lfp_store_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lfp_store_client_stub.call_count + end + end + end + + def test_list_lfp_stores + # Create test objects. + client_result = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + target_account = 42 + page_size = 42 + page_token = "hello world" + + list_lfp_stores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_list_lfp_stores_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lfp_stores_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lfp_stores ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_lfp_stores(::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_lfp_stores_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb new file mode 100644 index 000000000000..d18056af085b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" +require "google/shopping/merchant/lfp/v1beta/lfpstore_services_pb" +require "google/shopping/merchant/lfp/v1beta/lfp_store_service" + +class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_get_lfp_store + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lfp_store({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_lfp_store_client_stub.call_rpc_count + end + end + + def test_insert_lfp_store + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lfp_store = {} + + insert_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore), request["lfp_store"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.insert_lfp_store parent: parent, lfp_store: lfp_store do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, insert_lfp_store_client_stub.call_rpc_count + end + end + + def test_delete_lfp_store + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lfp_store, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lfp_store_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_lfp_store({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_lfp_store_client_stub.call_rpc_count + end + end + + def test_list_lfp_stores + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + target_account = 42 + page_size = 42 + page_token = "hello world" + + list_lfp_stores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lfp_stores, name + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["target_account"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lfp_stores_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_lfp_stores ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_lfp_stores(::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_lfp_stores_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.gitignore b/owl-bot-staging/google-shopping-merchant-lfp/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-lfp/.repo-metadata.json new file mode 100644 index 000000000000..b6866372ae63 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-lfp", + "distribution_name": "google-shopping-merchant-lfp", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant 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.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-lfp/.rubocop.yml new file mode 100644 index 000000000000..fd37400e16a5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-lfp.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-lfp.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.toys.rb b/owl-bot-staging/google-shopping-merchant-lfp/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.yardopts b/owl-bot-staging/google-shopping-merchant-lfp/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-lfp/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-lfp/AUTHENTICATION.md new file mode 100644 index 000000000000..fd05122fa57f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-lfp library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-lfp library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/lfp" + +client = Google::Shopping::Merchant::Lfp.lfp_inventory_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/lfp" + +Google::Shopping::Merchant::Lfp.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::Lfp.lfp_inventory_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-lfp +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/lfp" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::Lfp.lfp_inventory_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-lfp/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-lfp/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-lfp/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp/Gemfile new file mode 100644 index 000000000000..9284e71b5de8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/Gemfile @@ -0,0 +1,13 @@ +source "https://rubygems.org" + +gemspec + +gem "google-shopping-merchant-lfp-v1beta", path: "../google-shopping-merchant-lfp-v1beta" + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-lfp/LICENSE.md b/owl-bot-staging/google-shopping-merchant-lfp/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-lfp/README.md b/owl-bot-staging/google-shopping-merchant-lfp/README.md new file mode 100644 index 000000000000..e29a841945f9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/README.md @@ -0,0 +1,103 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center accounts. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-lfp-v*`. +The gem `google-shopping-merchant-lfp` is the main client library that brings the +verisoned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-lfp) +for this library, google-shopping-merchant-lfp, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-lfp-v1beta](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-lfp +``` + +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) + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-lfp`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-lfp-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-lfp`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-shopping-merchant-lfp-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-lfp/Rakefile b/owl-bot-staging/google-shopping-merchant-lfp/Rakefile new file mode 100644 index 000000000000..cc9a6397fd57 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-lfp acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" + ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-shopping-merchant-lfp gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-lfp gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-lfp gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-lfp gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-lfp" + header "google-shopping-merchant-lfp rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-lfp yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-lfp test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-lfp smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-lfp acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/google-shopping-merchant-lfp.gemspec b/owl-bot-staging/google-shopping-merchant-lfp/google-shopping-merchant-lfp.gemspec new file mode 100644 index 000000000000..d8360bf6a65c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/google-shopping-merchant-lfp.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/lfp/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-lfp" + gem.version = Google::Shopping::Merchant::Lfp::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-lfp-v1beta", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/lib/google-shopping-merchant-lfp.rb b/owl-bot-staging/google-shopping-merchant-lfp/lib/google-shopping-merchant-lfp.rb new file mode 100644 index 000000000000..2a758a338a8e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/lib/google-shopping-merchant-lfp.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/lfp" unless defined? Google::Shopping::Merchant::Lfp::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp.rb b/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp.rb new file mode 100644 index 000000000000..52548a62aecb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/lfp/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module Lfp + ## + # Create a new client object for LfpInventoryService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta/Google/Shopping/Merchant/Lfp/V1beta/LfpInventoryService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the LfpInventoryService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About LfpInventoryService + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # inventories for a merchant. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.lfp_inventory_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/lfp/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Lfp + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpInventoryService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for LfpSaleService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta/Google/Shopping/Merchant/Lfp/V1beta/LfpSaleService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the LfpSaleService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About LfpSaleService + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit sales + # data for a merchant. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.lfp_sale_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/lfp/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Lfp + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpSaleService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for LfpStoreService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta/Google/Shopping/Merchant/Lfp/V1beta/LfpStoreService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the LfpStoreService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About LfpStoreService + # + # Service for a [LFP + # partner](https://support.google.com/merchants/answer/7676652) to submit local + # stores for a merchant. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.lfp_store_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/lfp/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Lfp + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpStoreService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + end + end + end +end + +helper_path = ::File.join __dir__, "lfp", "helpers.rb" +require "google/shopping/merchant/lfp/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp/version.rb b/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp/version.rb new file mode 100644 index 000000000000..d8f98f0eade5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Lfp + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/client_test.rb b/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/client_test.rb new file mode 100644 index 000000000000..8f496e585abb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/client_test.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/lfp" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::Lfp::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_lfp_inventory_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Lfp.lfp_inventory_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client, client + end + end + + def test_lfp_inventory_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Lfp.lfp_inventory_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client, client + end + end + + def test_lfp_sale_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Lfp.lfp_sale_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client, client + end + end + + def test_lfp_sale_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Lfp.lfp_sale_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client, client + end + end + + def test_lfp_store_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Lfp.lfp_store_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client, client + end + end + + def test_lfp_store_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Lfp.lfp_store_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/version_test.rb b/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/version_test.rb new file mode 100644 index 000000000000..3a215a36b0b0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/lfp/version" + +class Google::Shopping::Merchant::Lfp::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::Lfp::VERSION + end +end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/test/helper.rb b/owl-bot-staging/google-shopping-merchant-lfp/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..f46b21050567 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta", + "distribution_name": "google-shopping-merchant-notifications-v1beta", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant V1BETA API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-notifications-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml new file mode 100644 index 000000000000..4befa09072a1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-notifications-v1beta.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-notifications-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Merchant V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..88d0015bde4b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-notifications-v1beta library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-notifications-v1beta library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/notifications/v1beta" + +client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/notifications/v1beta" + +::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-notifications-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/notifications/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile new file mode 100644 index 000000000000..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md new file mode 100644 index 000000000000..d6c61486344d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md @@ -0,0 +1,143 @@ +# Ruby Client for the Merchant V1BETA API + +Programmatically manage your Merchant Center accounts. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Merchant V1BETA API. Most users should consider using +the main client gem, +[google-shopping-merchant-notifications](https://rubygems.org/gems/google-shopping-merchant-notifications). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-notifications-v1beta +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/shopping/merchant/notifications/v1beta" + +client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new +request = ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new # (request fields as keyword arguments...) +response = client.get_notification_subscription request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta) +for class and method documentation. + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for general usage information. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +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 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-notifications`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-notifications-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-notifications`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-shopping-merchant-notifications-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile new file mode 100644 index 000000000000..6f562055276d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-notifications-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-shopping-merchant-notifications-v1beta gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-notifications-v1beta gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-notifications-v1beta gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-notifications-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-notifications-v1beta" + header "google-shopping-merchant-notifications-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-notifications-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-notifications-v1beta test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-notifications-v1beta smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-notifications-v1beta acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..bf7527d699f0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.notifications.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Notifications::V1beta", + "services": { + "NotificationsApiService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client", + "rpcs": { + "GetNotificationSubscription": { + "methods": [ + "get_notification_subscription" + ] + }, + "CreateNotificationSubscription": { + "methods": [ + "create_notification_subscription" + ] + }, + "UpdateNotificationSubscription": { + "methods": [ + "update_notification_subscription" + ] + }, + "DeleteNotificationSubscription": { + "methods": [ + "delete_notification_subscription" + ] + }, + "ListNotificationSubscriptions": { + "methods": [ + "list_notification_subscriptions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec new file mode 100644 index 000000000000..bf3485606a0e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/notifications/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-notifications-v1beta" + gem.version = Google::Shopping::Merchant::Notifications::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-notifications-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb new file mode 100644 index 000000000000..727153828c6e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/shopping/merchant/notifications/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb new file mode 100644 index 000000000000..35979f970759 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/notifications/v1beta/notifications_api_service" +require "google/shopping/merchant/notifications/v1beta/version" + +module Google + module Shopping + module Merchant + module Notifications + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/notifications/v1beta" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/notifications/v1beta" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/notifications/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb new file mode 100644 index 000000000000..a3178a18a6dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/notifications/v1beta/version" + +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/client" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + ## + # Service to manage notification subscriptions for merchants + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/notifications/v1beta/notifications_api_service" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + module NotificationsApiService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "notifications_api_service", "helpers.rb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb new file mode 100644 index 000000000000..16ff5bdffbd4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb @@ -0,0 +1,834 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + ## + # Client for the NotificationsApiService service. + # + # Service to manage notification subscriptions for merchants + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :notifications_api_service_stub + + ## + # Configure the NotificationsApiService Client class. + # + # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NotificationsApiService clients + # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Notifications", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NotificationsApiService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @notifications_api_service_stub.universe_domain + end + + ## + # Create a new NotificationsApiService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NotificationsApiService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @notifications_api_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + end + + # Service calls + + ## + # Gets notification subscriptions for an account. + # + # @overload get_notification_subscription(request, options = nil) + # Pass arguments to `get_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_notification_subscription(name: nil) + # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` of the notification subscription. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new + # + # # Call the get_notification_subscription method. + # result = client.get_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def get_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :get_notification_subscription, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification subscription for a merchant. We will allow the + # following types of notification subscriptions to exist together (per + # merchant as a subscriber per event type): + # 1. Subscription for all managed accounts + subscription for self + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self + # + # we will not allow (per merchant as a subscriber per event type): + # 1. multiple self subscriptions. + # 2. multiple "all managed accounts" subscriptions. + # 3. all and partial subscriptions at the same time. + # 4. multiple partial subscriptions for the same target account + # + # @overload create_notification_subscription(request, options = nil) + # Pass arguments to `create_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_notification_subscription(parent: nil, notification_subscription: nil) + # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] + # Required. The notification subscription to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new + # + # # Call the create_notification_subscription method. + # result = client.create_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def create_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :create_notification_subscription, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing notification subscription for a merchant. + # + # @overload update_notification_subscription(request, options = nil) + # Pass arguments to `update_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) + # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] + # Required. The new version of the notification subscription that should be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new + # + # # Call the update_notification_subscription method. + # result = client.update_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def update_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.notification_subscription&.name + header_params["notification_subscription.name"] = request.notification_subscription.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :update_notification_subscription, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification subscription for a merchant. + # + # @overload delete_notification_subscription(request, options = nil) + # Pass arguments to `delete_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_notification_subscription(name: nil) + # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the notification subscription to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new + # + # # Call the delete_notification_subscription method. + # result = client.delete_notification_subscription request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :delete_notification_subscription, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets all the notification subscriptions for a merchant. + # + # @overload list_notification_subscriptions(request, options = nil) + # Pass arguments to `list_notification_subscriptions` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @param page_token [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new + # + # # Call the list_notification_subscriptions method. + # result = client.list_notification_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p item + # end + # + def list_notification_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.call_rpc :list_notification_subscriptions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the NotificationsApiService API. + # + # This class represents the configuration for NotificationsApiService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_notification_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the NotificationsApiService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription + ## + # RPC-specific configuration for `create_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_subscription + ## + # RPC-specific configuration for `update_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_subscription + ## + # RPC-specific configuration for `delete_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_subscription + ## + # RPC-specific configuration for `list_notification_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_subscriptions + + # @private + def initialize parent_rpcs = nil + get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription + @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config + create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription + @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config + update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription + @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config + delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription + @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config + list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions + @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb new file mode 100644 index 000000000000..3036be3a1055 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + # Credentials for the NotificationsApiService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb new file mode 100644 index 000000000000..23462e286772 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + # Path helper methods for the NotificationsApiService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified NotificationSubscription resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # + # @param account [String] + # @param notification_subscription [String] + # + # @return [::String] + def notification_subscription_path account:, notification_subscription: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb new file mode 100644 index 000000000000..7ef900661cab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/shopping/merchant/notifications/v1beta/version" + +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + ## + # Service to manage notification subscriptions for merchants + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + module NotificationsApiService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb new file mode 100644 index 000000000000..32d916be83fb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb @@ -0,0 +1,773 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + module Rest + ## + # REST client for the NotificationsApiService service. + # + # Service to manage notification subscriptions for merchants + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :notifications_api_service_stub + + ## + # Configure the NotificationsApiService Client class. + # + # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NotificationsApiService clients + # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Notifications", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NotificationsApiService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @notifications_api_service_stub.universe_domain + end + + ## + # Create a new NotificationsApiService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NotificationsApiService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @notifications_api_service_stub = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + end + + # Service calls + + ## + # Gets notification subscriptions for an account. + # + # @overload get_notification_subscription(request, options = nil) + # Pass arguments to `get_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_notification_subscription(name: nil) + # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The `name` of the notification subscription. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new + # + # # Call the get_notification_subscription method. + # result = client.get_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def get_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.get_notification_subscription request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification subscription for a merchant. We will allow the + # following types of notification subscriptions to exist together (per + # merchant as a subscriber per event type): + # 1. Subscription for all managed accounts + subscription for self + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self + # + # we will not allow (per merchant as a subscriber per event type): + # 1. multiple self subscriptions. + # 2. multiple "all managed accounts" subscriptions. + # 3. all and partial subscriptions at the same time. + # 4. multiple partial subscriptions for the same target account + # + # @overload create_notification_subscription(request, options = nil) + # Pass arguments to `create_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_notification_subscription(parent: nil, notification_subscription: nil) + # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] + # Required. The notification subscription to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new + # + # # Call the create_notification_subscription method. + # result = client.create_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def create_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.create_notification_subscription request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing notification subscription for a merchant. + # + # @overload update_notification_subscription(request, options = nil) + # Pass arguments to `update_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) + # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] + # Required. The new version of the notification subscription that should be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new + # + # # Call the update_notification_subscription method. + # result = client.update_notification_subscription request + # + # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p result + # + def update_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.update_notification_subscription request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification subscription for a merchant. + # + # @overload delete_notification_subscription(request, options = nil) + # Pass arguments to `delete_notification_subscription` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_notification_subscription(name: nil) + # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the notification subscription to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new + # + # # Call the delete_notification_subscription method. + # result = client.delete_notification_subscription request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_notification_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_notification_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.delete_notification_subscription request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets all the notification subscriptions for a merchant. + # + # @overload list_notification_subscriptions(request, options = nil) + # Pass arguments to `list_notification_subscriptions` via a request object, either of type + # {::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @param page_token [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/notifications/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new + # + # # Call the list_notification_subscriptions method. + # result = client.list_notification_subscriptions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + # p item + # end + # + def list_notification_subscriptions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @notifications_api_service_stub.list_notification_subscriptions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, "notification_subscriptions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the NotificationsApiService REST API. + # + # This class represents the configuration for NotificationsApiService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_notification_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_notification_subscription.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the NotificationsApiService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_subscription + ## + # RPC-specific configuration for `create_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_subscription + ## + # RPC-specific configuration for `update_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_subscription + ## + # RPC-specific configuration for `delete_notification_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_subscription + ## + # RPC-specific configuration for `list_notification_subscriptions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_subscriptions + + # @private + def initialize parent_rpcs = nil + get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription + @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config + create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription + @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config + update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription + @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config + delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription + @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config + list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions + @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb new file mode 100644 index 000000000000..859e9e960fcf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb @@ -0,0 +1,368 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + module Rest + ## + # REST service stub for the NotificationsApiService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the get_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # A result object deserialized from the server's reply + def get_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # A result object deserialized from the server's reply + def create_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # A result object deserialized from the server's reply + def update_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_notification_subscription request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_subscription_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_notification_subscriptions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse] + # A result object deserialized from the server's reply + def list_notification_subscriptions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_subscriptions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the get_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions", + body: "notification_subscription", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/notifications/v1beta/{notification_subscription.name}", + body: "notification_subscription", + matches: [ + ["notification_subscription.name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_notification_subscription REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_notification_subscription_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/notifications/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_notification_subscriptions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_notification_subscriptions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb new file mode 100644 index 000000000000..38505a2fb408 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\nDgoogle/shopping/merchant/notifications/v1beta/notificationsapi.proto\x12-google.shopping.merchant.notifications.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"o\n\"GetNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\xe5\x01\n%CreateNotificationSubscriptionRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12o\n\x19notification_subscription\x18\x02 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\"\xc9\x01\n%UpdateNotificationSubscriptionRequest\x12o\n\x19notification_subscription\x18\x01 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"r\n%DeleteNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\x9a\x01\n$ListNotificationSubscriptionsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xad\x01\n%ListNotificationSubscriptionsResponse\x12k\n\x1anotification_subscriptions\x18\x01 \x03(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xea\x03\n\x18NotificationSubscription\x12\x1e\n\x14\x61ll_managed_accounts\x18\x03 \x01(\x08H\x00\x12\x18\n\x0etarget_account\x18\x04 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12w\n\x10registered_event\x18\x02 \x01(\x0e\x32].google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType\x12\x15\n\rcall_back_uri\x18\x05 \x01(\t\"[\n\x15NotificationEventType\x12\'\n#NOTIFICATION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15PRODUCT_STATUS_CHANGE\x10\x01:\x82\x01\xea\x41\x7f\n3merchantapi.googleapis.com/NotificationSubscription\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}B\x0f\n\rinterested_in\"\xf8\x01\n\rProductChange\x12\x16\n\told_value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnew_value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0bregion_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12[\n\x11reporting_context\x18\x04 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x03\x88\x01\x01\x42\x0c\n\n_old_valueB\x0c\n\n_new_valueB\x0e\n\x0c_region_codeB\x14\n\x12_reporting_context\"\xd6\x03\n\x1aProductStatusChangeMessage\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10managing_account\x18\x02 \x01(\tH\x01\x88\x01\x01\x12S\n\rresource_type\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.notifications.v1beta.ResourceH\x02\x88\x01\x01\x12P\n\tattribute\x18\x04 \x01(\x0e\x32\x38.google.shopping.merchant.notifications.v1beta.AttributeH\x03\x88\x01\x01\x12M\n\x07\x63hanges\x18\x05 \x03(\x0b\x32<.google.shopping.merchant.notifications.v1beta.ProductChange\x12\x18\n\x0bresource_id\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08resource\x18\x07 \x01(\tH\x05\x88\x01\x01\x42\n\n\x08_accountB\x13\n\x11_managing_accountB\x10\n\x0e_resource_typeB\x0c\n\n_attributeB\x0e\n\x0c_resource_idB\x0b\n\t_resource*1\n\x08Resource\x12\x18\n\x14RESOURCE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRODUCT\x10\x01*2\n\tAttribute\x12\x19\n\x15\x41TTRIBUTE_UNSPECIFIED\x10\x00\x12\n\n\x06STATUS\x10\x01\x32\xb5\x0c\n\x17NotificationsApiService\x12\x8d\x02\n\x1bGetNotificationSubscription\x12Q.google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xcb\x02\n\x1e\x43reateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\x89\x01\xda\x41 parent,notification_subscription\x82\xd3\xe4\x93\x02`\"C/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions:\x19notification_subscription\x12\xea\x02\n\x1eUpdateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\xa8\x01\xda\x41%notification_subscription,update_mask\x82\xd3\xe4\x93\x02z2]/notifications/v1beta/{notification_subscription.name=accounts/*/notificationsubscriptions/*}:\x19notification_subscription\x12\xe2\x01\n\x1e\x44\x65leteNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xa0\x02\n\x1dListNotificationSubscriptions\x12S.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest\x1aT.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe6\x01\n1com.google.shopping.merchant.notifications.v1betaB\x15NotificationsApiProtoP\x01Z]cloud.google.com/go/shopping/merchant/notifications/apiv1beta/notificationspb;notificationspb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + GetNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest").msgclass + CreateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest").msgclass + UpdateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest").msgclass + DeleteNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest").msgclass + ListNotificationSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest").msgclass + ListNotificationSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse").msgclass + NotificationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription").msgclass + NotificationSubscription::NotificationEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType").enummodule + ProductChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductChange").msgclass + ProductStatusChangeMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductStatusChangeMessage").msgclass + Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Resource").enummodule + Attribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Attribute").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb new file mode 100644 index 000000000000..0257e0c3cf01 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto for package 'google.shopping.merchant.notifications.v1beta' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/shopping/merchant/notifications/v1beta/notificationsapi_pb' + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + module NotificationsApiService + # Service to manage notification subscriptions for merchants + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.notifications.v1beta.NotificationsApiService' + + # Gets notification subscriptions for an account. + rpc :GetNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription + # Creates a notification subscription for a merchant. We will allow the + # following types of notification subscriptions to exist together (per + # merchant as a subscriber per event type): + # 1. Subscription for all managed accounts + subscription for self + # 2. Multiple "partial" subscriptions for managed accounts + subscription + # for self + # + # we will not allow (per merchant as a subscriber per event type): + # 1. multiple self subscriptions. + # 2. multiple "all managed accounts" subscriptions. + # 3. all and partial subscriptions at the same time. + # 4. multiple partial subscriptions for the same target account + rpc :CreateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription + # Updates an existing notification subscription for a merchant. + rpc :UpdateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription + # Deletes a notification subscription for a merchant. + rpc :DeleteNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Google::Protobuf::Empty + # Gets all the notification subscriptions for a merchant. + rpc :ListNotificationSubscriptions, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb new file mode 100644 index 000000000000..4d9cbec40b68 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" +require "google/shopping/merchant/notifications/v1beta/version" + +module Google + module Shopping + module Merchant + module Notifications + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/notifications/v1beta/rest" + # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb new file mode 100644 index 000000000000..d0941bca7818 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Merchant V1BETA Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..e0b26a33b4b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..b03587481349 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..38b4b61e6061 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..935946d52792 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..b5731a824060 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..8c6b19d52e3d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..8e7abcf8f052 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb new file mode 100644 index 000000000000..8810d1cedd98 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb @@ -0,0 +1,215 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Notifications + module V1beta + # Request message for the GetNotificationSubscription method. + # @!attribute [rw] name + # @return [::String] + # Required. The `name` of the notification subscription. + class GetNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the CreateNotificationSubscription method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account that owns the new notification subscription. + # Format: `accounts/{account}` + # @!attribute [rw] notification_subscription + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # Required. The notification subscription to create. + class CreateNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateNotificationSubscription method. + # @!attribute [rw] notification_subscription + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] + # Required. The new version of the notification subscription that should be + # updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # List of fields being updated. + class UpdateNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteNotificationSubscription method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the notification subscription to be deleted. + class DeleteNotificationSubscriptionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListNotificationSubscription method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the notification subscriptions. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of notification subscriptions to return in a page. + # The default value for `page_size` is 100. The + # maximum value is `200`. Values above `200` will be coerced to `200`. + # @!attribute [rw] page_token + # @return [::String] + # Token (if provided) to retrieve the subsequent page. All other parameters + # must match the original call that provided the page token. + class ListNotificationSubscriptionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListNotificationSubscription method. + # @!attribute [rw] notification_subscriptions + # @return [::Array<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] + # The list of notification subscriptions requested by the merchant. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListNotificationSubscriptionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a notification subscription owned by a Merchant account. + # @!attribute [rw] all_managed_accounts + # @return [::Boolean] + # If this value is true, the requesting account is notified of the + # specified event for all managed accounts (can be subaccounts or other + # linked accounts) including newly added accounts on a daily basis. + # @!attribute [rw] target_account + # @return [::String] + # The `name` of the account you want to receive notifications for. + # Format: `accounts/{account}` + # @!attribute [r] name + # @return [::String] + # Output only. The `name` of the notification configuration. Generated by the + # Content API upon creation of a new `NotificationSubscription`. The + # `account` represents the merchant ID of the merchant that owns the + # configuration. Format: + # `accounts/{account}/notificationsubscriptions/{notification_subscription}` + # @!attribute [rw] registered_event + # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription::NotificationEventType] + # The event that the merchant wants to be notified about. + # @!attribute [rw] call_back_uri + # @return [::String] + # URL to be used to push the notification to the merchant. + class NotificationSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the event type that the merchant is interested in receiving + # notifications for. + module NotificationEventType + # Notifications event type is unspecified. + NOTIFICATION_EVENT_TYPE_UNSPECIFIED = 0 + + # Notification of product status changes, for example when product becomes + # disapproved. + PRODUCT_STATUS_CHANGE = 1 + end + end + + # The change that happened to the product including old value, new value, + # country code as the region code and reporting context. + # @!attribute [rw] old_value + # @return [::String] + # The old value of the changed resource or attribute. + # @!attribute [rw] new_value + # @return [::String] + # The new value of the changed resource or attribute. + # @!attribute [rw] region_code + # @return [::String] + # Countries that have the change (if applicable) + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Reporting contexts that have the change (if applicable) + class ProductChange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message that the merchant will receive to notify about product status + # change event + # @!attribute [rw] account + # @return [::String] + # The target account that owns the entity that changed. + # Format : `accounts/{merchant_id}` + # @!attribute [rw] managing_account + # @return [::String] + # The account that manages the merchant's account. can be the same as + # merchant id if it is standalone account. Format : + # `accounts/{service_provider_id}` + # @!attribute [rw] resource_type + # @return [::Google::Shopping::Merchant::Notifications::V1beta::Resource] + # The resource that changed, in this case it will always be `Product`. + # @!attribute [rw] attribute + # @return [::Google::Shopping::Merchant::Notifications::V1beta::Attribute] + # The attribute in the resource that changed, in this case it will be always + # `Status`. + # @!attribute [rw] changes + # @return [::Array<::Google::Shopping::Merchant::Notifications::V1beta::ProductChange>] + # A message to describe the change that happened to the product + # @!attribute [rw] resource_id + # @return [::String] + # The product id. + # @!attribute [rw] resource + # @return [::String] + # The product name. + # Format: `{product.name=accounts/{account}/products/{product}}` + class ProductStatusChangeMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum to specify the resource that is being changed to notify the merchant + # about. + module Resource + # Unspecified resource + RESOURCE_UNSPECIFIED = 0 + + # Resource type : product + PRODUCT = 1 + end + + # Enum to specify the attribute in the resource that is being changed to + # notify the merchant about. + module Attribute + # Unspecified attribute + ATTRIBUTE_UNSPECIFIED = 0 + + # Status of the changed entity + STATUS = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..7c4fd780655b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + 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 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 + # 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 + end + end + + # [Channel](https://support.google.com/merchants/answer/7361332) of a product. + # + # Channel is used to distinguish between online and local products. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Channel values. + module ChannelEnum + # Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0 + + # Online product. + ONLINE = 1 + + # Local product. + LOCAL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..2227f846e191 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-shopping-merchant-notifications-v1beta", path: "../" +else + gem "google-shopping-merchant-notifications-v1beta" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb new file mode 100644 index 000000000000..3ee3562634b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the create_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription. +# +def create_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new + + # Call the create_notification_subscription method. + result = client.create_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + p result +end +# [END merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb new file mode 100644 index 000000000000..afbb070302ff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the delete_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription. +# +def delete_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new + + # Call the delete_notification_subscription method. + result = client.delete_notification_subscription request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb new file mode 100644 index 000000000000..998279d186fd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the get_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription. +# +def get_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new + + # Call the get_notification_subscription method. + result = client.get_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + p result +end +# [END merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb new file mode 100644 index 000000000000..e92af781168b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the list_notification_subscriptions call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions. +# +def list_notification_subscriptions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new + + # Call the list_notification_subscriptions method. + result = client.list_notification_subscriptions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + p item + end +end +# [END merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb new file mode 100644 index 000000000000..1c2e6d7d2dac --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync] +require "google/shopping/merchant/notifications/v1beta" + +## +# Snippet for the update_notification_subscription call in the NotificationsApiService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription. +# +def update_notification_subscription + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new + + # Call the update_notification_subscription method. + result = client.update_notification_subscription request + + # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. + p result +end +# [END merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json new file mode 100644 index 000000000000..ef440913e101 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-shopping-merchant-notifications-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.notifications.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync", + "title": "Snippet for the get_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription.", + "file": "notifications_api_service/get_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "GetNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.GetNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync", + "title": "Snippet for the create_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription.", + "file": "notifications_api_service/create_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "CreateNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.CreateNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync", + "title": "Snippet for the update_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription.", + "file": "notifications_api_service/update_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "UpdateNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.UpdateNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync", + "title": "Snippet for the delete_notification_subscription call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription.", + "file": "notifications_api_service/delete_notification_subscription.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_notification_subscription", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "DeleteNotificationSubscription", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.DeleteNotificationSubscription", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync", + "title": "Snippet for the list_notification_subscriptions call in the NotificationsApiService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions.", + "file": "notifications_api_service/list_notification_subscriptions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_notification_subscriptions", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse", + "client": { + "short_name": "NotificationsApiService::Client", + "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" + }, + "method": { + "short_name": "ListNotificationSubscriptions", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.ListNotificationSubscriptions", + "service": { + "short_name": "NotificationsApiService", + "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb new file mode 100644 index 000000000000..84e3d78399ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/notifications/v1beta/notifications_api_service" + +class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_notification_subscription_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_subscription_path account: "value0", notification_subscription: "value1" + assert_equal "accounts/value0/notificationsubscriptions/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb new file mode 100644 index 000000000000..4e7e54362927 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb @@ -0,0 +1,365 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" + + +class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_get_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_notification_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_notification_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_notification_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_subscription_client_stub.call_count + end + end + end + + def test_create_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + notification_subscription = {} + + create_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_create_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_notification_subscription_client_stub.call_count + end + end + end + + def test_update_notification_subscription + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + notification_subscription = {} + update_mask = {} + + update_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_update_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_notification_subscription_client_stub.call_count + end + end + end + + def test_delete_notification_subscription + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_delete_notification_subscription_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_notification_subscription({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_notification_subscription name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_notification_subscription({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_notification_subscription_client_stub.call_count + end + end + end + + def test_list_notification_subscriptions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_notification_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_list_notification_subscriptions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_notification_subscriptions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_notification_subscriptions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_notification_subscriptions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_notification_subscriptions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_notification_subscriptions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb new file mode 100644 index 000000000000..38a96186e9c2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb @@ -0,0 +1,379 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" +require "google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb" +require "google/shopping/merchant/notifications/v1beta/notifications_api_service" + +class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_get_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_notification_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_notification_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_notification_subscription({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_notification_subscription_client_stub.call_rpc_count + end + end + + def test_create_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + notification_subscription = {} + + create_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription), request["notification_subscription"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_notification_subscription_client_stub.call_rpc_count + end + end + + def test_update_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + notification_subscription = {} + update_mask = {} + + update_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription), request["notification_subscription"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_notification_subscription_client_stub.call_rpc_count + end + end + + def test_delete_notification_subscription + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_notification_subscription, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_notification_subscription_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_notification_subscription({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_notification_subscription name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_notification_subscription({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_notification_subscription_client_stub.call_rpc_count + end + end + + def test_list_notification_subscriptions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_notification_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_notification_subscriptions, name + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_notification_subscriptions_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_notification_subscriptions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_notification_subscriptions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_notification_subscriptions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_notification_subscriptions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.gitignore b/owl-bot-staging/google-shopping-merchant-notifications/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-notifications/.repo-metadata.json new file mode 100644 index 000000000000..8885ff99bec4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-notifications", + "distribution_name": "google-shopping-merchant-notifications", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant 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.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-notifications/.rubocop.yml new file mode 100644 index 000000000000..7e600c61889d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-notifications.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-notifications.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.toys.rb b/owl-bot-staging/google-shopping-merchant-notifications/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.yardopts b/owl-bot-staging/google-shopping-merchant-notifications/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-notifications/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-notifications/AUTHENTICATION.md new file mode 100644 index 000000000000..92d52a1e4e8f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-notifications library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-notifications library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/notifications" + +client = Google::Shopping::Merchant::Notifications.notifications_api_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/notifications" + +Google::Shopping::Merchant::Notifications.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::Notifications.notifications_api_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-notifications +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/notifications" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::Notifications.notifications_api_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-notifications/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-notifications/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-notifications/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications/Gemfile new file mode 100644 index 000000000000..d4a3a4a3d95f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/Gemfile @@ -0,0 +1,13 @@ +source "https://rubygems.org" + +gemspec + +gem "google-shopping-merchant-notifications-v1beta", path: "../google-shopping-merchant-notifications-v1beta" + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-notifications/LICENSE.md b/owl-bot-staging/google-shopping-merchant-notifications/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-notifications/README.md b/owl-bot-staging/google-shopping-merchant-notifications/README.md new file mode 100644 index 000000000000..267432c1ba9c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/README.md @@ -0,0 +1,103 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center accounts. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-notifications-v*`. +The gem `google-shopping-merchant-notifications` is the main client library that brings the +verisoned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-notifications) +for this library, google-shopping-merchant-notifications, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-notifications-v1beta](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-notifications +``` + +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) + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-notifications`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-notifications-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-notifications`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-shopping-merchant-notifications-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-notifications/Rakefile b/owl-bot-staging/google-shopping-merchant-notifications/Rakefile new file mode 100644 index 000000000000..66ed091d35f5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-notifications acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" + ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-shopping-merchant-notifications gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-notifications gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-notifications gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-notifications gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-notifications" + header "google-shopping-merchant-notifications rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-notifications yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-notifications test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-notifications smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-notifications acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/google-shopping-merchant-notifications.gemspec b/owl-bot-staging/google-shopping-merchant-notifications/google-shopping-merchant-notifications.gemspec new file mode 100644 index 000000000000..5c5eaf2c08b4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/google-shopping-merchant-notifications.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/notifications/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-notifications" + gem.version = Google::Shopping::Merchant::Notifications::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-notifications-v1beta", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/lib/google-shopping-merchant-notifications.rb b/owl-bot-staging/google-shopping-merchant-notifications/lib/google-shopping-merchant-notifications.rb new file mode 100644 index 000000000000..6ca5fb19d59b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/lib/google-shopping-merchant-notifications.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/notifications" unless defined? Google::Shopping::Merchant::Notifications::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications.rb b/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications.rb new file mode 100644 index 000000000000..cf70a3fef34c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/notifications/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module Notifications + ## + # Create a new client object for NotificationsApiService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta/Google/Shopping/Merchant/Notifications/V1beta/NotificationsApiService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the NotificationsApiService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About NotificationsApiService + # + # Service to manage notification subscriptions for merchants + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.notifications_api_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/notifications/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Notifications + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Notifications.const_get(package_name).const_get(:NotificationsApiService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + end + end + end +end + +helper_path = ::File.join __dir__, "notifications", "helpers.rb" +require "google/shopping/merchant/notifications/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications/version.rb b/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications/version.rb new file mode 100644 index 000000000000..0a7f6ef260de --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Notifications + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/client_test.rb b/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/client_test.rb new file mode 100644 index 000000000000..a64c5ea87820 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/client_test.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/notifications" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::Notifications::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_notifications_api_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Notifications.notifications_api_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client, client + end + end + + def test_notifications_api_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Notifications.notifications_api_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/version_test.rb b/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/version_test.rb new file mode 100644 index 000000000000..10bd232f24de --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/notifications/version" + +class Google::Shopping::Merchant::Notifications::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::Notifications::VERSION + end +end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/test/helper.rb b/owl-bot-staging/google-shopping-merchant-notifications/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-notifications/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-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..f65e2ba20a6f --- /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": "Programmatically manage your Merchant Center accounts. 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..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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..cdc13d026aa1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/README.md @@ -0,0 +1,143 @@ +# 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-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. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +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 2.7+. + +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..3b2fd0419d64 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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..96e3d1fdfe38 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/gapic_metadata.json @@ -0,0 +1,47 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.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" + ] + }, + "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..088a551692b0 --- /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 = "Programmatically manage your Merchant Center accounts. 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 = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + 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..abda9a44fdb4 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..49afe8d8c9f4 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..68a5e1d98d77 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..1f6e328192da --- /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,547 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 + ) + end + + # Service calls + + ## + # Uploads a product input to your Merchant Center account. 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. Format: + # `accounts/{account}/dataSources/{datasource}`. + # + # @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? + return response + 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} + # @param data_source [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/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? + return response + 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: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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 `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 + 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..8bad4432d9c0 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..5aa2842b8d6f --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..f414f0da4fd3 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..276e273699ae --- /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,507 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 + ) + end + + # Service calls + + ## + # Uploads a product input to your Merchant Center account. 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. Format: + # `accounts/{account}/dataSources/{datasource}`. + # @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? + return result + 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} + # @param data_source [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/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? + return result + 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 + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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 `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 + 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..241bcef440f5 --- /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,190 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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 + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + 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, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + 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, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + 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 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..3a1e23501784 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb @@ -0,0 +1,56 @@ +# 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/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\x42\n\x07\x63hannel\x18\x03 \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumB\x06\xe0\x41\x02\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\x03\xe0\x41\x01H\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\"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\xfc\x03\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\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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.merchant.products.v1beta.Attributes", "google/shopping/merchant/products/v1beta/products_common.proto"], + ["google.shopping.type.CustomAttribute", "google/shopping/type/types.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module 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 + 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..c23d66eb0438 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/products/v1beta/productinputs.proto for package 'google.shopping.merchant.products.v1beta' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF 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. 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 + # 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..e68dac97fd80 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb @@ -0,0 +1,75 @@ +# 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\"\xa9\'\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\x11\n\x04gtin\x18\x1a \x01(\tH\x10\x88\x01\x01\x12\x1a\n\ritem_group_id\x18\x1b \x01(\tH\x11\x88\x01\x01\x12\x15\n\x08material\x18\x1c \x01(\tH\x12\x88\x01\x01\x12\x10\n\x03mpn\x18\x1d \x01(\tH\x13\x88\x01\x01\x12\x14\n\x07pattern\x18\x1e \x01(\tH\x14\x88\x01\x01\x12*\n\x05price\x18\x1f \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\x15\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\x16\x88\x01\x01\x12\x1e\n\x11min_handling_time\x18- \x01(\x03H\x17\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18. \x01(\tH\x18\x88\x01\x01\x12\x1f\n\x12transit_time_label\x18/ \x01(\tH\x19\x88\x01\x01\x12\x11\n\x04size\x18\x30 \x01(\tH\x1a\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x31 \x01(\tH\x1b\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.Tax\x12\x19\n\x0ctax_category\x18\x34 \x01(\tH\x1c\x88\x01\x01\x12$\n\x17\x65nergy_efficiency_class\x18\x35 \x01(\tH\x1d\x88\x01\x01\x12(\n\x1bmin_energy_efficiency_class\x18\x36 \x01(\tH\x1e\x88\x01\x01\x12(\n\x1bmax_energy_efficiency_class\x18\x37 \x01(\tH\x1f\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 \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(\tH0\x88\x01\x01\x12\x12\n\x05pause\x18\r \x01(\tH1\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(\tH2\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.ProductStructuredTitleH3\x88\x01\x01\x12l\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStructuredDescriptionH4\x88\x01\x01\x12;\n\x16\x61uto_pricing_min_price\x18| \x01(\x0b\x32\x1b.google.shopping.type.PriceB\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\x07\n\x05_gtinB\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\"\xb0\x02\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\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_points\"\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*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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.type.Interval", "google/type/interval.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module 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 + 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..472ad40ba8f3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_pb.rb @@ -0,0 +1,56 @@ +# 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\"\xb2\x04\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: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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.merchant.products.v1beta.Attributes", "google/shopping/merchant/products/v1beta/products_common.proto"], + ["google.shopping.type.CustomAttribute", "google/shopping/type/types.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module 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..816f779994a5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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. + # This service works for products with online channel only. + # + # @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..5005e0152fb1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb @@ -0,0 +1,552 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # 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 :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 + ) + 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}` + # + # @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? + return response + 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? + return 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: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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..af0813e91115 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..facdbcd17435 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..2bc59840cd04 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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. + # This service works for products with online channel only. + # + # 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..7a193ba278e3 --- /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,512 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # 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 :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 + ) + 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}` + # @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? + return result + 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? + return 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 + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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..ed1bcc0af107 --- /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,189 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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 + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + 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, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1beta::Product.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + 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, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + 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..2a0b9af49bc0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/products/v1beta/products.proto for package 'google.shopping.merchant.products.v1beta' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF 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. + # 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.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..655a63559974 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..b5b027da7e1c --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..e0b26a33b4b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-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..b03587481349 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..38b4b61e6061 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..935946d52792 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..b5731a824060 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..8c6b19d52e3d --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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/timestamp.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..4ac9c4801a3f --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..929a3a55d7b6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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 + # [product][google.shopping.content.bundles.Products.Product]. + # + # 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: + # [feedLabel][google.shopping.content.bundles.Products.feed_label], + # [contentLanguage][google.shopping.content.bundles.Products.content_language] + # and [offerId][google.shopping.content.bundles.Products.offer_id]. + # + # 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 vertical spec with [some + # exceptions](https://support.google.com/merchants/answer/7052112). + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the product input. + # Format: + # `"{productinput.name=accounts/{account}/productInputs/{productinput}}"` + # @!attribute [r] product + # @return [::String] + # Output only. The name of the processed product. + # Format: + # `"{product.name=accounts/{account}/products/{product}}"` + # @!attribute [rw] channel + # @return [::Google::Shopping::Type::Channel::ChannelEnum] + # Required. 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 [feed + # label](https://developers.google.com/shopping-content/guides/products/feed-labels) + # for the product. + # @!attribute [rw] version_number + # @return [::Integer] + # Optional. 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 [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, such as additional attributes used for Buy on Google. + # 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. Format: + # `accounts/{account}/dataSources/{datasource}`. + class InsertProductInputRequest + 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} + # @!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}`. + 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..44466741861e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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.content.bundles.Products.ProductInput] after + # applying rules and supplemental data sources. This processed product matches + # what is shown in your Merchant Center account and in Shopping ads and other + # surfaces across Google. 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: + # `"{product.name=accounts/{account}/products/{product}}"` + # @!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 for the product. + # @!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. + 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}` + 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..2df3c8c2ebd3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb @@ -0,0 +1,899 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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 merchant-defined bundle. A bundle is a custom + # grouping of different products sold by a merchant 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 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 of the item. + # @!attribute [rw] color + # @return [::String] + # Color of the item. + # @!attribute [rw] condition + # @return [::String] + # Condition or state of the item. + # @!attribute [rw] gender + # @return [::String] + # Target gender 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] gtin + # @return [::String] + # Global Trade Item Number + # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the + # item. + # @!attribute [rw] item_group_id + # @return [::String] + # Shared identifier for all variants of the same product. + # @!attribute [rw] material + # @return [::String] + # The material of which the item is made. + # @!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 (for example, polka dots). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Price of the item. + # @!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/188494#product_type)). + # @!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/188494#sale_price_effective_date)). + # @!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 + # [https://support.google.com/merchants/answer/6324492](size definition)). + # @!attribute [rw] size_system + # @return [::String] + # System in which the size is specified. Recommended for apparel items. + # @!attribute [rw] size_types + # @return [::Array<::String>] + # The cut of the item. It can be used to represent combined size types for + # apparel items. Maximum two of size types can be provided (see + # [https://support.google.com/merchants/answer/6324497](size type)). + # @!attribute [rw] taxes + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Tax>] + # Tax information. + # @!attribute [rw] tax_category + # @return [::String] + # The tax category of the product, used to configure detailed tax nexus + # in account-level tax settings. + # @!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 merchant-defined multipack. + # @!attribute [rw] ads_grouping + # @return [::String] + # Used to group items in an arbitrary way. Only for CPA%, discouraged + # otherwise. + # @!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 highlights of a product. + # @!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. + # @!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. + # @!attribute [rw] promotion_ids + # @return [::Array<::String>] + # The unique ID of a promotion. + # @!attribute [rw] pickup_method + # @return [::String] + # The pick up option for the item. + # @!attribute [rw] pickup_sla + # @return [::String] + # Item store pickup timeline. + # @!attribute [rw] link_template + # @return [::String] + # Link template for merchant hosted local storefront. + # @!attribute [rw] mobile_link_template + # @return [::String] + # Link template for merchant hosted local storefront optimized for mobile + # devices. + # @!attribute [rw] custom_label_0 + # @return [::String] + # Custom label 0 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_1 + # @return [::String] + # Custom label 1 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_2 + # @return [::String] + # Custom label 2 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_3 + # @return [::String] + # Custom label 3 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_4 + # @return [::String] + # Custom label 4 for custom grouping of items in a Shopping campaign. + # @!attribute [rw] included_destinations + # @return [::Array<::String>] + # The list of destinations to include for this target (corresponds to + # checked check boxes in Merchant Center). Default destinations are always + # included unless provided in `excludedDestinations`. + # @!attribute [rw] excluded_destinations + # @return [::Array<::String>] + # The list of destinations to exclude for this target (corresponds to + # unchecked check boxes in Merchant Center). + # @!attribute [rw] shopping_ads_excluded_countries + # @return [::Array<::String>] + # List of country codes (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 merchants' offers do not fall below this value, + # thereby preserving the offer's value and profitability. + 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 merchant 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 merchant. The + # corresponding program must be linked to the merchant 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. + 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. + # [minHandlingTime][google.shopping.content.bundles.Products.Shipping.min_handling_time] + # can only be present together with + # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time]; + # but it is not required if + # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time] + # 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 + # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time] + # and + # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time] + # are required if providing shipping speeds. + # [minHandlingTime][google.shopping.content.bundles.Products.Shipping.min_handling_time] + # is optional if + # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time] + # 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. + # [minTransitTime][google.shopping.content.bundles.Products.Shipping.min_transit_time] + # can only be present together with + # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time]; + # but it is not required if + # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time] + # 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 + # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time] + # and + # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time] + # are required if providing shipping speeds. + # [minTransitTime][google.shopping.content.bundles.Products.Shipping.min_transit_time] + # is optional if + # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time] + # 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 merchant. + # @!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 + + # 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..7c4fd780655b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + 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 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 + # 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 + 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..ba88575c495d --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..6000b2e11c62 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..3018f5a6d16e --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..2373f385a2c7 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/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..072d700d7787 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..44f8f4ab3b5e --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..74d99f434ad0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json @@ -0,0 +1,175 @@ +{ + "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_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..d4adc9b5fca2 --- /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,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# 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 + 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..67bfd9021f0f --- /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,202 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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:| + assert options.metadata.key? :"x-goog-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_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:| + assert options.metadata.key? :"x-goog-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..b77d7c6a3c54 --- /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,198 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# 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/productinputs_services_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) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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_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 +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..0c243244dd49 --- /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,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# 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 + 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..90ec1423368a --- /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,201 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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:| + assert options.metadata.key? :"x-goog-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:| + assert options.metadata.key? :"x-goog-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..065a4a7e378d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# 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_services_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) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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 +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..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-products/.gitignore b/owl-bot-staging/google-shopping-merchant-products/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/.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/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-products/.repo-metadata.json new file mode 100644 index 000000000000..a7c12622ff3d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/.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", + "distribution_name": "google-shopping-merchant-products", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant 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.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-products/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-products/.rubocop.yml new file mode 100644 index 000000000000..2495d6bfef28 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-products.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-products.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-products/.toys.rb b/owl-bot-staging/google-shopping-merchant-products/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/.yardopts b/owl-bot-staging/google-shopping-merchant-products/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-products/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-products/AUTHENTICATION.md new file mode 100644 index 000000000000..3c60cb8b5a33 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-products 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 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" + +client = Google::Shopping::Merchant::Products.product_inputs_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/products" + +Google::Shopping::Merchant::Products.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::Products.product_inputs_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-products +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" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::Products.product_inputs_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-products/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-products/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-products/Gemfile b/owl-bot-staging/google-shopping-merchant-products/Gemfile new file mode 100644 index 000000000000..e0b4f6d3daf6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/Gemfile @@ -0,0 +1,13 @@ +source "https://rubygems.org" + +gemspec + +gem "google-shopping-merchant-products-v1beta", path: "../google-shopping-merchant-products-v1beta" + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-products/LICENSE.md b/owl-bot-staging/google-shopping-merchant-products/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/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/README.md b/owl-bot-staging/google-shopping-merchant-products/README.md new file mode 100644 index 000000000000..9efcfe430fb7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/README.md @@ -0,0 +1,103 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center accounts. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-products-v*`. +The gem `google-shopping-merchant-products` is the main client library that brings the +verisoned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-products) +for this library, google-shopping-merchant-products, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-products-v1beta](https://rubydoc.info/gems/google-shopping-merchant-products-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-products +``` + +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) + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +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/Rakefile b/owl-bot-staging/google-shopping-merchant-products/Rakefile new file mode 100644 index 000000000000..6c487eb57f05 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-products 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 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 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 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 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-products" + header "google-shopping-merchant-products rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-products yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-products 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 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 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/google-shopping-merchant-products.gemspec b/owl-bot-staging/google-shopping-merchant-products/google-shopping-merchant-products.gemspec new file mode 100644 index 000000000000..40d4970d48c9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/google-shopping-merchant-products.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/products/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-products" + gem.version = Google::Shopping::Merchant::Products::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-products-v1beta", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-products/lib/google-shopping-merchant-products.rb b/owl-bot-staging/google-shopping-merchant-products/lib/google-shopping-merchant-products.rb new file mode 100644 index 000000000000..5571f6b3c28d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/lib/google-shopping-merchant-products.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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" unless defined? Google::Shopping::Merchant::Products::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products.rb b/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products.rb new file mode 100644 index 000000000000..4b1f11bc9883 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/products/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module Products + ## + # Create a new client object for ProductInputsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client](https://rubydoc.info/gems/google-shopping-merchant-products-v1beta/Google/Shopping/Merchant/Products/V1beta/ProductInputsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ProductInputsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About ProductInputsService + # + # Service to use ProductInput resource. + # This service works for products with online channel only. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.product_inputs_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/products/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Products + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Products.const_get(package_name).const_get(:ProductInputsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for ProductsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Products::V1beta::ProductsService::Client](https://rubydoc.info/gems/google-shopping-merchant-products-v1beta/Google/Shopping/Merchant/Products/V1beta/ProductsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ProductsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About ProductsService + # + # Service to use Product resource. + # This service works for products with online channel only. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.products_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/products/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Products + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Products.const_get(package_name).const_get(:ProductsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + end + end + end +end + +helper_path = ::File.join __dir__, "products", "helpers.rb" +require "google/shopping/merchant/products/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products/version.rb b/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products/version.rb new file mode 100644 index 000000000000..8bf93a058e47 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/client_test.rb b/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/client_test.rb new file mode 100644 index 000000000000..e376c30a3070 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/client_test.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/products" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::Products::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_product_inputs_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Products.product_inputs_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client, client + end + end + + def test_product_inputs_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Products.product_inputs_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client, client + end + end + + def test_products_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Products.products_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Products::V1beta::ProductsService::Client, client + end + end + + def test_products_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Products.products_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/version_test.rb b/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/version_test.rb new file mode 100644 index 000000000000..e6044512b074 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/products/version" + +class Google::Shopping::Merchant::Products::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::Products::VERSION + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products/test/helper.rb b/owl-bot-staging/google-shopping-merchant-products/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-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..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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..cdcbbd1b08fa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/README.md @@ -0,0 +1,143 @@ +# 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. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +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 2.7+. + +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..eb2fe8f26960 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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..6a98d0ac54b2 --- /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 = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + 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..740109104aa0 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..47131d212a31 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..94e172f6c52b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_pb.rb @@ -0,0 +1,62 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.type.Interval", "google/type/interval.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module 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..46393f6aa1aa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_pb.rb @@ -0,0 +1,57 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.shopping.merchant.promotions.v1beta.Attributes", "google/shopping/merchant/promotions/v1beta/promotions_common.proto"], + ["google.shopping.type.CustomAttribute", "google/shopping/type/types.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module 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..9a5fd53d2d12 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..cb9358b37e0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb @@ -0,0 +1,642 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 + ) + 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? + return response + 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? + return response + 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? + return 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: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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..8e50532ece8a --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..ab48d5af5169 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..8e8d8edf7031 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..7833f5ca7501 --- /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,595 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 + ) + 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? + return result + 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? + return result + 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? + return 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 + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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..74feb089bfad --- /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,249 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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 + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + 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, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + 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, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + 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, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + 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..26ed8c356a6d --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF 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..118a2b0f157b --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..cc249696c38e --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..e0b26a33b4b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-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..b03587481349 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..38b4b61e6061 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..935946d52792 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..b5731a824060 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..4ac9c4801a3f --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..9621f662161c --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..3e0fe09d37ba --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..7c4fd780655b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + 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 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 + # 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 + 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..ba88575c495d --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..e4292cdc50d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..951e406a5139 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..deec7e6f2d21 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..9f0e22d2a817 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..1664e4d0ed0e --- /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,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# 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 + 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..8a49a3aa560f --- /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,257 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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:| + assert options.metadata.key? :"x-goog-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:| + assert options.metadata.key? :"x-goog-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:| + assert options.metadata.key? :"x-goog-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..91aca5fbb06e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb @@ -0,0 +1,263 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# 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_services_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) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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 +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..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-promotions/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/.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/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-promotions/.repo-metadata.json new file mode 100644 index 000000000000..2535a3acb1a8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/.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", + "distribution_name": "google-shopping-merchant-promotions", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant 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.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-promotions/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-promotions/.rubocop.yml new file mode 100644 index 000000000000..e86b66a515cd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-promotions.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-promotions.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-promotions/.toys.rb b/owl-bot-staging/google-shopping-merchant-promotions/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/.yardopts b/owl-bot-staging/google-shopping-merchant-promotions/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-promotions/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-promotions/AUTHENTICATION.md new file mode 100644 index 000000000000..aa1094bd951f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-promotions 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 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" + +client = Google::Shopping::Merchant::Promotions.promotions_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/promotions" + +Google::Shopping::Merchant::Promotions.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::Promotions.promotions_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-promotions +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" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::Promotions.promotions_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-promotions/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-promotions/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-promotions/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions/Gemfile new file mode 100644 index 000000000000..42ab4226b2da --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/Gemfile @@ -0,0 +1,13 @@ +source "https://rubygems.org" + +gemspec + +gem "google-shopping-merchant-promotions-v1beta", path: "../google-shopping-merchant-promotions-v1beta" + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-promotions/LICENSE.md b/owl-bot-staging/google-shopping-merchant-promotions/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/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/README.md b/owl-bot-staging/google-shopping-merchant-promotions/README.md new file mode 100644 index 000000000000..dffec8b1a44a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/README.md @@ -0,0 +1,103 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center accounts. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-promotions-v*`. +The gem `google-shopping-merchant-promotions` is the main client library that brings the +verisoned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-promotions) +for this library, google-shopping-merchant-promotions, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-promotions-v1beta](https://rubydoc.info/gems/google-shopping-merchant-promotions-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-promotions +``` + +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) + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +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/Rakefile b/owl-bot-staging/google-shopping-merchant-promotions/Rakefile new file mode 100644 index 000000000000..7e42b1056fc5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-promotions 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 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 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 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 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-promotions" + header "google-shopping-merchant-promotions rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-promotions yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-promotions 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 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 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/google-shopping-merchant-promotions.gemspec b/owl-bot-staging/google-shopping-merchant-promotions/google-shopping-merchant-promotions.gemspec new file mode 100644 index 000000000000..6644bdad7f73 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/google-shopping-merchant-promotions.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/promotions/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-promotions" + gem.version = Google::Shopping::Merchant::Promotions::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-promotions-v1beta", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions/lib/google-shopping-merchant-promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions/lib/google-shopping-merchant-promotions.rb new file mode 100644 index 000000000000..7530a8f1426a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/lib/google-shopping-merchant-promotions.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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" unless defined? Google::Shopping::Merchant::Promotions::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions.rb new file mode 100644 index 000000000000..c4802d44f70d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/promotions/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module Promotions + ## + # Create a new client object for PromotionsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client](https://rubydoc.info/gems/google-shopping-merchant-promotions-v1beta/Google/Shopping/Merchant/Promotions/V1beta/PromotionsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the PromotionsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About PromotionsService + # + # Service to manage promotions for products. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.promotions_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/promotions/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Promotions + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Promotions.const_get(package_name).const_get(:PromotionsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + end + end + end +end + +helper_path = ::File.join __dir__, "promotions", "helpers.rb" +require "google/shopping/merchant/promotions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions/version.rb b/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions/version.rb new file mode 100644 index 000000000000..c4bb01f77a85 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/client_test.rb b/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/client_test.rb new file mode 100644 index 000000000000..c7637fe68faf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/client_test.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/promotions" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::Promotions::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_promotions_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Promotions.promotions_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client, client + end + end + + def test_promotions_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Promotions.promotions_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/version_test.rb b/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/version_test.rb new file mode 100644 index 000000000000..2f443857d8de --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/promotions/version" + +class Google::Shopping::Merchant::Promotions::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::Promotions::VERSION + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions/test/helper.rb b/owl-bot-staging/google-shopping-merchant-promotions/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-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..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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..71279433a799 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/README.md @@ -0,0 +1,143 @@ +# 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. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +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 2.7+. + +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..c1b582ff7c75 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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..aa0b263ebc67 --- /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 = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + 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..81b60e5ac669 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..c78448980a3c --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..4f49c02f824c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_pb.rb @@ -0,0 +1,52 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module 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..d930a3131138 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..68cfcc83320d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb @@ -0,0 +1,445 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 + ) + 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? + return 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: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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..a6dbd06c7c63 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..b8ba88ff83b9 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..fe84aca4eba3 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..4ad9ef7be001 --- /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,412 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 + ) + 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? + return 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 + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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..ebf2ac5937a9 --- /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,130 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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 + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + 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, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + 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..6287419989ad --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF 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..997f8f3565ee --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..ddc696b4f8bf --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..e0b26a33b4b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-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..b03587481349 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..38b4b61e6061 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..935946d52792 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..b5731a824060 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..7a20e71719e1 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..fa75ca0b9add --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..1ee36236c94f --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..c2cb60fc6d3c --- /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,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# 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 + 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..13a5aef36835 --- /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,147 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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:| + assert options.metadata.key? :"x-goog-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..2ebf8a82667f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# 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_services_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) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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 +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..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-quota/.gitignore b/owl-bot-staging/google-shopping-merchant-quota/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/.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/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-quota/.repo-metadata.json new file mode 100644 index 000000000000..e796cb886c20 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/.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", + "distribution_name": "google-shopping-merchant-quota", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant 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.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-quota/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-quota/.rubocop.yml new file mode 100644 index 000000000000..70c97c2565c2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-quota.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-quota.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-quota/.toys.rb b/owl-bot-staging/google-shopping-merchant-quota/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/.yardopts b/owl-bot-staging/google-shopping-merchant-quota/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-quota/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-quota/AUTHENTICATION.md new file mode 100644 index 000000000000..f857398f54bb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-quota 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 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" + +client = Google::Shopping::Merchant::Quota.quota_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/quota" + +Google::Shopping::Merchant::Quota.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::Quota.quota_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-quota +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" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::Quota.quota_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-quota/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-quota/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-quota/Gemfile b/owl-bot-staging/google-shopping-merchant-quota/Gemfile new file mode 100644 index 000000000000..52b47324ce24 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/Gemfile @@ -0,0 +1,13 @@ +source "https://rubygems.org" + +gemspec + +gem "google-shopping-merchant-quota-v1beta", path: "../google-shopping-merchant-quota-v1beta" + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-quota/LICENSE.md b/owl-bot-staging/google-shopping-merchant-quota/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/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/README.md b/owl-bot-staging/google-shopping-merchant-quota/README.md new file mode 100644 index 000000000000..60ad00f30bd0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/README.md @@ -0,0 +1,103 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center accounts. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-quota-v*`. +The gem `google-shopping-merchant-quota` is the main client library that brings the +verisoned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-quota) +for this library, google-shopping-merchant-quota, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-quota-v1beta](https://rubydoc.info/gems/google-shopping-merchant-quota-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-quota +``` + +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) + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +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/Rakefile b/owl-bot-staging/google-shopping-merchant-quota/Rakefile new file mode 100644 index 000000000000..18c6ef64e80e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-quota 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 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 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 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 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-quota" + header "google-shopping-merchant-quota rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-quota yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-quota 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 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 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/google-shopping-merchant-quota.gemspec b/owl-bot-staging/google-shopping-merchant-quota/google-shopping-merchant-quota.gemspec new file mode 100644 index 000000000000..2a827e3a6678 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/google-shopping-merchant-quota.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/quota/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-quota" + gem.version = Google::Shopping::Merchant::Quota::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-quota-v1beta", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-quota/lib/google-shopping-merchant-quota.rb b/owl-bot-staging/google-shopping-merchant-quota/lib/google-shopping-merchant-quota.rb new file mode 100644 index 000000000000..ac8399c48750 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/lib/google-shopping-merchant-quota.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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" unless defined? Google::Shopping::Merchant::Quota::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota.rb b/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota.rb new file mode 100644 index 000000000000..68f7fdb085f0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/quota/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module Quota + ## + # Create a new client object for QuotaService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client](https://rubydoc.info/gems/google-shopping-merchant-quota-v1beta/Google/Shopping/Merchant/Quota/V1beta/QuotaService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the QuotaService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About QuotaService + # + # Service to get method call quota information per Merchant API method. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.quota_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/quota/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Quota + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Quota.const_get(package_name).const_get(:QuotaService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + end + end + end +end + +helper_path = ::File.join __dir__, "quota", "helpers.rb" +require "google/shopping/merchant/quota/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota/version.rb b/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota/version.rb new file mode 100644 index 000000000000..bd9bddd5c527 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/client_test.rb b/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/client_test.rb new file mode 100644 index 000000000000..c1aa98480044 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/client_test.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/quota" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::Quota::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_quota_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Quota.quota_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client, client + end + end + + def test_quota_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Quota.quota_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/version_test.rb b/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/version_test.rb new file mode 100644 index 000000000000..6b6933ae160c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/quota/version" + +class Google::Shopping::Merchant::Quota::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::Quota::VERSION + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota/test/helper.rb b/owl-bot-staging/google-shopping-merchant-quota/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-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..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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..3ff97c4597f0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/README.md @@ -0,0 +1,143 @@ +# 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. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +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 2.7+. + +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..9af7edd2ddc4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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..08f3aae2d621 --- /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 = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + 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..480f94535756 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..f90f11a430ec --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..61f465246ce2 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..c6829d4d21ca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb @@ -0,0 +1,453 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 + ) + 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? + return 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: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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..abc502ba35c9 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..2a32059131b1 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..20b2a10e7819 --- /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,420 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 + ) + 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? + return 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 + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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..f6647ae91537 --- /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,131 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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 + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + 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, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + 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..20fc1e4a1275 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb @@ -0,0 +1,86 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.Date", "google/type/date.proto"], + ["google.shopping.type.Price", "google/shopping/type/types.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module 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..e89d2e0f3aa0 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF 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..7142d3748bb5 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..4783f6e6f555 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..e0b26a33b4b3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-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..b03587481349 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..38b4b61e6061 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..935946d52792 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..b5731a824060 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..4ac9c4801a3f --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..8a50a084bcf3 --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..7c4fd780655b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + 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 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 + # 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 + 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..a8b78b5e8ce4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..769e34015ecc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..aae80d41ccaf --- /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 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..6957ea78857c --- /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,148 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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:| + assert options.metadata.key? :"x-goog-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..51d16aa460cd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# 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/reports_services_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) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + 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 +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..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-reports/.gitignore b/owl-bot-staging/google-shopping-merchant-reports/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/.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/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-reports/.repo-metadata.json new file mode 100644 index 000000000000..5d4be5110b7d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/.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", + "distribution_name": "google-shopping-merchant-reports", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant 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.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-reports/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-reports/.rubocop.yml new file mode 100644 index 000000000000..8eaf420dda24 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-reports.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-reports.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-reports/.toys.rb b/owl-bot-staging/google-shopping-merchant-reports/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/.yardopts b/owl-bot-staging/google-shopping-merchant-reports/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-reports/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-reports/AUTHENTICATION.md new file mode 100644 index 000000000000..329b9548b796 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-reports 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 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" + +client = Google::Shopping::Merchant::Reports.report_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/reports" + +Google::Shopping::Merchant::Reports.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::Reports.report_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-reports +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" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::Reports.report_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-reports/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-reports/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-reports/Gemfile b/owl-bot-staging/google-shopping-merchant-reports/Gemfile new file mode 100644 index 000000000000..7fbf9c1065b4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/Gemfile @@ -0,0 +1,13 @@ +source "https://rubygems.org" + +gemspec + +gem "google-shopping-merchant-reports-v1beta", path: "../google-shopping-merchant-reports-v1beta" + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-reports/LICENSE.md b/owl-bot-staging/google-shopping-merchant-reports/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/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/README.md b/owl-bot-staging/google-shopping-merchant-reports/README.md new file mode 100644 index 000000000000..11dc1d98b228 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/README.md @@ -0,0 +1,103 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center accounts. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-reports-v*`. +The gem `google-shopping-merchant-reports` is the main client library that brings the +verisoned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-reports) +for this library, google-shopping-merchant-reports, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-reports-v1beta](https://rubydoc.info/gems/google-shopping-merchant-reports-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-reports +``` + +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) + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +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/Rakefile b/owl-bot-staging/google-shopping-merchant-reports/Rakefile new file mode 100644 index 000000000000..88d092609019 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-reports 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 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 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 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 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-reports" + header "google-shopping-merchant-reports rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-reports yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-reports 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 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 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/google-shopping-merchant-reports.gemspec b/owl-bot-staging/google-shopping-merchant-reports/google-shopping-merchant-reports.gemspec new file mode 100644 index 000000000000..aa28a75a591e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/google-shopping-merchant-reports.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/reports/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-reports" + gem.version = Google::Shopping::Merchant::Reports::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Programmatically manage your Merchant Center accounts." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-reports-v1beta", ">= 0.3", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-reports/lib/google-shopping-merchant-reports.rb b/owl-bot-staging/google-shopping-merchant-reports/lib/google-shopping-merchant-reports.rb new file mode 100644 index 000000000000..5425656fd067 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/lib/google-shopping-merchant-reports.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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" unless defined? Google::Shopping::Merchant::Reports::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports.rb b/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports.rb new file mode 100644 index 000000000000..2e57c1947f3b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/reports/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module Reports + ## + # Create a new client object for ReportService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Reports::V1beta::ReportService::Client](https://rubydoc.info/gems/google-shopping-merchant-reports-v1beta/Google/Shopping/Merchant/Reports/V1beta/ReportService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ReportService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About ReportService + # + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.report_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/reports/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Reports + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Reports.const_get(package_name).const_get(:ReportService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + end + end + end +end + +helper_path = ::File.join __dir__, "reports", "helpers.rb" +require "google/shopping/merchant/reports/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports/version.rb b/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports/version.rb new file mode 100644 index 000000000000..ba0222f654cd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/client_test.rb b/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/client_test.rb new file mode 100644 index 000000000000..d6d8379d7945 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/client_test.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/reports" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::Reports::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_report_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Reports.report_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Reports::V1beta::ReportService::Client, client + end + end + + def test_report_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Reports.report_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/version_test.rb b/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/version_test.rb new file mode 100644 index 000000000000..8b8e499f7789 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/reports/version" + +class Google::Shopping::Merchant::Reports::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::Reports::VERSION + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports/test/helper.rb b/owl-bot-staging/google-shopping-merchant-reports/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 0cb023168c2a81a5b1970506d360d13f431227d5 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 8 Aug 2024 20:03:45 +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 --- .../README.md | 1 - .../README.md | 3 +- google-shopping-merchant-lfp-v1beta/README.md | 1 - google-shopping-merchant-lfp/README.md | 3 +- .../README.md | 1 - .../README.md | 3 +- .../README.md | 1 - google-shopping-merchant-products/README.md | 3 +- .../README.md | 1 - google-shopping-merchant-promotions/README.md | 3 +- .../README.md | 1 - google-shopping-merchant-quota/README.md | 3 +- .../README.md | 1 - google-shopping-merchant-reports/README.md | 3 +- .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 --- .../README.md | 143 -- .../Rakefile | 169 --- .../gapic_metadata.json | 57 - ...opping-merchant-inventories-v1beta.gemspec | 29 - ...le-shopping-merchant-inventories-v1beta.rb | 21 - .../shopping/merchant/inventories/v1beta.rb | 48 - .../v1beta/local_inventory_service.rb | 57 - .../v1beta/local_inventory_service/client.rb | 663 --------- .../local_inventory_service/credentials.rb | 49 - .../v1beta/local_inventory_service/paths.rb | 71 - .../v1beta/local_inventory_service/rest.rb | 54 - .../local_inventory_service/rest/client.rb | 616 -------- .../rest/service_stub.rb | 249 ---- .../inventories/v1beta/localinventory_pb.rb | 58 - .../v1beta/localinventory_services_pb.rb | 68 - .../v1beta/regional_inventory_service.rb | 58 - .../regional_inventory_service/client.rb | 663 --------- .../regional_inventory_service/credentials.rb | 49 - .../regional_inventory_service/paths.rb | 71 - .../v1beta/regional_inventory_service/rest.rb | 55 - .../regional_inventory_service/rest/client.rb | 616 -------- .../rest/service_stub.rb | 249 ---- .../v1beta/regionalinventory_pb.rb | 58 - .../v1beta/regionalinventory_services_pb.rb | 69 - .../merchant/inventories/v1beta/rest.rb | 40 - .../merchant/inventories/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 403 ----- .../proto_docs/google/api/field_behavior.rb | 85 -- .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 --- .../proto_docs/google/protobuf/duration.rb | 98 -- .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 -- .../inventories/v1beta/localinventory.rb | 164 --- .../inventories/v1beta/regionalinventory.rb | 142 -- .../proto_docs/google/shopping/type/types.rb | 210 --- .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../delete_local_inventory.rb | 47 - .../insert_local_inventory.rb | 47 - .../list_local_inventories.rb | 51 - .../delete_regional_inventory.rb | 47 - .../insert_regional_inventory.rb | 47 - .../list_regional_inventories.rb | 51 - ....shopping.merchant.inventories.v1beta.json | 255 ---- .../local_inventory_service_paths_test.rb | 59 - .../local_inventory_service_rest_test.rb | 256 ---- .../v1beta/local_inventory_service_test.rb | 261 ---- .../regional_inventory_service_paths_test.rb | 59 - .../regional_inventory_service_rest_test.rb | 256 ---- .../v1beta/regional_inventory_service_test.rb | 261 ---- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 13 - .../LICENSE.md | 201 --- .../README.md | 103 -- .../Rakefile | 169 --- ...ogle-shopping-merchant-inventories.gemspec | 27 - .../google-shopping-merchant-inventories.rb | 19 - .../google/shopping/merchant/inventories.rb | 105 -- .../shopping/merchant/inventories/version.rb | 28 - .../merchant/inventories/client_test.rb | 73 - .../merchant/inventories/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 --- .../README.md | 143 -- .../Rakefile | 169 --- .../gapic_metadata.json | 66 - ...oogle-shopping-merchant-lfp-v1beta.gemspec | 29 - .../google-shopping-merchant-lfp-v1beta.rb | 21 - .../google/shopping/merchant/lfp/v1beta.rb | 49 - .../lfp/v1beta/lfp_inventory_service.rb | 59 - .../v1beta/lfp_inventory_service/client.rb | 439 ------ .../lfp_inventory_service/credentials.rb | 49 - .../lfp/v1beta/lfp_inventory_service/paths.rb | 70 - .../lfp/v1beta/lfp_inventory_service/rest.rb | 56 - .../lfp_inventory_service/rest/client.rb | 406 ------ .../rest/service_stub.rb | 131 -- .../merchant/lfp/v1beta/lfp_sale_service.rb | 59 - .../lfp/v1beta/lfp_sale_service/client.rb | 437 ------ .../v1beta/lfp_sale_service/credentials.rb | 49 - .../lfp/v1beta/lfp_sale_service/paths.rb | 52 - .../lfp/v1beta/lfp_sale_service/rest.rb | 56 - .../v1beta/lfp_sale_service/rest/client.rb | 404 ------ .../lfp_sale_service/rest/service_stub.rb | 131 -- .../merchant/lfp/v1beta/lfp_store_service.rb | 59 - .../lfp/v1beta/lfp_store_service/client.rb | 741 ---------- .../v1beta/lfp_store_service/credentials.rb | 49 - .../lfp/v1beta/lfp_store_service/paths.rb | 68 - .../lfp/v1beta/lfp_store_service/rest.rb | 56 - .../v1beta/lfp_store_service/rest/client.rb | 687 --------- .../lfp_store_service/rest/service_stub.rb | 308 ---- .../merchant/lfp/v1beta/lfpinventory_pb.rb | 54 - .../lfp/v1beta/lfpinventory_services_pb.rb | 51 - .../merchant/lfp/v1beta/lfpsale_pb.rb | 55 - .../lfp/v1beta/lfpsale_services_pb.rb | 49 - .../merchant/lfp/v1beta/lfpstore_pb.rb | 56 - .../lfp/v1beta/lfpstore_services_pb.rb | 57 - .../shopping/merchant/lfp/v1beta/rest.rb | 41 - .../shopping/merchant/lfp/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 403 ----- .../proto_docs/google/api/field_behavior.rb | 85 -- .../proto_docs/google/api/field_info.rb | 88 -- .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 --- .../proto_docs/google/protobuf/duration.rb | 98 -- .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 -- .../merchant/lfp/v1beta/lfpinventory.rb | 113 -- .../shopping/merchant/lfp/v1beta/lfpsale.rb | 96 -- .../shopping/merchant/lfp/v1beta/lfpstore.rb | 185 --- .../proto_docs/google/shopping/type/types.rb | 210 --- .../snippets/Gemfile | 32 - .../insert_lfp_inventory.rb | 47 - .../lfp_sale_service/insert_lfp_sale.rb | 47 - .../lfp_store_service/delete_lfp_store.rb | 47 - .../lfp_store_service/get_lfp_store.rb | 47 - .../lfp_store_service/insert_lfp_store.rb | 47 - .../lfp_store_service/list_lfp_stores.rb | 51 - ...a_google.shopping.merchant.lfp.v1beta.json | 255 ---- .../lfp_inventory_service_paths_test.rb | 59 - .../v1beta/lfp_inventory_service_rest_test.rb | 146 -- .../lfp/v1beta/lfp_inventory_service_test.rb | 136 -- .../lfp/v1beta/lfp_sale_service_paths_test.rb | 47 - .../lfp/v1beta/lfp_sale_service_rest_test.rb | 146 -- .../lfp/v1beta/lfp_sale_service_test.rb | 136 -- .../v1beta/lfp_store_service_paths_test.rb | 59 - .../lfp/v1beta/lfp_store_service_rest_test.rb | 311 ---- .../lfp/v1beta/lfp_store_service_test.rb | 321 ---- .../test/helper.rb | 25 - .../google-shopping-merchant-lfp/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-shopping-merchant-lfp/.rubocop.yml | 39 - .../google-shopping-merchant-lfp/.toys.rb | 28 - .../google-shopping-merchant-lfp/.yardopts | 11 - .../AUTHENTICATION.md | 122 -- .../google-shopping-merchant-lfp/CHANGELOG.md | 2 - .../google-shopping-merchant-lfp/Gemfile | 13 - .../google-shopping-merchant-lfp/LICENSE.md | 201 --- .../google-shopping-merchant-lfp/README.md | 103 -- .../google-shopping-merchant-lfp/Rakefile | 169 --- .../google-shopping-merchant-lfp.gemspec | 27 - .../lib/google-shopping-merchant-lfp.rb | 19 - .../lib/google/shopping/merchant/lfp.rb | 144 -- .../google/shopping/merchant/lfp/version.rb | 28 - .../shopping/merchant/lfp/client_test.rb | 92 -- .../shopping/merchant/lfp/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 --- .../README.md | 143 -- .../Rakefile | 169 --- .../gapic_metadata.json | 43 - ...ping-merchant-notifications-v1beta.gemspec | 29 - ...-shopping-merchant-notifications-v1beta.rb | 21 - .../shopping/merchant/notifications/v1beta.rb | 47 - .../v1beta/notifications_api_service.rb | 57 - .../notifications_api_service/client.rb | 834 ----------- .../notifications_api_service/credentials.rb | 49 - .../v1beta/notifications_api_service/paths.rb | 66 - .../v1beta/notifications_api_service/rest.rb | 54 - .../notifications_api_service/rest/client.rb | 773 ---------- .../rest/service_stub.rb | 368 ----- .../v1beta/notificationsapi_pb.rb | 64 - .../v1beta/notificationsapi_services_pb.rb | 66 - .../merchant/notifications/v1beta/rest.rb | 39 - .../merchant/notifications/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 403 ----- .../proto_docs/google/api/field_behavior.rb | 85 -- .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 --- .../proto_docs/google/protobuf/duration.rb | 98 -- .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 --- .../notifications/v1beta/notificationsapi.rb | 215 --- .../proto_docs/google/shopping/type/types.rb | 210 --- .../snippets/Gemfile | 32 - .../create_notification_subscription.rb | 47 - .../delete_notification_subscription.rb | 47 - .../get_notification_subscription.rb | 47 - .../list_notification_subscriptions.rb | 51 - .../update_notification_subscription.rb | 47 - ...hopping.merchant.notifications.v1beta.json | 215 --- .../notifications_api_service_paths_test.rb | 59 - .../notifications_api_service_rest_test.rb | 365 ----- .../v1beta/notifications_api_service_test.rb | 379 ----- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 13 - .../LICENSE.md | 201 --- .../README.md | 103 -- .../Rakefile | 169 --- ...le-shopping-merchant-notifications.gemspec | 27 - .../google-shopping-merchant-notifications.rb | 19 - .../google/shopping/merchant/notifications.rb | 70 - .../merchant/notifications/version.rb | 28 - .../merchant/notifications/client_test.rb | 54 - .../merchant/notifications/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 --- .../README.md | 143 -- .../Rakefile | 169 --- .../gapic_metadata.json | 47 - ...-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 | 547 ------- .../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 | 507 ------- .../rest/service_stub.rb | 190 --- .../products/v1beta/productinputs_pb.rb | 56 - .../v1beta/productinputs_services_pb.rb | 58 - .../products/v1beta/products_common_pb.rb | 75 - .../merchant/products/v1beta/products_pb.rb | 56 - .../products/v1beta/products_service.rb | 58 - .../v1beta/products_service/client.rb | 552 ------- .../v1beta/products_service/credentials.rb | 49 - .../products/v1beta/products_service/paths.rb | 66 - .../products/v1beta/products_service/rest.rb | 55 - .../v1beta/products_service/rest/client.rb | 512 ------- .../products_service/rest/service_stub.rb | 189 --- .../products/v1beta/products_services_pb.rb | 58 - .../shopping/merchant/products/v1beta/rest.rb | 40 - .../merchant/products/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 403 ----- .../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 -- .../merchant/products/v1beta/productinputs.rb | 152 -- .../merchant/products/v1beta/products.rb | 152 -- .../products/v1beta/products_common.rb | 899 ------------ .../proto_docs/google/shopping/type/types.rb | 210 --- .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../delete_product_input.rb | 47 - .../insert_product_input.rb | 47 - .../snippets/products_service/get_product.rb | 47 - .../products_service/list_products.rb | 51 - ...gle.shopping.merchant.products.v1beta.json | 175 --- .../product_inputs_service_paths_test.rb | 59 - .../product_inputs_service_rest_test.rb | 202 --- .../v1beta/product_inputs_service_test.rb | 198 --- .../v1beta/products_service_paths_test.rb | 59 - .../v1beta/products_service_rest_test.rb | 201 --- .../products/v1beta/products_service_test.rb | 201 --- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../google-shopping-merchant-products/Gemfile | 13 - .../LICENSE.md | 201 --- .../README.md | 103 -- .../Rakefile | 169 --- .../google-shopping-merchant-products.gemspec | 27 - .../lib/google-shopping-merchant-products.rb | 19 - .../lib/google/shopping/merchant/products.rb | 106 -- .../shopping/merchant/products/version.rb | 28 - .../shopping/merchant/products/client_test.rb | 73 - .../merchant/products/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 --- .../README.md | 143 -- .../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 | 62 - .../promotions/v1beta/promotions_pb.rb | 57 - .../promotions/v1beta/promotions_service.rb | 57 - .../v1beta/promotions_service/client.rb | 642 -------- .../v1beta/promotions_service/credentials.rb | 49 - .../v1beta/promotions_service/paths.rb | 52 - .../v1beta/promotions_service/rest.rb | 54 - .../v1beta/promotions_service/rest/client.rb | 595 -------- .../promotions_service/rest/service_stub.rb | 249 ---- .../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 | 403 ----- .../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 | 210 --- .../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 | 47 - .../v1beta/promotions_service_rest_test.rb | 257 ---- .../v1beta/promotions_service_test.rb | 263 ---- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 13 - .../LICENSE.md | 201 --- .../README.md | 103 -- .../Rakefile | 169 --- ...oogle-shopping-merchant-promotions.gemspec | 27 - .../google-shopping-merchant-promotions.rb | 19 - .../google/shopping/merchant/promotions.rb | 70 - .../shopping/merchant/promotions/version.rb | 28 - .../merchant/promotions/client_test.rb | 54 - .../merchant/promotions/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 --- .../README.md | 143 -- .../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 | 52 - .../merchant/quota/v1beta/quota_service.rb | 57 - .../quota/v1beta/quota_service/client.rb | 445 ------ .../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 | 412 ------ .../v1beta/quota_service/rest/service_stub.rb | 130 -- .../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 | 403 ----- .../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 | 47 - .../quota/v1beta/quota_service_rest_test.rb | 147 -- .../quota/v1beta/quota_service_test.rb | 143 -- .../test/helper.rb | 25 - .../google-shopping-merchant-quota/.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../google-shopping-merchant-quota/.toys.rb | 28 - .../google-shopping-merchant-quota/.yardopts | 11 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../google-shopping-merchant-quota/Gemfile | 13 - .../google-shopping-merchant-quota/LICENSE.md | 201 --- .../google-shopping-merchant-quota/README.md | 103 -- .../google-shopping-merchant-quota/Rakefile | 169 --- .../google-shopping-merchant-quota.gemspec | 27 - .../lib/google-shopping-merchant-quota.rb | 19 - .../lib/google/shopping/merchant/quota.rb | 70 - .../google/shopping/merchant/quota/version.rb | 28 - .../shopping/merchant/quota/client_test.rb | 54 - .../shopping/merchant/quota/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 --- .../README.md | 143 -- .../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 | 453 ------ .../v1beta/report_service/credentials.rb | 49 - .../reports/v1beta/report_service/rest.rb | 54 - .../v1beta/report_service/rest/client.rb | 420 ------ .../report_service/rest/service_stub.rb | 131 -- .../merchant/reports/v1beta/reports_pb.rb | 86 -- .../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 | 403 ----- .../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 | 210 --- .../proto_docs/google/type/date.rb | 53 - .../snippets/Gemfile | 32 - .../snippets/report_service/search.rb | 51 - ...ogle.shopping.merchant.reports.v1beta.json | 55 - .../v1beta/report_service_rest_test.rb | 148 -- .../reports/v1beta/report_service_test.rb | 145 -- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../google-shopping-merchant-reports/.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../google-shopping-merchant-reports/Gemfile | 13 - .../LICENSE.md | 201 --- .../README.md | 103 -- .../google-shopping-merchant-reports/Rakefile | 169 --- .../google-shopping-merchant-reports.gemspec | 27 - .../lib/google-shopping-merchant-reports.rb | 19 - .../lib/google/shopping/merchant/reports.rb | 71 - .../shopping/merchant/reports/version.rb | 28 - .../shopping/merchant/reports/client_test.rb | 54 - .../shopping/merchant/reports/version_test.rb | 26 - .../test/helper.rb | 25 - 514 files changed, 7 insertions(+), 53498 deletions(-) delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/google-shopping-merchant-inventories.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/lib/google-shopping-merchant-inventories.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/client_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/version_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-inventories/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/google-shopping-merchant-lfp.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/lib/google-shopping-merchant-lfp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/client_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/version_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-lfp/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/google-shopping-merchant-notifications.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/lib/google-shopping-merchant-notifications.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/client_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/version_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-notifications/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/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/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-products/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-products/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-products/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-products/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-products/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-products/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-products/google-shopping-merchant-products.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-products/lib/google-shopping-merchant-products.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/client_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/version_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products/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-promotions/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/google-shopping-merchant-promotions.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/lib/google-shopping-merchant-promotions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/client_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/version_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions/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-quota/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/google-shopping-merchant-quota.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/lib/google-shopping-merchant-quota.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/client_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/version_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota/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-reports/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/google-shopping-merchant-reports.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/lib/google-shopping-merchant-reports.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/client_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/version_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports/test/helper.rb diff --git a/google-shopping-merchant-inventories-v1beta/README.md b/google-shopping-merchant-inventories-v1beta/README.md index 8ed6cb2b88c3..70d29beaee97 100644 --- a/google-shopping-merchant-inventories-v1beta/README.md +++ b/google-shopping-merchant-inventories-v1beta/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. https://github.com/googleapis/google-cloud-ruby diff --git a/google-shopping-merchant-inventories/README.md b/google-shopping-merchant-inventories/README.md index 16d76021faad..b4f26b43f6d0 100644 --- a/google-shopping-merchant-inventories/README.md +++ b/google-shopping-merchant-inventories/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. Actual client classes for the various versions of this API are defined in _versioned_ client gems, with names of the form `google-shopping-merchant-inventories-v*`. @@ -32,7 +31,7 @@ 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. {file:AUTHENTICATION.md Set up authentication.} +1. [Set up authentication.](AUTHENTICATION.md) ## Supported Ruby Versions diff --git a/google-shopping-merchant-lfp-v1beta/README.md b/google-shopping-merchant-lfp-v1beta/README.md index 8faff850de7c..186a8337b6b2 100644 --- a/google-shopping-merchant-lfp-v1beta/README.md +++ b/google-shopping-merchant-lfp-v1beta/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. https://github.com/googleapis/google-cloud-ruby diff --git a/google-shopping-merchant-lfp/README.md b/google-shopping-merchant-lfp/README.md index 29020cb52d3c..e29a841945f9 100644 --- a/google-shopping-merchant-lfp/README.md +++ b/google-shopping-merchant-lfp/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. Actual client classes for the various versions of this API are defined in _versioned_ client gems, with names of the form `google-shopping-merchant-lfp-v*`. @@ -32,7 +31,7 @@ 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. {file:AUTHENTICATION.md Set up authentication.} +1. [Set up authentication.](AUTHENTICATION.md) ## Supported Ruby Versions diff --git a/google-shopping-merchant-notifications-v1beta/README.md b/google-shopping-merchant-notifications-v1beta/README.md index 835181c49022..d6c61486344d 100644 --- a/google-shopping-merchant-notifications-v1beta/README.md +++ b/google-shopping-merchant-notifications-v1beta/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. https://github.com/googleapis/google-cloud-ruby diff --git a/google-shopping-merchant-notifications/README.md b/google-shopping-merchant-notifications/README.md index 0a0d8c6ce90f..267432c1ba9c 100644 --- a/google-shopping-merchant-notifications/README.md +++ b/google-shopping-merchant-notifications/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. Actual client classes for the various versions of this API are defined in _versioned_ client gems, with names of the form `google-shopping-merchant-notifications-v*`. @@ -32,7 +31,7 @@ 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. {file:AUTHENTICATION.md Set up authentication.} +1. [Set up authentication.](AUTHENTICATION.md) ## Supported Ruby Versions diff --git a/google-shopping-merchant-products-v1beta/README.md b/google-shopping-merchant-products-v1beta/README.md index 25c709c50d88..cdc13d026aa1 100644 --- a/google-shopping-merchant-products-v1beta/README.md +++ b/google-shopping-merchant-products-v1beta/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. https://github.com/googleapis/google-cloud-ruby diff --git a/google-shopping-merchant-products/README.md b/google-shopping-merchant-products/README.md index 8a8c7c615259..9efcfe430fb7 100644 --- a/google-shopping-merchant-products/README.md +++ b/google-shopping-merchant-products/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. Actual client classes for the various versions of this API are defined in _versioned_ client gems, with names of the form `google-shopping-merchant-products-v*`. @@ -32,7 +31,7 @@ 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. {file:AUTHENTICATION.md Set up authentication.} +1. [Set up authentication.](AUTHENTICATION.md) ## Supported Ruby Versions diff --git a/google-shopping-merchant-promotions-v1beta/README.md b/google-shopping-merchant-promotions-v1beta/README.md index ff0c11c3ef4c..cdcbbd1b08fa 100644 --- a/google-shopping-merchant-promotions-v1beta/README.md +++ b/google-shopping-merchant-promotions-v1beta/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. https://github.com/googleapis/google-cloud-ruby diff --git a/google-shopping-merchant-promotions/README.md b/google-shopping-merchant-promotions/README.md index 8ee6329e1c5c..dffec8b1a44a 100644 --- a/google-shopping-merchant-promotions/README.md +++ b/google-shopping-merchant-promotions/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. Actual client classes for the various versions of this API are defined in _versioned_ client gems, with names of the form `google-shopping-merchant-promotions-v*`. @@ -32,7 +31,7 @@ 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. {file:AUTHENTICATION.md Set up authentication.} +1. [Set up authentication.](AUTHENTICATION.md) ## Supported Ruby Versions diff --git a/google-shopping-merchant-quota-v1beta/README.md b/google-shopping-merchant-quota-v1beta/README.md index 22f21bd51598..71279433a799 100644 --- a/google-shopping-merchant-quota-v1beta/README.md +++ b/google-shopping-merchant-quota-v1beta/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. https://github.com/googleapis/google-cloud-ruby diff --git a/google-shopping-merchant-quota/README.md b/google-shopping-merchant-quota/README.md index e9f19d5f7898..60ad00f30bd0 100644 --- a/google-shopping-merchant-quota/README.md +++ b/google-shopping-merchant-quota/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. Actual client classes for the various versions of this API are defined in _versioned_ client gems, with names of the form `google-shopping-merchant-quota-v*`. @@ -32,7 +31,7 @@ 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. {file:AUTHENTICATION.md Set up authentication.} +1. [Set up authentication.](AUTHENTICATION.md) ## Supported Ruby Versions diff --git a/google-shopping-merchant-reports-v1beta/README.md b/google-shopping-merchant-reports-v1beta/README.md index cc4740cda24b..3ff97c4597f0 100644 --- a/google-shopping-merchant-reports-v1beta/README.md +++ b/google-shopping-merchant-reports-v1beta/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. https://github.com/googleapis/google-cloud-ruby diff --git a/google-shopping-merchant-reports/README.md b/google-shopping-merchant-reports/README.md index 89488fa3608b..11dc1d98b228 100644 --- a/google-shopping-merchant-reports/README.md +++ b/google-shopping-merchant-reports/README.md @@ -2,7 +2,6 @@ Programmatically manage your Merchant Center accounts. -Programmatically manage your Merchant Center accounts. Actual client classes for the various versions of this API are defined in _versioned_ client gems, with names of the form `google-shopping-merchant-reports-v*`. @@ -32,7 +31,7 @@ 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. {file:AUTHENTICATION.md Set up authentication.} +1. [Set up authentication.](AUTHENTICATION.md) ## Supported Ruby Versions diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json deleted file mode 100644 index e750ced8add4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta", - "distribution_name": "google-shopping-merchant-inventories-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-inventories-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml deleted file mode 100644 index e4469fb37867..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-inventories-v1beta.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-inventories-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md deleted file mode 100644 index 3500f6dddbe8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-inventories-v1beta library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-shopping-merchant-inventories-v1beta library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/shopping/merchant/inventories/v1beta" - -client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/inventories/v1beta" - -::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-inventories-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/inventories/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile deleted file mode 100644 index 95163a6d11f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md deleted file mode 100644 index 70d29beaee97..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center accounts. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-inventories](https://rubygems.org/gems/google-shopping-merchant-inventories). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-inventories-v1beta -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/inventories/v1beta" - -client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new -request = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new # (request fields as keyword arguments...) -response = client.list_local_inventories request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for general usage information. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -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 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-inventories`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-inventories-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-inventories`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-shopping-merchant-inventories-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile deleted file mode 100644 index c37839e4270d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-inventories-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-shopping-merchant-inventories-v1beta gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-inventories-v1beta gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-inventories-v1beta gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-shopping-merchant-inventories-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-inventories-v1beta" - header "google-shopping-merchant-inventories-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-inventories-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-inventories-v1beta test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-shopping-merchant-inventories-v1beta smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-shopping-merchant-inventories-v1beta acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json deleted file mode 100644 index dd89d64ee89b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/gapic_metadata.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.inventories.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Inventories::V1beta", - "services": { - "LocalInventoryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client", - "rpcs": { - "ListLocalInventories": { - "methods": [ - "list_local_inventories" - ] - }, - "InsertLocalInventory": { - "methods": [ - "insert_local_inventory" - ] - }, - "DeleteLocalInventory": { - "methods": [ - "delete_local_inventory" - ] - } - } - } - } - }, - "RegionalInventoryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client", - "rpcs": { - "ListRegionalInventories": { - "methods": [ - "list_regional_inventories" - ] - }, - "InsertRegionalInventory": { - "methods": [ - "insert_regional_inventory" - ] - }, - "DeleteRegionalInventory": { - "methods": [ - "delete_regional_inventory" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec deleted file mode 100644 index 9bf4192a5b55..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/google-shopping-merchant-inventories-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/inventories/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-inventories-v1beta" - gem.version = Google::Shopping::Merchant::Inventories::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-inventories-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-inventories instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb deleted file mode 100644 index 290831ee9d55..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/shopping/merchant/inventories/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb deleted file mode 100644 index 9b3bebe571e4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/inventories/v1beta/local_inventory_service" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" -require "google/shopping/merchant/inventories/v1beta/version" - -module Google - module Shopping - module Merchant - module Inventories - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/inventories/v1beta" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/inventories/v1beta" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/inventories/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb deleted file mode 100644 index e523ef3a89c7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/inventories/v1beta/version" - -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/client" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - ## - # Service to manage local inventory for products - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/inventories/v1beta/local_inventory_service" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - module LocalInventoryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "local_inventory_service", "helpers.rb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb deleted file mode 100644 index af47154962a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb +++ /dev/null @@ -1,663 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/inventories/v1beta/localinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - ## - # Client for the LocalInventoryService service. - # - # Service to manage local inventory for products - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :local_inventory_service_stub - - ## - # Configure the LocalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LocalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Inventories", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LocalInventoryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @local_inventory_service_stub.universe_domain - end - - ## - # Create a new LocalInventoryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LocalInventoryService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/shopping/merchant/inventories/v1beta/localinventory_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @local_inventory_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - end - - # Service calls - - ## - # Lists the `LocalInventory` resources for the given product in your merchant - # account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be used - # to obtain additional results. - # - # `LocalInventory` resources are listed per product for a given account. - # - # @overload list_local_inventories(request, options = nil) - # Pass arguments to `list_local_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_local_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The `name` of the parent product to list local inventories for. - # Format: - # `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `LocalInventory` resources for the given - # product to return. The service returns fewer than this value if the number - # of inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 25000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # A page token, received from a previous `ListLocalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLocalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new - # - # # Call the list_local_inventories method. - # result = client.list_local_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - # p item - # end - # - def list_local_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_local_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_local_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.call_rpc :list_local_inventories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a `LocalInventory` resource to a product in your merchant - # account. - # - # Replaces the full `LocalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `LocalInventory` - # resource to appear in products. - # - # @overload insert_local_inventory(request, options = nil) - # Pass arguments to `insert_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_local_inventory(parent: nil, local_inventory: nil) - # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory, ::Hash] - # Required. Local inventory information of the product. If the product - # already has a `LocalInventory` resource for the same `storeCode`, full - # replacement of the `LocalInventory` resource is performed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new - # - # # Call the insert_local_inventory method. - # result = client.insert_local_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - # p result - # - def insert_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.call_rpc :insert_local_inventory, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified `LocalInventory` from the given product in your - # merchant account. It might take a up to an hour for the - # `LocalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_local_inventory(request, options = nil) - # Pass arguments to `delete_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_local_inventory(name: nil) - # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the local inventory for the given product to delete. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new - # - # # Call the delete_local_inventory method. - # result = client.delete_local_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_local_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.call_rpc :delete_local_inventory, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LocalInventoryService API. - # - # This class represents the configuration for LocalInventoryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_local_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the LocalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_local_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_local_inventories - ## - # RPC-specific configuration for `insert_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_local_inventory - ## - # RPC-specific configuration for `delete_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_local_inventory - - # @private - def initialize parent_rpcs = nil - list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories - @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config - insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory - @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config - delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory - @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb deleted file mode 100644 index 6386061f15fd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - # Credentials for the LocalInventoryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb deleted file mode 100644 index 185b4ba344ba..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - # Path helper methods for the LocalInventoryService API. - module Paths - ## - # Create a fully-qualified LocalInventory resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # - # @param account [String] - # @param product [String] - # @param store_code [String] - # - # @return [::String] - def local_inventory_path account:, product:, store_code: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" - - "accounts/#{account}/products/#{product}/localInventories/#{store_code}" - end - - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}` - # - # @param account [String] - # @param product [String] - # - # @return [::String] - def product_path account:, product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/products/#{product}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb deleted file mode 100644 index ef57fdbe953d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/inventories/v1beta/version" - -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/paths" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - ## - # Service to manage local inventory for products - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - module LocalInventoryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb deleted file mode 100644 index 90eab7a7c6b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb +++ /dev/null @@ -1,616 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/inventories/v1beta/localinventory_pb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - module Rest - ## - # REST client for the LocalInventoryService service. - # - # Service to manage local inventory for products - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :local_inventory_service_stub - - ## - # Configure the LocalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LocalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Inventories", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LocalInventoryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @local_inventory_service_stub.universe_domain - end - - ## - # Create a new LocalInventoryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LocalInventoryService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @local_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - end - - # Service calls - - ## - # Lists the `LocalInventory` resources for the given product in your merchant - # account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be used - # to obtain additional results. - # - # `LocalInventory` resources are listed per product for a given account. - # - # @overload list_local_inventories(request, options = nil) - # Pass arguments to `list_local_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_local_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_local_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The `name` of the parent product to list local inventories for. - # Format: - # `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `LocalInventory` resources for the given - # product to return. The service returns fewer than this value if the number - # of inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 25000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum - # @param page_token [::String] - # A page token, received from a previous `ListLocalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLocalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new - # - # # Call the list_local_inventories method. - # result = client.list_local_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - # p item - # end - # - def list_local_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_local_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_local_inventories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_local_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.list_local_inventories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @local_inventory_service_stub, :list_local_inventories, "local_inventories", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a `LocalInventory` resource to a product in your merchant - # account. - # - # Replaces the full `LocalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `LocalInventory` - # resource to appear in products. - # - # @overload insert_local_inventory(request, options = nil) - # Pass arguments to `insert_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_local_inventory(parent: nil, local_inventory: nil) - # Pass arguments to `insert_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param local_inventory [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory, ::Hash] - # Required. Local inventory information of the product. If the product - # already has a `LocalInventory` resource for the same `storeCode`, full - # replacement of the `LocalInventory` resource is performed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new - # - # # Call the insert_local_inventory method. - # result = client.insert_local_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - # p result - # - def insert_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_local_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.insert_local_inventory request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified `LocalInventory` from the given product in your - # merchant account. It might take a up to an hour for the - # `LocalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_local_inventory(request, options = nil) - # Pass arguments to `delete_local_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_local_inventory(name: nil) - # Pass arguments to `delete_local_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the local inventory for the given product to delete. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new - # - # # Call the delete_local_inventory method. - # result = client.delete_local_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_local_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_local_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_local_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_local_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @local_inventory_service_stub.delete_local_inventory request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LocalInventoryService REST API. - # - # This class represents the configuration for LocalInventoryService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_local_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_local_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the LocalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_local_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_local_inventories - ## - # RPC-specific configuration for `insert_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_local_inventory - ## - # RPC-specific configuration for `delete_local_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_local_inventory - - # @private - def initialize parent_rpcs = nil - list_local_inventories_config = parent_rpcs.list_local_inventories if parent_rpcs.respond_to? :list_local_inventories - @list_local_inventories = ::Gapic::Config::Method.new list_local_inventories_config - insert_local_inventory_config = parent_rpcs.insert_local_inventory if parent_rpcs.respond_to? :insert_local_inventory - @insert_local_inventory = ::Gapic::Config::Method.new insert_local_inventory_config - delete_local_inventory_config = parent_rpcs.delete_local_inventory if parent_rpcs.respond_to? :delete_local_inventory - @delete_local_inventory = ::Gapic::Config::Method.new delete_local_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb deleted file mode 100644 index 6864bf7f2116..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb +++ /dev/null @@ -1,249 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/inventories/v1beta/localinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - module Rest - ## - # REST service stub for the LocalInventoryService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the list_local_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse] - # A result object deserialized from the server's reply - def list_local_inventories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_local_inventories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the insert_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # A result object deserialized from the server's reply - def insert_local_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_local_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_local_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_local_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_local_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_local_inventories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/inventories/v1beta/{parent}/localInventories", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_local_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/inventories/v1beta/{parent}/localInventories:insert", - body: "local_inventory", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_local_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_local_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/inventories/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/localInventories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb deleted file mode 100644 index 45b970322c33..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/inventories/v1beta/localinventory.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/shopping/type/types_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n@google/shopping/merchant/inventories/v1beta/localinventory.proto\x12+google.shopping.merchant.inventories.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\x8d\x05\n\x0eLocalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12*\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nsale_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.Interval\x12\x19\n\x0c\x61vailability\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08quantity\x18\x08 \x01(\x03H\x01\x88\x01\x01\x12\x1a\n\rpickup_method\x18\t \x01(\tH\x02\x88\x01\x01\x12\x17\n\npickup_sla\x18\n \x01(\tH\x03\x88\x01\x01\x12%\n\x18instore_product_location\x18\x0b \x01(\tH\x04\x88\x01\x01\x12@\n\x11\x63ustom_attributes\x18\x0c \x03(\x0b\x32%.google.shopping.type.CustomAttribute:s\xea\x41p\n)merchantapi.googleapis.com/LocalInventory\x12\x43\x61\x63\x63ounts/{account}/products/{product}/localInventories/{store_code}B\x0f\n\r_availabilityB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x1b\n\x19_instore_product_location\"\x87\x01\n\x1bListLocalInventoriesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8f\x01\n\x1cListLocalInventoriesResponse\x12V\n\x11local_inventories\x18\x01 \x03(\x0b\x32;.google.shopping.merchant.inventories.v1beta.LocalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbb\x01\n\x1bInsertLocalInventoryRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/LocalInventory\x12Y\n\x0flocal_inventory\x18\x02 \x01(\x0b\x32;.google.shopping.merchant.inventories.v1beta.LocalInventoryB\x03\xe0\x41\x02\"^\n\x1b\x44\x65leteLocalInventoryRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/LocalInventory2\xb8\x06\n\x15LocalInventoryService\x12\x81\x02\n\x14ListLocalInventories\x12H.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest\x1aI.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/inventories/v1beta/{parent=accounts/*/products/*}/localInventories\x12\x82\x02\n\x14InsertLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest\x1a;.google.shopping.merchant.inventories.v1beta.LocalInventory\"c\x82\xd3\xe4\x93\x02]\"J/inventories/v1beta/{parent=accounts/*/products/*}/localInventories:insert:\x0flocal_inventory\x12\xcc\x01\n\x14\x44\x65leteLocalInventory\x12H.google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/inventories/v1beta/{name=accounts/*/products/*/localInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xef\x01\n/com.google.shopping.merchant.inventories.v1betaB\x13LocalInventoryProtoP\x01ZWcloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespb\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.shopping.type.Price", "google/shopping/type/types.proto"], - ["google.type.Interval", "google/type/interval.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - LocalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.LocalInventory").msgclass - ListLocalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest").msgclass - ListLocalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse").msgclass - InsertLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest").msgclass - DeleteLocalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb deleted file mode 100644 index 40ceba820404..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb +++ /dev/null @@ -1,68 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/inventories/v1beta/localinventory.proto for package 'google.shopping.merchant.inventories.v1beta' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/inventories/v1beta/localinventory_pb' - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module LocalInventoryService - # Service to manage local inventory for products - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.inventories.v1beta.LocalInventoryService' - - # Lists the `LocalInventory` resources for the given product in your merchant - # account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be used - # to obtain additional results. - # - # `LocalInventory` resources are listed per product for a given account. - rpc :ListLocalInventories, ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse - # Inserts a `LocalInventory` resource to a product in your merchant - # account. - # - # Replaces the full `LocalInventory` resource if an entry with the same - # [`storeCode`][google.shopping.merchant.inventories.v1beta.LocalInventory.store_code] - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `LocalInventory` - # resource to appear in products. - rpc :InsertLocalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory - # Deletes the specified `LocalInventory` from the given product in your - # merchant account. It might take a up to an hour for the - # `LocalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - rpc :DeleteLocalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb deleted file mode 100644 index cccaec166015..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/inventories/v1beta/version" - -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/client" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - ## - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - module RegionalInventoryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "regional_inventory_service", "helpers.rb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb deleted file mode 100644 index 6b923f3e2734..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb +++ /dev/null @@ -1,663 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - ## - # Client for the RegionalInventoryService service. - # - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regional_inventory_service_stub - - ## - # Configure the RegionalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Inventories", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionalInventoryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @regional_inventory_service_stub.universe_domain - end - - ## - # Create a new RegionalInventoryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionalInventoryService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @regional_inventory_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - end - - # Service calls - - ## - # Lists the `RegionalInventory` resources for the given product in your - # merchant account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be - # used to obtain additional results. - # - # `RegionalInventory` resources are listed per product for a given account. - # - # @overload list_regional_inventories(request, options = nil) - # Pass arguments to `list_regional_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The `name` of the parent product to list `RegionalInventory` - # resources for. Format: `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `RegionalInventory` resources for the given product - # to return. The service returns fewer than this value if the number of - # inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 100000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # A page token, received from a previous `ListRegionalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegionalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new - # - # # Call the list_regional_inventories method. - # result = client.list_regional_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - # p item - # end - # - def list_regional_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_regional_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_regional_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.call_rpc :list_regional_inventories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a `RegionalInventory` to a given product in your - # merchant account. - # - # Replaces the full `RegionalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `RegionalInventory` - # resource to appear in products. - # - # @overload insert_regional_inventory(request, options = nil) - # Pass arguments to `insert_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) - # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory, ::Hash] - # Required. Regional inventory information to add to the product. If the - # product already has a `RegionalInventory` resource for the same `region`, - # full replacement of the `RegionalInventory` resource is performed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new - # - # # Call the insert_regional_inventory method. - # result = client.insert_regional_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - # p result - # - def insert_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.call_rpc :insert_regional_inventory, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified `RegionalInventory` resource from the given product - # in your merchant account. It might take up to an hour for the - # `RegionalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_regional_inventory(request, options = nil) - # Pass arguments to `delete_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_regional_inventory(name: nil) - # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `RegionalInventory` resource to delete. - # Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new - # - # # Call the delete_regional_inventory method. - # result = client.delete_regional_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_regional_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.call_rpc :delete_regional_inventory, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the RegionalInventoryService API. - # - # This class represents the configuration for RegionalInventoryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_regional_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the RegionalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_regional_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regional_inventories - ## - # RPC-specific configuration for `insert_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_regional_inventory - ## - # RPC-specific configuration for `delete_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_regional_inventory - - # @private - def initialize parent_rpcs = nil - list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories - @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config - insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory - @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config - delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory - @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb deleted file mode 100644 index e5a4abc7eb5d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - # Credentials for the RegionalInventoryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb deleted file mode 100644 index 3d57ddab57ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - # Path helper methods for the RegionalInventoryService API. - module Paths - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}` - # - # @param account [String] - # @param product [String] - # - # @return [::String] - def product_path account:, product: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/products/#{product}" - end - - ## - # Create a fully-qualified RegionalInventory resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # - # @param account [String] - # @param product [String] - # @param region [String] - # - # @return [::String] - def regional_inventory_path account:, product:, region: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" - - "accounts/#{account}/products/#{product}/regionalInventories/#{region}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb deleted file mode 100644 index c547b55e5b04..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/inventories/v1beta/version" - -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - ## - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - module RegionalInventoryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb deleted file mode 100644 index bf9927d902ac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb +++ /dev/null @@ -1,616 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - module Rest - ## - # REST client for the RegionalInventoryService service. - # - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :regional_inventory_service_stub - - ## - # Configure the RegionalInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegionalInventoryService clients - # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Inventories", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegionalInventoryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @regional_inventory_service_stub.universe_domain - end - - ## - # Create a new RegionalInventoryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegionalInventoryService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @regional_inventory_service_stub = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - end - - # Service calls - - ## - # Lists the `RegionalInventory` resources for the given product in your - # merchant account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be - # used to obtain additional results. - # - # `RegionalInventory` resources are listed per product for a given account. - # - # @overload list_regional_inventories(request, options = nil) - # Pass arguments to `list_regional_inventories` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_regional_inventories(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_regional_inventories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The `name` of the parent product to list `RegionalInventory` - # resources for. Format: `accounts/{account}/products/{product}` - # @param page_size [::Integer] - # The maximum number of `RegionalInventory` resources for the given product - # to return. The service returns fewer than this value if the number of - # inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 100000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # A page token, received from a previous `ListRegionalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegionalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new - # - # # Call the list_regional_inventories method. - # result = client.list_regional_inventories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - # p item - # end - # - def list_regional_inventories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_regional_inventories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_regional_inventories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_regional_inventories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.list_regional_inventories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @regional_inventory_service_stub, :list_regional_inventories, "regional_inventories", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a `RegionalInventory` to a given product in your - # merchant account. - # - # Replaces the full `RegionalInventory` resource if an entry with the same - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`} - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `RegionalInventory` - # resource to appear in products. - # - # @overload insert_regional_inventory(request, options = nil) - # Pass arguments to `insert_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_regional_inventory(parent: nil, regional_inventory: nil) - # Pass arguments to `insert_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @param regional_inventory [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory, ::Hash] - # Required. Regional inventory information to add to the product. If the - # product already has a `RegionalInventory` resource for the same `region`, - # full replacement of the `RegionalInventory` resource is performed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new - # - # # Call the insert_regional_inventory method. - # result = client.insert_regional_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - # p result - # - def insert_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_regional_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.insert_regional_inventory request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified `RegionalInventory` resource from the given product - # in your merchant account. It might take up to an hour for the - # `RegionalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - # - # @overload delete_regional_inventory(request, options = nil) - # Pass arguments to `delete_regional_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_regional_inventory(name: nil) - # Pass arguments to `delete_regional_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `RegionalInventory` resource to delete. - # Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/inventories/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new - # - # # Call the delete_regional_inventory method. - # result = client.delete_regional_inventory request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_regional_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_regional_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Inventories::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_regional_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_regional_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @regional_inventory_service_stub.delete_regional_inventory request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the RegionalInventoryService REST API. - # - # This class represents the configuration for RegionalInventoryService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_regional_inventories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_regional_inventories.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the RegionalInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_regional_inventories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_regional_inventories - ## - # RPC-specific configuration for `insert_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_regional_inventory - ## - # RPC-specific configuration for `delete_regional_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_regional_inventory - - # @private - def initialize parent_rpcs = nil - list_regional_inventories_config = parent_rpcs.list_regional_inventories if parent_rpcs.respond_to? :list_regional_inventories - @list_regional_inventories = ::Gapic::Config::Method.new list_regional_inventories_config - insert_regional_inventory_config = parent_rpcs.insert_regional_inventory if parent_rpcs.respond_to? :insert_regional_inventory - @insert_regional_inventory = ::Gapic::Config::Method.new insert_regional_inventory_config - delete_regional_inventory_config = parent_rpcs.delete_regional_inventory if parent_rpcs.respond_to? :delete_regional_inventory - @delete_regional_inventory = ::Gapic::Config::Method.new delete_regional_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb deleted file mode 100644 index 9b5d8292df39..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb +++ /dev/null @@ -1,249 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - module Rest - ## - # REST service stub for the RegionalInventoryService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the list_regional_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse] - # A result object deserialized from the server's reply - def list_regional_inventories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_regional_inventories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the insert_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # A result object deserialized from the server's reply - def insert_regional_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_regional_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_regional_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_regional_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_regional_inventories REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_regional_inventories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/inventories/v1beta/{parent}/regionalInventories", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_regional_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/inventories/v1beta/{parent}/regionalInventories:insert", - body: "regional_inventory", - matches: [ - ["parent", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_regional_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_regional_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/inventories/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/regionalInventories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb deleted file mode 100644 index 5e53eb307f9f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/inventories/v1beta/regionalinventory.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/shopping/type/types_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\nCgoogle/shopping/merchant/inventories/v1beta/regionalinventory.proto\x12+google.shopping.merchant.inventories.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xd0\x03\n\x11RegionalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\x06region\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12*\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12/\n\nsale_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.Interval\x12\x19\n\x0c\x61vailability\x18\x07 \x01(\tH\x00\x88\x01\x01\x12@\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttribute:u\xea\x41r\n,merchantapi.googleapis.com/RegionalInventory\x12\x42\x61\x63\x63ounts/{account}/products/{product}/regionalInventories/{region}B\x0f\n\r_availability\"\x8d\x01\n\x1eListRegionalInventoriesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1fListRegionalInventoriesResponse\x12\\\n\x14regional_inventories\x18\x01 \x03(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc7\x01\n\x1eInsertRegionalInventoryRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,merchantapi.googleapis.com/RegionalInventory\x12_\n\x12regional_inventory\x18\x02 \x01(\x0b\x32>.google.shopping.merchant.inventories.v1beta.RegionalInventoryB\x03\xe0\x41\x02\"d\n\x1e\x44\x65leteRegionalInventoryRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,merchantapi.googleapis.com/RegionalInventory2\xdf\x06\n\x18RegionalInventoryService\x12\x8d\x02\n\x17ListRegionalInventories\x12K.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest\x1aL.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories\x12\x91\x02\n\x17InsertRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest\x1a>.google.shopping.merchant.inventories.v1beta.RegionalInventory\"i\x82\xd3\xe4\x93\x02\x63\"M/inventories/v1beta/{parent=accounts/*/products/*}/regionalInventories:insert:\x12regional_inventory\x12\xd5\x01\n\x17\x44\x65leteRegionalInventory\x12K.google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/inventories/v1beta/{name=accounts/*/products/*/regionalInventories/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa4\x01\n/com.google.shopping.merchant.inventories.v1betaB\x16RegionalInventoryProtoP\x01ZWcloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.shopping.type.Price", "google/shopping/type/types.proto"], - ["google.type.Interval", "google/type/interval.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - RegionalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.RegionalInventory").msgclass - ListRegionalInventoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest").msgclass - ListRegionalInventoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse").msgclass - InsertRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest").msgclass - DeleteRegionalInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb deleted file mode 100644 index 234e1a0a45a2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb +++ /dev/null @@ -1,69 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/inventories/v1beta/regionalinventory.proto for package 'google.shopping.merchant.inventories.v1beta' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/inventories/v1beta/regionalinventory_pb' - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - module RegionalInventoryService - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.inventories.v1beta.RegionalInventoryService' - - # Lists the `RegionalInventory` resources for the given product in your - # merchant account. The response might contain fewer items than specified by - # `pageSize`. If `pageToken` was returned in previous request, it can be - # used to obtain additional results. - # - # `RegionalInventory` resources are listed per product for a given account. - rpc :ListRegionalInventories, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse - # Inserts a `RegionalInventory` to a given product in your - # merchant account. - # - # Replaces the full `RegionalInventory` resource if an entry with the same - # [`region`][google.shopping.merchant.inventories.v1beta.RegionalInventory.region] - # already exists for the product. - # - # It might take up to 30 minutes for the new or updated `RegionalInventory` - # resource to appear in products. - rpc :InsertRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory - # Deletes the specified `RegionalInventory` resource from the given product - # in your merchant account. It might take up to an hour for the - # `RegionalInventory` to be deleted from the specific product. - # Once you have received a successful delete response, wait for that - # period before attempting a delete again. - rpc :DeleteRegionalInventory, ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb deleted file mode 100644 index 039ea4e3868c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" -require "google/shopping/merchant/inventories/v1beta/version" - -module Google - module Shopping - module Merchant - module Inventories - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/inventories/v1beta/rest" - # client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb deleted file mode 100644 index d6d1ec380433..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index e0b26a33b4b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,403 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index b03587481349..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 38b4b61e6061..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 935946d52792..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index b5731a824060..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 8c6b19d52e3d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 4ac9c4801a3f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb deleted file mode 100644 index a5a5c276b78c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb +++ /dev/null @@ -1,164 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - # Local inventory information for the product. Represents in-store information - # for a specific product at the store specified by - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#store_code `storeCode`}. - # For a list of all accepted attribute values, see the [local product inventory - # data specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [r] name - # @return [::String] - # Output only. The name of the `LocalInventory` resource. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # @!attribute [r] account - # @return [::Integer] - # Output only. The account that owns the product. This field will be ignored - # if set by the client. - # @!attribute [rw] store_code - # @return [::String] - # Required. Immutable. Store code (the store ID from your Business Profile) - # of the physical store the product is sold in. See the [Local product - # inventory data - # specification](https://support.google.com/merchants/answer/3061342) for - # more information. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Price of the product at this store. - # @!attribute [rw] sale_price - # @return [::Google::Shopping::Type::Price] - # Sale price of the product at this store. Mandatory if - # {::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory#sale_price_effective_date `salePriceEffectiveDate`} - # is defined. - # @!attribute [rw] sale_price_effective_date - # @return [::Google::Type::Interval] - # The `TimePeriod` of the - # sale at this store. - # @!attribute [rw] availability - # @return [::String] - # Availability of the product at this store. - # For accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] quantity - # @return [::Integer] - # Quantity of the product available at this store. Must be greater than or - # equal to zero. - # @!attribute [rw] pickup_method - # @return [::String] - # Supported pickup method for this product. Unless the value is `"not - # supported"`, this field must be submitted together with - # `pickupSla`. - # For accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] pickup_sla - # @return [::String] - # Relative time period from the order date for an order for this product, - # from this store, to be ready for pickup. Must be submitted with - # `pickupMethod`. - # For accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] instore_product_location - # @return [::String] - # Location of the product inside the store. Maximum length is 20 bytes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # A list of custom (merchant-provided) attributes. You can also use - # `CustomAttribute` to submit any attribute of the data specification in its - # generic form. - class LocalInventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListLocalInventories` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The `name` of the parent product to list local inventories for. - # Format: - # `accounts/{account}/products/{product}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of `LocalInventory` resources for the given - # product to return. The service returns fewer than this value if the number - # of inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 25000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListLocalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLocalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListLocalInventoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListLocalInventories` method. - # @!attribute [rw] local_inventories - # @return [::Array<::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory>] - # The `LocalInventory` resources for the given product from the specified - # account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListLocalInventoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertLocalInventory` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] local_inventory - # @return [::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory] - # Required. Local inventory information of the product. If the product - # already has a `LocalInventory` resource for the same `storeCode`, full - # replacement of the `LocalInventory` resource is performed. - class InsertLocalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteLocalInventory` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the local inventory for the given product to delete. - # Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - class DeleteLocalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb deleted file mode 100644 index c59bf0b46ed9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Inventories - module V1beta - # Regional inventory information for the product. Represents specific - # information like price and availability for a given product in a specific - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#region `region`}. - # For a list of all accepted attribute values, see the [regional product - # inventory data - # specification](https://support.google.com/merchants/answer/9698880). - # @!attribute [r] name - # @return [::String] - # Output only. The name of the `RegionalInventory` resource. - # Format: - # `{regional_inventory.name=accounts/{account}/products/{product}/regionalInventories/{region}` - # @!attribute [r] account - # @return [::Integer] - # Output only. The account that owns the product. This field will be ignored - # if set by the client. - # @!attribute [rw] region - # @return [::String] - # Required. Immutable. ID of the region for this - # `RegionalInventory` resource. See the [Regional availability and - # pricing](https://support.google.com/merchants/answer/9698880) for more - # details. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Price of the product in this region. - # @!attribute [rw] sale_price - # @return [::Google::Shopping::Type::Price] - # Sale price of the product in this region. Mandatory if - # {::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory#sale_price_effective_date `salePriceEffectiveDate`} - # is defined. - # @!attribute [rw] sale_price_effective_date - # @return [::Google::Type::Interval] - # The `TimePeriod` of the - # sale price in this region. - # @!attribute [rw] availability - # @return [::String] - # Availability of the product in this region. - # For accepted attribute values, see the [regional product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # A list of custom (merchant-provided) attributes. You can also use - # `CustomAttribute` to submit any attribute of the data specification in its - # generic form. - class RegionalInventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListRegionalInventories` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The `name` of the parent product to list `RegionalInventory` - # resources for. Format: `accounts/{account}/products/{product}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of `RegionalInventory` resources for the given product - # to return. The service returns fewer than this value if the number of - # inventories for the given product is less that than the `pageSize`. The - # default value is 25000. The maximum value is 100000; If a value higher than - # the maximum is specified, then the `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRegionalInventories` call. - # Provide the page token to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRegionalInventories` - # must match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListRegionalInventoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListRegionalInventories` method. - # @!attribute [rw] regional_inventories - # @return [::Array<::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory>] - # The `RegionalInventory` resources for the given product from the specified - # account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRegionalInventoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertRegionalInventory` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account and product where this inventory will be inserted. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] regional_inventory - # @return [::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory] - # Required. Regional inventory information to add to the product. If the - # product already has a `RegionalInventory` resource for the same `region`, - # full replacement of the `RegionalInventory` resource is performed. - class InsertRegionalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteRegionalInventory` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `RegionalInventory` resource to delete. - # Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - class DeleteRegionalInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 7c4fd780655b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - 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 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 - # 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 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb deleted file mode 100644 index ba88575c495d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile deleted file mode 100644 index 3ce23806cf79..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-shopping-merchant-inventories-v1beta", path: "../" -else - gem "google-shopping-merchant-inventories-v1beta" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb deleted file mode 100644 index b3f6412401ef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the delete_local_inventory call in the LocalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory. -# -def delete_local_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new - - # Call the delete_local_inventory method. - result = client.delete_local_inventory request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb deleted file mode 100644 index 8f09761abc4d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the insert_local_inventory call in the LocalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory. -# -def insert_local_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new - - # Call the insert_local_inventory method. - result = client.insert_local_inventory request - - # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - p result -end -# [END merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb deleted file mode 100644 index 09fa0d8dd173..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the list_local_inventories call in the LocalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories. -# -def list_local_inventories - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new - - # Call the list_local_inventories method. - result = client.list_local_inventories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory. - p item - end -end -# [END merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb deleted file mode 100644 index e59e0d65e072..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the delete_regional_inventory call in the RegionalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory. -# -def delete_regional_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new - - # Call the delete_regional_inventory method. - result = client.delete_regional_inventory request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb deleted file mode 100644 index c5dce5c3b443..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the insert_regional_inventory call in the RegionalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory. -# -def insert_regional_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new - - # Call the insert_regional_inventory method. - result = client.insert_regional_inventory request - - # The returned object is of type Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - p result -end -# [END merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb deleted file mode 100644 index 9814e15efae0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync] -require "google/shopping/merchant/inventories/v1beta" - -## -# Snippet for the list_regional_inventories call in the RegionalInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories. -# -def list_regional_inventories - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new - - # Call the list_regional_inventories method. - result = client.list_regional_inventories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory. - p item - end -end -# [END merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync] diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json deleted file mode 100644 index 01d13ac306c5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/snippets/snippet_metadata_google.shopping.merchant.inventories.v1beta.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-inventories-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.inventories.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync", - "title": "Snippet for the list_local_inventories call in the LocalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories.", - "file": "local_inventory_service/list_local_inventories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_local_inventories", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#list_local_inventories", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse", - "client": { - "short_name": "LocalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" - }, - "method": { - "short_name": "ListLocalInventories", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.ListLocalInventories", - "service": { - "short_name": "LocalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync", - "title": "Snippet for the insert_local_inventory call in the LocalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory.", - "file": "local_inventory_service/insert_local_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_local_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#insert_local_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory", - "client": { - "short_name": "LocalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" - }, - "method": { - "short_name": "InsertLocalInventory", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.InsertLocalInventory", - "service": { - "short_name": "LocalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LocalInventoryService_DeleteLocalInventory_sync", - "title": "Snippet for the delete_local_inventory call in the LocalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory.", - "file": "local_inventory_service/delete_local_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_local_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client#delete_local_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "LocalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client" - }, - "method": { - "short_name": "DeleteLocalInventory", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService.DeleteLocalInventory", - "service": { - "short_name": "LocalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.LocalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync", - "title": "Snippet for the list_regional_inventories call in the RegionalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories.", - "file": "regional_inventory_service/list_regional_inventories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_regional_inventories", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#list_regional_inventories", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse", - "client": { - "short_name": "RegionalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" - }, - "method": { - "short_name": "ListRegionalInventories", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.ListRegionalInventories", - "service": { - "short_name": "RegionalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync", - "title": "Snippet for the insert_regional_inventory call in the RegionalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory.", - "file": "regional_inventory_service/insert_regional_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_regional_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#insert_regional_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory", - "client": { - "short_name": "RegionalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" - }, - "method": { - "short_name": "InsertRegionalInventory", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.InsertRegionalInventory", - "service": { - "short_name": "RegionalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_RegionalInventoryService_DeleteRegionalInventory_sync", - "title": "Snippet for the delete_regional_inventory call in the RegionalInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory.", - "file": "regional_inventory_service/delete_regional_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_regional_inventory", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client#delete_regional_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegionalInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client" - }, - "method": { - "short_name": "DeleteRegionalInventory", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService.DeleteRegionalInventory", - "service": { - "short_name": "RegionalInventoryService", - "full_name": "google.shopping.merchant.inventories.v1beta.RegionalInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb deleted file mode 100644 index b9e575647ee8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/inventories/v1beta/local_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_local_inventory_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.local_inventory_path account: "value0", product: "value1", store_code: "value2" - assert_equal "accounts/value0/products/value1/localInventories/value2", path - end - end - - def test_product_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path account: "value0", product: "value1" - assert_equal "accounts/value0/products/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb deleted file mode 100644 index 0e9db691f7d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb +++ /dev/null @@ -1,256 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/inventories/v1beta/localinventory_pb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service/rest" - - -class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_local_inventories - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_local_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_list_local_inventories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_local_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_local_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_local_inventories parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_local_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_local_inventories({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_local_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_local_inventories_client_stub.call_count - end - end - end - - def test_insert_local_inventory - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - local_inventory = {} - - insert_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_insert_local_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_local_inventory_client_stub.call_count - end - end - end - - def test_delete_local_inventory - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_local_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::ServiceStub.stub :transcode_delete_local_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_local_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_local_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_local_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_local_inventory_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb deleted file mode 100644 index 4b6df7b218ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb +++ /dev/null @@ -1,261 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/inventories/v1beta/localinventory_pb" -require "google/shopping/merchant/inventories/v1beta/localinventory_services_pb" -require "google/shopping/merchant/inventories/v1beta/local_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_local_inventories - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_local_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_local_inventories, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_local_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_local_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_local_inventories parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_local_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_local_inventories({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_local_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListLocalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_local_inventories_client_stub.call_rpc_count - end - end - - def test_insert_local_inventory - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - local_inventory = {} - - insert_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_local_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventory), request["local_inventory"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_local_inventory parent: parent, local_inventory: local_inventory do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_local_inventory({ parent: parent, local_inventory: local_inventory }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertLocalInventoryRequest.new(parent: parent, local_inventory: local_inventory), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_local_inventory_client_stub.call_rpc_count - end - end - - def test_delete_local_inventory - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_local_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_local_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_local_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_local_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_local_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_local_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_local_inventory({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_local_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteLocalInventoryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_local_inventory_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb deleted file mode 100644 index 88c3367d5d24..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_product_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path account: "value0", product: "value1" - assert_equal "accounts/value0/products/value1", path - end - end - - def test_regional_inventory_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.regional_inventory_path account: "value0", product: "value1", region: "value2" - assert_equal "accounts/value0/products/value1/regionalInventories/value2", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb deleted file mode 100644 index 1be5fd500d6c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb +++ /dev/null @@ -1,256 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest" - - -class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_regional_inventories - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_regional_inventories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_list_regional_inventories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_regional_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_regional_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_regional_inventories parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_regional_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_regional_inventories({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_regional_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_regional_inventories_client_stub.call_count - end - end - end - - def test_insert_regional_inventory - # Create test objects. - client_result = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - regional_inventory = {} - - insert_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_insert_regional_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_regional_inventory_client_stub.call_count - end - end - end - - def test_delete_regional_inventory - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_regional_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::ServiceStub.stub :transcode_delete_regional_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_regional_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_regional_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_regional_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_regional_inventory_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb deleted file mode 100644 index 5cc8597424e0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb +++ /dev/null @@ -1,261 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/inventories/v1beta/regionalinventory_pb" -require "google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb" -require "google/shopping/merchant/inventories/v1beta/regional_inventory_service" - -class ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_regional_inventories - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_regional_inventories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_regional_inventories, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_regional_inventories_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_regional_inventories({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_regional_inventories parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_regional_inventories ::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_regional_inventories({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_regional_inventories(::Google::Shopping::Merchant::Inventories::V1beta::ListRegionalInventoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_regional_inventories_client_stub.call_rpc_count - end - end - - def test_insert_regional_inventory - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - regional_inventory = {} - - insert_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_regional_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventory), request["regional_inventory"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::InsertRegionalInventoryRequest.new(parent: parent, regional_inventory: regional_inventory), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_regional_inventory_client_stub.call_rpc_count - end - end - - def test_delete_regional_inventory - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_regional_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_regional_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_regional_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_regional_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_regional_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_regional_inventory ::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_regional_inventory({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_regional_inventory(::Google::Shopping::Merchant::Inventories::V1beta::DeleteRegionalInventoryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_regional_inventory_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.gitignore b/owl-bot-staging/google-shopping-merchant-inventories/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-inventories/.repo-metadata.json deleted file mode 100644 index 9b1473e3d0c6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-inventories", - "distribution_name": "google-shopping-merchant-inventories", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant 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.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-inventories/.rubocop.yml deleted file mode 100644 index 9b86de31b0a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-inventories.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-inventories.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.toys.rb b/owl-bot-staging/google-shopping-merchant-inventories/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/.yardopts b/owl-bot-staging/google-shopping-merchant-inventories/.yardopts deleted file mode 100644 index 7f1a344f5a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Merchant API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-inventories/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-inventories/AUTHENTICATION.md deleted file mode 100644 index f42b32326ae4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-inventories library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-shopping-merchant-inventories library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/shopping/merchant/inventories" - -client = Google::Shopping::Merchant::Inventories.local_inventory_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/inventories" - -Google::Shopping::Merchant::Inventories.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Shopping::Merchant::Inventories.local_inventory_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-inventories -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/inventories" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Shopping::Merchant::Inventories.local_inventory_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-inventories/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-inventories/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-inventories/Gemfile b/owl-bot-staging/google-shopping-merchant-inventories/Gemfile deleted file mode 100644 index b0567b7a0ddd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-shopping-merchant-inventories-v1beta", path: "../google-shopping-merchant-inventories-v1beta" - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-inventories/LICENSE.md b/owl-bot-staging/google-shopping-merchant-inventories/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-inventories/README.md b/owl-bot-staging/google-shopping-merchant-inventories/README.md deleted file mode 100644 index b4f26b43f6d0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Ruby Client for the Merchant API - -Programmatically manage your Merchant Center accounts. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-shopping-merchant-inventories-v*`. -The gem `google-shopping-merchant-inventories` is the main client library that brings the -verisoned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-inventories) -for this library, google-shopping-merchant-inventories, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-shopping-merchant-inventories-v1beta](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta). - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for more usage information. - -## Quick Start - -``` -$ gem install google-shopping-merchant-inventories -``` - -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) - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-inventories`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-inventories-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-inventories`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-shopping-merchant-inventories-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-inventories/Rakefile b/owl-bot-staging/google-shopping-merchant-inventories/Rakefile deleted file mode 100644 index 0c957483ff95..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-inventories acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials" - ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-shopping-merchant-inventories gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-inventories gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-inventories gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-shopping-merchant-inventories gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-inventories" - header "google-shopping-merchant-inventories rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-inventories yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-inventories test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-shopping-merchant-inventories smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-shopping-merchant-inventories acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/google-shopping-merchant-inventories.gemspec b/owl-bot-staging/google-shopping-merchant-inventories/google-shopping-merchant-inventories.gemspec deleted file mode 100644 index 5fef8b0e1ba3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/google-shopping-merchant-inventories.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/inventories/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-inventories" - gem.version = Google::Shopping::Merchant::Inventories::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-inventories-v1beta", ">= 0.2", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/lib/google-shopping-merchant-inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories/lib/google-shopping-merchant-inventories.rb deleted file mode 100644 index a2288cb0b57e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/lib/google-shopping-merchant-inventories.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/inventories" unless defined? Google::Shopping::Merchant::Inventories::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories.rb b/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories.rb deleted file mode 100644 index 39b924385f70..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/shopping/merchant/inventories/version" - -require "googleauth" - -module Google - module Shopping - module Merchant - module Inventories - ## - # Create a new client object for LocalInventoryService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta/Google/Shopping/Merchant/Inventories/V1beta/LocalInventoryService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the LocalInventoryService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About LocalInventoryService - # - # Service to manage local inventory for products - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.local_inventory_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/inventories/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Inventories - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Inventories.const_get(package_name).const_get(:LocalInventoryService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for RegionalInventoryService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client](https://rubydoc.info/gems/google-shopping-merchant-inventories-v1beta/Google/Shopping/Merchant/Inventories/V1beta/RegionalInventoryService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the RegionalInventoryService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About RegionalInventoryService - # - # Service to manage regional inventory for products. There is also separate - # `regions` resource and API to manage regions definitions. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.regional_inventory_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/inventories/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Inventories - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Inventories.const_get(package_name).const_get(:RegionalInventoryService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - end - end - end -end - -helper_path = ::File.join __dir__, "inventories", "helpers.rb" -require "google/shopping/merchant/inventories/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories/version.rb b/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories/version.rb deleted file mode 100644 index 0c575eedf735..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/lib/google/shopping/merchant/inventories/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Inventories - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/client_test.rb b/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/client_test.rb deleted file mode 100644 index ca90eb78b051..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/client_test.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/inventories" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Shopping::Merchant::Inventories::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_local_inventory_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Inventories.local_inventory_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client, client - end - end - - def test_local_inventory_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Inventories.local_inventory_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client, client - end - end - - def test_regional_inventory_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Inventories.regional_inventory_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client, client - end - end - - def test_regional_inventory_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Inventories.regional_inventory_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/version_test.rb b/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/version_test.rb deleted file mode 100644 index 54dbc1824a72..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/test/google/shopping/merchant/inventories/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/inventories/version" - -class Google::Shopping::Merchant::Inventories::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Shopping::Merchant::Inventories::VERSION - end -end diff --git a/owl-bot-staging/google-shopping-merchant-inventories/test/helper.rb b/owl-bot-staging/google-shopping-merchant-inventories/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json deleted file mode 100644 index d1991995c1df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta", - "distribution_name": "google-shopping-merchant-lfp-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-lfp-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml deleted file mode 100644 index 5bfed50cae80..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-lfp-v1beta.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-lfp-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md deleted file mode 100644 index f2270ceb15f9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-lfp-v1beta library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-shopping-merchant-lfp-v1beta library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/shopping/merchant/lfp/v1beta" - -client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/lfp/v1beta" - -::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-lfp-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/lfp/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile deleted file mode 100644 index 95163a6d11f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md deleted file mode 100644 index 186a8337b6b2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/README.md +++ /dev/null @@ -1,143 +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-lfp](https://rubygems.org/gems/google-shopping-merchant-lfp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-lfp-v1beta -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/lfp/v1beta" - -client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new -request = ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new # (request fields as keyword arguments...) -response = client.insert_lfp_inventory request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for general usage information. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -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 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-lfp`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-lfp-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-lfp`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-shopping-merchant-lfp-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile deleted file mode 100644 index 566fa6b6b9b2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-lfp-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" - ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-shopping-merchant-lfp-v1beta gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-lfp-v1beta gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-lfp-v1beta gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-shopping-merchant-lfp-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-lfp-v1beta" - header "google-shopping-merchant-lfp-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-lfp-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-lfp-v1beta test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-shopping-merchant-lfp-v1beta smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-shopping-merchant-lfp-v1beta acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json deleted file mode 100644 index ea08ef885e20..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/gapic_metadata.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.lfp.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Lfp::V1beta", - "services": { - "LfpInventoryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client", - "rpcs": { - "InsertLfpInventory": { - "methods": [ - "insert_lfp_inventory" - ] - } - } - } - } - }, - "LfpSaleService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client", - "rpcs": { - "InsertLfpSale": { - "methods": [ - "insert_lfp_sale" - ] - } - } - } - } - }, - "LfpStoreService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client", - "rpcs": { - "GetLfpStore": { - "methods": [ - "get_lfp_store" - ] - }, - "InsertLfpStore": { - "methods": [ - "insert_lfp_store" - ] - }, - "DeleteLfpStore": { - "methods": [ - "delete_lfp_store" - ] - }, - "ListLfpStores": { - "methods": [ - "list_lfp_stores" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec deleted file mode 100644 index 9d9056123bfd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/google-shopping-merchant-lfp-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/lfp/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-lfp-v1beta" - gem.version = Google::Shopping::Merchant::Lfp::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-lfp-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-lfp instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb deleted file mode 100644 index 3f6901699442..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/shopping/merchant/lfp/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb deleted file mode 100644 index 4a08d15ef8b6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service" -require "google/shopping/merchant/lfp/v1beta/version" - -module Google - module Shopping - module Merchant - module Lfp - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1beta" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1beta" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/lfp/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb deleted file mode 100644 index dd19348e914c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - module LfpInventoryService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_inventory_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb deleted file mode 100644 index f47e3e3bbc8e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb +++ /dev/null @@ -1,439 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - ## - # Client for the LfpInventoryService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_inventory_service_stub - - ## - # Configure the LfpInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpInventoryService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpInventoryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lfp_inventory_service_stub.universe_domain - end - - ## - # Create a new LfpInventoryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpInventoryService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @lfp_inventory_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - end - - # Service calls - - ## - # Inserts a `LfpInventory` resource for the given target merchant account. If - # the resource already exists, it will be replaced. The inventory - # automatically expires after 30 days. - # - # @overload insert_lfp_inventory(request, options = nil) - # Pass arguments to `insert_lfp_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) - # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{account}` - # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory, ::Hash] - # Required. The inventory to insert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new - # - # # Call the insert_lfp_inventory method. - # result = client.insert_lfp_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. - # p result - # - def insert_lfp_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_inventory_service_stub.call_rpc :insert_lfp_inventory, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpInventoryService API. - # - # This class represents the configuration for LfpInventoryService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_lfp_inventory to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the LfpInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_lfp_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_inventory - - # @private - def initialize parent_rpcs = nil - insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory - @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb deleted file mode 100644 index c65dcf4dc629..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - # Credentials for the LfpInventoryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb deleted file mode 100644 index f76ace026e35..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - # Path helper methods for the LfpInventoryService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified LfpInventory resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` - # - # @param account [String] - # @param target_merchant [String] - # @param store_code [String] - # @param offer [String] - # - # @return [::String] - def lfp_inventory_path account:, target_merchant:, store_code:, offer: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" - raise ::ArgumentError, "store_code cannot contain /" if store_code.to_s.include? "/" - - "accounts/#{account}/lfpInventories/#{target_merchant}~#{store_code}~#{offer}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb deleted file mode 100644 index 1bfbde4d0c29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - module LfpInventoryService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb deleted file mode 100644 index 3ec94b2563f3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb +++ /dev/null @@ -1,406 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - module Rest - ## - # REST client for the LfpInventoryService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_inventory_service_stub - - ## - # Configure the LfpInventoryService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpInventoryService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpInventoryService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lfp_inventory_service_stub.universe_domain - end - - ## - # Create a new LfpInventoryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpInventoryService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @lfp_inventory_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - end - - # Service calls - - ## - # Inserts a `LfpInventory` resource for the given target merchant account. If - # the resource already exists, it will be replaced. The inventory - # automatically expires after 30 days. - # - # @overload insert_lfp_inventory(request, options = nil) - # Pass arguments to `insert_lfp_inventory` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil) - # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{account}` - # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory, ::Hash] - # Required. The inventory to insert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new - # - # # Call the insert_lfp_inventory method. - # result = client.insert_lfp_inventory request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. - # p result - # - def insert_lfp_inventory request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_inventory_service_stub.insert_lfp_inventory request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpInventoryService REST API. - # - # This class represents the configuration for LfpInventoryService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_lfp_inventory to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_inventory.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the LfpInventoryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_lfp_inventory` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_inventory - - # @private - def initialize parent_rpcs = nil - insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory - @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb deleted file mode 100644 index 1e703ffbd423..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - module Rest - ## - # REST service stub for the LfpInventoryService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the insert_lfp_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # A result object deserialized from the server's reply - def insert_lfp_inventory request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_inventory_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_lfp_inventory REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_lfp_inventory_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/lfp/v1beta/{parent}/lfpInventories:insert", - body: "lfp_inventory", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb deleted file mode 100644 index 1d564b85fdc3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/client" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new - # - module LfpSaleService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_sale_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb deleted file mode 100644 index 60530f7cde49..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb +++ /dev/null @@ -1,437 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - ## - # Client for the LfpSaleService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_sale_service_stub - - ## - # Configure the LfpSaleService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpSaleService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpSaleService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lfp_sale_service_stub.universe_domain - end - - ## - # Create a new LfpSaleService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpSaleService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/shopping/merchant/lfp/v1beta/lfpsale_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @lfp_sale_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - end - - # Service calls - - ## - # Inserts a `LfpSale` for the given merchant. - # - # @overload insert_lfp_sale(request, options = nil) - # Pass arguments to `insert_lfp_sale` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) - # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{lfp_partner}` - # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale, ::Hash] - # Required. The sale to insert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new - # - # # Call the insert_lfp_sale method. - # result = client.insert_lfp_sale request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. - # p result - # - def insert_lfp_sale request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_lfp_sale.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_lfp_sale.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_sale_service_stub.call_rpc :insert_lfp_sale, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpSaleService API. - # - # This class represents the configuration for LfpSaleService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_lfp_sale to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the LfpSaleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_lfp_sale` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_sale - - # @private - def initialize parent_rpcs = nil - insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale - @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb deleted file mode 100644 index 003e33388e6f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - # Credentials for the LfpSaleService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb deleted file mode 100644 index 39dab5a49ede..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - # Path helper methods for the LfpSaleService API. - module Paths - ## - # Create a fully-qualified LfpSale resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpSales/{sale}` - # - # @param account [String] - # @param sale [String] - # - # @return [::String] - def lfp_sale_path account:, sale: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/lfpSales/#{sale}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb deleted file mode 100644 index a951dd3591ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new - # - module LfpSaleService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb deleted file mode 100644 index 43ccf822d585..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb +++ /dev/null @@ -1,404 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - module Rest - ## - # REST client for the LfpSaleService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_sale_service_stub - - ## - # Configure the LfpSaleService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpSaleService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpSaleService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lfp_sale_service_stub.universe_domain - end - - ## - # Create a new LfpSaleService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpSaleService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @lfp_sale_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - end - - # Service calls - - ## - # Inserts a `LfpSale` for the given merchant. - # - # @overload insert_lfp_sale(request, options = nil) - # Pass arguments to `insert_lfp_sale` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_lfp_sale(parent: nil, lfp_sale: nil) - # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account. - # Format: `accounts/{lfp_partner}` - # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale, ::Hash] - # Required. The sale to insert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new - # - # # Call the insert_lfp_sale method. - # result = client.insert_lfp_sale request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. - # p result - # - def insert_lfp_sale request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_lfp_sale.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_lfp_sale.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_sale_service_stub.insert_lfp_sale request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpSaleService REST API. - # - # This class represents the configuration for LfpSaleService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # insert_lfp_sale to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_lfp_sale.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the LfpSaleService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_lfp_sale` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_sale - - # @private - def initialize parent_rpcs = nil - insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale - @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb deleted file mode 100644 index e227102d07a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - module Rest - ## - # REST service stub for the LfpSaleService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the insert_lfp_sale REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # A result object deserialized from the server's reply - def insert_lfp_sale request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_sale_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_lfp_sale REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_lfp_sale_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/lfp/v1beta/{parent}/lfpSales:insert", - body: "lfp_sale", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb deleted file mode 100644 index 4d063abe878c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/client" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_store_service" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - module LfpStoreService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp_store_service", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb deleted file mode 100644 index c26afe89879f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb +++ /dev/null @@ -1,741 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - ## - # Client for the LfpStoreService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_store_service_stub - - ## - # Configure the LfpStoreService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpStoreService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpStoreService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lfp_store_service_stub.universe_domain - end - - ## - # Create a new LfpStoreService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpStoreService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/shopping/merchant/lfp/v1beta/lfpstore_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @lfp_store_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - end - - # Service calls - - ## - # Retrieves information about a store. - # - # @overload get_lfp_store(request, options = nil) - # Pass arguments to `get_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lfp_store(name: nil) - # Pass arguments to `get_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to retrieve. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new - # - # # Call the get_lfp_store method. - # result = client.get_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p result - # - def get_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :get_lfp_store, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a store for the target merchant. If the store with the same store - # code already exists, it will be replaced. - # - # @overload insert_lfp_store(request, options = nil) - # Pass arguments to `insert_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload insert_lfp_store(parent: nil, lfp_store: nil) - # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account - # Format: `accounts/{account}` - # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore, ::Hash] - # Required. The store to insert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new - # - # # Call the insert_lfp_store method. - # result = client.insert_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p result - # - def insert_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.insert_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :insert_lfp_store, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a store for a target merchant. - # - # @overload delete_lfp_store(request, options = nil) - # Pass arguments to `delete_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_lfp_store(name: nil) - # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to delete for the target merchant account. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new - # - # # Call the delete_lfp_store method. - # result = client.delete_lfp_store request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_lfp_store.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :delete_lfp_store, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the stores of the target merchant, specified by the filter in - # `ListLfpStoresRequest`. - # - # @overload list_lfp_stores(request, options = nil) - # Pass arguments to `list_lfp_stores` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP partner. - # Format: `accounts/{account}` - # @param target_account [::Integer] - # Required. The Merchant Center id of the merchant to list stores for. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpStore` resources for the given account - # to return. The service returns fewer than this value if the number of - # stores for the given account is less than the `pageSize`. The default value - # is 250. The maximum value is 1000; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListLfpStoresRequest` - # call. Provide the page token to retrieve the subsequent page. When - # paginating, all other parameters provided to `ListLfpStoresRequest` must - # match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} - # in the response to the previous request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new - # - # # Call the list_lfp_stores method. - # result = client.list_lfp_stores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p item - # end - # - def list_lfp_stores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_lfp_stores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lfp_stores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.call_rpc :list_lfp_stores, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpStoreService API. - # - # This class represents the configuration for LfpStoreService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_store to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the LfpStoreService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_store - ## - # RPC-specific configuration for `insert_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_store - ## - # RPC-specific configuration for `delete_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lfp_store - ## - # RPC-specific configuration for `list_lfp_stores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lfp_stores - - # @private - def initialize parent_rpcs = nil - get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store - @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config - insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store - @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config - delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store - @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config - list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores - @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb deleted file mode 100644 index 537bef4e2fa4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - # Credentials for the LfpStoreService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb deleted file mode 100644 index eccaaaef2cbc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - # Path helper methods for the LfpStoreService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified LfpStore resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # - # @param account [String] - # @param target_merchant [String] - # @param store_code [String] - # - # @return [::String] - def lfp_store_path account:, target_merchant:, store_code: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/" - - "accounts/#{account}/lfpStores/#{target_merchant}~#{store_code}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb deleted file mode 100644 index 53a918964596..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/lfp/v1beta/version" - -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/paths" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - ## - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - module LfpStoreService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb deleted file mode 100644 index 5c23d60663d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb +++ /dev/null @@ -1,687 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - module Rest - ## - # REST client for the LfpStoreService service. - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lfp_store_service_stub - - ## - # Configure the LfpStoreService Client class. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LfpStoreService clients - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LfpStoreService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lfp_store_service_stub.universe_domain - end - - ## - # Create a new LfpStoreService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LfpStoreService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @lfp_store_service_stub = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - end - - # Service calls - - ## - # Retrieves information about a store. - # - # @overload get_lfp_store(request, options = nil) - # Pass arguments to `get_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lfp_store(name: nil) - # Pass arguments to `get_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to retrieve. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new - # - # # Call the get_lfp_store method. - # result = client.get_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p result - # - def get_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_lfp_store.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.get_lfp_store request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inserts a store for the target merchant. If the store with the same store - # code already exists, it will be replaced. - # - # @overload insert_lfp_store(request, options = nil) - # Pass arguments to `insert_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload insert_lfp_store(parent: nil, lfp_store: nil) - # Pass arguments to `insert_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP provider account - # Format: `accounts/{account}` - # @param lfp_store [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore, ::Hash] - # Required. The store to insert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new - # - # # Call the insert_lfp_store method. - # result = client.insert_lfp_store request - # - # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p result - # - def insert_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.insert_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.insert_lfp_store.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.insert_lfp_store request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a store for a target merchant. - # - # @overload delete_lfp_store(request, options = nil) - # Pass arguments to `delete_lfp_store` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_lfp_store(name: nil) - # Pass arguments to `delete_lfp_store` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the store to delete for the target merchant account. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new - # - # # Call the delete_lfp_store method. - # result = client.delete_lfp_store request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_lfp_store request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_lfp_store.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_lfp_store.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lfp_store.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.delete_lfp_store request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the stores of the target merchant, specified by the filter in - # `ListLfpStoresRequest`. - # - # @overload list_lfp_stores(request, options = nil) - # Pass arguments to `list_lfp_stores` via a request object, either of type - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_lfp_stores(parent: nil, target_account: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lfp_stores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The LFP partner. - # Format: `accounts/{account}` - # @param target_account [::Integer] - # Required. The Merchant Center id of the merchant to list stores for. - # @param page_size [::Integer] - # Optional. The maximum number of `LfpStore` resources for the given account - # to return. The service returns fewer than this value if the number of - # stores for the given account is less than the `pageSize`. The default value - # is 250. The maximum value is 1000; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListLfpStoresRequest` - # call. Provide the page token to retrieve the subsequent page. When - # paginating, all other parameters provided to `ListLfpStoresRequest` must - # match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} - # in the response to the previous request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/lfp/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new - # - # # Call the list_lfp_stores method. - # result = client.list_lfp_stores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - # p item - # end - # - def list_lfp_stores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_lfp_stores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_lfp_stores.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lfp_stores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lfp_store_service_stub.list_lfp_stores request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, "lfp_stores", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LfpStoreService REST API. - # - # This class represents the configuration for LfpStoreService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_lfp_store to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_lfp_store.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the LfpStoreService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lfp_store - ## - # RPC-specific configuration for `insert_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_lfp_store - ## - # RPC-specific configuration for `delete_lfp_store` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lfp_store - ## - # RPC-specific configuration for `list_lfp_stores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lfp_stores - - # @private - def initialize parent_rpcs = nil - get_lfp_store_config = parent_rpcs.get_lfp_store if parent_rpcs.respond_to? :get_lfp_store - @get_lfp_store = ::Gapic::Config::Method.new get_lfp_store_config - insert_lfp_store_config = parent_rpcs.insert_lfp_store if parent_rpcs.respond_to? :insert_lfp_store - @insert_lfp_store = ::Gapic::Config::Method.new insert_lfp_store_config - delete_lfp_store_config = parent_rpcs.delete_lfp_store if parent_rpcs.respond_to? :delete_lfp_store - @delete_lfp_store = ::Gapic::Config::Method.new delete_lfp_store_config - list_lfp_stores_config = parent_rpcs.list_lfp_stores if parent_rpcs.respond_to? :list_lfp_stores - @list_lfp_stores = ::Gapic::Config::Method.new list_lfp_stores_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb deleted file mode 100644 index ae689af6b895..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb +++ /dev/null @@ -1,308 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - module Rest - ## - # REST service stub for the LfpStoreService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the get_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # A result object deserialized from the server's reply - def get_lfp_store request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lfp_store_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the insert_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # A result object deserialized from the server's reply - def insert_lfp_store request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_lfp_store_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_lfp_store request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lfp_store_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_lfp_stores REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse] - # A result object deserialized from the server's reply - def list_lfp_stores request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lfp_stores_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lfp_store_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/lfp/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_insert_lfp_store_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/lfp/v1beta/{parent}/lfpStores:insert", - body: "lfp_store", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lfp_store REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_lfp_store_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/lfp/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/lfpStores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lfp_stores REST call - # - # @param request_pb [::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_lfp_stores_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/lfp/v1beta/{parent}/lfpStores", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_pb.rb deleted file mode 100644 index 5d95749dccc4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_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/lfp/v1beta/lfpinventory.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n6google/shopping/merchant/lfp/v1beta/lfpinventory.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa2\x05\n\x0cLfpInventory\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08offer_id\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x19\n\x0c\x61vailability\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x08quantity\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x38\n\x0f\x63ollection_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x1f\n\rpickup_method\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1c\n\npickup_sla\x18\r \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0e \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01:\x95\x01\xea\x41\x91\x01\n\'merchantapi.googleapis.com/LfpInventory\x12Haccounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}*\x0elfpInventories2\x0clfpInventoryB\x07\n\x05_gtinB\x0b\n\t_quantityB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\r\n\x0b_feed_label\"\xab\x01\n\x19InsertLfpInventoryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'merchantapi.googleapis.com/LfpInventory\x12M\n\rlfp_inventory\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.lfp.v1beta.LfpInventoryB\x03\xe0\x41\x02\x32\xb6\x02\n\x13LfpInventoryService\x12\xd5\x01\n\x12InsertLfpInventory\x12>.google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest\x1a\x31.google.shopping.merchant.lfp.v1beta.LfpInventory\"L\x82\xd3\xe4\x93\x02\x46\"5/lfp/v1beta/{parent=accounts/*}/lfpInventories:insert:\rlfp_inventory\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xba\x01\n\'com.google.shopping.merchant.lfp.v1betaB\x11LfpInventoryProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.shopping.type.Price", "google/shopping/type/types.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - LfpInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpInventory").msgclass - InsertLfpInventoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb deleted file mode 100644 index 9395c7140c6d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1beta/lfpinventory.proto for package 'google.shopping.merchant.lfp.v1beta' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/lfp/v1beta/lfpinventory_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpInventoryService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpInventoryService' - - # Inserts a `LfpInventory` resource for the given target merchant account. If - # the resource already exists, it will be replaced. The inventory - # automatically expires after 30 days. - rpc :InsertLfpInventory, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb deleted file mode 100644 index 775eb3d1da5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_pb.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1beta/lfpsale.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n1google/shopping/merchant/lfp/v1beta/lfpsale.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xe8\x03\n\x07LfpSale\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x17\n\nstore_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08offer_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04gtin\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12/\n\x05price\x18\x08 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\t \x01(\x03\x42\x03\xe0\x41\x02\x12\x32\n\tsale_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x1d\n\x03uid\x18\x0b \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01H\x00\x88\x01\x01\x12\x1c\n\nfeed_label\x18\x0c \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01:^\xea\x41[\n\"merchantapi.googleapis.com/LfpSale\x12\"accounts/{account}/lfpSales/{sale}*\x08lfpSales2\x07lfpSaleB\x06\n\x04_uidB\r\n\x0b_feed_label\"p\n\x14InsertLfpSaleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x08lfp_sale\x18\x02 \x01(\x0b\x32,.google.shopping.merchant.lfp.v1beta.LfpSaleB\x03\xe0\x41\x02\x32\x97\x02\n\x0eLfpSaleService\x12\xbb\x01\n\rInsertLfpSale\x12\x39.google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest\x1a,.google.shopping.merchant.lfp.v1beta.LfpSale\"A\x82\xd3\xe4\x93\x02;\"//lfp/v1beta/{parent=accounts/*}/lfpSales:insert:\x08lfp_sale\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentBz\n\'com.google.shopping.merchant.lfp.v1betaB\x0cLfpSaleProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.shopping.type.Price", "google/shopping/type/types.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - LfpSale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpSale").msgclass - InsertLfpSaleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb deleted file mode 100644 index 91e55d7ac5ce..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1beta/lfpsale.proto for package 'google.shopping.merchant.lfp.v1beta' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/lfp/v1beta/lfpsale_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpSaleService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpSaleService' - - # Inserts a `LfpSale` for the given merchant. - rpc :InsertLfpSale, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb deleted file mode 100644 index 36683530fca2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/lfp/v1beta/lfpstore.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n2google/shopping/merchant/lfp/v1beta/lfpstore.proto\x12#google.shopping.merchant.lfp.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe6\x05\n\x08LfpStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1a\n\nstore_code\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1a\n\rstore_address\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nstore_name\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1e\n\x0cphone_number\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bwebsite_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1a\n\rgcid_category\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\x08place_id\x18\t \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12`\n\x0ematching_state\x18\n \x01(\x0e\x32@.google.shopping.merchant.lfp.v1beta.LfpStore.StoreMatchingStateB\x06\xe0\x41\x01\xe0\x41\x03\x12(\n\x13matching_state_hint\x18\x0b \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\x04\x88\x01\x01\"}\n\x12StoreMatchingState\x12$\n STORE_MATCHING_STATE_UNSPECIFIED\x10\x00\x12 \n\x1cSTORE_MATCHING_STATE_MATCHED\x10\x01\x12\x1f\n\x1bSTORE_MATCHING_STATE_FAILED\x10\x02:z\xea\x41w\n#merchantapi.googleapis.com/LfpStore\x12;accounts/{account}/lfpStores/{target_merchant}~{store_code}*\tlfpStores2\x08lfpStoreB\r\n\x0b_store_nameB\x0f\n\r_phone_numberB\x0e\n\x0c_website_uriB\x0b\n\t_place_idB\x16\n\x14_matching_state_hint\"O\n\x12GetLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\x9b\x01\n\x15InsertLfpStoreRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x45\n\tlfp_store\x18\x02 \x01(\x0b\x32-.google.shopping.merchant.lfp.v1beta.LfpStoreB\x03\xe0\x41\x02\"R\n\x15\x44\x65leteLfpStoreRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#merchantapi.googleapis.com/LfpStore\"\xa1\x01\n\x14ListLfpStoresRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#merchantapi.googleapis.com/LfpStore\x12\x1b\n\x0etarget_account\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"s\n\x15ListLfpStoresResponse\x12\x41\n\nlfp_stores\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.lfp.v1beta.LfpStore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xc8\x06\n\x0fLfpStoreService\x12\xaf\x01\n\x0bGetLfpStore\x12\x37.google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest\x1a-.google.shopping.merchant.lfp.v1beta.LfpStore\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/lfp/v1beta/{name=accounts/*/lfpStores/*}\x12\xd3\x01\n\x0eInsertLfpStore\x12:.google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest\x1a-.google.shopping.merchant.lfp.v1beta.LfpStore\"V\xda\x41\x10parent,lfp_store\x82\xd3\xe4\x93\x02=\"0/lfp/v1beta/{parent=accounts/*}/lfpStores:insert:\tlfp_store\x12\x9e\x01\n\x0e\x44\x65leteLfpStore\x12:.google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest\x1a\x16.google.protobuf.Empty\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/lfp/v1beta/{name=accounts/*/lfpStores/*}\x12\xc2\x01\n\rListLfpStores\x12\x39.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest\x1a:.google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/lfp/v1beta/{parent=accounts/*}/lfpStores\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB{\n\'com.google.shopping.merchant.lfp.v1betaB\rLfpStoreProtoP\x01Z?cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb;lfppbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - LfpStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpStore").msgclass - LfpStore::StoreMatchingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.LfpStore.StoreMatchingState").enummodule - GetLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest").msgclass - InsertLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest").msgclass - DeleteLfpStoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest").msgclass - ListLfpStoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest").msgclass - ListLfpStoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb deleted file mode 100644 index e3e7e2fc411a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/lfp/v1beta/lfpstore.proto for package 'google.shopping.merchant.lfp.v1beta' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/lfp/v1beta/lfpstore_pb' - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - module LfpStoreService - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.lfp.v1beta.LfpStoreService' - - # Retrieves information about a store. - rpc :GetLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore - # Inserts a store for the target merchant. If the store with the same store - # code already exists, it will be replaced. - rpc :InsertLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore - # Deletes a store for a target merchant. - rpc :DeleteLfpStore, ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, ::Google::Protobuf::Empty - # Lists the stores of the target merchant, specified by the filter in - # `ListLfpStoresRequest`. - rpc :ListLfpStores, ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb deleted file mode 100644 index c092e4264418..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" -require "google/shopping/merchant/lfp/v1beta/version" - -module Google - module Shopping - module Merchant - module Lfp - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/lfp/v1beta/rest" - # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb deleted file mode 100644 index 7b4a98b85f6f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index e0b26a33b4b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,403 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index b03587481349..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb deleted file mode 100644 index d558fed6cef1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 38b4b61e6061..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 935946d52792..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index b5731a824060..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 8c6b19d52e3d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 4ac9c4801a3f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb deleted file mode 100644 index a6af22574258..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - # Local Inventory for the merchant. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name for the `LfpInventory` resource. - # Format: - # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center ID of the merchant to submit the inventory - # for. - # @!attribute [rw] store_code - # @return [::String] - # Required. The identifier of the merchant's store. Either the store code - # inserted through `InsertLfpStore` or the store code in the Business - # Profile. - # @!attribute [rw] offer_id - # @return [::String] - # Required. Immutable. A unique identifier for the product. If both - # inventories and sales are submitted for a merchant, this id should match - # for the same product. - # - # **Note**: if the merchant sells the same product new and used, they should - # have different IDs. - # @!attribute [rw] region_code - # @return [::String] - # Required. The [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) - # for the country where the product is sold. - # @!attribute [rw] content_language - # @return [::String] - # Required. The two-letter ISO 639-1 language code for the item. - # @!attribute [rw] gtin - # @return [::String] - # Optional. The Global Trade Item Number of the product. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Optional. The current price of the product. - # @!attribute [rw] availability - # @return [::String] - # Required. Availability of the product at this store. - # For accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342) - # @!attribute [rw] quantity - # @return [::Integer] - # Optional. Quantity of the product available at this store. Must be greater - # than or equal to zero. - # @!attribute [rw] collection_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time when the inventory is collected. If not set, it will be - # set to the time when the inventory is submitted. - # @!attribute [rw] pickup_method - # @return [::String] - # Optional. Supported pickup method for this offer. Unless the value is "not - # supported", this field must be submitted together with `pickupSla`. For - # accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [rw] pickup_sla - # @return [::String] - # Optional. Expected date that an order will be ready for pickup relative to - # the order date. Must be submitted together with `pickupMethod`. For - # accepted attribute values, see the [local product inventory data - # specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [rw] feed_label - # @return [::String] - # Optional. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the product. If this is not set, it will default to `regionCode`. - class LfpInventory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertLfpInventory` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP provider account. - # Format: `accounts/{account}` - # @!attribute [rw] lfp_inventory - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory] - # Required. The inventory to insert. - class InsertLfpInventoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb deleted file mode 100644 index e6c00478c936..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - # A sale for the merchant. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the `LfpSale` resource. - # Format: - # `accounts/{account}/lfpSales/{sale}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center ID of the merchant to submit the sale for. - # @!attribute [rw] store_code - # @return [::String] - # Required. The identifier of the merchant's store. Either a `storeCode` - # inserted through the API or the code of the store in the Business Profile. - # @!attribute [rw] offer_id - # @return [::String] - # Required. A unique identifier for the product. If both inventories and - # sales are submitted for a merchant, this id should match for the same - # product. - # - # **Note**: if the merchant sells the same product new and used, they should - # have different IDs. - # @!attribute [rw] region_code - # @return [::String] - # Required. The [CLDR territory - # code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) - # for the country where the product is sold. - # @!attribute [rw] content_language - # @return [::String] - # Required. The two-letter ISO 639-1 language code for the item. - # @!attribute [rw] gtin - # @return [::String] - # Required. The Global Trade Item Number of the sold product. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Required. The unit price of the product. - # @!attribute [rw] quantity - # @return [::Integer] - # Required. The relative change of the available quantity. Negative for items - # returned. - # @!attribute [rw] sale_time - # @return [::Google::Protobuf::Timestamp] - # Required. The timestamp for the sale. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the `LfpSale`. - # @!attribute [rw] feed_label - # @return [::String] - # Optional. The [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the product. If this is not set, it will default to `regionCode`. - class LfpSale - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertLfpSale method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP provider account. - # Format: `accounts/{lfp_partner}` - # @!attribute [rw] lfp_sale - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale] - # Required. The sale to insert. - class InsertLfpSaleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb deleted file mode 100644 index 927293d9510b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb +++ /dev/null @@ -1,185 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - module V1beta - # A store for the merchant. This will be used to match to a store under the - # Google Business Profile of the target merchant. If a matching store can't be - # found, the inventories or sales submitted with the store code will not be - # used. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the `LfpStore` resource. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center id of the merchant to submit the store for. - # @!attribute [rw] store_code - # @return [::String] - # Required. Immutable. A store identifier that is unique for the target - # merchant. - # @!attribute [rw] store_address - # @return [::String] - # Required. The street address of the store. - # Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA. - # @!attribute [rw] store_name - # @return [::String] - # Optional. The merchant or store name. - # @!attribute [rw] phone_number - # @return [::String] - # Optional. The store phone number in - # [E.164](https://en.wikipedia.org/wiki/E.164) format. Example: - # `+15556767888` - # @!attribute [rw] website_uri - # @return [::String] - # Optional. The website URL for the store or merchant. - # @!attribute [rw] gcid_category - # @return [::Array<::String>] - # Optional. [Google My Business category - # id](https://gcid-explorer.corp.google.com/static/gcid.html). - # @!attribute [rw] place_id - # @return [::String] - # Optional. The [Google Place - # Id](https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview) - # of the store location. - # @!attribute [r] matching_state - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore::StoreMatchingState] - # Optional. Output only. The state of matching to a Google Business Profile. - # See - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStore#matching_state_hint matchingStateHint} - # for further details if no match is found. - # @!attribute [r] matching_state_hint - # @return [::String] - # Optional. Output only. The hint of why the matching has failed. This is - # only set when - # {::Google::Shopping::Merchant::Lfp::V1beta::LfpStore#matching_state matchingState}=`STORE_MATCHING_STATE_FAILED`. - # - # Possible values are: - # - # - "`linked-store-not-found`": There aren't any Google Business - # Profile stores available for matching. - # - "`store-match-not-found`": The provided `LfpStore` couldn't be matched to - # any of the connected Google Business Profile stores. Merchant Center - # account is connected correctly and stores are available on Google Business - # Profile, but the `LfpStore` location address does not match with Google - # Business Profile stores' addresses. Update the `LfpStore` address or Google - # Business Profile store address to match correctly. - # - "`store-match-unverified`": The provided `LfpStore` couldn't be matched - # to any of the connected Google Business Profile stores, as the matched - # Google Business Profile store is unverified. Go through the Google Business - # Profile verification process to match correctly. - class LfpStore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of matching `LfpStore` to a Google Business Profile. - module StoreMatchingState - # Store matching state unspecified. - STORE_MATCHING_STATE_UNSPECIFIED = 0 - - # The `LfpStore` is successfully matched with a Google Business Profile - # store. - STORE_MATCHING_STATE_MATCHED = 1 - - # The `LfpStore` is not matched with a Google Business Profile store. - STORE_MATCHING_STATE_FAILED = 2 - end - end - - # Request message for the `GetLfpStore` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the store to retrieve. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - class GetLfpStoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertLfpStore method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP provider account - # Format: `accounts/{account}` - # @!attribute [rw] lfp_store - # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpStore] - # Required. The store to insert. - class InsertLfpStoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteLfpStore method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the store to delete for the target merchant account. - # Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` - class DeleteLfpStoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListLfpStores method. - # @!attribute [rw] parent - # @return [::String] - # Required. The LFP partner. - # Format: `accounts/{account}` - # @!attribute [rw] target_account - # @return [::Integer] - # Required. The Merchant Center id of the merchant to list stores for. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of `LfpStore` resources for the given account - # to return. The service returns fewer than this value if the number of - # stores for the given account is less than the `pageSize`. The default value - # is 250. The maximum value is 1000; If a value higher than the maximum is - # specified, then the `pageSize` will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListLfpStoresRequest` - # call. Provide the page token to retrieve the subsequent page. When - # paginating, all other parameters provided to `ListLfpStoresRequest` must - # match the call that provided the page token. The token returned as - # {::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse#next_page_token nextPageToken} - # in the response to the previous request. - class ListLfpStoresRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListLfpStores method. - # @!attribute [rw] lfp_stores - # @return [::Array<::Google::Shopping::Merchant::Lfp::V1beta::LfpStore>] - # The stores from the specified merchant. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `pageToken` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListLfpStoresResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 7c4fd780655b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - 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 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 - # 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 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile deleted file mode 100644 index 59691d8f906c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-shopping-merchant-lfp-v1beta", path: "../" -else - gem "google-shopping-merchant-lfp-v1beta" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb deleted file mode 100644 index 46400ecc1e72..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the insert_lfp_inventory call in the LfpInventoryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory. -# -def insert_lfp_inventory - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new - - # Call the insert_lfp_inventory method. - result = client.insert_lfp_inventory request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpInventory. - p result -end -# [END merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb deleted file mode 100644 index 3ba60858f37a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the insert_lfp_sale call in the LfpSaleService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale. -# -def insert_lfp_sale - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new - - # Call the insert_lfp_sale method. - result = client.insert_lfp_sale request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale. - p result -end -# [END merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb deleted file mode 100644 index cb33a80b368a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the delete_lfp_store call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store. -# -def delete_lfp_store - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new - - # Call the delete_lfp_store method. - result = client.delete_lfp_store request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb deleted file mode 100644 index f0397620d007..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the get_lfp_store call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store. -# -def get_lfp_store - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new - - # Call the get_lfp_store method. - result = client.get_lfp_store request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - p result -end -# [END merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb deleted file mode 100644 index f5170c9aeb4f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the insert_lfp_store call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store. -# -def insert_lfp_store - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new - - # Call the insert_lfp_store method. - result = client.insert_lfp_store request - - # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - p result -end -# [END merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb deleted file mode 100644 index 614c32536657..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync] -require "google/shopping/merchant/lfp/v1beta" - -## -# Snippet for the list_lfp_stores call in the LfpStoreService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores. -# -def list_lfp_stores - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new - - # Call the list_lfp_stores method. - result = client.list_lfp_stores request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore. - p item - end -end -# [END merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync] diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json deleted file mode 100644 index 81867a4ac716..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/snippets/snippet_metadata_google.shopping.merchant.lfp.v1beta.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-lfp-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.lfp.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_LfpInventoryService_InsertLfpInventory_sync", - "title": "Snippet for the insert_lfp_inventory call in the LfpInventoryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory.", - "file": "lfp_inventory_service/insert_lfp_inventory.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_lfp_inventory", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client#insert_lfp_inventory", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory", - "client": { - "short_name": "LfpInventoryService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client" - }, - "method": { - "short_name": "InsertLfpInventory", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpInventoryService.InsertLfpInventory", - "service": { - "short_name": "LfpInventoryService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpInventoryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpSaleService_InsertLfpSale_sync", - "title": "Snippet for the insert_lfp_sale call in the LfpSaleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale.", - "file": "lfp_sale_service/insert_lfp_sale.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_lfp_sale", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client#insert_lfp_sale", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSale", - "client": { - "short_name": "LfpSaleService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client" - }, - "method": { - "short_name": "InsertLfpSale", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpSaleService.InsertLfpSale", - "service": { - "short_name": "LfpSaleService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpSaleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpStoreService_GetLfpStore_sync", - "title": "Snippet for the get_lfp_store call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store.", - "file": "lfp_store_service/get_lfp_store.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lfp_store", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#get_lfp_store", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStore", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" - }, - "method": { - "short_name": "GetLfpStore", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.GetLfpStore", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpStoreService_InsertLfpStore_sync", - "title": "Snippet for the insert_lfp_store call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store.", - "file": "lfp_store_service/insert_lfp_store.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_lfp_store", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#insert_lfp_store", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStore", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" - }, - "method": { - "short_name": "InsertLfpStore", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.InsertLfpStore", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpStoreService_DeleteLfpStore_sync", - "title": "Snippet for the delete_lfp_store call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store.", - "file": "lfp_store_service/delete_lfp_store.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lfp_store", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#delete_lfp_store", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" - }, - "method": { - "short_name": "DeleteLfpStore", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.DeleteLfpStore", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_LfpStoreService_ListLfpStores_sync", - "title": "Snippet for the list_lfp_stores call in the LfpStoreService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores.", - "file": "lfp_store_service/list_lfp_stores.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lfp_stores", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client#list_lfp_stores", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse", - "client": { - "short_name": "LfpStoreService::Client", - "full_name": "::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client" - }, - "method": { - "short_name": "ListLfpStores", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService.ListLfpStores", - "service": { - "short_name": "LfpStoreService", - "full_name": "google.shopping.merchant.lfp.v1beta.LfpStoreService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb deleted file mode 100644 index 546a67b3338b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_lfp_inventory_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_inventory_path account: "value0", target_merchant: "value1", store_code: "value2", offer: "value3" - assert_equal "accounts/value0/lfpInventories/value1~value2~value3", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb deleted file mode 100644 index 2b509848be47..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb +++ /dev/null @@ -1,146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_insert_lfp_inventory - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_inventory = {} - - insert_lfp_inventory_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::ServiceStub.stub :transcode_insert_lfp_inventory_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_lfp_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_lfp_inventory_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb deleted file mode 100644 index 959e64306b92..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb +++ /dev/null @@ -1,136 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1beta/lfpinventory_pb" -require "google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_insert_lfp_inventory - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_inventory = {} - - insert_lfp_inventory_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_lfp_inventory, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory), request["lfp_inventory"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_lfp_inventory_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_lfp_inventory ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_lfp_inventory(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpInventoryRequest.new(parent: parent, lfp_inventory: lfp_inventory), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_lfp_inventory_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb deleted file mode 100644 index adf95b8edb6b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_lfp_sale_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_sale_path account: "value0", sale: "value1" - assert_equal "accounts/value0/lfpSales/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb deleted file mode 100644 index 05340ee25079..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb +++ /dev/null @@ -1,146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_insert_lfp_sale - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_sale = {} - - insert_lfp_sale_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::ServiceStub.stub :transcode_insert_lfp_sale_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_lfp_sale_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_lfp_sale_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb deleted file mode 100644 index d213abb9b87f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb +++ /dev/null @@ -1,136 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1beta/lfpsale_pb" -require "google/shopping/merchant/lfp/v1beta/lfpsale_services_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_sale_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_insert_lfp_sale - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_sale = {} - - insert_lfp_sale_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_lfp_sale, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale), request["lfp_sale"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_lfp_sale_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_lfp_sale ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_lfp_sale(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new(parent: parent, lfp_sale: lfp_sale), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_lfp_sale_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb deleted file mode 100644 index 734121ff45ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1beta/lfp_store_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_lfp_store_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lfp_store_path account: "value0", target_merchant: "value1", store_code: "value2" - assert_equal "accounts/value0/lfpStores/value1~value2", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb deleted file mode 100644 index 69be3efc6f75..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb +++ /dev/null @@ -1,311 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service/rest" - - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_get_lfp_store - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_get_lfp_store_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lfp_store_client_stub.call_count - end - end - end - - def test_insert_lfp_store - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_store = {} - - insert_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_insert_lfp_store_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_lfp_store_client_stub.call_count - end - end - end - - def test_delete_lfp_store - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_lfp_store_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_delete_lfp_store_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lfp_store_client_stub.call_count - end - end - end - - def test_list_lfp_stores - # Create test objects. - client_result = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - target_account = 42 - page_size = 42 - page_token = "hello world" - - list_lfp_stores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::ServiceStub.stub :transcode_list_lfp_stores_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lfp_stores_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_lfp_stores ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_lfp_stores(::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_lfp_stores_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb deleted file mode 100644 index d18056af085b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb +++ /dev/null @@ -1,321 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/lfp/v1beta/lfpstore_pb" -require "google/shopping/merchant/lfp/v1beta/lfpstore_services_pb" -require "google/shopping/merchant/lfp/v1beta/lfp_store_service" - -class ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_get_lfp_store - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lfp_store, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_lfp_store({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::GetLfpStoreRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_lfp_store_client_stub.call_rpc_count - end - end - - def test_insert_lfp_store - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lfp_store = {} - - insert_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_lfp_store, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore), request["lfp_store"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.insert_lfp_store parent: parent, lfp_store: lfp_store do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.insert_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.insert_lfp_store({ parent: parent, lfp_store: lfp_store }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.insert_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpStoreRequest.new(parent: parent, lfp_store: lfp_store), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, insert_lfp_store_client_stub.call_rpc_count - end - end - - def test_delete_lfp_store - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_lfp_store_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lfp_store, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lfp_store_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_lfp_store ::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_lfp_store({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_lfp_store(::Google::Shopping::Merchant::Lfp::V1beta::DeleteLfpStoreRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_lfp_store_client_stub.call_rpc_count - end - end - - def test_list_lfp_stores - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - target_account = 42 - page_size = 42 - page_token = "hello world" - - list_lfp_stores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lfp_stores, name - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["target_account"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_lfp_stores_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_lfp_stores parent: parent, target_account: target_account, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_lfp_stores ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_lfp_stores({ parent: parent, target_account: target_account, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_lfp_stores(::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresRequest.new(parent: parent, target_account: target_account, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_lfp_stores_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.gitignore b/owl-bot-staging/google-shopping-merchant-lfp/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-lfp/.repo-metadata.json deleted file mode 100644 index b6866372ae63..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-lfp", - "distribution_name": "google-shopping-merchant-lfp", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant 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.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-lfp/.rubocop.yml deleted file mode 100644 index fd37400e16a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-lfp.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-lfp.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.toys.rb b/owl-bot-staging/google-shopping-merchant-lfp/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/.yardopts b/owl-bot-staging/google-shopping-merchant-lfp/.yardopts deleted file mode 100644 index 7f1a344f5a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Merchant API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-lfp/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-lfp/AUTHENTICATION.md deleted file mode 100644 index fd05122fa57f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-lfp library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-shopping-merchant-lfp library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/shopping/merchant/lfp" - -client = Google::Shopping::Merchant::Lfp.lfp_inventory_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/lfp" - -Google::Shopping::Merchant::Lfp.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Shopping::Merchant::Lfp.lfp_inventory_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-lfp -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/lfp" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Shopping::Merchant::Lfp.lfp_inventory_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-lfp/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-lfp/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-lfp/Gemfile b/owl-bot-staging/google-shopping-merchant-lfp/Gemfile deleted file mode 100644 index 9284e71b5de8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-shopping-merchant-lfp-v1beta", path: "../google-shopping-merchant-lfp-v1beta" - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-lfp/LICENSE.md b/owl-bot-staging/google-shopping-merchant-lfp/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-lfp/README.md b/owl-bot-staging/google-shopping-merchant-lfp/README.md deleted file mode 100644 index e29a841945f9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Ruby Client for the Merchant API - -Programmatically manage your Merchant Center accounts. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-shopping-merchant-lfp-v*`. -The gem `google-shopping-merchant-lfp` is the main client library that brings the -verisoned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-lfp) -for this library, google-shopping-merchant-lfp, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-shopping-merchant-lfp-v1beta](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta). - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for more usage information. - -## Quick Start - -``` -$ gem install google-shopping-merchant-lfp -``` - -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) - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-lfp`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-lfp-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-lfp`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-shopping-merchant-lfp-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-lfp/Rakefile b/owl-bot-staging/google-shopping-merchant-lfp/Rakefile deleted file mode 100644 index cc9a6397fd57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-lfp acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials" - ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-shopping-merchant-lfp gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-lfp gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-lfp gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-shopping-merchant-lfp gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-lfp" - header "google-shopping-merchant-lfp rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-lfp yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-lfp test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-shopping-merchant-lfp smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-shopping-merchant-lfp acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/google-shopping-merchant-lfp.gemspec b/owl-bot-staging/google-shopping-merchant-lfp/google-shopping-merchant-lfp.gemspec deleted file mode 100644 index d8360bf6a65c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/google-shopping-merchant-lfp.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/lfp/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-lfp" - gem.version = Google::Shopping::Merchant::Lfp::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-lfp-v1beta", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/lib/google-shopping-merchant-lfp.rb b/owl-bot-staging/google-shopping-merchant-lfp/lib/google-shopping-merchant-lfp.rb deleted file mode 100644 index 2a758a338a8e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/lib/google-shopping-merchant-lfp.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/lfp" unless defined? Google::Shopping::Merchant::Lfp::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp.rb b/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp.rb deleted file mode 100644 index 52548a62aecb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp.rb +++ /dev/null @@ -1,144 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/shopping/merchant/lfp/version" - -require "googleauth" - -module Google - module Shopping - module Merchant - module Lfp - ## - # Create a new client object for LfpInventoryService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta/Google/Shopping/Merchant/Lfp/V1beta/LfpInventoryService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the LfpInventoryService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About LfpInventoryService - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # inventories for a merchant. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.lfp_inventory_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/lfp/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Lfp - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpInventoryService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for LfpSaleService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta/Google/Shopping/Merchant/Lfp/V1beta/LfpSaleService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the LfpSaleService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About LfpSaleService - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit sales - # data for a merchant. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.lfp_sale_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/lfp/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Lfp - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpSaleService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for LfpStoreService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta/Google/Shopping/Merchant/Lfp/V1beta/LfpStoreService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the LfpStoreService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About LfpStoreService - # - # Service for a [LFP - # partner](https://support.google.com/merchants/answer/7676652) to submit local - # stores for a merchant. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.lfp_store_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/lfp/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Lfp - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Lfp.const_get(package_name).const_get(:LfpStoreService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - end - end - end -end - -helper_path = ::File.join __dir__, "lfp", "helpers.rb" -require "google/shopping/merchant/lfp/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp/version.rb b/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp/version.rb deleted file mode 100644 index d8f98f0eade5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/lib/google/shopping/merchant/lfp/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Lfp - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/client_test.rb b/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/client_test.rb deleted file mode 100644 index 8f496e585abb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/client_test.rb +++ /dev/null @@ -1,92 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/lfp" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Shopping::Merchant::Lfp::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_lfp_inventory_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Lfp.lfp_inventory_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client, client - end - end - - def test_lfp_inventory_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Lfp.lfp_inventory_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client, client - end - end - - def test_lfp_sale_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Lfp.lfp_sale_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client, client - end - end - - def test_lfp_sale_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Lfp.lfp_sale_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client, client - end - end - - def test_lfp_store_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Lfp.lfp_store_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client, client - end - end - - def test_lfp_store_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Lfp.lfp_store_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/version_test.rb b/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/version_test.rb deleted file mode 100644 index 3a215a36b0b0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/test/google/shopping/merchant/lfp/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/lfp/version" - -class Google::Shopping::Merchant::Lfp::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Shopping::Merchant::Lfp::VERSION - end -end diff --git a/owl-bot-staging/google-shopping-merchant-lfp/test/helper.rb b/owl-bot-staging/google-shopping-merchant-lfp/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json deleted file mode 100644 index f46b21050567..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta", - "distribution_name": "google-shopping-merchant-notifications-v1beta", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant V1BETA API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-notifications-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml deleted file mode 100644 index 4befa09072a1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-notifications-v1beta.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-notifications-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Merchant V1BETA API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md deleted file mode 100644 index 88d0015bde4b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-notifications-v1beta library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-shopping-merchant-notifications-v1beta library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/shopping/merchant/notifications/v1beta" - -client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/notifications/v1beta" - -::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-notifications-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/notifications/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile deleted file mode 100644 index 95163a6d11f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md deleted file mode 100644 index d6c61486344d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# Ruby Client for the Merchant V1BETA API - -Programmatically manage your Merchant Center accounts. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Merchant V1BETA API. Most users should consider using -the main client gem, -[google-shopping-merchant-notifications](https://rubygems.org/gems/google-shopping-merchant-notifications). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-notifications-v1beta -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/shopping/merchant/notifications/v1beta" - -client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new -request = ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new # (request fields as keyword arguments...) -response = client.get_notification_subscription request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta) -for class and method documentation. - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for general usage information. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -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 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-notifications`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-notifications-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-notifications`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-shopping-merchant-notifications-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile deleted file mode 100644 index 6f562055276d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-notifications-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-shopping-merchant-notifications-v1beta gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-notifications-v1beta gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-notifications-v1beta gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-shopping-merchant-notifications-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-notifications-v1beta" - header "google-shopping-merchant-notifications-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-notifications-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-notifications-v1beta test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-shopping-merchant-notifications-v1beta smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-shopping-merchant-notifications-v1beta acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json deleted file mode 100644 index bf7527d699f0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.notifications.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Notifications::V1beta", - "services": { - "NotificationsApiService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client", - "rpcs": { - "GetNotificationSubscription": { - "methods": [ - "get_notification_subscription" - ] - }, - "CreateNotificationSubscription": { - "methods": [ - "create_notification_subscription" - ] - }, - "UpdateNotificationSubscription": { - "methods": [ - "update_notification_subscription" - ] - }, - "DeleteNotificationSubscription": { - "methods": [ - "delete_notification_subscription" - ] - }, - "ListNotificationSubscriptions": { - "methods": [ - "list_notification_subscriptions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec deleted file mode 100644 index bf3485606a0e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/google-shopping-merchant-notifications-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/notifications/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-notifications-v1beta" - gem.version = Google::Shopping::Merchant::Notifications::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts. Note that google-shopping-merchant-notifications-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-notifications instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb deleted file mode 100644 index 727153828c6e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google-shopping-merchant-notifications-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/shopping/merchant/notifications/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb deleted file mode 100644 index 35979f970759..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/notifications/v1beta/notifications_api_service" -require "google/shopping/merchant/notifications/v1beta/version" - -module Google - module Shopping - module Merchant - module Notifications - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/notifications/v1beta" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/notifications/v1beta" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/notifications/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb deleted file mode 100644 index a3178a18a6dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/notifications/v1beta/version" - -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/client" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - ## - # Service to manage notification subscriptions for merchants - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/notifications/v1beta/notifications_api_service" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - module NotificationsApiService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "notifications_api_service", "helpers.rb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb deleted file mode 100644 index 16ff5bdffbd4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb +++ /dev/null @@ -1,834 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - ## - # Client for the NotificationsApiService service. - # - # Service to manage notification subscriptions for merchants - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :notifications_api_service_stub - - ## - # Configure the NotificationsApiService Client class. - # - # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NotificationsApiService clients - # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Notifications", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the NotificationsApiService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @notifications_api_service_stub.universe_domain - end - - ## - # Create a new NotificationsApiService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NotificationsApiService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @notifications_api_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - end - - # Service calls - - ## - # Gets notification subscriptions for an account. - # - # @overload get_notification_subscription(request, options = nil) - # Pass arguments to `get_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_notification_subscription(name: nil) - # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` of the notification subscription. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new - # - # # Call the get_notification_subscription method. - # result = client.get_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def get_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :get_notification_subscription, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification subscription for a merchant. We will allow the - # following types of notification subscriptions to exist together (per - # merchant as a subscriber per event type): - # 1. Subscription for all managed accounts + subscription for self - # 2. Multiple "partial" subscriptions for managed accounts + subscription - # for self - # - # we will not allow (per merchant as a subscriber per event type): - # 1. multiple self subscriptions. - # 2. multiple "all managed accounts" subscriptions. - # 3. all and partial subscriptions at the same time. - # 4. multiple partial subscriptions for the same target account - # - # @overload create_notification_subscription(request, options = nil) - # Pass arguments to `create_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_notification_subscription(parent: nil, notification_subscription: nil) - # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that owns the new notification subscription. - # Format: `accounts/{account}` - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] - # Required. The notification subscription to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new - # - # # Call the create_notification_subscription method. - # result = client.create_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def create_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :create_notification_subscription, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing notification subscription for a merchant. - # - # @overload update_notification_subscription(request, options = nil) - # Pass arguments to `update_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) - # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] - # Required. The new version of the notification subscription that should be - # updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new - # - # # Call the update_notification_subscription method. - # result = client.update_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def update_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.notification_subscription&.name - header_params["notification_subscription.name"] = request.notification_subscription.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :update_notification_subscription, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification subscription for a merchant. - # - # @overload delete_notification_subscription(request, options = nil) - # Pass arguments to `delete_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_notification_subscription(name: nil) - # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the notification subscription to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new - # - # # Call the delete_notification_subscription method. - # result = client.delete_notification_subscription request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :delete_notification_subscription, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all the notification subscriptions for a merchant. - # - # @overload list_notification_subscriptions(request, options = nil) - # Pass arguments to `list_notification_subscriptions` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the notification subscriptions. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of notification subscriptions to return in a page. - # The default value for `page_size` is 100. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # @param page_token [::String] - # Token (if provided) to retrieve the subsequent page. All other parameters - # must match the original call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new - # - # # Call the list_notification_subscriptions method. - # result = client.list_notification_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p item - # end - # - def list_notification_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.call_rpc :list_notification_subscriptions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the NotificationsApiService API. - # - # This class represents the configuration for NotificationsApiService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_notification_subscription to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the NotificationsApiService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_subscription - ## - # RPC-specific configuration for `create_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_subscription - ## - # RPC-specific configuration for `update_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_subscription - ## - # RPC-specific configuration for `delete_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_subscription - ## - # RPC-specific configuration for `list_notification_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_subscriptions - - # @private - def initialize parent_rpcs = nil - get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription - @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config - create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription - @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config - update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription - @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config - delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription - @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config - list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions - @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb deleted file mode 100644 index 3036be3a1055..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - # Credentials for the NotificationsApiService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb deleted file mode 100644 index 23462e286772..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - # Path helper methods for the NotificationsApiService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified NotificationSubscription resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - # - # @param account [String] - # @param notification_subscription [String] - # - # @return [::String] - def notification_subscription_path account:, notification_subscription: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/notificationsubscriptions/#{notification_subscription}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb deleted file mode 100644 index 7ef900661cab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/shopping/merchant/notifications/v1beta/version" - -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - ## - # Service to manage notification subscriptions for merchants - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - module NotificationsApiService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb deleted file mode 100644 index 32d916be83fb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb +++ /dev/null @@ -1,773 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - module Rest - ## - # REST client for the NotificationsApiService service. - # - # Service to manage notification subscriptions for merchants - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :notifications_api_service_stub - - ## - # Configure the NotificationsApiService Client class. - # - # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NotificationsApiService clients - # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Notifications", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the NotificationsApiService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @notifications_api_service_stub.universe_domain - end - - ## - # Create a new NotificationsApiService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NotificationsApiService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @notifications_api_service_stub = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - end - - # Service calls - - ## - # Gets notification subscriptions for an account. - # - # @overload get_notification_subscription(request, options = nil) - # Pass arguments to `get_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_notification_subscription(name: nil) - # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` of the notification subscription. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new - # - # # Call the get_notification_subscription method. - # result = client.get_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def get_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.get_notification_subscription request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification subscription for a merchant. We will allow the - # following types of notification subscriptions to exist together (per - # merchant as a subscriber per event type): - # 1. Subscription for all managed accounts + subscription for self - # 2. Multiple "partial" subscriptions for managed accounts + subscription - # for self - # - # we will not allow (per merchant as a subscriber per event type): - # 1. multiple self subscriptions. - # 2. multiple "all managed accounts" subscriptions. - # 3. all and partial subscriptions at the same time. - # 4. multiple partial subscriptions for the same target account - # - # @overload create_notification_subscription(request, options = nil) - # Pass arguments to `create_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_notification_subscription(parent: nil, notification_subscription: nil) - # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account that owns the new notification subscription. - # Format: `accounts/{account}` - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] - # Required. The notification subscription to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new - # - # # Call the create_notification_subscription method. - # result = client.create_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def create_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.create_notification_subscription request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing notification subscription for a merchant. - # - # @overload update_notification_subscription(request, options = nil) - # Pass arguments to `update_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil) - # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription, ::Hash] - # Required. The new version of the notification subscription that should be - # updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new - # - # # Call the update_notification_subscription method. - # result = client.update_notification_subscription request - # - # # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p result - # - def update_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.update_notification_subscription request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification subscription for a merchant. - # - # @overload delete_notification_subscription(request, options = nil) - # Pass arguments to `delete_notification_subscription` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_notification_subscription(name: nil) - # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the notification subscription to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new - # - # # Call the delete_notification_subscription method. - # result = client.delete_notification_subscription request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_subscription request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_notification_subscription.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_notification_subscription.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.delete_notification_subscription request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets all the notification subscriptions for a merchant. - # - # @overload list_notification_subscriptions(request, options = nil) - # Pass arguments to `list_notification_subscriptions` via a request object, either of type - # {::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the notification subscriptions. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of notification subscriptions to return in a page. - # The default value for `page_size` is 100. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # @param page_token [::String] - # Token (if provided) to retrieve the subsequent page. All other parameters - # must match the original call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/notifications/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new - # - # # Call the list_notification_subscriptions method. - # result = client.list_notification_subscriptions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - # p item - # end - # - def list_notification_subscriptions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Notifications::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @notifications_api_service_stub.list_notification_subscriptions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, "notification_subscriptions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the NotificationsApiService REST API. - # - # This class represents the configuration for NotificationsApiService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_notification_subscription to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_notification_subscription.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the NotificationsApiService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_subscription - ## - # RPC-specific configuration for `create_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_subscription - ## - # RPC-specific configuration for `update_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_subscription - ## - # RPC-specific configuration for `delete_notification_subscription` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_subscription - ## - # RPC-specific configuration for `list_notification_subscriptions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_subscriptions - - # @private - def initialize parent_rpcs = nil - get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription - @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config - create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription - @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config - update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription - @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config - delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription - @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config - list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions - @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb deleted file mode 100644 index 859e9e960fcf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb +++ /dev/null @@ -1,368 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - module Rest - ## - # REST service stub for the NotificationsApiService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the get_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # A result object deserialized from the server's reply - def get_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # A result object deserialized from the server's reply - def create_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # A result object deserialized from the server's reply - def update_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_notification_subscription request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_subscription_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_notification_subscriptions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse] - # A result object deserialized from the server's reply - def list_notification_subscriptions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_subscriptions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the get_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/notifications/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions", - body: "notification_subscription", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/notifications/v1beta/{notification_subscription.name}", - body: "notification_subscription", - matches: [ - ["notification_subscription.name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_notification_subscription REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_notification_subscription_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/notifications/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_notification_subscriptions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_notification_subscriptions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb deleted file mode 100644 index 38505a2fb408..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\nDgoogle/shopping/merchant/notifications/v1beta/notificationsapi.proto\x12-google.shopping.merchant.notifications.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"o\n\"GetNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\xe5\x01\n%CreateNotificationSubscriptionRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12o\n\x19notification_subscription\x18\x02 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\"\xc9\x01\n%UpdateNotificationSubscriptionRequest\x12o\n\x19notification_subscription\x18\x01 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"r\n%DeleteNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\x9a\x01\n$ListNotificationSubscriptionsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xad\x01\n%ListNotificationSubscriptionsResponse\x12k\n\x1anotification_subscriptions\x18\x01 \x03(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xea\x03\n\x18NotificationSubscription\x12\x1e\n\x14\x61ll_managed_accounts\x18\x03 \x01(\x08H\x00\x12\x18\n\x0etarget_account\x18\x04 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12w\n\x10registered_event\x18\x02 \x01(\x0e\x32].google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType\x12\x15\n\rcall_back_uri\x18\x05 \x01(\t\"[\n\x15NotificationEventType\x12\'\n#NOTIFICATION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15PRODUCT_STATUS_CHANGE\x10\x01:\x82\x01\xea\x41\x7f\n3merchantapi.googleapis.com/NotificationSubscription\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}B\x0f\n\rinterested_in\"\xf8\x01\n\rProductChange\x12\x16\n\told_value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnew_value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0bregion_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12[\n\x11reporting_context\x18\x04 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x03\x88\x01\x01\x42\x0c\n\n_old_valueB\x0c\n\n_new_valueB\x0e\n\x0c_region_codeB\x14\n\x12_reporting_context\"\xd6\x03\n\x1aProductStatusChangeMessage\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10managing_account\x18\x02 \x01(\tH\x01\x88\x01\x01\x12S\n\rresource_type\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.notifications.v1beta.ResourceH\x02\x88\x01\x01\x12P\n\tattribute\x18\x04 \x01(\x0e\x32\x38.google.shopping.merchant.notifications.v1beta.AttributeH\x03\x88\x01\x01\x12M\n\x07\x63hanges\x18\x05 \x03(\x0b\x32<.google.shopping.merchant.notifications.v1beta.ProductChange\x12\x18\n\x0bresource_id\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08resource\x18\x07 \x01(\tH\x05\x88\x01\x01\x42\n\n\x08_accountB\x13\n\x11_managing_accountB\x10\n\x0e_resource_typeB\x0c\n\n_attributeB\x0e\n\x0c_resource_idB\x0b\n\t_resource*1\n\x08Resource\x12\x18\n\x14RESOURCE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRODUCT\x10\x01*2\n\tAttribute\x12\x19\n\x15\x41TTRIBUTE_UNSPECIFIED\x10\x00\x12\n\n\x06STATUS\x10\x01\x32\xb5\x0c\n\x17NotificationsApiService\x12\x8d\x02\n\x1bGetNotificationSubscription\x12Q.google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xcb\x02\n\x1e\x43reateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\x89\x01\xda\x41 parent,notification_subscription\x82\xd3\xe4\x93\x02`\"C/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions:\x19notification_subscription\x12\xea\x02\n\x1eUpdateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\xa8\x01\xda\x41%notification_subscription,update_mask\x82\xd3\xe4\x93\x02z2]/notifications/v1beta/{notification_subscription.name=accounts/*/notificationsubscriptions/*}:\x19notification_subscription\x12\xe2\x01\n\x1e\x44\x65leteNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xa0\x02\n\x1dListNotificationSubscriptions\x12S.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest\x1aT.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe6\x01\n1com.google.shopping.merchant.notifications.v1betaB\x15NotificationsApiProtoP\x01Z]cloud.google.com/go/shopping/merchant/notifications/apiv1beta/notificationspb;notificationspb\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - GetNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest").msgclass - CreateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest").msgclass - UpdateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest").msgclass - DeleteNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest").msgclass - ListNotificationSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest").msgclass - ListNotificationSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse").msgclass - NotificationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription").msgclass - NotificationSubscription::NotificationEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType").enummodule - ProductChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductChange").msgclass - ProductStatusChangeMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductStatusChangeMessage").msgclass - Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Resource").enummodule - Attribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Attribute").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb deleted file mode 100644 index 0257e0c3cf01..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto for package 'google.shopping.merchant.notifications.v1beta' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/shopping/merchant/notifications/v1beta/notificationsapi_pb' - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - module NotificationsApiService - # Service to manage notification subscriptions for merchants - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.notifications.v1beta.NotificationsApiService' - - # Gets notification subscriptions for an account. - rpc :GetNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription - # Creates a notification subscription for a merchant. We will allow the - # following types of notification subscriptions to exist together (per - # merchant as a subscriber per event type): - # 1. Subscription for all managed accounts + subscription for self - # 2. Multiple "partial" subscriptions for managed accounts + subscription - # for self - # - # we will not allow (per merchant as a subscriber per event type): - # 1. multiple self subscriptions. - # 2. multiple "all managed accounts" subscriptions. - # 3. all and partial subscriptions at the same time. - # 4. multiple partial subscriptions for the same target account - rpc :CreateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription - # Updates an existing notification subscription for a merchant. - rpc :UpdateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription - # Deletes a notification subscription for a merchant. - rpc :DeleteNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Google::Protobuf::Empty - # Gets all the notification subscriptions for a merchant. - rpc :ListNotificationSubscriptions, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb deleted file mode 100644 index 4d9cbec40b68..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" -require "google/shopping/merchant/notifications/v1beta/version" - -module Google - module Shopping - module Merchant - module Notifications - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/notifications/v1beta/rest" - # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb deleted file mode 100644 index d0941bca7818..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/lib/google/shopping/merchant/notifications/v1beta/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Merchant V1BETA Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index e0b26a33b4b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,403 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index b03587481349..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 38b4b61e6061..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 935946d52792..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index b5731a824060..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 8c6b19d52e3d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 8e7abcf8f052..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb deleted file mode 100644 index 8810d1cedd98..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb +++ /dev/null @@ -1,215 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Notifications - module V1beta - # Request message for the GetNotificationSubscription method. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` of the notification subscription. - class GetNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the CreateNotificationSubscription method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account that owns the new notification subscription. - # Format: `accounts/{account}` - # @!attribute [rw] notification_subscription - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # Required. The notification subscription to create. - class CreateNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateNotificationSubscription method. - # @!attribute [rw] notification_subscription - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription] - # Required. The new version of the notification subscription that should be - # updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # List of fields being updated. - class UpdateNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteNotificationSubscription method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the notification subscription to be deleted. - class DeleteNotificationSubscriptionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListNotificationSubscription method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the notification subscriptions. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of notification subscriptions to return in a page. - # The default value for `page_size` is 100. The - # maximum value is `200`. Values above `200` will be coerced to `200`. - # @!attribute [rw] page_token - # @return [::String] - # Token (if provided) to retrieve the subsequent page. All other parameters - # must match the original call that provided the page token. - class ListNotificationSubscriptionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListNotificationSubscription method. - # @!attribute [rw] notification_subscriptions - # @return [::Array<::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription>] - # The list of notification subscriptions requested by the merchant. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListNotificationSubscriptionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a notification subscription owned by a Merchant account. - # @!attribute [rw] all_managed_accounts - # @return [::Boolean] - # If this value is true, the requesting account is notified of the - # specified event for all managed accounts (can be subaccounts or other - # linked accounts) including newly added accounts on a daily basis. - # @!attribute [rw] target_account - # @return [::String] - # The `name` of the account you want to receive notifications for. - # Format: `accounts/{account}` - # @!attribute [r] name - # @return [::String] - # Output only. The `name` of the notification configuration. Generated by the - # Content API upon creation of a new `NotificationSubscription`. The - # `account` represents the merchant ID of the merchant that owns the - # configuration. Format: - # `accounts/{account}/notificationsubscriptions/{notification_subscription}` - # @!attribute [rw] registered_event - # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription::NotificationEventType] - # The event that the merchant wants to be notified about. - # @!attribute [rw] call_back_uri - # @return [::String] - # URL to be used to push the notification to the merchant. - class NotificationSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the event type that the merchant is interested in receiving - # notifications for. - module NotificationEventType - # Notifications event type is unspecified. - NOTIFICATION_EVENT_TYPE_UNSPECIFIED = 0 - - # Notification of product status changes, for example when product becomes - # disapproved. - PRODUCT_STATUS_CHANGE = 1 - end - end - - # The change that happened to the product including old value, new value, - # country code as the region code and reporting context. - # @!attribute [rw] old_value - # @return [::String] - # The old value of the changed resource or attribute. - # @!attribute [rw] new_value - # @return [::String] - # The new value of the changed resource or attribute. - # @!attribute [rw] region_code - # @return [::String] - # Countries that have the change (if applicable) - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Reporting contexts that have the change (if applicable) - class ProductChange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message that the merchant will receive to notify about product status - # change event - # @!attribute [rw] account - # @return [::String] - # The target account that owns the entity that changed. - # Format : `accounts/{merchant_id}` - # @!attribute [rw] managing_account - # @return [::String] - # The account that manages the merchant's account. can be the same as - # merchant id if it is standalone account. Format : - # `accounts/{service_provider_id}` - # @!attribute [rw] resource_type - # @return [::Google::Shopping::Merchant::Notifications::V1beta::Resource] - # The resource that changed, in this case it will always be `Product`. - # @!attribute [rw] attribute - # @return [::Google::Shopping::Merchant::Notifications::V1beta::Attribute] - # The attribute in the resource that changed, in this case it will be always - # `Status`. - # @!attribute [rw] changes - # @return [::Array<::Google::Shopping::Merchant::Notifications::V1beta::ProductChange>] - # A message to describe the change that happened to the product - # @!attribute [rw] resource_id - # @return [::String] - # The product id. - # @!attribute [rw] resource - # @return [::String] - # The product name. - # Format: `{product.name=accounts/{account}/products/{product}}` - class ProductStatusChangeMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum to specify the resource that is being changed to notify the merchant - # about. - module Resource - # Unspecified resource - RESOURCE_UNSPECIFIED = 0 - - # Resource type : product - PRODUCT = 1 - end - - # Enum to specify the attribute in the resource that is being changed to - # notify the merchant about. - module Attribute - # Unspecified attribute - ATTRIBUTE_UNSPECIFIED = 0 - - # Status of the changed entity - STATUS = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 7c4fd780655b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - 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 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 - # 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 - end - end - - # [Channel](https://support.google.com/merchants/answer/7361332) of a product. - # - # Channel is used to distinguish between online and local products. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Channel values. - module ChannelEnum - # Not specified. - CHANNEL_ENUM_UNSPECIFIED = 0 - - # Online product. - ONLINE = 1 - - # Local product. - LOCAL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile deleted file mode 100644 index 2227f846e191..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-shopping-merchant-notifications-v1beta", path: "../" -else - gem "google-shopping-merchant-notifications-v1beta" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb deleted file mode 100644 index 3ee3562634b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/create_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the create_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription. -# -def create_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new - - # Call the create_notification_subscription method. - result = client.create_notification_subscription request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - p result -end -# [END merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb deleted file mode 100644 index afbb070302ff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/delete_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the delete_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription. -# -def delete_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new - - # Call the delete_notification_subscription method. - result = client.delete_notification_subscription request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb deleted file mode 100644 index 998279d186fd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/get_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the get_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription. -# -def get_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new - - # Call the get_notification_subscription method. - result = client.get_notification_subscription request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - p result -end -# [END merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb deleted file mode 100644 index e92af781168b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/list_notification_subscriptions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the list_notification_subscriptions call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions. -# -def list_notification_subscriptions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new - - # Call the list_notification_subscriptions method. - result = client.list_notification_subscriptions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - p item - end -end -# [END merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb deleted file mode 100644 index 1c2e6d7d2dac..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/notifications_api_service/update_notification_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync] -require "google/shopping/merchant/notifications/v1beta" - -## -# Snippet for the update_notification_subscription call in the NotificationsApiService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription. -# -def update_notification_subscription - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new - - # Call the update_notification_subscription method. - result = client.update_notification_subscription request - - # The returned object is of type Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription. - p result -end -# [END merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync] diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json deleted file mode 100644 index ef440913e101..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/snippets/snippet_metadata_google.shopping.merchant.notifications.v1beta.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-notifications-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.notifications.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_GetNotificationSubscription_sync", - "title": "Snippet for the get_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription.", - "file": "notifications_api_service/get_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#get_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "GetNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.GetNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_CreateNotificationSubscription_sync", - "title": "Snippet for the create_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription.", - "file": "notifications_api_service/create_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#create_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "CreateNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.CreateNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_UpdateNotificationSubscription_sync", - "title": "Snippet for the update_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription.", - "file": "notifications_api_service/update_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#update_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "UpdateNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.UpdateNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_DeleteNotificationSubscription_sync", - "title": "Snippet for the delete_notification_subscription call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription.", - "file": "notifications_api_service/delete_notification_subscription.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_notification_subscription", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#delete_notification_subscription", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "DeleteNotificationSubscription", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.DeleteNotificationSubscription", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_NotificationsApiService_ListNotificationSubscriptions_sync", - "title": "Snippet for the list_notification_subscriptions call in the NotificationsApiService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions.", - "file": "notifications_api_service/list_notification_subscriptions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_notification_subscriptions", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client#list_notification_subscriptions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse", - "client": { - "short_name": "NotificationsApiService::Client", - "full_name": "::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client" - }, - "method": { - "short_name": "ListNotificationSubscriptions", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService.ListNotificationSubscriptions", - "service": { - "short_name": "NotificationsApiService", - "full_name": "google.shopping.merchant.notifications.v1beta.NotificationsApiService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb deleted file mode 100644 index 84e3d78399ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_paths_test.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/notifications/v1beta/notifications_api_service" - -class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_notification_subscription_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.notification_subscription_path account: "value0", notification_subscription: "value1" - assert_equal "accounts/value0/notificationsubscriptions/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb deleted file mode 100644 index 4e7e54362927..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_rest_test.rb +++ /dev/null @@ -1,365 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest" - - -class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_get_notification_subscription - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_get_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_notification_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_notification_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_notification_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_notification_subscription_client_stub.call_count - end - end - end - - def test_create_notification_subscription - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - notification_subscription = {} - - create_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_create_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_notification_subscription_client_stub.call_count - end - end - end - - def test_update_notification_subscription - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - notification_subscription = {} - update_mask = {} - - update_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_update_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_notification_subscription_client_stub.call_count - end - end - end - - def test_delete_notification_subscription - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_subscription_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_delete_notification_subscription_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_notification_subscription({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_notification_subscription name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_notification_subscription({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_notification_subscription_client_stub.call_count - end - end - end - - def test_list_notification_subscriptions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_notification_subscriptions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::ServiceStub.stub :transcode_list_notification_subscriptions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_notification_subscriptions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_notification_subscriptions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_notification_subscriptions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_notification_subscriptions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_notification_subscriptions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb deleted file mode 100644 index 38a96186e9c2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/google/shopping/merchant/notifications/v1beta/notifications_api_service_test.rb +++ /dev/null @@ -1,379 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/notifications/v1beta/notificationsapi_pb" -require "google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb" -require "google/shopping/merchant/notifications/v1beta/notifications_api_service" - -class ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_get_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_notification_subscription({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_notification_subscription name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_notification_subscription({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_notification_subscription_client_stub.call_rpc_count - end - end - - def test_create_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - notification_subscription = {} - - create_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription), request["notification_subscription"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_notification_subscription parent: parent, notification_subscription: notification_subscription do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_notification_subscription({ parent: parent, notification_subscription: notification_subscription }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest.new(parent: parent, notification_subscription: notification_subscription), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_notification_subscription_client_stub.call_rpc_count - end - end - - def test_update_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - notification_subscription = {} - update_mask = {} - - update_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription), request["notification_subscription"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_notification_subscription notification_subscription: notification_subscription, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_notification_subscription({ notification_subscription: notification_subscription, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest.new(notification_subscription: notification_subscription, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_notification_subscription_client_stub.call_rpc_count - end - end - - def test_delete_notification_subscription - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_subscription_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_notification_subscription, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_notification_subscription_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_notification_subscription({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_notification_subscription name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_notification_subscription ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_notification_subscription({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_notification_subscription(::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_notification_subscription_client_stub.call_rpc_count - end - end - - def test_list_notification_subscriptions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_notification_subscriptions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_notification_subscriptions, name - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_notification_subscriptions_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_notification_subscriptions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_notification_subscriptions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_notification_subscriptions ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_notification_subscriptions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_notification_subscriptions(::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_notification_subscriptions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.gitignore b/owl-bot-staging/google-shopping-merchant-notifications/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-notifications/.repo-metadata.json deleted file mode 100644 index 8885ff99bec4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-notifications", - "distribution_name": "google-shopping-merchant-notifications", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant 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.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-notifications/.rubocop.yml deleted file mode 100644 index 7e600c61889d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-notifications.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-notifications.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.toys.rb b/owl-bot-staging/google-shopping-merchant-notifications/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/.yardopts b/owl-bot-staging/google-shopping-merchant-notifications/.yardopts deleted file mode 100644 index 7f1a344f5a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Merchant API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-notifications/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-notifications/AUTHENTICATION.md deleted file mode 100644 index 92d52a1e4e8f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-notifications library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-shopping-merchant-notifications library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/shopping/merchant/notifications" - -client = Google::Shopping::Merchant::Notifications.notifications_api_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/notifications" - -Google::Shopping::Merchant::Notifications.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Shopping::Merchant::Notifications.notifications_api_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-notifications -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/notifications" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Shopping::Merchant::Notifications.notifications_api_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-notifications/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-notifications/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-notifications/Gemfile b/owl-bot-staging/google-shopping-merchant-notifications/Gemfile deleted file mode 100644 index d4a3a4a3d95f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-shopping-merchant-notifications-v1beta", path: "../google-shopping-merchant-notifications-v1beta" - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-notifications/LICENSE.md b/owl-bot-staging/google-shopping-merchant-notifications/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-notifications/README.md b/owl-bot-staging/google-shopping-merchant-notifications/README.md deleted file mode 100644 index 267432c1ba9c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Ruby Client for the Merchant API - -Programmatically manage your Merchant Center accounts. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-shopping-merchant-notifications-v*`. -The gem `google-shopping-merchant-notifications` is the main client library that brings the -verisoned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-notifications) -for this library, google-shopping-merchant-notifications, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-shopping-merchant-notifications-v1beta](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta). - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for more usage information. - -## Quick Start - -``` -$ gem install google-shopping-merchant-notifications -``` - -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) - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-notifications`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-notifications-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-notifications`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-shopping-merchant-notifications-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-notifications/Rakefile b/owl-bot-staging/google-shopping-merchant-notifications/Rakefile deleted file mode 100644 index 66ed091d35f5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-notifications acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials" - ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-shopping-merchant-notifications gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-notifications gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-notifications gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-shopping-merchant-notifications gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-notifications" - header "google-shopping-merchant-notifications rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-notifications yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-notifications test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-shopping-merchant-notifications smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-shopping-merchant-notifications acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/google-shopping-merchant-notifications.gemspec b/owl-bot-staging/google-shopping-merchant-notifications/google-shopping-merchant-notifications.gemspec deleted file mode 100644 index 5c5eaf2c08b4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/google-shopping-merchant-notifications.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/notifications/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-notifications" - gem.version = Google::Shopping::Merchant::Notifications::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-notifications-v1beta", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/lib/google-shopping-merchant-notifications.rb b/owl-bot-staging/google-shopping-merchant-notifications/lib/google-shopping-merchant-notifications.rb deleted file mode 100644 index 6ca5fb19d59b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/lib/google-shopping-merchant-notifications.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/notifications" unless defined? Google::Shopping::Merchant::Notifications::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications.rb b/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications.rb deleted file mode 100644 index cf70a3fef34c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/shopping/merchant/notifications/version" - -require "googleauth" - -module Google - module Shopping - module Merchant - module Notifications - ## - # Create a new client object for NotificationsApiService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client](https://rubydoc.info/gems/google-shopping-merchant-notifications-v1beta/Google/Shopping/Merchant/Notifications/V1beta/NotificationsApiService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the NotificationsApiService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About NotificationsApiService - # - # Service to manage notification subscriptions for merchants - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.notifications_api_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/notifications/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Notifications - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Notifications.const_get(package_name).const_get(:NotificationsApiService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - end - end - end -end - -helper_path = ::File.join __dir__, "notifications", "helpers.rb" -require "google/shopping/merchant/notifications/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications/version.rb b/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications/version.rb deleted file mode 100644 index 0a7f6ef260de..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/lib/google/shopping/merchant/notifications/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Notifications - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/client_test.rb b/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/client_test.rb deleted file mode 100644 index a64c5ea87820..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/client_test.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/notifications" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Shopping::Merchant::Notifications::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_notifications_api_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Notifications.notifications_api_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client, client - end - end - - def test_notifications_api_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Notifications.notifications_api_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/version_test.rb b/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/version_test.rb deleted file mode 100644 index 10bd232f24de..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/test/google/shopping/merchant/notifications/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/notifications/version" - -class Google::Shopping::Merchant::Notifications::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Shopping::Merchant::Notifications::VERSION - end -end diff --git a/owl-bot-staging/google-shopping-merchant-notifications/test/helper.rb b/owl-bot-staging/google-shopping-merchant-notifications/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-notifications/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-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 f65e2ba20a6f..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": "Programmatically manage your Merchant Center accounts. 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 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 95163a6d11f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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 cdc13d026aa1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/README.md +++ /dev/null @@ -1,143 +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-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. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -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 2.7+. - -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 3b2fd0419d64..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 96e3d1fdfe38..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/gapic_metadata.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.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" - ] - }, - "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 088a551692b0..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 = "Programmatically manage your Merchant Center accounts. 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 = ">= 2.7" - - gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" - 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 abda9a44fdb4..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 49afe8d8c9f4..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 68a5e1d98d77..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 1f6e328192da..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb +++ /dev/null @@ -1,547 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 - ) - end - - # Service calls - - ## - # Uploads a product input to your Merchant Center account. 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. Format: - # `accounts/{account}/dataSources/{datasource}`. - # - # @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? - return response - 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} - # @param data_source [::String] - # Required. The primary or supplemental data source from which the product - # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/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? - return response - 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: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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 `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 - 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 8bad4432d9c0..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 5aa2842b8d6f..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 f414f0da4fd3..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 276e273699ae..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,507 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 - ) - end - - # Service calls - - ## - # Uploads a product input to your Merchant Center account. 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. Format: - # `accounts/{account}/dataSources/{datasource}`. - # @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? - return result - 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} - # @param data_source [::String] - # Required. The primary or supplemental data source from which the product - # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/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? - return result - 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 - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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 `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 - 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 241bcef440f5..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,190 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - 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, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - 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, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - 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 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 3a1e23501784..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb +++ /dev/null @@ -1,56 +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/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\x42\n\x07\x63hannel\x18\x03 \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumB\x06\xe0\x41\x02\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\x03\xe0\x41\x01H\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\"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\xfc\x03\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\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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.shopping.merchant.products.v1beta.Attributes", "google/shopping/merchant/products/v1beta/products_common.proto"], - ["google.shopping.type.CustomAttribute", "google/shopping/type/types.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module 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 - 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 c23d66eb0438..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb +++ /dev/null @@ -1,58 +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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF 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. 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 - # 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 e68dac97fd80..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb +++ /dev/null @@ -1,75 +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\"\xa9\'\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\x11\n\x04gtin\x18\x1a \x01(\tH\x10\x88\x01\x01\x12\x1a\n\ritem_group_id\x18\x1b \x01(\tH\x11\x88\x01\x01\x12\x15\n\x08material\x18\x1c \x01(\tH\x12\x88\x01\x01\x12\x10\n\x03mpn\x18\x1d \x01(\tH\x13\x88\x01\x01\x12\x14\n\x07pattern\x18\x1e \x01(\tH\x14\x88\x01\x01\x12*\n\x05price\x18\x1f \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\x15\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\x16\x88\x01\x01\x12\x1e\n\x11min_handling_time\x18- \x01(\x03H\x17\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18. \x01(\tH\x18\x88\x01\x01\x12\x1f\n\x12transit_time_label\x18/ \x01(\tH\x19\x88\x01\x01\x12\x11\n\x04size\x18\x30 \x01(\tH\x1a\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x31 \x01(\tH\x1b\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.Tax\x12\x19\n\x0ctax_category\x18\x34 \x01(\tH\x1c\x88\x01\x01\x12$\n\x17\x65nergy_efficiency_class\x18\x35 \x01(\tH\x1d\x88\x01\x01\x12(\n\x1bmin_energy_efficiency_class\x18\x36 \x01(\tH\x1e\x88\x01\x01\x12(\n\x1bmax_energy_efficiency_class\x18\x37 \x01(\tH\x1f\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 \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(\tH0\x88\x01\x01\x12\x12\n\x05pause\x18\r \x01(\tH1\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(\tH2\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.ProductStructuredTitleH3\x88\x01\x01\x12l\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStructuredDescriptionH4\x88\x01\x01\x12;\n\x16\x61uto_pricing_min_price\x18| \x01(\x0b\x32\x1b.google.shopping.type.PriceB\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\x07\n\x05_gtinB\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\"\xb0\x02\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\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_points\"\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*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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.shopping.type.Price", "google/shopping/type/types.proto"], - ["google.type.Interval", "google/type/interval.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module 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 - 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 472ad40ba8f3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_pb.rb +++ /dev/null @@ -1,56 +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\"\xb2\x04\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: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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.shopping.merchant.products.v1beta.Attributes", "google/shopping/merchant/products/v1beta/products_common.proto"], - ["google.shopping.type.CustomAttribute", "google/shopping/type/types.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module 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 816f779994a5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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. - # This service works for products with online channel only. - # - # @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 5005e0152fb1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb +++ /dev/null @@ -1,552 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # 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 :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 - ) - 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}` - # - # @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? - return response - 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? - return 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: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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 af0813e91115..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 facdbcd17435..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 2bc59840cd04..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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. - # This service works for products with online channel only. - # - # 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 7a193ba278e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb +++ /dev/null @@ -1,512 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # 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 :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 - ) - 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}` - # @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? - return result - 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? - return 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 - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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 ed1bcc0af107..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,189 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - 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, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1beta::Product.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - 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, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - 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 2a0b9af49bc0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb +++ /dev/null @@ -1,58 +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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF 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. - # 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.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 655a63559974..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 b5b027da7e1c..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 e0b26a33b4b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,403 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-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 b03587481349..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 38b4b61e6061..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 935946d52792..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 b5731a824060..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 8c6b19d52e3d..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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/timestamp.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 4ac9c4801a3f..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 929a3a55d7b6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 - # [product][google.shopping.content.bundles.Products.Product]. - # - # 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: - # [feedLabel][google.shopping.content.bundles.Products.feed_label], - # [contentLanguage][google.shopping.content.bundles.Products.content_language] - # and [offerId][google.shopping.content.bundles.Products.offer_id]. - # - # 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 vertical spec with [some - # exceptions](https://support.google.com/merchants/answer/7052112). - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the product input. - # Format: - # `"{productinput.name=accounts/{account}/productInputs/{productinput}}"` - # @!attribute [r] product - # @return [::String] - # Output only. The name of the processed product. - # Format: - # `"{product.name=accounts/{account}/products/{product}}"` - # @!attribute [rw] channel - # @return [::Google::Shopping::Type::Channel::ChannelEnum] - # Required. 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 [feed - # label](https://developers.google.com/shopping-content/guides/products/feed-labels) - # for the product. - # @!attribute [rw] version_number - # @return [::Integer] - # Optional. 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 [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, such as additional attributes used for Buy on Google. - # 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. Format: - # `accounts/{account}/dataSources/{datasource}`. - class InsertProductInputRequest - 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} - # @!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}`. - 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 44466741861e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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.content.bundles.Products.ProductInput] after - # applying rules and supplemental data sources. This processed product matches - # what is shown in your Merchant Center account and in Shopping ads and other - # surfaces across Google. 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: - # `"{product.name=accounts/{account}/products/{product}}"` - # @!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 for the product. - # @!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. - 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}` - 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 2df3c8c2ebd3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb +++ /dev/null @@ -1,899 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 merchant-defined bundle. A bundle is a custom - # grouping of different products sold by a merchant 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 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 of the item. - # @!attribute [rw] color - # @return [::String] - # Color of the item. - # @!attribute [rw] condition - # @return [::String] - # Condition or state of the item. - # @!attribute [rw] gender - # @return [::String] - # Target gender 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] gtin - # @return [::String] - # Global Trade Item Number - # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the - # item. - # @!attribute [rw] item_group_id - # @return [::String] - # Shared identifier for all variants of the same product. - # @!attribute [rw] material - # @return [::String] - # The material of which the item is made. - # @!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 (for example, polka dots). - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Price of the item. - # @!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/188494#product_type)). - # @!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/188494#sale_price_effective_date)). - # @!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 - # [https://support.google.com/merchants/answer/6324492](size definition)). - # @!attribute [rw] size_system - # @return [::String] - # System in which the size is specified. Recommended for apparel items. - # @!attribute [rw] size_types - # @return [::Array<::String>] - # The cut of the item. It can be used to represent combined size types for - # apparel items. Maximum two of size types can be provided (see - # [https://support.google.com/merchants/answer/6324497](size type)). - # @!attribute [rw] taxes - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Tax>] - # Tax information. - # @!attribute [rw] tax_category - # @return [::String] - # The tax category of the product, used to configure detailed tax nexus - # in account-level tax settings. - # @!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 merchant-defined multipack. - # @!attribute [rw] ads_grouping - # @return [::String] - # Used to group items in an arbitrary way. Only for CPA%, discouraged - # otherwise. - # @!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 highlights of a product. - # @!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. - # @!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. - # @!attribute [rw] promotion_ids - # @return [::Array<::String>] - # The unique ID of a promotion. - # @!attribute [rw] pickup_method - # @return [::String] - # The pick up option for the item. - # @!attribute [rw] pickup_sla - # @return [::String] - # Item store pickup timeline. - # @!attribute [rw] link_template - # @return [::String] - # Link template for merchant hosted local storefront. - # @!attribute [rw] mobile_link_template - # @return [::String] - # Link template for merchant hosted local storefront optimized for mobile - # devices. - # @!attribute [rw] custom_label_0 - # @return [::String] - # Custom label 0 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_1 - # @return [::String] - # Custom label 1 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_2 - # @return [::String] - # Custom label 2 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_3 - # @return [::String] - # Custom label 3 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_4 - # @return [::String] - # Custom label 4 for custom grouping of items in a Shopping campaign. - # @!attribute [rw] included_destinations - # @return [::Array<::String>] - # The list of destinations to include for this target (corresponds to - # checked check boxes in Merchant Center). Default destinations are always - # included unless provided in `excludedDestinations`. - # @!attribute [rw] excluded_destinations - # @return [::Array<::String>] - # The list of destinations to exclude for this target (corresponds to - # unchecked check boxes in Merchant Center). - # @!attribute [rw] shopping_ads_excluded_countries - # @return [::Array<::String>] - # List of country codes (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 merchants' offers do not fall below this value, - # thereby preserving the offer's value and profitability. - 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 merchant 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 merchant. The - # corresponding program must be linked to the merchant 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. - 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. - # [minHandlingTime][google.shopping.content.bundles.Products.Shipping.min_handling_time] - # can only be present together with - # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time]; - # but it is not required if - # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time] - # 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 - # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time] - # and - # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time] - # are required if providing shipping speeds. - # [minHandlingTime][google.shopping.content.bundles.Products.Shipping.min_handling_time] - # is optional if - # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time] - # 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. - # [minTransitTime][google.shopping.content.bundles.Products.Shipping.min_transit_time] - # can only be present together with - # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time]; - # but it is not required if - # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time] - # 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 - # [maxHandlingTime][google.shopping.content.bundles.Products.Shipping.max_handling_time] - # and - # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time] - # are required if providing shipping speeds. - # [minTransitTime][google.shopping.content.bundles.Products.Shipping.min_transit_time] - # is optional if - # [maxTransitTime][google.shopping.content.bundles.Products.Shipping.max_transit_time] - # 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 merchant. - # @!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 - - # 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 7c4fd780655b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - 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 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 - # 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 - 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 ba88575c495d..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 6000b2e11c62..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 3018f5a6d16e..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 2373f385a2c7..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/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 072d700d7787..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 44f8f4ab3b5e..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 74d99f434ad0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json +++ /dev/null @@ -1,175 +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_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 d4adc9b5fca2..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,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# 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 - 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 67bfd9021f0f..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,202 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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:| - assert options.metadata.key? :"x-goog-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_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:| - assert options.metadata.key? :"x-goog-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 b77d7c6a3c54..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb +++ /dev/null @@ -1,198 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# 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/productinputs_services_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) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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_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 -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 0c243244dd49..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# 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 - 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 90ec1423368a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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:| - assert options.metadata.key? :"x-goog-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:| - assert options.metadata.key? :"x-goog-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 065a4a7e378d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# 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_services_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) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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 -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 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-products/.gitignore b/owl-bot-staging/google-shopping-merchant-products/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/.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/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-products/.repo-metadata.json deleted file mode 100644 index a7c12622ff3d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/.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", - "distribution_name": "google-shopping-merchant-products", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant 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.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-products/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-products/.rubocop.yml deleted file mode 100644 index 2495d6bfef28..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-products.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-products.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-products/.toys.rb b/owl-bot-staging/google-shopping-merchant-products/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/.yardopts b/owl-bot-staging/google-shopping-merchant-products/.yardopts deleted file mode 100644 index 7f1a344f5a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Merchant API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-products/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-products/AUTHENTICATION.md deleted file mode 100644 index 3c60cb8b5a33..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-products 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 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" - -client = Google::Shopping::Merchant::Products.product_inputs_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/products" - -Google::Shopping::Merchant::Products.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Shopping::Merchant::Products.product_inputs_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-products -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" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Shopping::Merchant::Products.product_inputs_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-products/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-products/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-products/Gemfile b/owl-bot-staging/google-shopping-merchant-products/Gemfile deleted file mode 100644 index e0b4f6d3daf6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-shopping-merchant-products-v1beta", path: "../google-shopping-merchant-products-v1beta" - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-products/LICENSE.md b/owl-bot-staging/google-shopping-merchant-products/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/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/README.md b/owl-bot-staging/google-shopping-merchant-products/README.md deleted file mode 100644 index 9efcfe430fb7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Ruby Client for the Merchant API - -Programmatically manage your Merchant Center accounts. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-shopping-merchant-products-v*`. -The gem `google-shopping-merchant-products` is the main client library that brings the -verisoned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-products) -for this library, google-shopping-merchant-products, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-shopping-merchant-products-v1beta](https://rubydoc.info/gems/google-shopping-merchant-products-v1beta). - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for more usage information. - -## Quick Start - -``` -$ gem install google-shopping-merchant-products -``` - -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) - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -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/Rakefile b/owl-bot-staging/google-shopping-merchant-products/Rakefile deleted file mode 100644 index 6c487eb57f05..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-products 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 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 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 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 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-products" - header "google-shopping-merchant-products rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-products yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-products 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 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 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/google-shopping-merchant-products.gemspec b/owl-bot-staging/google-shopping-merchant-products/google-shopping-merchant-products.gemspec deleted file mode 100644 index 40d4970d48c9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/google-shopping-merchant-products.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/products/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-products" - gem.version = Google::Shopping::Merchant::Products::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-products-v1beta", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-products/lib/google-shopping-merchant-products.rb b/owl-bot-staging/google-shopping-merchant-products/lib/google-shopping-merchant-products.rb deleted file mode 100644 index 5571f6b3c28d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/lib/google-shopping-merchant-products.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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" unless defined? Google::Shopping::Merchant::Products::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products.rb b/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products.rb deleted file mode 100644 index 4b1f11bc9883..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/shopping/merchant/products/version" - -require "googleauth" - -module Google - module Shopping - module Merchant - module Products - ## - # Create a new client object for ProductInputsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client](https://rubydoc.info/gems/google-shopping-merchant-products-v1beta/Google/Shopping/Merchant/Products/V1beta/ProductInputsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ProductInputsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About ProductInputsService - # - # Service to use ProductInput resource. - # This service works for products with online channel only. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.product_inputs_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/products/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Products - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Products.const_get(package_name).const_get(:ProductInputsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for ProductsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Products::V1beta::ProductsService::Client](https://rubydoc.info/gems/google-shopping-merchant-products-v1beta/Google/Shopping/Merchant/Products/V1beta/ProductsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ProductsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About ProductsService - # - # Service to use Product resource. - # This service works for products with online channel only. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.products_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/products/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Products - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Products.const_get(package_name).const_get(:ProductsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - end - end - end -end - -helper_path = ::File.join __dir__, "products", "helpers.rb" -require "google/shopping/merchant/products/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products/version.rb b/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products/version.rb deleted file mode 100644 index 8bf93a058e47..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/lib/google/shopping/merchant/products/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/client_test.rb b/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/client_test.rb deleted file mode 100644 index e376c30a3070..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/client_test.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/products" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Shopping::Merchant::Products::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_product_inputs_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Products.product_inputs_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client, client - end - end - - def test_product_inputs_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Products.product_inputs_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client, client - end - end - - def test_products_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Products.products_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Products::V1beta::ProductsService::Client, client - end - end - - def test_products_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Products.products_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/version_test.rb b/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/version_test.rb deleted file mode 100644 index e6044512b074..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/test/google/shopping/merchant/products/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/products/version" - -class Google::Shopping::Merchant::Products::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Shopping::Merchant::Products::VERSION - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products/test/helper.rb b/owl-bot-staging/google-shopping-merchant-products/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-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 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 95163a6d11f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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 cdcbbd1b08fa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/README.md +++ /dev/null @@ -1,143 +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. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -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 2.7+. - -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 eb2fe8f26960..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 6a98d0ac54b2..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 = ">= 2.7" - - gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" - 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 740109104aa0..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 47131d212a31..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 94e172f6c52b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_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/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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.shopping.type.Price", "google/shopping/type/types.proto"], - ["google.type.Interval", "google/type/interval.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module 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 46393f6aa1aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_pb.rb +++ /dev/null @@ -1,57 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.shopping.merchant.promotions.v1beta.Attributes", "google/shopping/merchant/promotions/v1beta/promotions_common.proto"], - ["google.shopping.type.CustomAttribute", "google/shopping/type/types.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module 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 9a5fd53d2d12..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 cb9358b37e0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb +++ /dev/null @@ -1,642 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 - ) - 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? - return response - 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? - return response - 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? - return 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: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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 8e50532ece8a..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 ab48d5af5169..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 8e8d8edf7031..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 7833f5ca7501..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb +++ /dev/null @@ -1,595 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 - ) - 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? - return result - 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? - return result - 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? - return 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 - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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 74feb089bfad..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,249 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - 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, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - 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, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - 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, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - 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 26ed8c356a6d..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF 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 118a2b0f157b..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 cc249696c38e..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 e0b26a33b4b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,403 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-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 b03587481349..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 38b4b61e6061..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 935946d52792..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 b5731a824060..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 4ac9c4801a3f..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 9621f662161c..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 3e0fe09d37ba..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 7c4fd780655b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - 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 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 - # 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 - 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 ba88575c495d..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 e4292cdc50d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 951e406a5139..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 deec7e6f2d21..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 9f0e22d2a817..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 1664e4d0ed0e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# 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 - 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 8a49a3aa560f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb +++ /dev/null @@ -1,257 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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:| - assert options.metadata.key? :"x-goog-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:| - assert options.metadata.key? :"x-goog-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:| - assert options.metadata.key? :"x-goog-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 91aca5fbb06e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb +++ /dev/null @@ -1,263 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# 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_services_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) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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 -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 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-promotions/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/.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/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-promotions/.repo-metadata.json deleted file mode 100644 index 2535a3acb1a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/.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", - "distribution_name": "google-shopping-merchant-promotions", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant 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.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-promotions/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-promotions/.rubocop.yml deleted file mode 100644 index e86b66a515cd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-promotions.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-promotions.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-promotions/.toys.rb b/owl-bot-staging/google-shopping-merchant-promotions/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/.yardopts b/owl-bot-staging/google-shopping-merchant-promotions/.yardopts deleted file mode 100644 index 7f1a344f5a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Merchant API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-promotions/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-promotions/AUTHENTICATION.md deleted file mode 100644 index aa1094bd951f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-promotions 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 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" - -client = Google::Shopping::Merchant::Promotions.promotions_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/promotions" - -Google::Shopping::Merchant::Promotions.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Shopping::Merchant::Promotions.promotions_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-promotions -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" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Shopping::Merchant::Promotions.promotions_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-promotions/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-promotions/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-promotions/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions/Gemfile deleted file mode 100644 index 42ab4226b2da..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-shopping-merchant-promotions-v1beta", path: "../google-shopping-merchant-promotions-v1beta" - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-promotions/LICENSE.md b/owl-bot-staging/google-shopping-merchant-promotions/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/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/README.md b/owl-bot-staging/google-shopping-merchant-promotions/README.md deleted file mode 100644 index dffec8b1a44a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Ruby Client for the Merchant API - -Programmatically manage your Merchant Center accounts. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-shopping-merchant-promotions-v*`. -The gem `google-shopping-merchant-promotions` is the main client library that brings the -verisoned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-promotions) -for this library, google-shopping-merchant-promotions, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-shopping-merchant-promotions-v1beta](https://rubydoc.info/gems/google-shopping-merchant-promotions-v1beta). - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for more usage information. - -## Quick Start - -``` -$ gem install google-shopping-merchant-promotions -``` - -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) - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -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/Rakefile b/owl-bot-staging/google-shopping-merchant-promotions/Rakefile deleted file mode 100644 index 7e42b1056fc5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-promotions 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 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 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 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 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-promotions" - header "google-shopping-merchant-promotions rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-promotions yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-promotions 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 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 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/google-shopping-merchant-promotions.gemspec b/owl-bot-staging/google-shopping-merchant-promotions/google-shopping-merchant-promotions.gemspec deleted file mode 100644 index 6644bdad7f73..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/google-shopping-merchant-promotions.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/promotions/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-promotions" - gem.version = Google::Shopping::Merchant::Promotions::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-promotions-v1beta", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions/lib/google-shopping-merchant-promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions/lib/google-shopping-merchant-promotions.rb deleted file mode 100644 index 7530a8f1426a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/lib/google-shopping-merchant-promotions.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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" unless defined? Google::Shopping::Merchant::Promotions::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions.rb deleted file mode 100644 index c4802d44f70d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/shopping/merchant/promotions/version" - -require "googleauth" - -module Google - module Shopping - module Merchant - module Promotions - ## - # Create a new client object for PromotionsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client](https://rubydoc.info/gems/google-shopping-merchant-promotions-v1beta/Google/Shopping/Merchant/Promotions/V1beta/PromotionsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the PromotionsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About PromotionsService - # - # Service to manage promotions for products. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.promotions_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/promotions/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Promotions - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Promotions.const_get(package_name).const_get(:PromotionsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - end - end - end -end - -helper_path = ::File.join __dir__, "promotions", "helpers.rb" -require "google/shopping/merchant/promotions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions/version.rb b/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions/version.rb deleted file mode 100644 index c4bb01f77a85..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/lib/google/shopping/merchant/promotions/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/client_test.rb b/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/client_test.rb deleted file mode 100644 index c7637fe68faf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/client_test.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/promotions" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Shopping::Merchant::Promotions::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_promotions_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Promotions.promotions_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client, client - end - end - - def test_promotions_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Promotions.promotions_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/version_test.rb b/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/version_test.rb deleted file mode 100644 index 2f443857d8de..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/test/google/shopping/merchant/promotions/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/promotions/version" - -class Google::Shopping::Merchant::Promotions::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Shopping::Merchant::Promotions::VERSION - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions/test/helper.rb b/owl-bot-staging/google-shopping-merchant-promotions/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-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 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 95163a6d11f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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 71279433a799..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/README.md +++ /dev/null @@ -1,143 +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. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -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 2.7+. - -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 c1b582ff7c75..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 aa0b263ebc67..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 = ">= 2.7" - - gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" - 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 81b60e5ac669..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 c78448980a3c..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 4f49c02f824c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_pb.rb +++ /dev/null @@ -1,52 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module 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 d930a3131138..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 68cfcc83320d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb +++ /dev/null @@ -1,445 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 - ) - 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? - return 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: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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 a6dbd06c7c63..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 b8ba88ff83b9..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 fe84aca4eba3..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 4ad9ef7be001..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/client.rb +++ /dev/null @@ -1,412 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 - ) - 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? - return 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 - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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 ebf2ac5937a9..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,130 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - 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, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - 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 6287419989ad..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF 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 997f8f3565ee..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 ddc696b4f8bf..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 e0b26a33b4b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,403 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-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 b03587481349..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 38b4b61e6061..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 935946d52792..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 b5731a824060..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 7a20e71719e1..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 fa75ca0b9add..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 1ee36236c94f..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 c2cb60fc6d3c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_paths_test.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# 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 - 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 13a5aef36835..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_rest_test.rb +++ /dev/null @@ -1,147 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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:| - assert options.metadata.key? :"x-goog-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 2ebf8a82667f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# 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_services_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) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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 -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 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-quota/.gitignore b/owl-bot-staging/google-shopping-merchant-quota/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/.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/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-quota/.repo-metadata.json deleted file mode 100644 index e796cb886c20..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/.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", - "distribution_name": "google-shopping-merchant-quota", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant 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.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-quota/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-quota/.rubocop.yml deleted file mode 100644 index 70c97c2565c2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-quota.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-quota.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-quota/.toys.rb b/owl-bot-staging/google-shopping-merchant-quota/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/.yardopts b/owl-bot-staging/google-shopping-merchant-quota/.yardopts deleted file mode 100644 index 7f1a344f5a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Merchant API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-quota/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-quota/AUTHENTICATION.md deleted file mode 100644 index f857398f54bb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-quota 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 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" - -client = Google::Shopping::Merchant::Quota.quota_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/quota" - -Google::Shopping::Merchant::Quota.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Shopping::Merchant::Quota.quota_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-quota -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" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Shopping::Merchant::Quota.quota_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-quota/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-quota/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-quota/Gemfile b/owl-bot-staging/google-shopping-merchant-quota/Gemfile deleted file mode 100644 index 52b47324ce24..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-shopping-merchant-quota-v1beta", path: "../google-shopping-merchant-quota-v1beta" - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-quota/LICENSE.md b/owl-bot-staging/google-shopping-merchant-quota/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/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/README.md b/owl-bot-staging/google-shopping-merchant-quota/README.md deleted file mode 100644 index 60ad00f30bd0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Ruby Client for the Merchant API - -Programmatically manage your Merchant Center accounts. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-shopping-merchant-quota-v*`. -The gem `google-shopping-merchant-quota` is the main client library that brings the -verisoned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-quota) -for this library, google-shopping-merchant-quota, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-shopping-merchant-quota-v1beta](https://rubydoc.info/gems/google-shopping-merchant-quota-v1beta). - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for more usage information. - -## Quick Start - -``` -$ gem install google-shopping-merchant-quota -``` - -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) - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -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/Rakefile b/owl-bot-staging/google-shopping-merchant-quota/Rakefile deleted file mode 100644 index 18c6ef64e80e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-quota 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 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 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 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 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-quota" - header "google-shopping-merchant-quota rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-quota yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-quota 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 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 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/google-shopping-merchant-quota.gemspec b/owl-bot-staging/google-shopping-merchant-quota/google-shopping-merchant-quota.gemspec deleted file mode 100644 index 2a827e3a6678..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/google-shopping-merchant-quota.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/quota/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-quota" - gem.version = Google::Shopping::Merchant::Quota::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-quota-v1beta", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-quota/lib/google-shopping-merchant-quota.rb b/owl-bot-staging/google-shopping-merchant-quota/lib/google-shopping-merchant-quota.rb deleted file mode 100644 index ac8399c48750..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/lib/google-shopping-merchant-quota.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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" unless defined? Google::Shopping::Merchant::Quota::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota.rb b/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota.rb deleted file mode 100644 index 68f7fdb085f0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/shopping/merchant/quota/version" - -require "googleauth" - -module Google - module Shopping - module Merchant - module Quota - ## - # Create a new client object for QuotaService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client](https://rubydoc.info/gems/google-shopping-merchant-quota-v1beta/Google/Shopping/Merchant/Quota/V1beta/QuotaService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the QuotaService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About QuotaService - # - # Service to get method call quota information per Merchant API method. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.quota_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/quota/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Quota - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Quota.const_get(package_name).const_get(:QuotaService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - end - end - end -end - -helper_path = ::File.join __dir__, "quota", "helpers.rb" -require "google/shopping/merchant/quota/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota/version.rb b/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota/version.rb deleted file mode 100644 index bd9bddd5c527..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/lib/google/shopping/merchant/quota/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/client_test.rb b/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/client_test.rb deleted file mode 100644 index c1aa98480044..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/client_test.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/quota" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Shopping::Merchant::Quota::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_quota_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Quota.quota_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client, client - end - end - - def test_quota_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Quota.quota_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/version_test.rb b/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/version_test.rb deleted file mode 100644 index 6b6933ae160c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/test/google/shopping/merchant/quota/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/quota/version" - -class Google::Shopping::Merchant::Quota::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Shopping::Merchant::Quota::VERSION - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota/test/helper.rb b/owl-bot-staging/google-shopping-merchant-quota/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-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 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 95163a6d11f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-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 3ff97c4597f0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/README.md +++ /dev/null @@ -1,143 +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. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -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 2.7+. - -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 9af7edd2ddc4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 08f3aae2d621..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 = ">= 2.7" - - gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" - 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 480f94535756..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 f90f11a430ec..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 61f465246ce2..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 c6829d4d21ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb +++ /dev/null @@ -1,453 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 - ) - 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? - return 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: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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 abc502ba35c9..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 2a32059131b1..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 20b2a10e7819..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb +++ /dev/null @@ -1,420 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 - ) - 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? - return 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 - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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 f6647ae91537..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,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - 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, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - 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 20fc1e4a1275..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb +++ /dev/null @@ -1,86 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.type.Date", "google/type/date.proto"], - ["google.shopping.type.Price", "google/shopping/type/types.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module 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 e89d2e0f3aa0..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF 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 7142d3748bb5..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 4783f6e6f555..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 e0b26a33b4b3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,403 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-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 b03587481349..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 38b4b61e6061..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 935946d52792..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 b5731a824060..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 4ac9c4801a3f..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 8a50a084bcf3..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 7c4fd780655b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - 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 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 - # 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 - 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 a8b78b5e8ce4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile deleted file mode 100644 index 769e34015ecc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 aae80d41ccaf..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 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 6957ea78857c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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:| - assert options.metadata.key? :"x-goog-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 51d16aa460cd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# 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/reports_services_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) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - 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 -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 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-reports/.gitignore b/owl-bot-staging/google-shopping-merchant-reports/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/.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/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-reports/.repo-metadata.json deleted file mode 100644 index 5d4be5110b7d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/.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", - "distribution_name": "google-shopping-merchant-reports", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant 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.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-reports/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-reports/.rubocop.yml deleted file mode 100644 index 8eaf420dda24..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-reports.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-reports.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-reports/.toys.rb b/owl-bot-staging/google-shopping-merchant-reports/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/.yardopts b/owl-bot-staging/google-shopping-merchant-reports/.yardopts deleted file mode 100644 index 7f1a344f5a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Merchant API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-reports/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-reports/AUTHENTICATION.md deleted file mode 100644 index 329b9548b796..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-reports 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 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" - -client = Google::Shopping::Merchant::Reports.report_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/reports" - -Google::Shopping::Merchant::Reports.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Shopping::Merchant::Reports.report_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-reports -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" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Shopping::Merchant::Reports.report_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-reports/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-reports/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-reports/Gemfile b/owl-bot-staging/google-shopping-merchant-reports/Gemfile deleted file mode 100644 index 7fbf9c1065b4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-shopping-merchant-reports-v1beta", path: "../google-shopping-merchant-reports-v1beta" - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-reports/LICENSE.md b/owl-bot-staging/google-shopping-merchant-reports/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/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/README.md b/owl-bot-staging/google-shopping-merchant-reports/README.md deleted file mode 100644 index 11dc1d98b228..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Ruby Client for the Merchant API - -Programmatically manage your Merchant Center accounts. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-shopping-merchant-reports-v*`. -The gem `google-shopping-merchant-reports` is the main client library that brings the -verisoned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-reports) -for this library, google-shopping-merchant-reports, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-shopping-merchant-reports-v1beta](https://rubydoc.info/gems/google-shopping-merchant-reports-v1beta). - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for more usage information. - -## Quick Start - -``` -$ gem install google-shopping-merchant-reports -``` - -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) - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -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/Rakefile b/owl-bot-staging/google-shopping-merchant-reports/Rakefile deleted file mode 100644 index 88d092609019..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-reports 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 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 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 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 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-reports" - header "google-shopping-merchant-reports rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-reports yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-reports 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 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 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/google-shopping-merchant-reports.gemspec b/owl-bot-staging/google-shopping-merchant-reports/google-shopping-merchant-reports.gemspec deleted file mode 100644 index aa28a75a591e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/google-shopping-merchant-reports.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/reports/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-reports" - gem.version = Google::Shopping::Merchant::Reports::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-reports-v1beta", ">= 0.3", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-reports/lib/google-shopping-merchant-reports.rb b/owl-bot-staging/google-shopping-merchant-reports/lib/google-shopping-merchant-reports.rb deleted file mode 100644 index 5425656fd067..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/lib/google-shopping-merchant-reports.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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" unless defined? Google::Shopping::Merchant::Reports::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports.rb b/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports.rb deleted file mode 100644 index 2e57c1947f3b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/shopping/merchant/reports/version" - -require "googleauth" - -module Google - module Shopping - module Merchant - module Reports - ## - # Create a new client object for ReportService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Reports::V1beta::ReportService::Client](https://rubydoc.info/gems/google-shopping-merchant-reports-v1beta/Google/Shopping/Merchant/Reports/V1beta/ReportService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ReportService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About ReportService - # - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.report_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/reports/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Reports - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Reports.const_get(package_name).const_get(:ReportService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - end - end - end -end - -helper_path = ::File.join __dir__, "reports", "helpers.rb" -require "google/shopping/merchant/reports/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports/version.rb b/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports/version.rb deleted file mode 100644 index ba0222f654cd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/lib/google/shopping/merchant/reports/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/client_test.rb b/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/client_test.rb deleted file mode 100644 index d6d8379d7945..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/client_test.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/reports" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Shopping::Merchant::Reports::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_report_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Reports.report_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Reports::V1beta::ReportService::Client, client - end - end - - def test_report_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Reports.report_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/version_test.rb b/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/version_test.rb deleted file mode 100644 index 8b8e499f7789..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/test/google/shopping/merchant/reports/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/reports/version" - -class Google::Shopping::Merchant::Reports::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Shopping::Merchant::Reports::VERSION - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports/test/helper.rb b/owl-bot-staging/google-shopping-merchant-reports/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct"