From f1e3d9b34a7f88580db8752ba396ca55b7a2bd52 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 9 Jan 2021 03:30:03 -0800 Subject: [PATCH] feat: Automated regeneration of retail v2 client (#2263) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2021-01-09 03:16:31,252 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py. On branch autosynth-retail-v2 nothing to commit, working tree clean 2021-01-09 03:16:31,322 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth retail v2 DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth retail v2 bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`. Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Fetching rake 11.3.0 Installing rake 11.3.0 Fetching concurrent-ruby 1.1.7 Installing concurrent-ruby 1.1.7 Fetching i18n 1.8.7 Installing i18n 1.8.7 Fetching minitest 5.14.3 Installing minitest 5.14.3 Fetching tzinfo 2.0.4 Installing tzinfo 2.0.4 Fetching zeitwerk 2.4.2 Installing zeitwerk 2.4.2 Fetching activesupport 6.1.1 Installing activesupport 6.1.1 Fetching public_suffix 4.0.6 Installing public_suffix 4.0.6 Fetching addressable 2.7.0 Installing addressable 2.7.0 Fetching ast 2.4.1 Installing ast 2.4.1 Using bundler 2.1.4 Fetching byebug 11.1.3 Installing byebug 11.1.3 with native extensions Fetching coderay 1.1.3 Installing coderay 1.1.3 Fetching json 2.5.1 Installing json 2.5.1 with native extensions Fetching docile 1.3.4 Installing docile 1.3.4 Fetching simplecov-html 0.10.2 Installing simplecov-html 0.10.2 Fetching simplecov 0.16.1 Installing simplecov 0.16.1 Using sync 0.5.0 Fetching tins 1.26.0 Installing tins 1.26.0 Fetching term-ansicolor 1.7.1 Installing term-ansicolor 1.7.1 Fetching thor 0.20.3 Installing thor 0.20.3 Fetching coveralls 0.8.23 Installing coveralls 0.8.23 Fetching rexml 3.2.4 Installing rexml 3.2.4 Fetching crack 0.4.5 Installing crack 0.4.5 Fetching declarative 0.0.20 Installing declarative 0.0.20 Fetching declarative-option 0.1.0 Installing declarative-option 0.1.0 Fetching diff-lcs 1.4.4 Installing diff-lcs 1.4.4 Fetching dotenv 2.7.6 Installing dotenv 2.7.6 Fetching fakefs 0.20.1 Installing fakefs 0.20.1 Fetching faraday-net_http 1.0.0 Installing faraday-net_http 1.0.0 Fetching multipart-post 2.1.1 Installing multipart-post 2.1.1 Fetching ruby2_keywords 0.0.2 Installing ruby2_keywords 0.0.2 Fetching faraday 1.3.0 Installing faraday 1.3.0 Fetching gems 1.2.0 Installing gems 1.2.0 Fetching github-markup 1.7.0 Installing github-markup 1.7.0 Fetching jwt 2.2.2 Installing jwt 2.2.2 Fetching memoist 0.16.2 Installing memoist 0.16.2 Fetching multi_json 1.15.0 Installing multi_json 1.15.0 Fetching os 0.9.6 Installing os 0.9.6 Fetching signet 0.14.0 Installing signet 0.14.0 Fetching googleauth 0.14.0 Installing googleauth 0.14.0 Fetching httpclient 2.8.3 Installing httpclient 2.8.3 Fetching mini_mime 1.0.2 Installing mini_mime 1.0.2 Fetching uber 0.1.0 Installing uber 0.1.0 Fetching representable 3.0.4 Installing representable 3.0.4 Fetching retriable 3.1.2 Installing retriable 3.1.2 Fetching google-apis-core 0.2.0 Installing google-apis-core 0.2.0 Fetching google-apis-discovery_v1 0.1.0 Installing google-apis-discovery_v1 0.1.0 Using google-apis-generator 0.1.1 from source at `.` Fetching google-id-token 1.4.2 Installing google-id-token 1.4.2 Fetching hashdiff 1.0.1 Installing hashdiff 1.0.1 Fetching mime-types-data 3.2020.1104 Installing mime-types-data 3.2020.1104 Fetching mime-types 3.3.1 Installing mime-types 3.3.1 Fetching multi_xml 0.6.0 Installing multi_xml 0.6.0 Fetching httparty 0.18.1 Installing httparty 0.18.1 Fetching rspec-support 3.10.1 Installing rspec-support 3.10.1 Fetching rspec-core 3.10.1 Installing rspec-core 3.10.1 Fetching rspec-expectations 3.10.1 Installing rspec-expectations 3.10.1 Fetching rspec-mocks 3.10.1 Installing rspec-mocks 3.10.1 Fetching rspec 3.10.0 Installing rspec 3.10.0 Fetching json_spec 1.1.5 Installing json_spec 1.1.5 Fetching launchy 2.5.0 Installing launchy 2.5.0 Fetching little-plugger 1.1.4 Installing little-plugger 1.1.4 Fetching logging 2.3.0 Installing logging 2.3.0 Fetching method_source 1.0.0 Installing method_source 1.0.0 Fetching opencensus 0.5.0 Installing opencensus 0.5.0 Fetching parallel 1.20.1 Installing parallel 1.20.1 Fetching parser 2.7.2.0 Installing parser 2.7.2.0 Fetching powerpack 0.1.3 Installing powerpack 0.1.3 Fetching pry 0.13.1 Installing pry 0.13.1 Fetching pry-byebug 3.9.0 Installing pry-byebug 3.9.0 Fetching yard 0.9.26 Installing yard 0.9.26 Fetching pry-doc 0.13.5 Installing pry-doc 0.13.5 Fetching rainbow 2.2.2 Installing rainbow 2.2.2 with native extensions Fetching redcarpet 3.5.1 Installing redcarpet 3.5.1 with native extensions Fetching redis 3.3.5 Installing redis 3.3.5 Fetching rmail 1.1.4 Installing rmail 1.1.4 Fetching ruby-progressbar 1.11.0 Installing ruby-progressbar 1.11.0 Fetching unicode-display_width 1.7.0 Installing unicode-display_width 1.7.0 Fetching rubocop 0.49.1 Installing rubocop 0.49.1 Fetching webmock 2.3.2 Installing webmock 2.3.2 Bundle complete! 25 Gemfile dependencies, 81 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. Post-install message from i18n: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. If you are upgrading your Rails application from an older version of Rails: Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. If you are starting a NEW Rails application, you can ignore this notice. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 Post-install message from httparty: When you HTTParty, you must party hard! echo a | bundle exec bin/generate-api gen /workspace/generated --api=retail.v2 --names=/workspace/api_names.yaml --names-out=/workspace/api_names_out.yaml --spot-check Loading retail, version v2 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/retail.v2.json create google-apis-retail_v2/.rspec create google-apis-retail_v2/.yardopts create google-apis-retail_v2/Gemfile create google-apis-retail_v2/google-apis-retail_v2.gemspec create google-apis-retail_v2/LICENSE.md create google-apis-retail_v2/OVERVIEW.md create google-apis-retail_v2/Rakefile create google-apis-retail_v2/lib/google-apis-retail_v2.rb create google-apis-retail_v2/lib/google/apis/retail_v2.rb create google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb create google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb create google-apis-retail_v2/lib/google/apis/retail_v2/service.rb create google-apis-retail_v2/spec/generated_spec.rb create google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb create google-apis-retail_v2/CHANGELOG.md Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`. Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Fetching rake 13.0.3 Installing rake 13.0.3 Using public_suffix 4.0.6 Using addressable 2.7.0 Using bundler 2.1.4 Using declarative 0.0.20 Using declarative-option 0.1.0 Using diff-lcs 1.4.4 Using faraday-net_http 1.0.0 Using multipart-post 2.1.1 Using ruby2_keywords 0.0.2 Using faraday 1.3.0 Using jwt 2.2.2 Using memoist 0.16.2 Using multi_json 1.15.0 Fetching os 1.1.1 Installing os 1.1.1 Using signet 0.14.0 Using googleauth 0.14.0 Using httpclient 2.8.3 Using mini_mime 1.0.2 Using uber 0.1.0 Using representable 3.0.4 Using retriable 3.1.2 Using rexml 3.2.4 Using google-apis-core 0.2.0 Using google-apis-retail_v2 0.1.0 from source at `.` Using opencensus 0.5.0 Using redcarpet 3.5.1 Using rspec-support 3.10.1 Using rspec-core 3.10.1 Using rspec-expectations 3.10.1 Using rspec-mocks 3.10.1 Using rspec 3.10.0 Using yard 0.9.26 Bundle complete! 8 Gemfile dependencies, 33 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. /root/.rbenv/versions/2.6.6/bin/ruby -I/root/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib:/root/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rspec-support-3.10.1/lib /root/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb Google::Apis::RetailV2 should load Finished in 0.32127 seconds (files took 0.11116 seconds to load) 1 example, 0 failures Files: 4 Modules: 3 ( 1 undocumented) Classes: 84 ( 0 undocumented) Constants: 5 ( 0 undocumented) Attributes: 115 ( 0 undocumented) Methods: 185 ( 0 undocumented) 99.74% documented google-apis-retail_v2 0.1.0 built to pkg/google-apis-retail_v2-0.1.0.gem. conflict /workspace/api_names_out.yaml Overwrite /workspace/api_names_out.yaml? (enter "h" for help) [Ynaqdhm] a force /workspace/api_names_out.yaml 2021-01-09 03:17:06,394 synthtool [DEBUG] > Wrote metadata to generated/google-apis-retail_v2/synth.metadata. DEBUG:synthtool:Wrote metadata to generated/google-apis-retail_v2/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/2fec3e68-c8da-44a7-8bac-3218258fd2a0/targets - [ ] To automatically regenerate this PR, check this box. --- api_names_out.yaml | 380 +++ generated/google-apis-retail_v2/.rspec | 2 + generated/google-apis-retail_v2/.yardopts | 13 + generated/google-apis-retail_v2/CHANGELOG.md | 7 + generated/google-apis-retail_v2/Gemfile | 23 + generated/google-apis-retail_v2/LICENSE.md | 202 ++ generated/google-apis-retail_v2/OVERVIEW.md | 96 + generated/google-apis-retail_v2/Rakefile | 28 + .../google-apis-retail_v2.gemspec | 32 + .../lib/google-apis-retail_v2.rb | 15 + .../lib/google/apis/retail_v2.rb | 38 + .../lib/google/apis/retail_v2/classes.rb | 2739 +++++++++++++++++ .../lib/google/apis/retail_v2/gem_version.rb | 28 + .../google/apis/retail_v2/representations.rb | 1287 ++++++++ .../lib/google/apis/retail_v2/service.rb | 776 +++++ .../spec/generated_spec.rb | 27 + .../google-apis-retail_v2/synth.metadata | 11 + 17 files changed, 5704 insertions(+) create mode 100644 generated/google-apis-retail_v2/.rspec create mode 100644 generated/google-apis-retail_v2/.yardopts create mode 100644 generated/google-apis-retail_v2/CHANGELOG.md create mode 100644 generated/google-apis-retail_v2/Gemfile create mode 100644 generated/google-apis-retail_v2/LICENSE.md create mode 100644 generated/google-apis-retail_v2/OVERVIEW.md create mode 100644 generated/google-apis-retail_v2/Rakefile create mode 100644 generated/google-apis-retail_v2/google-apis-retail_v2.gemspec create mode 100644 generated/google-apis-retail_v2/lib/google-apis-retail_v2.rb create mode 100644 generated/google-apis-retail_v2/lib/google/apis/retail_v2.rb create mode 100644 generated/google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb create mode 100644 generated/google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb create mode 100644 generated/google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb create mode 100644 generated/google-apis-retail_v2/lib/google/apis/retail_v2/service.rb create mode 100644 generated/google-apis-retail_v2/spec/generated_spec.rb create mode 100644 generated/google-apis-retail_v2/synth.metadata diff --git a/api_names_out.yaml b/api_names_out.yaml index e9194d07e..f67405927 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -135680,6 +135680,386 @@ "/resourceviews:v1beta2/resourceviews.zoneViews.setService/resourceView": resource_view "/resourceviews:v1beta2/resourceviews.zoneViews.setService/zone": zone "/resourceviews:v1beta2/userIp": user_ip +"/retail:v2/GoogleApiHttpBody": google_api_http_body +"/retail:v2/GoogleApiHttpBody/contentType": content_type +"/retail:v2/GoogleApiHttpBody/data": data +"/retail:v2/GoogleApiHttpBody/extensions": extensions +"/retail:v2/GoogleApiHttpBody/extensions/extension": extension +"/retail:v2/GoogleApiHttpBody/extensions/extension/extension": extension +"/retail:v2/GoogleCloudRetailLoggingErrorContext": google_cloud_retail_logging_error_context +"/retail:v2/GoogleCloudRetailLoggingErrorContext/httpRequest": http_request +"/retail:v2/GoogleCloudRetailLoggingErrorContext/reportLocation": report_location +"/retail:v2/GoogleCloudRetailLoggingErrorLog": google_cloud_retail_logging_error_log +"/retail:v2/GoogleCloudRetailLoggingErrorLog/context": context +"/retail:v2/GoogleCloudRetailLoggingErrorLog/importPayload": import_payload +"/retail:v2/GoogleCloudRetailLoggingErrorLog/message": message +"/retail:v2/GoogleCloudRetailLoggingErrorLog/requestPayload": request_payload +"/retail:v2/GoogleCloudRetailLoggingErrorLog/requestPayload/request_payload": request_payload +"/retail:v2/GoogleCloudRetailLoggingErrorLog/responsePayload": response_payload +"/retail:v2/GoogleCloudRetailLoggingErrorLog/responsePayload/response_payload": response_payload +"/retail:v2/GoogleCloudRetailLoggingErrorLog/serviceContext": service_context +"/retail:v2/GoogleCloudRetailLoggingErrorLog/status": status +"/retail:v2/GoogleCloudRetailLoggingHttpRequestContext": google_cloud_retail_logging_http_request_context +"/retail:v2/GoogleCloudRetailLoggingHttpRequestContext/responseStatusCode": response_status_code +"/retail:v2/GoogleCloudRetailLoggingImportErrorContext": google_cloud_retail_logging_import_error_context +"/retail:v2/GoogleCloudRetailLoggingImportErrorContext/catalogItem": catalog_item +"/retail:v2/GoogleCloudRetailLoggingImportErrorContext/gcsPath": gcs_path +"/retail:v2/GoogleCloudRetailLoggingImportErrorContext/lineNumber": line_number +"/retail:v2/GoogleCloudRetailLoggingImportErrorContext/operationName": operation_name +"/retail:v2/GoogleCloudRetailLoggingImportErrorContext/product": product +"/retail:v2/GoogleCloudRetailLoggingImportErrorContext/userEvent": user_event +"/retail:v2/GoogleCloudRetailLoggingServiceContext": google_cloud_retail_logging_service_context +"/retail:v2/GoogleCloudRetailLoggingServiceContext/service": service +"/retail:v2/GoogleCloudRetailLoggingSourceLocation": google_cloud_retail_logging_source_location +"/retail:v2/GoogleCloudRetailLoggingSourceLocation/functionName": function_name +"/retail:v2/GoogleCloudRetailV2BigQuerySource": google_cloud_retail_v2_big_query_source +"/retail:v2/GoogleCloudRetailV2BigQuerySource/dataSchema": data_schema +"/retail:v2/GoogleCloudRetailV2BigQuerySource/datasetId": dataset_id +"/retail:v2/GoogleCloudRetailV2BigQuerySource/gcsStagingDir": gcs_staging_dir +"/retail:v2/GoogleCloudRetailV2BigQuerySource/projectId": project_id +"/retail:v2/GoogleCloudRetailV2BigQuerySource/tableId": table_id +"/retail:v2/GoogleCloudRetailV2Catalog": google_cloud_retail_v2_catalog +"/retail:v2/GoogleCloudRetailV2Catalog/displayName": display_name +"/retail:v2/GoogleCloudRetailV2Catalog/name": name +"/retail:v2/GoogleCloudRetailV2Catalog/productLevelConfig": product_level_config +"/retail:v2/GoogleCloudRetailV2CustomAttribute": google_cloud_retail_v2_custom_attribute +"/retail:v2/GoogleCloudRetailV2CustomAttribute/numbers": numbers +"/retail:v2/GoogleCloudRetailV2CustomAttribute/numbers/number": number +"/retail:v2/GoogleCloudRetailV2CustomAttribute/text": text +"/retail:v2/GoogleCloudRetailV2CustomAttribute/text/text": text +"/retail:v2/GoogleCloudRetailV2GcsSource": google_cloud_retail_v2_gcs_source +"/retail:v2/GoogleCloudRetailV2GcsSource/dataSchema": data_schema +"/retail:v2/GoogleCloudRetailV2GcsSource/inputUris": input_uris +"/retail:v2/GoogleCloudRetailV2GcsSource/inputUris/input_uri": input_uri +"/retail:v2/GoogleCloudRetailV2Image": google_cloud_retail_v2_image +"/retail:v2/GoogleCloudRetailV2Image/height": height +"/retail:v2/GoogleCloudRetailV2Image/uri": uri +"/retail:v2/GoogleCloudRetailV2Image/width": width +"/retail:v2/GoogleCloudRetailV2ImportErrorsConfig": google_cloud_retail_v2_import_errors_config +"/retail:v2/GoogleCloudRetailV2ImportErrorsConfig/gcsPrefix": gcs_prefix +"/retail:v2/GoogleCloudRetailV2ImportMetadata": google_cloud_retail_v2_import_metadata +"/retail:v2/GoogleCloudRetailV2ImportMetadata/createTime": create_time +"/retail:v2/GoogleCloudRetailV2ImportMetadata/failureCount": failure_count +"/retail:v2/GoogleCloudRetailV2ImportMetadata/successCount": success_count +"/retail:v2/GoogleCloudRetailV2ImportMetadata/updateTime": update_time +"/retail:v2/GoogleCloudRetailV2ImportProductsRequest": google_cloud_retail_v2_import_products_request +"/retail:v2/GoogleCloudRetailV2ImportProductsRequest/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2ImportProductsRequest/inputConfig": input_config +"/retail:v2/GoogleCloudRetailV2ImportProductsRequest/updateMask": update_mask +"/retail:v2/GoogleCloudRetailV2ImportProductsResponse": google_cloud_retail_v2_import_products_response +"/retail:v2/GoogleCloudRetailV2ImportProductsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2ImportProductsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2ImportProductsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2ImportUserEventsRequest": google_cloud_retail_v2_import_user_events_request +"/retail:v2/GoogleCloudRetailV2ImportUserEventsRequest/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2ImportUserEventsRequest/inputConfig": input_config +"/retail:v2/GoogleCloudRetailV2ImportUserEventsResponse": google_cloud_retail_v2_import_user_events_response +"/retail:v2/GoogleCloudRetailV2ImportUserEventsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2ImportUserEventsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2ImportUserEventsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2ImportUserEventsResponse/importSummary": import_summary +"/retail:v2/GoogleCloudRetailV2ListCatalogsResponse": google_cloud_retail_v2_list_catalogs_response +"/retail:v2/GoogleCloudRetailV2ListCatalogsResponse/catalogs": catalogs +"/retail:v2/GoogleCloudRetailV2ListCatalogsResponse/catalogs/catalog": catalog +"/retail:v2/GoogleCloudRetailV2ListCatalogsResponse/nextPageToken": next_page_token +"/retail:v2/GoogleCloudRetailV2PredictRequest": google_cloud_retail_v2_predict_request +"/retail:v2/GoogleCloudRetailV2PredictRequest/filter": filter +"/retail:v2/GoogleCloudRetailV2PredictRequest/labels": labels +"/retail:v2/GoogleCloudRetailV2PredictRequest/labels/label": label +"/retail:v2/GoogleCloudRetailV2PredictRequest/pageSize": page_size +"/retail:v2/GoogleCloudRetailV2PredictRequest/pageToken": page_token +"/retail:v2/GoogleCloudRetailV2PredictRequest/params": params +"/retail:v2/GoogleCloudRetailV2PredictRequest/params/param": param +"/retail:v2/GoogleCloudRetailV2PredictRequest/userEvent": user_event +"/retail:v2/GoogleCloudRetailV2PredictRequest/validateOnly": validate_only +"/retail:v2/GoogleCloudRetailV2PredictResponse": google_cloud_retail_v2_predict_response +"/retail:v2/GoogleCloudRetailV2PredictResponse/attributionToken": attribution_token +"/retail:v2/GoogleCloudRetailV2PredictResponse/missingIds": missing_ids +"/retail:v2/GoogleCloudRetailV2PredictResponse/missingIds/missing_id": missing_id +"/retail:v2/GoogleCloudRetailV2PredictResponse/results": results +"/retail:v2/GoogleCloudRetailV2PredictResponse/results/result": result +"/retail:v2/GoogleCloudRetailV2PredictResponse/validateOnly": validate_only +"/retail:v2/GoogleCloudRetailV2PredictResponsePredictionResult": google_cloud_retail_v2_predict_response_prediction_result +"/retail:v2/GoogleCloudRetailV2PredictResponsePredictionResult/id": id +"/retail:v2/GoogleCloudRetailV2PredictResponsePredictionResult/metadata": metadata +"/retail:v2/GoogleCloudRetailV2PredictResponsePredictionResult/metadata/metadatum": metadatum +"/retail:v2/GoogleCloudRetailV2PriceInfo": google_cloud_retail_v2_price_info +"/retail:v2/GoogleCloudRetailV2PriceInfo/cost": cost +"/retail:v2/GoogleCloudRetailV2PriceInfo/currencyCode": currency_code +"/retail:v2/GoogleCloudRetailV2PriceInfo/originalPrice": original_price +"/retail:v2/GoogleCloudRetailV2PriceInfo/price": price +"/retail:v2/GoogleCloudRetailV2Product": google_cloud_retail_v2_product +"/retail:v2/GoogleCloudRetailV2Product/attributes": attributes +"/retail:v2/GoogleCloudRetailV2Product/attributes/attribute": attribute +"/retail:v2/GoogleCloudRetailV2Product/availability": availability +"/retail:v2/GoogleCloudRetailV2Product/availableQuantity": available_quantity +"/retail:v2/GoogleCloudRetailV2Product/availableTime": available_time +"/retail:v2/GoogleCloudRetailV2Product/categories": categories +"/retail:v2/GoogleCloudRetailV2Product/categories/category": category +"/retail:v2/GoogleCloudRetailV2Product/description": description +"/retail:v2/GoogleCloudRetailV2Product/id": id +"/retail:v2/GoogleCloudRetailV2Product/images": images +"/retail:v2/GoogleCloudRetailV2Product/images/image": image +"/retail:v2/GoogleCloudRetailV2Product/name": name +"/retail:v2/GoogleCloudRetailV2Product/priceInfo": price_info +"/retail:v2/GoogleCloudRetailV2Product/primaryProductId": primary_product_id +"/retail:v2/GoogleCloudRetailV2Product/tags": tags +"/retail:v2/GoogleCloudRetailV2Product/tags/tag": tag +"/retail:v2/GoogleCloudRetailV2Product/title": title +"/retail:v2/GoogleCloudRetailV2Product/type": type +"/retail:v2/GoogleCloudRetailV2Product/uri": uri +"/retail:v2/GoogleCloudRetailV2ProductDetail": google_cloud_retail_v2_product_detail +"/retail:v2/GoogleCloudRetailV2ProductDetail/product": product +"/retail:v2/GoogleCloudRetailV2ProductDetail/quantity": quantity +"/retail:v2/GoogleCloudRetailV2ProductInlineSource": google_cloud_retail_v2_product_inline_source +"/retail:v2/GoogleCloudRetailV2ProductInlineSource/products": products +"/retail:v2/GoogleCloudRetailV2ProductInlineSource/products/product": product +"/retail:v2/GoogleCloudRetailV2ProductInputConfig": google_cloud_retail_v2_product_input_config +"/retail:v2/GoogleCloudRetailV2ProductInputConfig/bigQuerySource": big_query_source +"/retail:v2/GoogleCloudRetailV2ProductInputConfig/gcsSource": gcs_source +"/retail:v2/GoogleCloudRetailV2ProductInputConfig/productInlineSource": product_inline_source +"/retail:v2/GoogleCloudRetailV2ProductLevelConfig": google_cloud_retail_v2_product_level_config +"/retail:v2/GoogleCloudRetailV2ProductLevelConfig/ingestionProductType": ingestion_product_type +"/retail:v2/GoogleCloudRetailV2ProductLevelConfig/merchantCenterProductIdField": merchant_center_product_id_field +"/retail:v2/GoogleCloudRetailV2PurchaseTransaction": google_cloud_retail_v2_purchase_transaction +"/retail:v2/GoogleCloudRetailV2PurchaseTransaction/cost": cost +"/retail:v2/GoogleCloudRetailV2PurchaseTransaction/currencyCode": currency_code +"/retail:v2/GoogleCloudRetailV2PurchaseTransaction/id": id +"/retail:v2/GoogleCloudRetailV2PurchaseTransaction/revenue": revenue +"/retail:v2/GoogleCloudRetailV2PurchaseTransaction/tax": tax +"/retail:v2/GoogleCloudRetailV2PurgeMetadata": google_cloud_retail_v2_purge_metadata +"/retail:v2/GoogleCloudRetailV2PurgeUserEventsRequest": google_cloud_retail_v2_purge_user_events_request +"/retail:v2/GoogleCloudRetailV2PurgeUserEventsRequest/filter": filter +"/retail:v2/GoogleCloudRetailV2PurgeUserEventsRequest/force": force +"/retail:v2/GoogleCloudRetailV2PurgeUserEventsResponse": google_cloud_retail_v2_purge_user_events_response +"/retail:v2/GoogleCloudRetailV2PurgeUserEventsResponse/purgedEventsCount": purged_events_count +"/retail:v2/GoogleCloudRetailV2RejoinUserEventsMetadata": google_cloud_retail_v2_rejoin_user_events_metadata +"/retail:v2/GoogleCloudRetailV2RejoinUserEventsRequest": google_cloud_retail_v2_rejoin_user_events_request +"/retail:v2/GoogleCloudRetailV2RejoinUserEventsRequest/userEventRejoinScope": user_event_rejoin_scope +"/retail:v2/GoogleCloudRetailV2RejoinUserEventsResponse": google_cloud_retail_v2_rejoin_user_events_response +"/retail:v2/GoogleCloudRetailV2RejoinUserEventsResponse/rejoinedUserEventsCount": rejoined_user_events_count +"/retail:v2/GoogleCloudRetailV2UserEvent": google_cloud_retail_v2_user_event +"/retail:v2/GoogleCloudRetailV2UserEvent/attributes": attributes +"/retail:v2/GoogleCloudRetailV2UserEvent/attributes/attribute": attribute +"/retail:v2/GoogleCloudRetailV2UserEvent/attributionToken": attribution_token +"/retail:v2/GoogleCloudRetailV2UserEvent/cartId": cart_id +"/retail:v2/GoogleCloudRetailV2UserEvent/eventTime": event_time +"/retail:v2/GoogleCloudRetailV2UserEvent/eventType": event_type +"/retail:v2/GoogleCloudRetailV2UserEvent/experimentIds": experiment_ids +"/retail:v2/GoogleCloudRetailV2UserEvent/experimentIds/experiment_id": experiment_id +"/retail:v2/GoogleCloudRetailV2UserEvent/pageCategories": page_categories +"/retail:v2/GoogleCloudRetailV2UserEvent/pageCategories/page_category": page_category +"/retail:v2/GoogleCloudRetailV2UserEvent/pageViewId": page_view_id +"/retail:v2/GoogleCloudRetailV2UserEvent/productDetails": product_details +"/retail:v2/GoogleCloudRetailV2UserEvent/productDetails/product_detail": product_detail +"/retail:v2/GoogleCloudRetailV2UserEvent/purchaseTransaction": purchase_transaction +"/retail:v2/GoogleCloudRetailV2UserEvent/referrerUri": referrer_uri +"/retail:v2/GoogleCloudRetailV2UserEvent/searchQuery": search_query +"/retail:v2/GoogleCloudRetailV2UserEvent/uri": uri +"/retail:v2/GoogleCloudRetailV2UserEvent/userInfo": user_info +"/retail:v2/GoogleCloudRetailV2UserEvent/visitorId": visitor_id +"/retail:v2/GoogleCloudRetailV2UserEventImportSummary": google_cloud_retail_v2_user_event_import_summary +"/retail:v2/GoogleCloudRetailV2UserEventImportSummary/joinedEventsCount": joined_events_count +"/retail:v2/GoogleCloudRetailV2UserEventImportSummary/unjoinedEventsCount": unjoined_events_count +"/retail:v2/GoogleCloudRetailV2UserEventInlineSource": google_cloud_retail_v2_user_event_inline_source +"/retail:v2/GoogleCloudRetailV2UserEventInlineSource/userEvents": user_events +"/retail:v2/GoogleCloudRetailV2UserEventInlineSource/userEvents/user_event": user_event +"/retail:v2/GoogleCloudRetailV2UserEventInputConfig": google_cloud_retail_v2_user_event_input_config +"/retail:v2/GoogleCloudRetailV2UserEventInputConfig/bigQuerySource": big_query_source +"/retail:v2/GoogleCloudRetailV2UserEventInputConfig/gcsSource": gcs_source +"/retail:v2/GoogleCloudRetailV2UserEventInputConfig/userEventInlineSource": user_event_inline_source +"/retail:v2/GoogleCloudRetailV2UserInfo": google_cloud_retail_v2_user_info +"/retail:v2/GoogleCloudRetailV2UserInfo/directUserRequest": direct_user_request +"/retail:v2/GoogleCloudRetailV2UserInfo/ipAddress": ip_address +"/retail:v2/GoogleCloudRetailV2UserInfo/userAgent": user_agent +"/retail:v2/GoogleCloudRetailV2UserInfo/userId": user_id +"/retail:v2/GoogleCloudRetailV2alphaExportErrorsConfig": google_cloud_retail_v2alpha_export_errors_config +"/retail:v2/GoogleCloudRetailV2alphaExportErrorsConfig/gcsPrefix": gcs_prefix +"/retail:v2/GoogleCloudRetailV2alphaExportMetadata": google_cloud_retail_v2alpha_export_metadata +"/retail:v2/GoogleCloudRetailV2alphaExportMetadata/createTime": create_time +"/retail:v2/GoogleCloudRetailV2alphaExportMetadata/updateTime": update_time +"/retail:v2/GoogleCloudRetailV2alphaExportProductsResponse": google_cloud_retail_v2alpha_export_products_response +"/retail:v2/GoogleCloudRetailV2alphaExportProductsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2alphaExportProductsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2alphaExportProductsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2alphaExportUserEventsResponse": google_cloud_retail_v2alpha_export_user_events_response +"/retail:v2/GoogleCloudRetailV2alphaExportUserEventsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2alphaExportUserEventsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2alphaExportUserEventsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2alphaImportErrorsConfig": google_cloud_retail_v2alpha_import_errors_config +"/retail:v2/GoogleCloudRetailV2alphaImportErrorsConfig/gcsPrefix": gcs_prefix +"/retail:v2/GoogleCloudRetailV2alphaImportMetadata": google_cloud_retail_v2alpha_import_metadata +"/retail:v2/GoogleCloudRetailV2alphaImportMetadata/createTime": create_time +"/retail:v2/GoogleCloudRetailV2alphaImportMetadata/failureCount": failure_count +"/retail:v2/GoogleCloudRetailV2alphaImportMetadata/successCount": success_count +"/retail:v2/GoogleCloudRetailV2alphaImportMetadata/updateTime": update_time +"/retail:v2/GoogleCloudRetailV2alphaImportProductsResponse": google_cloud_retail_v2alpha_import_products_response +"/retail:v2/GoogleCloudRetailV2alphaImportProductsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2alphaImportProductsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2alphaImportProductsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2alphaImportUserEventsResponse": google_cloud_retail_v2alpha_import_user_events_response +"/retail:v2/GoogleCloudRetailV2alphaImportUserEventsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2alphaImportUserEventsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2alphaImportUserEventsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2alphaImportUserEventsResponse/importSummary": import_summary +"/retail:v2/GoogleCloudRetailV2alphaPurgeMetadata": google_cloud_retail_v2alpha_purge_metadata +"/retail:v2/GoogleCloudRetailV2alphaPurgeUserEventsResponse": google_cloud_retail_v2alpha_purge_user_events_response +"/retail:v2/GoogleCloudRetailV2alphaPurgeUserEventsResponse/purgedEventsCount": purged_events_count +"/retail:v2/GoogleCloudRetailV2alphaRejoinUserEventsMetadata": google_cloud_retail_v2alpha_rejoin_user_events_metadata +"/retail:v2/GoogleCloudRetailV2alphaRejoinUserEventsResponse": google_cloud_retail_v2alpha_rejoin_user_events_response +"/retail:v2/GoogleCloudRetailV2alphaRejoinUserEventsResponse/rejoinedUserEventsCount": rejoined_user_events_count +"/retail:v2/GoogleCloudRetailV2alphaUserEventImportSummary": google_cloud_retail_v2alpha_user_event_import_summary +"/retail:v2/GoogleCloudRetailV2alphaUserEventImportSummary/joinedEventsCount": joined_events_count +"/retail:v2/GoogleCloudRetailV2alphaUserEventImportSummary/unjoinedEventsCount": unjoined_events_count +"/retail:v2/GoogleCloudRetailV2betaExportErrorsConfig": google_cloud_retail_v2beta_export_errors_config +"/retail:v2/GoogleCloudRetailV2betaExportErrorsConfig/gcsPrefix": gcs_prefix +"/retail:v2/GoogleCloudRetailV2betaExportMetadata": google_cloud_retail_v2beta_export_metadata +"/retail:v2/GoogleCloudRetailV2betaExportMetadata/createTime": create_time +"/retail:v2/GoogleCloudRetailV2betaExportMetadata/updateTime": update_time +"/retail:v2/GoogleCloudRetailV2betaExportProductsResponse": google_cloud_retail_v2beta_export_products_response +"/retail:v2/GoogleCloudRetailV2betaExportProductsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2betaExportProductsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2betaExportProductsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2betaExportUserEventsResponse": google_cloud_retail_v2beta_export_user_events_response +"/retail:v2/GoogleCloudRetailV2betaExportUserEventsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2betaExportUserEventsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2betaExportUserEventsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2betaImportErrorsConfig": google_cloud_retail_v2beta_import_errors_config +"/retail:v2/GoogleCloudRetailV2betaImportErrorsConfig/gcsPrefix": gcs_prefix +"/retail:v2/GoogleCloudRetailV2betaImportMetadata": google_cloud_retail_v2beta_import_metadata +"/retail:v2/GoogleCloudRetailV2betaImportMetadata/createTime": create_time +"/retail:v2/GoogleCloudRetailV2betaImportMetadata/failureCount": failure_count +"/retail:v2/GoogleCloudRetailV2betaImportMetadata/successCount": success_count +"/retail:v2/GoogleCloudRetailV2betaImportMetadata/updateTime": update_time +"/retail:v2/GoogleCloudRetailV2betaImportProductsResponse": google_cloud_retail_v2beta_import_products_response +"/retail:v2/GoogleCloudRetailV2betaImportProductsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2betaImportProductsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2betaImportProductsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2betaImportUserEventsResponse": google_cloud_retail_v2beta_import_user_events_response +"/retail:v2/GoogleCloudRetailV2betaImportUserEventsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2betaImportUserEventsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2betaImportUserEventsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2betaImportUserEventsResponse/importSummary": import_summary +"/retail:v2/GoogleCloudRetailV2betaPurgeMetadata": google_cloud_retail_v2beta_purge_metadata +"/retail:v2/GoogleCloudRetailV2betaPurgeUserEventsResponse": google_cloud_retail_v2beta_purge_user_events_response +"/retail:v2/GoogleCloudRetailV2betaPurgeUserEventsResponse/purgedEventsCount": purged_events_count +"/retail:v2/GoogleCloudRetailV2betaRejoinUserEventsMetadata": google_cloud_retail_v2beta_rejoin_user_events_metadata +"/retail:v2/GoogleCloudRetailV2betaRejoinUserEventsResponse": google_cloud_retail_v2beta_rejoin_user_events_response +"/retail:v2/GoogleCloudRetailV2betaRejoinUserEventsResponse/rejoinedUserEventsCount": rejoined_user_events_count +"/retail:v2/GoogleCloudRetailV2betaUserEventImportSummary": google_cloud_retail_v2beta_user_event_import_summary +"/retail:v2/GoogleCloudRetailV2betaUserEventImportSummary/joinedEventsCount": joined_events_count +"/retail:v2/GoogleCloudRetailV2betaUserEventImportSummary/unjoinedEventsCount": unjoined_events_count +"/retail:v2/GoogleCloudRetailV2mainExportErrorsConfig": google_cloud_retail_v2main_export_errors_config +"/retail:v2/GoogleCloudRetailV2mainExportErrorsConfig/gcsPrefix": gcs_prefix +"/retail:v2/GoogleCloudRetailV2mainExportMetadata": google_cloud_retail_v2main_export_metadata +"/retail:v2/GoogleCloudRetailV2mainExportMetadata/createTime": create_time +"/retail:v2/GoogleCloudRetailV2mainExportMetadata/updateTime": update_time +"/retail:v2/GoogleCloudRetailV2mainExportProductsResponse": google_cloud_retail_v2main_export_products_response +"/retail:v2/GoogleCloudRetailV2mainExportProductsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2mainExportProductsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2mainExportProductsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2mainExportUserEventsResponse": google_cloud_retail_v2main_export_user_events_response +"/retail:v2/GoogleCloudRetailV2mainExportUserEventsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2mainExportUserEventsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2mainExportUserEventsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2mainImportErrorsConfig": google_cloud_retail_v2main_import_errors_config +"/retail:v2/GoogleCloudRetailV2mainImportErrorsConfig/gcsPrefix": gcs_prefix +"/retail:v2/GoogleCloudRetailV2mainImportMetadata": google_cloud_retail_v2main_import_metadata +"/retail:v2/GoogleCloudRetailV2mainImportMetadata/createTime": create_time +"/retail:v2/GoogleCloudRetailV2mainImportMetadata/failureCount": failure_count +"/retail:v2/GoogleCloudRetailV2mainImportMetadata/successCount": success_count +"/retail:v2/GoogleCloudRetailV2mainImportMetadata/updateTime": update_time +"/retail:v2/GoogleCloudRetailV2mainImportProductsResponse": google_cloud_retail_v2main_import_products_response +"/retail:v2/GoogleCloudRetailV2mainImportProductsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2mainImportProductsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2mainImportProductsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2mainImportUserEventsResponse": google_cloud_retail_v2main_import_user_events_response +"/retail:v2/GoogleCloudRetailV2mainImportUserEventsResponse/errorSamples": error_samples +"/retail:v2/GoogleCloudRetailV2mainImportUserEventsResponse/errorSamples/error_sample": error_sample +"/retail:v2/GoogleCloudRetailV2mainImportUserEventsResponse/errorsConfig": errors_config +"/retail:v2/GoogleCloudRetailV2mainImportUserEventsResponse/importSummary": import_summary +"/retail:v2/GoogleCloudRetailV2mainPurgeMetadata": google_cloud_retail_v2main_purge_metadata +"/retail:v2/GoogleCloudRetailV2mainPurgeUserEventsResponse": google_cloud_retail_v2main_purge_user_events_response +"/retail:v2/GoogleCloudRetailV2mainPurgeUserEventsResponse/purgedEventsCount": purged_events_count +"/retail:v2/GoogleCloudRetailV2mainRejoinUserEventsMetadata": google_cloud_retail_v2main_rejoin_user_events_metadata +"/retail:v2/GoogleCloudRetailV2mainRejoinUserEventsResponse": google_cloud_retail_v2main_rejoin_user_events_response +"/retail:v2/GoogleCloudRetailV2mainRejoinUserEventsResponse/rejoinedUserEventsCount": rejoined_user_events_count +"/retail:v2/GoogleCloudRetailV2mainUserEventImportSummary": google_cloud_retail_v2main_user_event_import_summary +"/retail:v2/GoogleCloudRetailV2mainUserEventImportSummary/joinedEventsCount": joined_events_count +"/retail:v2/GoogleCloudRetailV2mainUserEventImportSummary/unjoinedEventsCount": unjoined_events_count +"/retail:v2/GoogleLongrunningListOperationsResponse": google_longrunning_list_operations_response +"/retail:v2/GoogleLongrunningListOperationsResponse/nextPageToken": next_page_token +"/retail:v2/GoogleLongrunningListOperationsResponse/operations": operations +"/retail:v2/GoogleLongrunningListOperationsResponse/operations/operation": operation +"/retail:v2/GoogleLongrunningOperation": google_longrunning_operation +"/retail:v2/GoogleLongrunningOperation/done": done +"/retail:v2/GoogleLongrunningOperation/error": error +"/retail:v2/GoogleLongrunningOperation/metadata": metadata +"/retail:v2/GoogleLongrunningOperation/metadata/metadatum": metadatum +"/retail:v2/GoogleLongrunningOperation/name": name +"/retail:v2/GoogleLongrunningOperation/response": response +"/retail:v2/GoogleLongrunningOperation/response/response": response +"/retail:v2/GoogleProtobufEmpty": google_protobuf_empty +"/retail:v2/GoogleRpcStatus": google_rpc_status +"/retail:v2/GoogleRpcStatus/code": code +"/retail:v2/GoogleRpcStatus/details": details +"/retail:v2/GoogleRpcStatus/details/detail": detail +"/retail:v2/GoogleRpcStatus/details/detail/detail": detail +"/retail:v2/GoogleRpcStatus/message": message +"/retail:v2/fields": fields +"/retail:v2/key": key +"/retail:v2/quotaUser": quota_user +"/retail:v2/retail.projects.locations.catalogs.branches.operations.get": get_project_location_catalog_branch_operation +"/retail:v2/retail.projects.locations.catalogs.branches.operations.get/name": name +"/retail:v2/retail.projects.locations.catalogs.branches.products.create": create_project_location_catalog_branch_product +"/retail:v2/retail.projects.locations.catalogs.branches.products.create/parent": parent +"/retail:v2/retail.projects.locations.catalogs.branches.products.create/productId": product_id +"/retail:v2/retail.projects.locations.catalogs.branches.products.delete": delete_project_location_catalog_branch_product +"/retail:v2/retail.projects.locations.catalogs.branches.products.delete/name": name +"/retail:v2/retail.projects.locations.catalogs.branches.products.get": get_project_location_catalog_branch_product +"/retail:v2/retail.projects.locations.catalogs.branches.products.get/name": name +"/retail:v2/retail.projects.locations.catalogs.branches.products.import": import_project_location_catalog_branch_product +"/retail:v2/retail.projects.locations.catalogs.branches.products.import/parent": parent +"/retail:v2/retail.projects.locations.catalogs.branches.products.patch": patch_project_location_catalog_branch_product +"/retail:v2/retail.projects.locations.catalogs.branches.products.patch/allowMissing": allow_missing +"/retail:v2/retail.projects.locations.catalogs.branches.products.patch/name": name +"/retail:v2/retail.projects.locations.catalogs.branches.products.patch/updateMask": update_mask +"/retail:v2/retail.projects.locations.catalogs.list": list_project_location_catalogs +"/retail:v2/retail.projects.locations.catalogs.list/pageSize": page_size +"/retail:v2/retail.projects.locations.catalogs.list/pageToken": page_token +"/retail:v2/retail.projects.locations.catalogs.list/parent": parent +"/retail:v2/retail.projects.locations.catalogs.operations.get": get_project_location_catalog_operation +"/retail:v2/retail.projects.locations.catalogs.operations.get/name": name +"/retail:v2/retail.projects.locations.catalogs.operations.list": list_project_location_catalog_operations +"/retail:v2/retail.projects.locations.catalogs.operations.list/filter": filter +"/retail:v2/retail.projects.locations.catalogs.operations.list/name": name +"/retail:v2/retail.projects.locations.catalogs.operations.list/pageSize": page_size +"/retail:v2/retail.projects.locations.catalogs.operations.list/pageToken": page_token +"/retail:v2/retail.projects.locations.catalogs.patch": patch_project_location_catalog +"/retail:v2/retail.projects.locations.catalogs.patch/name": name +"/retail:v2/retail.projects.locations.catalogs.patch/updateMask": update_mask +"/retail:v2/retail.projects.locations.catalogs.placements.predict": predict_project_location_catalog_placement +"/retail:v2/retail.projects.locations.catalogs.placements.predict/placement": placement +"/retail:v2/retail.projects.locations.catalogs.userEvents.collect": collect_project_location_catalog_user_event +"/retail:v2/retail.projects.locations.catalogs.userEvents.collect/ets": ets +"/retail:v2/retail.projects.locations.catalogs.userEvents.collect/parent": parent +"/retail:v2/retail.projects.locations.catalogs.userEvents.collect/uri": uri +"/retail:v2/retail.projects.locations.catalogs.userEvents.collect/userEvent": user_event +"/retail:v2/retail.projects.locations.catalogs.userEvents.import": import_project_location_catalog_user_event +"/retail:v2/retail.projects.locations.catalogs.userEvents.import/parent": parent +"/retail:v2/retail.projects.locations.catalogs.userEvents.purge": purge_project_location_catalog_user_event +"/retail:v2/retail.projects.locations.catalogs.userEvents.purge/parent": parent +"/retail:v2/retail.projects.locations.catalogs.userEvents.rejoin": rejoin_project_location_catalog_user_event +"/retail:v2/retail.projects.locations.catalogs.userEvents.rejoin/parent": parent +"/retail:v2/retail.projects.locations.catalogs.userEvents.write": write_project_location_catalog_user_event +"/retail:v2/retail.projects.locations.catalogs.userEvents.write/parent": parent +"/retail:v2/retail.projects.locations.operations.get": get_project_location_operation +"/retail:v2/retail.projects.locations.operations.get/name": name +"/retail:v2/retail.projects.locations.operations.list": list_project_location_operations +"/retail:v2/retail.projects.locations.operations.list/filter": filter +"/retail:v2/retail.projects.locations.operations.list/name": name +"/retail:v2/retail.projects.locations.operations.list/pageSize": page_size +"/retail:v2/retail.projects.locations.operations.list/pageToken": page_token "/run:v1/Addressable": addressable "/run:v1/Addressable/url": url "/run:v1/AuditConfig": audit_config diff --git a/generated/google-apis-retail_v2/.rspec b/generated/google-apis-retail_v2/.rspec new file mode 100644 index 000000000..16f9cdb01 --- /dev/null +++ b/generated/google-apis-retail_v2/.rspec @@ -0,0 +1,2 @@ +--color +--format documentation diff --git a/generated/google-apis-retail_v2/.yardopts b/generated/google-apis-retail_v2/.yardopts new file mode 100644 index 000000000..2d5d3287d --- /dev/null +++ b/generated/google-apis-retail_v2/.yardopts @@ -0,0 +1,13 @@ +--hide-void-return +--no-private +--verbose +--title=google-apis-retail_v2 +--markup-provider=redcarpet +--markup=markdown +--main OVERVIEW.md +lib/google/apis/retail_v2/*.rb +lib/google/apis/retail_v2.rb +- +OVERVIEW.md +CHANGELOG.md +LICENSE.md diff --git a/generated/google-apis-retail_v2/CHANGELOG.md b/generated/google-apis-retail_v2/CHANGELOG.md new file mode 100644 index 000000000..67059eb17 --- /dev/null +++ b/generated/google-apis-retail_v2/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release history for google-apis-retail_v2 + +### v0.1.0 (2021-01-09) + +* Regenerated from discovery document revision 20210105 +* Regenerated using generator version 0.1.1 + diff --git a/generated/google-apis-retail_v2/Gemfile b/generated/google-apis-retail_v2/Gemfile new file mode 100644 index 000000000..6fa8bb627 --- /dev/null +++ b/generated/google-apis-retail_v2/Gemfile @@ -0,0 +1,23 @@ +source 'https://rubygems.org' + +gemspec + +group :development do + gem "bundler", ">= 1.17" + gem "rake", ">= 12.0" + gem "rspec", "~> 3.9" + gem "opencensus", "~> 0.5" +end + +platforms :jruby do + group :development do + gem "jruby-openssl" + end +end + +platforms :ruby do + group :development do + gem "yard", "~> 0.9", ">= 0.9.25" + gem "redcarpet", "~> 3.5" + end +end diff --git a/generated/google-apis-retail_v2/LICENSE.md b/generated/google-apis-retail_v2/LICENSE.md new file mode 100644 index 000000000..329168041 --- /dev/null +++ b/generated/google-apis-retail_v2/LICENSE.md @@ -0,0 +1,202 @@ + + 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/generated/google-apis-retail_v2/OVERVIEW.md b/generated/google-apis-retail_v2/OVERVIEW.md new file mode 100644 index 000000000..11c038641 --- /dev/null +++ b/generated/google-apis-retail_v2/OVERVIEW.md @@ -0,0 +1,96 @@ +# Simple REST client for version V2 of the Retail API + +This is a simple client library for version V2 of the Retail API. It provides: + +* A client object that connects to the HTTP/JSON REST endpoint for the service. +* Ruby objects for data structures related to the service. +* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts. +* Control of retry, pagination, and timeouts. + +Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information. + +## Getting started + +### Before you begin + +There are a few setup steps you need to complete before you can use this library: + + 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts). + 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/). + 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/retail.googleapis.com) in the console. + +### Installation + +Add this line to your application's Gemfile: + +```ruby +gem 'google-apis-retail_v2', '~> 0.1' +``` + +And then execute: + +``` +$ bundle +``` + +Or install it yourself as: + +``` +$ gem install google-apis-retail_v2 +``` + +### Creating a client object + +Once the gem is installed, you can load the client code and instantiate a client. + +```ruby +# Load the client +require "google/apis/retail_v2" + +# Create a client object +client = Google::Apis::RetailV2::CloudRetailService.new + +# Authenticate calls +client.authentication = # ... use the googleauth gem to create credentials +``` + +See the class reference docs for information on the methods you can call from a client. + +## Documentation + +More detailed descriptions of the Google simple REST clients are available in two documents. + + * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging. + * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables. + +(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Retail service in particular.) + +For reference information on specific calls in the Retail API, see the {Google::Apis::RetailV2::CloudRetailService class reference docs}. + +## Which client should I use? + +Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**. + +This library, `google-apis-retail_v2`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-_`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward. + +Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients. + +Gem names for modern clients are often of the form `google-cloud-`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud--`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended. + +**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure. + +The [product documentation](https://cloud.google.com/recommendations) may provide guidance regarding the preferred client library to use. + +## Supported Ruby versions + +This library is supported on Ruby 2.5+. + +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. Currently, this means Ruby 2.5 and later. 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. + +## License + +This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}. + +## Support + +Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com). diff --git a/generated/google-apis-retail_v2/Rakefile b/generated/google-apis-retail_v2/Rakefile new file mode 100644 index 000000000..defbde597 --- /dev/null +++ b/generated/google-apis-retail_v2/Rakefile @@ -0,0 +1,28 @@ +require "bundler/gem_tasks" +task :release_gem do + Rake::Task["build"].invoke + Rake::Task["release:rubygem_push"].invoke +end + +require 'rake/clean' +CLOBBER.include('coverage', 'doc') +CLEAN.include('.yardoc') + +require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new(:spec) + +begin + require 'yard' + require 'yard/rake/yardoc_task' + YARD::Rake::YardocTask.new do |t| + t.files = ['lib/**/*.rb', 'generated/**/*.rb'] + t.options = ['--verbose', '--markup', 'markdown'] + end +rescue LoadError + task :yard + puts "YARD not available" +end + +task :ci => [:spec, :yard, :build] + +task :default => :ci diff --git a/generated/google-apis-retail_v2/google-apis-retail_v2.gemspec b/generated/google-apis-retail_v2/google-apis-retail_v2.gemspec new file mode 100644 index 000000000..710ccfea7 --- /dev/null +++ b/generated/google-apis-retail_v2/google-apis-retail_v2.gemspec @@ -0,0 +1,32 @@ +require File.expand_path("lib/google/apis/retail_v2/gem_version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-apis-retail_v2" + gem.version = Google::Apis::RetailV2::GEM_VERSION + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.summary = "Simple REST client for Retail API V2" + gem.description = + "This is the simple REST client for Retail API V2." \ + " Simple REST clients are Ruby client libraries that provide access to" \ + " Google services via their HTTP REST API endpoints. These libraries are" \ + " generated and updated automatically based on the discovery documents" \ + " published by the service, and they handle most concerns such as" \ + " authentication, pagination, retry, timeouts, and logging. You can use" \ + " this client to access the Retail API, but note that some" \ + " services may provide a separate modern client that is easier to use." + gem.homepage = "https://github.com/google/google-api-ruby-client" + gem.license = "Apache-2.0" + gem.metadata = { + "bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues", + "changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-retail_v2/CHANGELOG.md", + "documentation_uri" => "https://googleapis.dev/ruby/google-apis-retail_v2/v#{Google::Apis::RetailV2::GEM_VERSION}", + "source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-retail_v2" + } + + gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = '>= 2.4' + gem.add_runtime_dependency "google-apis-core", "~> 0.1" +end diff --git a/generated/google-apis-retail_v2/lib/google-apis-retail_v2.rb b/generated/google-apis-retail_v2/lib/google-apis-retail_v2.rb new file mode 100644 index 000000000..38106c069 --- /dev/null +++ b/generated/google-apis-retail_v2/lib/google-apis-retail_v2.rb @@ -0,0 +1,15 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require "google/apis/retail_v2" diff --git a/generated/google-apis-retail_v2/lib/google/apis/retail_v2.rb b/generated/google-apis-retail_v2/lib/google/apis/retail_v2.rb new file mode 100644 index 000000000..b95d83916 --- /dev/null +++ b/generated/google-apis-retail_v2/lib/google/apis/retail_v2.rb @@ -0,0 +1,38 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/retail_v2/service.rb' +require 'google/apis/retail_v2/classes.rb' +require 'google/apis/retail_v2/representations.rb' +require 'google/apis/retail_v2/gem_version.rb' + +module Google + module Apis + # Retail API + # + # Cloud Retail service enables customers to build end-to-end personalized + # recommendation systems without requiring a high level of expertise in machine + # learning, recommendation system, or Google Cloud. + # + # @see https://cloud.google.com/recommendations + module RetailV2 + # Version of the Retail API this client connects to. + # This is NOT the gem version. + VERSION = 'V2' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb new file mode 100644 index 000000000..817b5486d --- /dev/null +++ b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb @@ -0,0 +1,2739 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module RetailV2 + + # Message that represents an arbitrary HTTP body. It should only be used for + # payload formats that can't be represented as JSON, such as raw binary or an + # HTML page. This message can be used both in streaming and non-streaming API + # methods in the request as well as the response. It can be used as a top-level + # request field, which is convenient if one wants to extract parameters from + # either the URL or HTTP template into the request fields and also want access + # to the raw HTTP body. Example: message GetResourceRequest ` // A unique + # request id. string request_id = 1; // The raw HTTP body is bound to this field. + # google.api.HttpBody http_body = 2; ` service ResourceService ` rpc + # GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc + # UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example + # with streaming methods: service CaldavService ` rpc GetCalendar(stream google. + # api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream + # google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type + # only changes how the request and response bodies are handled, all other + # features will continue to work unchanged. + class GoogleApiHttpBody + include Google::Apis::Core::Hashable + + # The HTTP Content-Type header value specifying the content type of the body. + # Corresponds to the JSON property `contentType` + # @return [String] + attr_accessor :content_type + + # The HTTP request/response body as raw binary. + # Corresponds to the JSON property `data` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :data + + # Application specific response metadata. Must be set in the first response for + # streaming APIs. + # Corresponds to the JSON property `extensions` + # @return [Array>] + attr_accessor :extensions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content_type = args[:content_type] if args.key?(:content_type) + @data = args[:data] if args.key?(:data) + @extensions = args[:extensions] if args.key?(:extensions) + end + end + + # A description of the context in which an error occurred. + class GoogleCloudRetailLoggingErrorContext + include Google::Apis::Core::Hashable + + # HTTP request data that is related to a reported error. + # Corresponds to the JSON property `httpRequest` + # @return [Google::Apis::RetailV2::GoogleCloudRetailLoggingHttpRequestContext] + attr_accessor :http_request + + # Indicates a location in the source code of the service for which errors are + # reported. + # Corresponds to the JSON property `reportLocation` + # @return [Google::Apis::RetailV2::GoogleCloudRetailLoggingSourceLocation] + attr_accessor :report_location + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @http_request = args[:http_request] if args.key?(:http_request) + @report_location = args[:report_location] if args.key?(:report_location) + end + end + + # An error log which is reported to the Error Reporting system. This proto a + # superset of google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent. + class GoogleCloudRetailLoggingErrorLog + include Google::Apis::Core::Hashable + + # A description of the context in which an error occurred. + # Corresponds to the JSON property `context` + # @return [Google::Apis::RetailV2::GoogleCloudRetailLoggingErrorContext] + attr_accessor :context + + # The error payload that is populated on LRO import APIs. Including: "google. + # cloud.retail.v2.ProductService.ImportProducts" "google.cloud.retail.v2. + # EventService.ImportUserEvents" + # Corresponds to the JSON property `importPayload` + # @return [Google::Apis::RetailV2::GoogleCloudRetailLoggingImportErrorContext] + attr_accessor :import_payload + + # A message describing the error. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + # The API request payload, represented as a protocol buffer. Most API request + # types are supported. For example: "type.googleapis.com/google.cloud.retail.v2. + # ProductService.CreateProductRequest" "type.googleapis.com/google.cloud.retail. + # v2.UserEventService.WriteUserEventRequest" + # Corresponds to the JSON property `requestPayload` + # @return [Hash] + attr_accessor :request_payload + + # The API response payload, represented as a protocol buffer. This is used to + # log some "soft errors", where the response is valid but we consider there are + # some quality issues like unjoined events. The following API responses are + # supported and no PII is included: "google.cloud.retail.v2.PredictionService. + # Predict" "google.cloud.retail.v2.UserEventService.WriteUserEvent" "google. + # cloud.retail.v2.UserEventService.CollectUserEvent" + # Corresponds to the JSON property `responsePayload` + # @return [Hash] + attr_accessor :response_payload + + # Describes a running service that sends errors. + # Corresponds to the JSON property `serviceContext` + # @return [Google::Apis::RetailV2::GoogleCloudRetailLoggingServiceContext] + attr_accessor :service_context + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by [ + # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of + # data: error code, error message, and error details. You can find out more + # about this error model and how to work with it in the [API Design Guide](https: + # //cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `status` + # @return [Google::Apis::RetailV2::GoogleRpcStatus] + attr_accessor :status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @context = args[:context] if args.key?(:context) + @import_payload = args[:import_payload] if args.key?(:import_payload) + @message = args[:message] if args.key?(:message) + @request_payload = args[:request_payload] if args.key?(:request_payload) + @response_payload = args[:response_payload] if args.key?(:response_payload) + @service_context = args[:service_context] if args.key?(:service_context) + @status = args[:status] if args.key?(:status) + end + end + + # HTTP request data that is related to a reported error. + class GoogleCloudRetailLoggingHttpRequestContext + include Google::Apis::Core::Hashable + + # The HTTP response status code for the request. + # Corresponds to the JSON property `responseStatusCode` + # @return [Fixnum] + attr_accessor :response_status_code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @response_status_code = args[:response_status_code] if args.key?(:response_status_code) + end + end + + # The error payload that is populated on LRO import APIs. Including: "google. + # cloud.retail.v2.ProductService.ImportProducts" "google.cloud.retail.v2. + # EventService.ImportUserEvents" + class GoogleCloudRetailLoggingImportErrorContext + include Google::Apis::Core::Hashable + + # The detailed content which caused the error on importing a catalog item. + # Corresponds to the JSON property `catalogItem` + # @return [String] + attr_accessor :catalog_item + + # GCS file path of the import source. Can be set for batch operation error. + # Corresponds to the JSON property `gcsPath` + # @return [String] + attr_accessor :gcs_path + + # Line number of the content in file. Should be empty for permission or batch + # operation error. + # Corresponds to the JSON property `lineNumber` + # @return [String] + attr_accessor :line_number + + # The operation resource name of the LRO. + # Corresponds to the JSON property `operationName` + # @return [String] + attr_accessor :operation_name + + # The detailed content which caused the error on importing a product. + # Corresponds to the JSON property `product` + # @return [String] + attr_accessor :product + + # The detailed content which caused the error on importing a user event. + # Corresponds to the JSON property `userEvent` + # @return [String] + attr_accessor :user_event + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @catalog_item = args[:catalog_item] if args.key?(:catalog_item) + @gcs_path = args[:gcs_path] if args.key?(:gcs_path) + @line_number = args[:line_number] if args.key?(:line_number) + @operation_name = args[:operation_name] if args.key?(:operation_name) + @product = args[:product] if args.key?(:product) + @user_event = args[:user_event] if args.key?(:user_event) + end + end + + # Describes a running service that sends errors. + class GoogleCloudRetailLoggingServiceContext + include Google::Apis::Core::Hashable + + # An identifier of the service. For example, "retail.googleapis.com". + # Corresponds to the JSON property `service` + # @return [String] + attr_accessor :service + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service = args[:service] if args.key?(:service) + end + end + + # Indicates a location in the source code of the service for which errors are + # reported. + class GoogleCloudRetailLoggingSourceLocation + include Google::Apis::Core::Hashable + + # Human-readable name of a function or method. For example, "google.cloud.retail. + # v2.UserEventService.ImportUserEvents". + # Corresponds to the JSON property `functionName` + # @return [String] + attr_accessor :function_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @function_name = args[:function_name] if args.key?(:function_name) + end + end + + # BigQuery source import data from. + class GoogleCloudRetailV2BigQuerySource + include Google::Apis::Core::Hashable + + # The schema to use when parsing the data from the source. Supported values for + # product imports: * `product` (default): One JSON Product per line. Each + # product must have a valid Product.id. * `product_merchant_center`: See [ + # Importing catalog data from Merchant Center](/retail/recommendations-ai/docs/ + # upload-catalog#mc). Supported values for user events imports: * `user_event` ( + # default): One JSON UserEvent per line. * `user_event_ga360`: Using https:// + # support.google.com/analytics/answer/3437719?hl=en. + # Corresponds to the JSON property `dataSchema` + # @return [String] + attr_accessor :data_schema + + # Required. The BigQuery data set to copy the data from with a length limit of 1, + # 024 characters. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + + # Intermediate Cloud Storage directory used for the import with a length limit + # of 2,000 characters. Can be specified if one wants to have the BigQuery export + # to a specific Cloud Storage directory. + # Corresponds to the JSON property `gcsStagingDir` + # @return [String] + attr_accessor :gcs_staging_dir + + # The project id (can be project # or id) that the BigQuery source is in with a + # length limit of 128 characters. If not specified, inherits the project id from + # the parent request. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # Required. The BigQuery table to copy the data from with a length limit of 1, + # 024 characters. + # Corresponds to the JSON property `tableId` + # @return [String] + attr_accessor :table_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data_schema = args[:data_schema] if args.key?(:data_schema) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) + @gcs_staging_dir = args[:gcs_staging_dir] if args.key?(:gcs_staging_dir) + @project_id = args[:project_id] if args.key?(:project_id) + @table_id = args[:table_id] if args.key?(:table_id) + end + end + + # The catalog configuration. + class GoogleCloudRetailV2Catalog + include Google::Apis::Core::Hashable + + # Required. Immutable. The catalog display name. This field must be a UTF-8 + # encoded string with a length limit of 128 characters. Otherwise, an + # INVALID_ARGUMENT error is returned. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Required. Immutable. The fully qualified resource name of the catalog. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Configures what level the product should be uploaded with regards to how users + # will be send events and how predictions will be made. + # Corresponds to the JSON property `productLevelConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2ProductLevelConfig] + attr_accessor :product_level_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @name = args[:name] if args.key?(:name) + @product_level_config = args[:product_level_config] if args.key?(:product_level_config) + end + end + + # A custom attribute that is not explicitly modeled in Product]. + class GoogleCloudRetailV2CustomAttribute + include Google::Apis::Core::Hashable + + # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when + # the key is "lengths_cm". At most 400 values are allowed.Otherwise, an + # INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be + # set. Otherwise, an INVALID_ARGUMENT error is returned. + # Corresponds to the JSON property `numbers` + # @return [Array] + attr_accessor :numbers + + # The textual values of this custom attribute. For example, `["yellow", "green"]` + # when the key is "color". At most 400 values are allowed. Empty values are not + # allowed. Each value must be a UTF-8 encoded string with a length limit of 256 + # characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of + # text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is + # returned. + # Corresponds to the JSON property `text` + # @return [Array] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @numbers = args[:numbers] if args.key?(:numbers) + @text = args[:text] if args.key?(:text) + end + end + + # Google Cloud Storage location for input content. format. + class GoogleCloudRetailV2GcsSource + include Google::Apis::Core::Hashable + + # The schema to use when parsing the data from the source. Supported values for + # product imports: * `product` (default): One JSON Product per line. Each + # product must have a valid Product.id. * `product_merchant_center`: See [ + # Importing catalog data from Merchant Center](/retail/recommendations-ai/docs/ + # upload-catalog#mc). Supported values for user events imports: * `user_event` ( + # default): One JSON UserEvent per line. * `user_event_ga360`: Using https:// + # support.google.com/analytics/answer/3437719?hl=en. + # Corresponds to the JSON property `dataSchema` + # @return [String] + attr_accessor :data_schema + + # Required. Google Cloud Storage URIs to input files. URI can be up to 2000 + # characters long. URIs can match the full object path (for example, `gs:// + # bucket/directory/object.json`) or a pattern matching one or more files, such + # as `gs://bucket/directory/*.json`. A request can contain at most 100 files, + # and each file can be up to 2 GB. See [Importing product information](/ + # recommendations-ai/docs/upload-catalog) for the expected file format and setup + # instructions. + # Corresponds to the JSON property `inputUris` + # @return [Array] + attr_accessor :input_uris + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data_schema = args[:data_schema] if args.key?(:data_schema) + @input_uris = args[:input_uris] if args.key?(:input_uris) + end + end + + # Product thumbnail/detail image. + class GoogleCloudRetailV2Image + include Google::Apis::Core::Hashable + + # Height of the image in number of pixels. This field must be nonnegative. + # Otherwise, an INVALID_ARGUMENT error is returned. + # Corresponds to the JSON property `height` + # @return [Fixnum] + attr_accessor :height + + # Required. URI of the image. This field must be a valid UTF-8 encoded URI with + # a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is + # returned. Google Merchant Center property [image_link](https://support.google. + # com/merchants/answer/6324350). Schema.org property [Product.image](https:// + # schema.org/image). + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + # Width of the image in number of pixels. This field must be nonnegative. + # Otherwise, an INVALID_ARGUMENT error is returned. + # Corresponds to the JSON property `width` + # @return [Fixnum] + attr_accessor :width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @height = args[:height] if args.key?(:height) + @uri = args[:uri] if args.key?(:uri) + @width = args[:width] if args.key?(:width) + end + end + + # Configuration of destination for Import related errors. + class GoogleCloudRetailV2ImportErrorsConfig + include Google::Apis::Core::Hashable + + # Google Cloud Storage path for import errors. This must be an empty, existing + # Cloud Storage bucket. Import errors will be written to a file in this bucket, + # one per line, as a JSON-encoded `google.rpc.Status` message. + # Corresponds to the JSON property `gcsPrefix` + # @return [String] + attr_accessor :gcs_prefix + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix) + end + end + + # Metadata related to the progress of the Import operation. This will be + # returned by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2ImportMetadata + include Google::Apis::Core::Hashable + + # Operation create time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Count of entries that encountered errors while processing. + # Corresponds to the JSON property `failureCount` + # @return [Fixnum] + attr_accessor :failure_count + + # Count of entries that were processed successfully. + # Corresponds to the JSON property `successCount` + # @return [Fixnum] + attr_accessor :success_count + + # Operation last update time. If the operation is done, this is also the finish + # time. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @failure_count = args[:failure_count] if args.key?(:failure_count) + @success_count = args[:success_count] if args.key?(:success_count) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Request message for Import methods. + class GoogleCloudRetailV2ImportProductsRequest + include Google::Apis::Core::Hashable + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig] + attr_accessor :errors_config + + # The input config source for products. + # Corresponds to the JSON property `inputConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2ProductInputConfig] + attr_accessor :input_config + + # Indicates which fields in the provided imported 'products' to update. If not + # set, will by default update all fields. + # Corresponds to the JSON property `updateMask` + # @return [String] + attr_accessor :update_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @errors_config = args[:errors_config] if args.key?(:errors_config) + @input_config = args[:input_config] if args.key?(:input_config) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + + # Response of the ImportProductsRequest. If the long running operation is done, + # then this message is returned by the google.longrunning.Operations.response + # field if the operation was successful. + class GoogleCloudRetailV2ImportProductsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Request message for the ImportUserEvents request. + class GoogleCloudRetailV2ImportUserEventsRequest + include Google::Apis::Core::Hashable + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig] + attr_accessor :errors_config + + # The input config source for user events. + # Corresponds to the JSON property `inputConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2UserEventInputConfig] + attr_accessor :input_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @errors_config = args[:errors_config] if args.key?(:errors_config) + @input_config = args[:input_config] if args.key?(:input_config) + end + end + + # Response of the ImportUserEventsRequest. If the long running operation was + # successful, then this message is returned by the google.longrunning.Operations. + # response field if the operation was successful. + class GoogleCloudRetailV2ImportUserEventsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig] + attr_accessor :errors_config + + # A summary of import result. The UserEventImportSummary summarizes the import + # status for user events. + # Corresponds to the JSON property `importSummary` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2UserEventImportSummary] + attr_accessor :import_summary + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + @import_summary = args[:import_summary] if args.key?(:import_summary) + end + end + + # Response for CatalogService.ListCatalogs method. + class GoogleCloudRetailV2ListCatalogsResponse + include Google::Apis::Core::Hashable + + # All the customer's Catalogs. + # Corresponds to the JSON property `catalogs` + # @return [Array] + attr_accessor :catalogs + + # A token that can be sent as ListCatalogsRequest.page_token to retrieve the + # next page. If this field is omitted, there are no subsequent pages. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @catalogs = args[:catalogs] if args.key?(:catalogs) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Request message for Predict method. + class GoogleCloudRetailV2PredictRequest + include Google::Apis::Core::Hashable + + # Filter for restricting prediction results with a length limit of 5,000 + # characters. Accepts values for tags and the `filterOutOfStockItems` flag. * + # Tag expressions. Restricts predictions to products that match all of the + # specified tags. Boolean operators `OR` and `NOT` are supported if the + # expression is enclosed in parentheses, and must be separated from the tag + # values by a space. `-"tagA"` is also supported and is equivalent to `NOT "tagA" + # `. Tag values must be double quoted UTF-8 encoded strings with a size limit of + # 1,000 characters. * filterOutOfStockItems. Restricts predictions to products + # that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR + # "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems tag=( + # -"promotional") * filterOutOfStockItems If your filter blocks all prediction + # results, nothing will be returned. If you want generic (unfiltered) popular + # products to be returned instead, set `strictFiltering` to false in ` + # PredictRequest.params`. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # The labels for the predict request. * Label keys can contain lowercase letters, + # digits and hyphens, must start with a letter, and must end with a letter or + # digit. * Non-zero label values can contain lowercase letters, digits and + # hyphens, must start with a letter, and must end with a letter or digit. * No + # more than 64 labels can be associated with a given request. See https://goo.gl/ + # xmQnxf for more information on and examples of labels. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Maximum number of results to return per page. Set this property to the number + # of prediction results needed. If zero, the service will choose a reasonable + # default. The maximum allowed value is 100. Values above 100 will be coerced to + # 100. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # The previous PredictResponse.next_page_token. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Additional domain specific parameters for the predictions. Allowed values: * ` + # returnProduct`: Boolean. If set to true, the associated product object will be + # returned in the `results.metadata` field in the prediction response. * ` + # returnScore`: Boolean. If set to true, the prediction 'score' corresponding to + # each returned product will be set in the `results.metadata` field in the + # prediction response. The given 'score' indicates the probability of an product + # being clicked/purchased given the user's context and history. * ` + # strictFiltering`: Boolean. True by default. If set to false, the service will + # return generic (unfiltered) popular products instead of empty if your filter + # blocks all prediction results. + # Corresponds to the JSON property `params` + # @return [Hash] + attr_accessor :params + + # UserEvent captures all metadata information Retail API needs to know about how + # end users interact with customers' website. + # Corresponds to the JSON property `userEvent` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent] + attr_accessor :user_event + + # Use validate only mode for this prediction query. If set to true, a dummy + # model will be used that returns arbitrary products. Note that the validate + # only mode should only be used for testing the API, or if the model is not + # ready. + # Corresponds to the JSON property `validateOnly` + # @return [Boolean] + attr_accessor :validate_only + alias_method :validate_only?, :validate_only + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + @labels = args[:labels] if args.key?(:labels) + @page_size = args[:page_size] if args.key?(:page_size) + @page_token = args[:page_token] if args.key?(:page_token) + @params = args[:params] if args.key?(:params) + @user_event = args[:user_event] if args.key?(:user_event) + @validate_only = args[:validate_only] if args.key?(:validate_only) + end + end + + # Response message for predict method. + class GoogleCloudRetailV2PredictResponse + include Google::Apis::Core::Hashable + + # A unique attribution token. This should be included in the UserEvent logs + # resulting from this recommendation, which enables accurate attribution of + # recommendation model performance. + # Corresponds to the JSON property `attributionToken` + # @return [String] + attr_accessor :attribution_token + + # IDs of products in the request that were missing from the inventory. + # Corresponds to the JSON property `missingIds` + # @return [Array] + attr_accessor :missing_ids + + # A list of recommended products. The order represents the ranking (from the + # most relevant product to the least). + # Corresponds to the JSON property `results` + # @return [Array] + attr_accessor :results + + # True if the validateOnly property was set in the request. + # Corresponds to the JSON property `validateOnly` + # @return [Boolean] + attr_accessor :validate_only + alias_method :validate_only?, :validate_only + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attribution_token = args[:attribution_token] if args.key?(:attribution_token) + @missing_ids = args[:missing_ids] if args.key?(:missing_ids) + @results = args[:results] if args.key?(:results) + @validate_only = args[:validate_only] if args.key?(:validate_only) + end + end + + # PredictionResult represents the recommendation prediction results. + class GoogleCloudRetailV2PredictResponsePredictionResult + include Google::Apis::Core::Hashable + + # ID of the recommended product + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Additional product metadata / annotations. Possible values: * `product`: JSON + # representation of the product. Will be set if `returnProduct` is set to true + # in `PredictRequest.params`. * `score`: Prediction score in double value. Will + # be set if `returnScore` is set to true in `PredictRequest.params`. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + + # The price information of a Product. + class GoogleCloudRetailV2PriceInfo + include Google::Apis::Core::Hashable + + # The costs associated with the sale of a particular product. Used for gross + # profit reporting. * Profit = price - cost Google Merchant Center property [ + # cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). + # Corresponds to the JSON property `cost` + # @return [Float] + attr_accessor :cost + + # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217- + # currency-codes.html). If this field is an unrecognizable currency code, an + # INVALID_ARGUMENT error is returned. + # Corresponds to the JSON property `currencyCode` + # @return [String] + attr_accessor :currency_code + + # Price of the product without any discount. If zero, by default set to be the + # price. + # Corresponds to the JSON property `originalPrice` + # @return [Float] + attr_accessor :original_price + + # Price of the product. Google Merchant Center property [price](https://support. + # google.com/merchants/answer/6324371). Schema.org property [Offer. + # priceSpecification](https://schema.org/priceSpecification). + # Corresponds to the JSON property `price` + # @return [Float] + attr_accessor :price + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cost = args[:cost] if args.key?(:cost) + @currency_code = args[:currency_code] if args.key?(:currency_code) + @original_price = args[:original_price] if args.key?(:original_price) + @price = args[:price] if args.key?(:price) + end + end + + # Product captures all metadata information of items to be recommended or + # searched. + class GoogleCloudRetailV2Product + include Google::Apis::Core::Hashable + + # Highly encouraged. Extra product attributes to be included. For example, for + # products, this could include the store name, vendor, style, color, etc. These + # are very strong signals for recommendation model, thus we highly recommend + # providing the attributes here. Features that can take on one of a limited + # number of possible values. Two types of features can be set are: Textual + # features. some examples would be the brand/maker of a product, or country of a + # customer. Numerical features. Some examples would be the height/weight of a + # product, or age of a customer. For example: `` "vendor": `"text": ["vendor123", + # "vendor456"]`, "lengths_cm": `"numbers":[2.3, 15.4]`, "heights_cm": `"numbers" + # :[8.1, 6.4]` ``. A maximum of 150 attributes are allowed. Otherwise, an + # INVALID_ARGUMENT error is returned. The key must be a UTF-8 encoded string + # with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error + # is returned. + # Corresponds to the JSON property `attributes` + # @return [Hash] + attr_accessor :attributes + + # The online availability of the Product. Default to Availability.IN_STOCK. + # Google Merchant Center Property [availability](https://support.google.com/ + # merchants/answer/6324448). Schema.org Property [Offer.availability](https:// + # schema.org/availability). + # Corresponds to the JSON property `availability` + # @return [String] + attr_accessor :availability + + # The available quantity of the item. + # Corresponds to the JSON property `availableQuantity` + # @return [Fixnum] + attr_accessor :available_quantity + + # The timestamp when this Product becomes available recommendation and search. + # Corresponds to the JSON property `availableTime` + # @return [String] + attr_accessor :available_time + + # Product categories. This field is repeated for supporting one product + # belonging to several parallel categories. Strongly recommended using the full + # path for better search / recommendation quality. To represent full path of + # category, use '>' sign to separate different hierarchies. If '>' is part of + # the category name, please replace it with other character(s). For example, if + # a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and [" + # Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented + # as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > + # Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an + # INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. + # Empty values are not allowed. Each value must be a UTF-8 encoded string with + # a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is + # returned. Google Merchant Center property google_product_category. Schema.org + # property [Product.category] (https://schema.org/category). [ + # mc_google_product_category]: https://support.google.com/merchants/answer/ + # 6324436 + # Corresponds to the JSON property `categories` + # @return [Array] + attr_accessor :categories + + # Product description. This field must be a UTF-8 encoded string with a length + # limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. + # Google Merchant Center property [description](https://support.google.com/ + # merchants/answer/6324468). schema.org property [Product.description](https:// + # schema.org/description). + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Immutable. Product identifier, which is the final component of name. For + # example, this field is "id_1", if name is `projects/*/locations/global/ + # catalogs/default_catalog/branches/default_branch/products/id_1`. This field + # must be a UTF-8 encoded string with a length limit of 128 characters. + # Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center + # property [id](https://support.google.com/merchants/answer/6324405). Schema.org + # Property [Product.sku](https://schema.org/sku). + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Product images for the product. A maximum of 300 images are allowed. Google + # Merchant Center property [image_link](https://support.google.com/merchants/ + # answer/6324350). Schema.org property [Product.image](https://schema.org/image). + # Corresponds to the JSON property `images` + # @return [Array] + attr_accessor :images + + # Immutable. Full resource name of the product, such as `projects/*/locations/ + # global/catalogs/default_catalog/branches/default_branch/products/product_id`. + # The branch ID must be "default_branch". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The price information of a Product. + # Corresponds to the JSON property `priceInfo` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2PriceInfo] + attr_accessor :price_info + + # Variant group identifier. Must be an id, with the same parent branch with this + # product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field + # can only be empty or set to the same value as id. For VARIANT Products, this + # field cannot be empty. A maximum of 2,000 products are allowed to share the + # same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. + # Google Merchant Center Property [item_group_id](https://support.google.com/ + # merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID]( + # https://schema.org/inProductGroupWithID). This field must be enabled before it + # can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id). + # Corresponds to the JSON property `primaryProductId` + # @return [String] + attr_accessor :primary_product_id + + # Custom tags associated with the product. At most 250 values are allowed per + # Product. This value must be a UTF-8 encoded string with a length limit of 1, + # 000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can + # be used for filtering recommendation results by passing the tag as part of the + # PredictRequest.filter. Google Merchant Center property [custom_label_0–4]( + # https://support.google.com/merchants/answer/6324473). + # Corresponds to the JSON property `tags` + # @return [Array] + attr_accessor :tags + + # Required. Product title. This field must be a UTF-8 encoded string with a + # length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is + # returned. Google Merchant Center property [title](https://support.google.com/ + # merchants/answer/6324415). Schema.org property [Product.name](https://schema. + # org/name). + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Immutable. The type of the product. This field is output-only. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Canonical URL directly linking to the product detail page. This field must be + # a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an + # INVALID_ARGUMENT error is returned. Google Merchant Center property [link]( + # https://support.google.com/merchants/answer/6324416). Schema.org property [ + # Offer.url](https://schema.org/url). + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attributes = args[:attributes] if args.key?(:attributes) + @availability = args[:availability] if args.key?(:availability) + @available_quantity = args[:available_quantity] if args.key?(:available_quantity) + @available_time = args[:available_time] if args.key?(:available_time) + @categories = args[:categories] if args.key?(:categories) + @description = args[:description] if args.key?(:description) + @id = args[:id] if args.key?(:id) + @images = args[:images] if args.key?(:images) + @name = args[:name] if args.key?(:name) + @price_info = args[:price_info] if args.key?(:price_info) + @primary_product_id = args[:primary_product_id] if args.key?(:primary_product_id) + @tags = args[:tags] if args.key?(:tags) + @title = args[:title] if args.key?(:title) + @type = args[:type] if args.key?(:type) + @uri = args[:uri] if args.key?(:uri) + end + end + + # Detailed product information associated with a user event. + class GoogleCloudRetailV2ProductDetail + include Google::Apis::Core::Hashable + + # Product captures all metadata information of items to be recommended or + # searched. + # Corresponds to the JSON property `product` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2Product] + attr_accessor :product + + # Quantity of the product associated with the user event. For example, this + # field will be 2 if two products are added to the shopping cart for `purchase- + # complete` event. Required for `add-to-cart` and `purchase-complete` event + # types. + # Corresponds to the JSON property `quantity` + # @return [Fixnum] + attr_accessor :quantity + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @product = args[:product] if args.key?(:product) + @quantity = args[:quantity] if args.key?(:quantity) + end + end + + # The inline source for the input config for ImportProducts method. + class GoogleCloudRetailV2ProductInlineSource + include Google::Apis::Core::Hashable + + # Required. A list of products to update/create. Each product must have a valid + # Product.id. Recommended max of 10k items. + # Corresponds to the JSON property `products` + # @return [Array] + attr_accessor :products + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @products = args[:products] if args.key?(:products) + end + end + + # The input config source for products. + class GoogleCloudRetailV2ProductInputConfig + include Google::Apis::Core::Hashable + + # BigQuery source import data from. + # Corresponds to the JSON property `bigQuerySource` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2BigQuerySource] + attr_accessor :big_query_source + + # Google Cloud Storage location for input content. format. + # Corresponds to the JSON property `gcsSource` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2GcsSource] + attr_accessor :gcs_source + + # The inline source for the input config for ImportProducts method. + # Corresponds to the JSON property `productInlineSource` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2ProductInlineSource] + attr_accessor :product_inline_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @big_query_source = args[:big_query_source] if args.key?(:big_query_source) + @gcs_source = args[:gcs_source] if args.key?(:gcs_source) + @product_inline_source = args[:product_inline_source] if args.key?(:product_inline_source) + end + end + + # Configures what level the product should be uploaded with regards to how users + # will be send events and how predictions will be made. + class GoogleCloudRetailV2ProductLevelConfig + include Google::Apis::Core::Hashable + + # The type of Products allowed to be ingested into the catalog. Acceptable + # values are: * `primary` (default): You can only ingest Product.Type.PRIMARY + # Products. This means Product.primary_product_id can only be empty or set to + # the same value as Product.id. * `variant`: You can only ingest Product.Type. + # VARIANT Products. This means Product.primary_product_id cannot be empty. If + # this field is set to an invalid value other than these, an INVALID_ARGUMENT + # error is returned. If this field is `variant` and + # merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error + # is returned. See [Using catalog levels](/retail/recommendations-ai/docs/ + # catalog#catalog-levels) for more details. + # Corresponds to the JSON property `ingestionProductType` + # @return [String] + attr_accessor :ingestion_product_type + + # Which field of [Merchant Center Product](/bigquery-transfer/docs/merchant- + # center-products-schema) should be imported as Product.id. Acceptable values + # are: * `offerId` (default): Import `offerId` as the product ID. * `itemGroupId` + # : Import `itemGroupId` as the product ID. Notice that Retail API will choose + # one item from the ones with the same `itemGroupId`, and use it to represent + # the item group. If this field is set to an invalid value other than these, an + # INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and + # ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned. + # See [Using catalog levels](/retail/recommendations-ai/docs/catalog#catalog- + # levels) for more details. + # Corresponds to the JSON property `merchantCenterProductIdField` + # @return [String] + attr_accessor :merchant_center_product_id_field + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ingestion_product_type = args[:ingestion_product_type] if args.key?(:ingestion_product_type) + @merchant_center_product_id_field = args[:merchant_center_product_id_field] if args.key?(:merchant_center_product_id_field) + end + end + + # A transaction represents the entire purchase transaction. + class GoogleCloudRetailV2PurchaseTransaction + include Google::Apis::Core::Hashable + + # All the costs associated with the products. These can be manufacturing costs, + # shipping expenses not borne by the end user, or any other costs, such that: * + # Profit = revenue - tax - cost + # Corresponds to the JSON property `cost` + # @return [Float] + attr_accessor :cost + + # Required. Currency code. Use three-character ISO-4217 code. + # Corresponds to the JSON property `currencyCode` + # @return [String] + attr_accessor :currency_code + + # The transaction ID with a length limit of 128 characters. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Required. Total non-zero revenue or grand total associated with the + # transaction. This value include shipping, tax, or other adjustments to total + # revenue that you want to include as part of your revenue calculations. + # Corresponds to the JSON property `revenue` + # @return [Float] + attr_accessor :revenue + + # All the taxes associated with the transaction. + # Corresponds to the JSON property `tax` + # @return [Float] + attr_accessor :tax + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cost = args[:cost] if args.key?(:cost) + @currency_code = args[:currency_code] if args.key?(:currency_code) + @id = args[:id] if args.key?(:id) + @revenue = args[:revenue] if args.key?(:revenue) + @tax = args[:tax] if args.key?(:tax) + end + end + + # Metadata related to the progress of the Purge operation. This will be returned + # by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2PurgeMetadata + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Request message for PurgeUserEvents method. + class GoogleCloudRetailV2PurgeUserEventsRequest + include Google::Apis::Core::Hashable + + # Required. The filter string to specify the events to be deleted with a length + # limit of 5,000 characters. Empty string filter is not allowed. The eligible + # fields for filtering are: * `eventType`: Double quoted UserEvent.event_type + # string. * `eventTime`: in ISO 8601 "zulu" format. * `visitorId`: Double quoted + # string. Specifying this will delete all events associated with a visitor. * ` + # userId`: Double quoted string. Specifying this will delete all events + # associated with a user. Examples: * Deleting all events in a time range: ` + # eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"` + # * Deleting specific eventType in time range: `eventTime > "2012-04-23T18:25:43. + # 511Z" eventType = "detail-page-view"` * Deleting all events for a specific + # visitor: `visitorId = "visitor1024"` The filtering fields are assumed to have + # an implicit AND. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Actually perform the purge. If `force` is set to false, the method will return + # the expected purge count without deleting any user events. + # Corresponds to the JSON property `force` + # @return [Boolean] + attr_accessor :force + alias_method :force?, :force + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + @force = args[:force] if args.key?(:force) + end + end + + # Response of the PurgeUserEventsRequest. If the long running operation is + # successfully done, then this message is returned by the google.longrunning. + # Operations.response field. + class GoogleCloudRetailV2PurgeUserEventsResponse + include Google::Apis::Core::Hashable + + # The total count of events purged as a result of the operation. + # Corresponds to the JSON property `purgedEventsCount` + # @return [Fixnum] + attr_accessor :purged_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count) + end + end + + # Metadata for RejoinUserEvents method. + class GoogleCloudRetailV2RejoinUserEventsMetadata + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Request message for RejoinUserEvents method. + class GoogleCloudRetailV2RejoinUserEventsRequest + include Google::Apis::Core::Hashable + + # The type of the user event rejoin to define the scope and range of the user + # events to be rejoined with the latest product catalog. Defaults to + # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an + # invalid integer value. + # Corresponds to the JSON property `userEventRejoinScope` + # @return [String] + attr_accessor :user_event_rejoin_scope + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @user_event_rejoin_scope = args[:user_event_rejoin_scope] if args.key?(:user_event_rejoin_scope) + end + end + + # Response message for RejoinUserEvents method. + class GoogleCloudRetailV2RejoinUserEventsResponse + include Google::Apis::Core::Hashable + + # Number of user events that were joined with latest product catalog. + # Corresponds to the JSON property `rejoinedUserEventsCount` + # @return [Fixnum] + attr_accessor :rejoined_user_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count) + end + end + + # UserEvent captures all metadata information Retail API needs to know about how + # end users interact with customers' website. + class GoogleCloudRetailV2UserEvent + include Google::Apis::Core::Hashable + + # Extra user event features to include in the recommendation model. The key must + # be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, + # an INVALID_ARGUMENT error is returned. For product recommendation, an example + # of extra user information is traffic_channel, i.e. how user arrives at the + # site. Users can arrive at the site by coming to the site directly, or coming + # through Google search, and etc. + # Corresponds to the JSON property `attributes` + # @return [Hash] + attr_accessor :attributes + + # Highly recommended for user events that are the result of PredictionService. + # Predict. This field enables accurate attribution of recommendation model + # performance. The value must be a valid PredictResponse.attribution_token for + # user events that are the result of PredictionService.Predict. This token + # enables us to accurately attribute page view or purchase back to the event and + # the particular predict response containing this clicked/purchased product. If + # user clicks on product K in the recommendation results, pass PredictResponse. + # attribution_token as a URL parameter to product K's page. When recording + # events on product K's page, log the PredictResponse.attribution_token to this + # field. + # Corresponds to the JSON property `attributionToken` + # @return [String] + attr_accessor :attribution_token + + # The id or name of the associated shopping cart. This id is used to associate + # multiple items added or present in the cart before purchase. This can only be + # set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view` + # events. + # Corresponds to the JSON property `cartId` + # @return [String] + attr_accessor :cart_id + + # Only required for UserEventService.ImportUserEvents method. Timestamp of when + # the user event happened. + # Corresponds to the JSON property `eventTime` + # @return [String] + attr_accessor :event_time + + # Required. User event type. Allowed values are: * `add-to-cart`: Products being + # added to cart. * `category-page-view`: Special pages such as sale or promotion + # pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page- + # view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * ` + # search`: Product search. * `shopping-cart-page-view`: User viewing a shopping + # cart. + # Corresponds to the JSON property `eventType` + # @return [String] + attr_accessor :event_type + + # A list of identifiers for the independent experiment groups this user event + # belongs to. This is used to distinguish between user events associated with + # different experiment setups (e.g. using Retail API, using different + # recommendation models). + # Corresponds to the JSON property `experimentIds` + # @return [Array] + attr_accessor :experiment_ids + + # The categories associated with a category page. To represent full path of + # category, use '>' sign to separate different hierarchies. If '>' is part of + # the category name, please replace it with other character(s). Category pages + # include special pages such as sales or promotions. For instance, a special + # sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 + # Black Friday Deals"]. Required for `category-page-view` events. Other event + # types should not set this field. Otherwise, an INVALID_ARGUMENT error is + # returned. + # Corresponds to the JSON property `pageCategories` + # @return [Array] + attr_accessor :page_categories + + # A unique id of a web page view. This should be kept the same for all user + # events triggered from the same pageview. For example, an item detail page view + # could trigger multiple events as the user is browsing the page. The ` + # pageViewId` property should be kept the same for all these events so that they + # can be grouped together properly. When using the client side event reporting + # with JavaScript pixel and Google Tag Manager, this value is filled in + # automatically. + # Corresponds to the JSON property `pageViewId` + # @return [String] + attr_accessor :page_view_id + + # The main product details related to the event. This field is required for the + # following event types: * `add-to-cart` * `detail-page-view` * `purchase- + # complete` In a `search` event, this field represents the products returned to + # the end user on the current page (the end user may have not finished broswing + # the whole page yet). When a new page is returned to the end user, after + # pagination/filtering/ordering even for the same query, a new `search` event + # with different product_details is desired. The end user may have not finished + # broswing the whole page yet. + # Corresponds to the JSON property `productDetails` + # @return [Array] + attr_accessor :product_details + + # A transaction represents the entire purchase transaction. + # Corresponds to the JSON property `purchaseTransaction` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2PurchaseTransaction] + attr_accessor :purchase_transaction + + # The referrer URL of the current page. When using the client side event + # reporting with JavaScript pixel and Google Tag Manager, this value is filled + # in automatically. + # Corresponds to the JSON property `referrerUri` + # @return [String] + attr_accessor :referrer_uri + + # The user's search query. The value must be a UTF-8 encoded string with a + # length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is + # returned. Required for `search` events. Other event types should not set this + # field. Otherwise, an INVALID_ARGUMENT error is returned. + # Corresponds to the JSON property `searchQuery` + # @return [String] + attr_accessor :search_query + + # Complete URL (window.location.href) of the user's current page. When using the + # client side event reporting with JavaScript pixel and Google Tag Manager, this + # value is filled in automatically. Maximum length 5,000 characters. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + # Information of an end user. + # Corresponds to the JSON property `userInfo` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2UserInfo] + attr_accessor :user_info + + # Required. A unique identifier for tracking visitors. For example, this could + # be implemented with an HTTP cookie, which should be able to uniquely identify + # a visitor on a single device. This unique identifier should not change if the + # visitor log in/out of the website. The field must be a UTF-8 encoded string + # with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is + # returned. + # Corresponds to the JSON property `visitorId` + # @return [String] + attr_accessor :visitor_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attributes = args[:attributes] if args.key?(:attributes) + @attribution_token = args[:attribution_token] if args.key?(:attribution_token) + @cart_id = args[:cart_id] if args.key?(:cart_id) + @event_time = args[:event_time] if args.key?(:event_time) + @event_type = args[:event_type] if args.key?(:event_type) + @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids) + @page_categories = args[:page_categories] if args.key?(:page_categories) + @page_view_id = args[:page_view_id] if args.key?(:page_view_id) + @product_details = args[:product_details] if args.key?(:product_details) + @purchase_transaction = args[:purchase_transaction] if args.key?(:purchase_transaction) + @referrer_uri = args[:referrer_uri] if args.key?(:referrer_uri) + @search_query = args[:search_query] if args.key?(:search_query) + @uri = args[:uri] if args.key?(:uri) + @user_info = args[:user_info] if args.key?(:user_info) + @visitor_id = args[:visitor_id] if args.key?(:visitor_id) + end + end + + # A summary of import result. The UserEventImportSummary summarizes the import + # status for user events. + class GoogleCloudRetailV2UserEventImportSummary + include Google::Apis::Core::Hashable + + # Count of user events imported with complete existing catalog information. + # Corresponds to the JSON property `joinedEventsCount` + # @return [Fixnum] + attr_accessor :joined_events_count + + # Count of user events imported, but with catalog information not found in the + # imported catalog. + # Corresponds to the JSON property `unjoinedEventsCount` + # @return [Fixnum] + attr_accessor :unjoined_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count) + @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count) + end + end + + # The inline source for the input config for ImportUserEvents method. + class GoogleCloudRetailV2UserEventInlineSource + include Google::Apis::Core::Hashable + + # Required. A list of user events to import. Recommended max of 10k items. + # Corresponds to the JSON property `userEvents` + # @return [Array] + attr_accessor :user_events + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @user_events = args[:user_events] if args.key?(:user_events) + end + end + + # The input config source for user events. + class GoogleCloudRetailV2UserEventInputConfig + include Google::Apis::Core::Hashable + + # BigQuery source import data from. + # Corresponds to the JSON property `bigQuerySource` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2BigQuerySource] + attr_accessor :big_query_source + + # Google Cloud Storage location for input content. format. + # Corresponds to the JSON property `gcsSource` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2GcsSource] + attr_accessor :gcs_source + + # The inline source for the input config for ImportUserEvents method. + # Corresponds to the JSON property `userEventInlineSource` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2UserEventInlineSource] + attr_accessor :user_event_inline_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @big_query_source = args[:big_query_source] if args.key?(:big_query_source) + @gcs_source = args[:gcs_source] if args.key?(:gcs_source) + @user_event_inline_source = args[:user_event_inline_source] if args.key?(:user_event_inline_source) + end + end + + # Information of an end user. + class GoogleCloudRetailV2UserInfo + include Google::Apis::Core::Hashable + + # True if the request is made directly from the end user, in which case the + # ip_address and user_agent can be populated from the HTTP request. This flag + # should be set only if the API request is made directly from the end user such + # as a mobile app (and not if a gateway or a server is processing and pushing + # the user events). This should not be set when using the JavaScript tag in + # UserEventService.CollectUserEvent. + # Corresponds to the JSON property `directUserRequest` + # @return [Boolean] + attr_accessor :direct_user_request + alias_method :direct_user_request?, :direct_user_request + + # The end user's IP address. This field is used to extract location information + # for personalization. This field must be either an IPv4 address (e.g. "104.133. + # 9.80") or an IPv6 address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334"). + # Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when + # using the JavaScript tag in UserEventService.CollectUserEvent or if + # direct_user_request is set. + # Corresponds to the JSON property `ipAddress` + # @return [String] + attr_accessor :ip_address + + # User agent as included in the HTTP header. The field must be a UTF-8 encoded + # string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT + # error is returned. This should not be set when using the client side event + # reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or + # if direct_user_request is set. + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # Highly recommended for logged-in users. Unique identifier for logged-in user, + # such as a user name. The field must be a UTF-8 encoded string with a length + # limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @direct_user_request = args[:direct_user_request] if args.key?(:direct_user_request) + @ip_address = args[:ip_address] if args.key?(:ip_address) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @user_id = args[:user_id] if args.key?(:user_id) + end + end + + # Configuration of destination for Export related errors. + class GoogleCloudRetailV2alphaExportErrorsConfig + include Google::Apis::Core::Hashable + + # Google Cloud Storage path for import errors. This must be an empty, existing + # Cloud Storage bucket. Export errors will be written to a file in this bucket, + # one per line, as a JSON-encoded `google.rpc.Status` message. + # Corresponds to the JSON property `gcsPrefix` + # @return [String] + attr_accessor :gcs_prefix + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix) + end + end + + # Metadata related to the progress of the Export operation. This will be + # returned by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2alphaExportMetadata + include Google::Apis::Core::Hashable + + # Operation create time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Operation last update time. If the operation is done, this is also the finish + # time. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Response of the ExportProductsRequest. If the long running operation is done, + # then this message is returned by the google.longrunning.Operations.response + # field if the operation was successful. + class GoogleCloudRetailV2alphaExportProductsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Export related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2alphaExportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Response of the ExportUserEventsRequest. If the long running operation was + # successful, then this message is returned by the google.longrunning.Operations. + # response field if the operation was successful. + class GoogleCloudRetailV2alphaExportUserEventsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Export related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2alphaExportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Configuration of destination for Import related errors. + class GoogleCloudRetailV2alphaImportErrorsConfig + include Google::Apis::Core::Hashable + + # Google Cloud Storage path for import errors. This must be an empty, existing + # Cloud Storage bucket. Import errors will be written to a file in this bucket, + # one per line, as a JSON-encoded `google.rpc.Status` message. + # Corresponds to the JSON property `gcsPrefix` + # @return [String] + attr_accessor :gcs_prefix + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix) + end + end + + # Metadata related to the progress of the Import operation. This will be + # returned by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2alphaImportMetadata + include Google::Apis::Core::Hashable + + # Operation create time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Count of entries that encountered errors while processing. + # Corresponds to the JSON property `failureCount` + # @return [Fixnum] + attr_accessor :failure_count + + # Count of entries that were processed successfully. + # Corresponds to the JSON property `successCount` + # @return [Fixnum] + attr_accessor :success_count + + # Operation last update time. If the operation is done, this is also the finish + # time. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @failure_count = args[:failure_count] if args.key?(:failure_count) + @success_count = args[:success_count] if args.key?(:success_count) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Response of the ImportProductsRequest. If the long running operation is done, + # then this message is returned by the google.longrunning.Operations.response + # field if the operation was successful. + class GoogleCloudRetailV2alphaImportProductsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2alphaImportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Response of the ImportUserEventsRequest. If the long running operation was + # successful, then this message is returned by the google.longrunning.Operations. + # response field if the operation was successful. + class GoogleCloudRetailV2alphaImportUserEventsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2alphaImportErrorsConfig] + attr_accessor :errors_config + + # A summary of import result. The UserEventImportSummary summarizes the import + # status for user events. + # Corresponds to the JSON property `importSummary` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2alphaUserEventImportSummary] + attr_accessor :import_summary + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + @import_summary = args[:import_summary] if args.key?(:import_summary) + end + end + + # Metadata related to the progress of the Purge operation. This will be returned + # by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2alphaPurgeMetadata + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response of the PurgeUserEventsRequest. If the long running operation is + # successfully done, then this message is returned by the google.longrunning. + # Operations.response field. + class GoogleCloudRetailV2alphaPurgeUserEventsResponse + include Google::Apis::Core::Hashable + + # The total count of events purged as a result of the operation. + # Corresponds to the JSON property `purgedEventsCount` + # @return [Fixnum] + attr_accessor :purged_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count) + end + end + + # Metadata for RejoinUserEvents method. + class GoogleCloudRetailV2alphaRejoinUserEventsMetadata + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response message for RejoinUserEvents method. + class GoogleCloudRetailV2alphaRejoinUserEventsResponse + include Google::Apis::Core::Hashable + + # Number of user events that were joined with latest product catalog. + # Corresponds to the JSON property `rejoinedUserEventsCount` + # @return [Fixnum] + attr_accessor :rejoined_user_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count) + end + end + + # A summary of import result. The UserEventImportSummary summarizes the import + # status for user events. + class GoogleCloudRetailV2alphaUserEventImportSummary + include Google::Apis::Core::Hashable + + # Count of user events imported with complete existing catalog information. + # Corresponds to the JSON property `joinedEventsCount` + # @return [Fixnum] + attr_accessor :joined_events_count + + # Count of user events imported, but with catalog information not found in the + # imported catalog. + # Corresponds to the JSON property `unjoinedEventsCount` + # @return [Fixnum] + attr_accessor :unjoined_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count) + @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count) + end + end + + # Configuration of destination for Export related errors. + class GoogleCloudRetailV2betaExportErrorsConfig + include Google::Apis::Core::Hashable + + # Google Cloud Storage path for import errors. This must be an empty, existing + # Cloud Storage bucket. Export errors will be written to a file in this bucket, + # one per line, as a JSON-encoded `google.rpc.Status` message. + # Corresponds to the JSON property `gcsPrefix` + # @return [String] + attr_accessor :gcs_prefix + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix) + end + end + + # Metadata related to the progress of the Export operation. This will be + # returned by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2betaExportMetadata + include Google::Apis::Core::Hashable + + # Operation create time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Operation last update time. If the operation is done, this is also the finish + # time. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Response of the ExportProductsRequest. If the long running operation is done, + # then this message is returned by the google.longrunning.Operations.response + # field if the operation was successful. + class GoogleCloudRetailV2betaExportProductsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Export related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2betaExportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Response of the ExportUserEventsRequest. If the long running operation was + # successful, then this message is returned by the google.longrunning.Operations. + # response field if the operation was successful. + class GoogleCloudRetailV2betaExportUserEventsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Export related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2betaExportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Configuration of destination for Import related errors. + class GoogleCloudRetailV2betaImportErrorsConfig + include Google::Apis::Core::Hashable + + # Google Cloud Storage path for import errors. This must be an empty, existing + # Cloud Storage bucket. Import errors will be written to a file in this bucket, + # one per line, as a JSON-encoded `google.rpc.Status` message. + # Corresponds to the JSON property `gcsPrefix` + # @return [String] + attr_accessor :gcs_prefix + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix) + end + end + + # Metadata related to the progress of the Import operation. This will be + # returned by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2betaImportMetadata + include Google::Apis::Core::Hashable + + # Operation create time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Count of entries that encountered errors while processing. + # Corresponds to the JSON property `failureCount` + # @return [Fixnum] + attr_accessor :failure_count + + # Count of entries that were processed successfully. + # Corresponds to the JSON property `successCount` + # @return [Fixnum] + attr_accessor :success_count + + # Operation last update time. If the operation is done, this is also the finish + # time. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @failure_count = args[:failure_count] if args.key?(:failure_count) + @success_count = args[:success_count] if args.key?(:success_count) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Response of the ImportProductsRequest. If the long running operation is done, + # then this message is returned by the google.longrunning.Operations.response + # field if the operation was successful. + class GoogleCloudRetailV2betaImportProductsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2betaImportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Response of the ImportUserEventsRequest. If the long running operation was + # successful, then this message is returned by the google.longrunning.Operations. + # response field if the operation was successful. + class GoogleCloudRetailV2betaImportUserEventsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2betaImportErrorsConfig] + attr_accessor :errors_config + + # A summary of import result. The UserEventImportSummary summarizes the import + # status for user events. + # Corresponds to the JSON property `importSummary` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2betaUserEventImportSummary] + attr_accessor :import_summary + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + @import_summary = args[:import_summary] if args.key?(:import_summary) + end + end + + # Metadata related to the progress of the Purge operation. This will be returned + # by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2betaPurgeMetadata + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response of the PurgeUserEventsRequest. If the long running operation is + # successfully done, then this message is returned by the google.longrunning. + # Operations.response field. + class GoogleCloudRetailV2betaPurgeUserEventsResponse + include Google::Apis::Core::Hashable + + # The total count of events purged as a result of the operation. + # Corresponds to the JSON property `purgedEventsCount` + # @return [Fixnum] + attr_accessor :purged_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count) + end + end + + # Metadata for RejoinUserEvents method. + class GoogleCloudRetailV2betaRejoinUserEventsMetadata + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response message for RejoinUserEvents method. + class GoogleCloudRetailV2betaRejoinUserEventsResponse + include Google::Apis::Core::Hashable + + # Number of user events that were joined with latest product catalog. + # Corresponds to the JSON property `rejoinedUserEventsCount` + # @return [Fixnum] + attr_accessor :rejoined_user_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count) + end + end + + # A summary of import result. The UserEventImportSummary summarizes the import + # status for user events. + class GoogleCloudRetailV2betaUserEventImportSummary + include Google::Apis::Core::Hashable + + # Count of user events imported with complete existing catalog information. + # Corresponds to the JSON property `joinedEventsCount` + # @return [Fixnum] + attr_accessor :joined_events_count + + # Count of user events imported, but with catalog information not found in the + # imported catalog. + # Corresponds to the JSON property `unjoinedEventsCount` + # @return [Fixnum] + attr_accessor :unjoined_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count) + @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count) + end + end + + # Configuration of destination for Export related errors. + class GoogleCloudRetailV2mainExportErrorsConfig + include Google::Apis::Core::Hashable + + # Google Cloud Storage path for import errors. This must be an empty, existing + # Cloud Storage bucket. Export errors will be written to a file in this bucket, + # one per line, as a JSON-encoded `google.rpc.Status` message. + # Corresponds to the JSON property `gcsPrefix` + # @return [String] + attr_accessor :gcs_prefix + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix) + end + end + + # Metadata related to the progress of the Export operation. This will be + # returned by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2mainExportMetadata + include Google::Apis::Core::Hashable + + # Operation create time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Operation last update time. If the operation is done, this is also the finish + # time. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Response of the ExportProductsRequest. If the long running operation is done, + # then this message is returned by the google.longrunning.Operations.response + # field if the operation was successful. + class GoogleCloudRetailV2mainExportProductsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Export related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2mainExportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Response of the ExportUserEventsRequest. If the long running operation was + # successful, then this message is returned by the google.longrunning.Operations. + # response field if the operation was successful. + class GoogleCloudRetailV2mainExportUserEventsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Export related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2mainExportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Configuration of destination for Import related errors. + class GoogleCloudRetailV2mainImportErrorsConfig + include Google::Apis::Core::Hashable + + # Google Cloud Storage path for import errors. This must be an empty, existing + # Cloud Storage bucket. Import errors will be written to a file in this bucket, + # one per line, as a JSON-encoded `google.rpc.Status` message. + # Corresponds to the JSON property `gcsPrefix` + # @return [String] + attr_accessor :gcs_prefix + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix) + end + end + + # Metadata related to the progress of the Import operation. This will be + # returned by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2mainImportMetadata + include Google::Apis::Core::Hashable + + # Operation create time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Count of entries that encountered errors while processing. + # Corresponds to the JSON property `failureCount` + # @return [Fixnum] + attr_accessor :failure_count + + # Count of entries that were processed successfully. + # Corresponds to the JSON property `successCount` + # @return [Fixnum] + attr_accessor :success_count + + # Operation last update time. If the operation is done, this is also the finish + # time. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @failure_count = args[:failure_count] if args.key?(:failure_count) + @success_count = args[:success_count] if args.key?(:success_count) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Response of the ImportProductsRequest. If the long running operation is done, + # then this message is returned by the google.longrunning.Operations.response + # field if the operation was successful. + class GoogleCloudRetailV2mainImportProductsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2mainImportErrorsConfig] + attr_accessor :errors_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + end + end + + # Response of the ImportUserEventsRequest. If the long running operation was + # successful, then this message is returned by the google.longrunning.Operations. + # response field if the operation was successful. + class GoogleCloudRetailV2mainImportUserEventsResponse + include Google::Apis::Core::Hashable + + # A sample of errors encountered while processing the request. + # Corresponds to the JSON property `errorSamples` + # @return [Array] + attr_accessor :error_samples + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2mainImportErrorsConfig] + attr_accessor :errors_config + + # A summary of import result. The UserEventImportSummary summarizes the import + # status for user events. + # Corresponds to the JSON property `importSummary` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2mainUserEventImportSummary] + attr_accessor :import_summary + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_samples = args[:error_samples] if args.key?(:error_samples) + @errors_config = args[:errors_config] if args.key?(:errors_config) + @import_summary = args[:import_summary] if args.key?(:import_summary) + end + end + + # Metadata related to the progress of the Purge operation. This will be returned + # by the google.longrunning.Operation.metadata field. + class GoogleCloudRetailV2mainPurgeMetadata + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response of the PurgeUserEventsRequest. If the long running operation is + # successfully done, then this message is returned by the google.longrunning. + # Operations.response field. + class GoogleCloudRetailV2mainPurgeUserEventsResponse + include Google::Apis::Core::Hashable + + # The total count of events purged as a result of the operation. + # Corresponds to the JSON property `purgedEventsCount` + # @return [Fixnum] + attr_accessor :purged_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count) + end + end + + # Metadata for RejoinUserEvents method. + class GoogleCloudRetailV2mainRejoinUserEventsMetadata + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response message for RejoinUserEvents method. + class GoogleCloudRetailV2mainRejoinUserEventsResponse + include Google::Apis::Core::Hashable + + # Number of user events that were joined with latest product catalog. + # Corresponds to the JSON property `rejoinedUserEventsCount` + # @return [Fixnum] + attr_accessor :rejoined_user_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count) + end + end + + # A summary of import result. The UserEventImportSummary summarizes the import + # status for user events. + class GoogleCloudRetailV2mainUserEventImportSummary + include Google::Apis::Core::Hashable + + # Count of user events imported with complete existing catalog information. + # Corresponds to the JSON property `joinedEventsCount` + # @return [Fixnum] + attr_accessor :joined_events_count + + # Count of user events imported, but with catalog information not found in the + # imported catalog. + # Corresponds to the JSON property `unjoinedEventsCount` + # @return [Fixnum] + attr_accessor :unjoined_events_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count) + @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count) + end + end + + # The response message for Operations.ListOperations. + class GoogleLongrunningListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class GoogleLongrunningOperation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. If `true` + # , the operation is completed, and either `error` or `response` is available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by [ + # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of + # data: error code, error message, and error details. You can find out more + # about this error model and how to work with it in the [API Design Guide](https: + # //cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::RetailV2::GoogleRpcStatus] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically contains + # progress information and common metadata such as create time. Some services + # might not provide such metadata. Any method that returns a long-running + # operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the `name` should + # be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is `google. + # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, + # the response should be the resource. For other methods, the response should + # have the type `XxxResponse`, where `Xxx` is the original method name. For + # example, if the original method name is `TakeSnapshot()`, the inferred + # response type is `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # 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); ` The JSON representation for + # `Empty` is empty JSON object ````. + class GoogleProtobufEmpty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by [ + # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of + # data: error code, error message, and error details. You can find out more + # about this error model and how to work with it in the [API Design Guide](https: + # //cloud.google.com/apis/design/errors). + class GoogleRpcStatus + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any user-facing + # error message should be localized and sent in the google.rpc.Status.details + # field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + end + end +end diff --git a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb new file mode 100644 index 000000000..cd0ec98b9 --- /dev/null +++ b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb @@ -0,0 +1,28 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Apis + module RetailV2 + # Version of the google-apis-retail_v2 gem + GEM_VERSION = "0.1.0" + + # Version of the code generator used to generate this client + GENERATOR_VERSION = "0.1.1" + + # Revision of the discovery document this client was generated from + REVISION = "20210105" + end + end +end diff --git a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb new file mode 100644 index 000000000..a05f25aa0 --- /dev/null +++ b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb @@ -0,0 +1,1287 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module RetailV2 + + class GoogleApiHttpBody + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailLoggingErrorContext + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailLoggingErrorLog + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailLoggingHttpRequestContext + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailLoggingImportErrorContext + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailLoggingServiceContext + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailLoggingSourceLocation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2BigQuerySource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2Catalog + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2CustomAttribute + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2GcsSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2Image + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ImportErrorsConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ImportMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ImportProductsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ImportProductsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ImportUserEventsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ImportUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ListCatalogsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2PredictRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2PredictResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2PredictResponsePredictionResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2PriceInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2Product + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ProductDetail + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ProductInlineSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ProductInputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2ProductLevelConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2PurchaseTransaction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2PurgeMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2PurgeUserEventsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2PurgeUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2RejoinUserEventsMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2RejoinUserEventsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2RejoinUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2UserEvent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2UserEventImportSummary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2UserEventInlineSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2UserEventInputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2UserInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaExportErrorsConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaExportMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaExportProductsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaExportUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaImportErrorsConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaImportMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaImportProductsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaImportUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaPurgeMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaPurgeUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaRejoinUserEventsMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaRejoinUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaUserEventImportSummary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaExportErrorsConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaExportMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaExportProductsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaExportUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaImportErrorsConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaImportMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaImportProductsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaImportUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaPurgeMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaPurgeUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaRejoinUserEventsMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaRejoinUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaUserEventImportSummary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainExportErrorsConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainExportMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainExportProductsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainExportUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainImportErrorsConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainImportMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainImportProductsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainImportUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainPurgeMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainPurgeUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainRejoinUserEventsMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainRejoinUserEventsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2mainUserEventImportSummary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleLongrunningListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleLongrunningOperation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleProtobufEmpty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleRpcStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleApiHttpBody + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_type, as: 'contentType' + property :data, :base64 => true, as: 'data' + collection :extensions, as: 'extensions' + end + end + + class GoogleCloudRetailLoggingErrorContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :http_request, as: 'httpRequest', class: Google::Apis::RetailV2::GoogleCloudRetailLoggingHttpRequestContext, decorator: Google::Apis::RetailV2::GoogleCloudRetailLoggingHttpRequestContext::Representation + + property :report_location, as: 'reportLocation', class: Google::Apis::RetailV2::GoogleCloudRetailLoggingSourceLocation, decorator: Google::Apis::RetailV2::GoogleCloudRetailLoggingSourceLocation::Representation + + end + end + + class GoogleCloudRetailLoggingErrorLog + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :context, as: 'context', class: Google::Apis::RetailV2::GoogleCloudRetailLoggingErrorContext, decorator: Google::Apis::RetailV2::GoogleCloudRetailLoggingErrorContext::Representation + + property :import_payload, as: 'importPayload', class: Google::Apis::RetailV2::GoogleCloudRetailLoggingImportErrorContext, decorator: Google::Apis::RetailV2::GoogleCloudRetailLoggingImportErrorContext::Representation + + property :message, as: 'message' + hash :request_payload, as: 'requestPayload' + hash :response_payload, as: 'responsePayload' + property :service_context, as: 'serviceContext', class: Google::Apis::RetailV2::GoogleCloudRetailLoggingServiceContext, decorator: Google::Apis::RetailV2::GoogleCloudRetailLoggingServiceContext::Representation + + property :status, as: 'status', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + end + end + + class GoogleCloudRetailLoggingHttpRequestContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :response_status_code, as: 'responseStatusCode' + end + end + + class GoogleCloudRetailLoggingImportErrorContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :catalog_item, as: 'catalogItem' + property :gcs_path, as: 'gcsPath' + property :line_number, as: 'lineNumber' + property :operation_name, as: 'operationName' + property :product, as: 'product' + property :user_event, as: 'userEvent' + end + end + + class GoogleCloudRetailLoggingServiceContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :service, as: 'service' + end + end + + class GoogleCloudRetailLoggingSourceLocation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :function_name, as: 'functionName' + end + end + + class GoogleCloudRetailV2BigQuerySource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data_schema, as: 'dataSchema' + property :dataset_id, as: 'datasetId' + property :gcs_staging_dir, as: 'gcsStagingDir' + property :project_id, as: 'projectId' + property :table_id, as: 'tableId' + end + end + + class GoogleCloudRetailV2Catalog + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :name, as: 'name' + property :product_level_config, as: 'productLevelConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2ProductLevelConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2ProductLevelConfig::Representation + + end + end + + class GoogleCloudRetailV2CustomAttribute + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :numbers, as: 'numbers' + collection :text, as: 'text' + end + end + + class GoogleCloudRetailV2GcsSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data_schema, as: 'dataSchema' + collection :input_uris, as: 'inputUris' + end + end + + class GoogleCloudRetailV2Image + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :height, as: 'height' + property :uri, as: 'uri' + property :width, as: 'width' + end + end + + class GoogleCloudRetailV2ImportErrorsConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_prefix, as: 'gcsPrefix' + end + end + + class GoogleCloudRetailV2ImportMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :failure_count, :numeric_string => true, as: 'failureCount' + property :success_count, :numeric_string => true, as: 'successCount' + property :update_time, as: 'updateTime' + end + end + + class GoogleCloudRetailV2ImportProductsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig::Representation + + property :input_config, as: 'inputConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2ProductInputConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2ProductInputConfig::Representation + + property :update_mask, as: 'updateMask' + end + end + + class GoogleCloudRetailV2ImportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2ImportUserEventsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig::Representation + + property :input_config, as: 'inputConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2UserEventInputConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2UserEventInputConfig::Representation + + end + end + + class GoogleCloudRetailV2ImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2ImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2::GoogleCloudRetailV2UserEventImportSummary, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2UserEventImportSummary::Representation + + end + end + + class GoogleCloudRetailV2ListCatalogsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :catalogs, as: 'catalogs', class: Google::Apis::RetailV2::GoogleCloudRetailV2Catalog, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2Catalog::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class GoogleCloudRetailV2PredictRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter' + hash :labels, as: 'labels' + property :page_size, as: 'pageSize' + property :page_token, as: 'pageToken' + hash :params, as: 'params' + property :user_event, as: 'userEvent', class: Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent::Representation + + property :validate_only, as: 'validateOnly' + end + end + + class GoogleCloudRetailV2PredictResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attribution_token, as: 'attributionToken' + collection :missing_ids, as: 'missingIds' + collection :results, as: 'results', class: Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponsePredictionResult, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponsePredictionResult::Representation + + property :validate_only, as: 'validateOnly' + end + end + + class GoogleCloudRetailV2PredictResponsePredictionResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + hash :metadata, as: 'metadata' + end + end + + class GoogleCloudRetailV2PriceInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cost, as: 'cost' + property :currency_code, as: 'currencyCode' + property :original_price, as: 'originalPrice' + property :price, as: 'price' + end + end + + class GoogleCloudRetailV2Product + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :attributes, as: 'attributes', class: Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute::Representation + + property :availability, as: 'availability' + property :available_quantity, as: 'availableQuantity' + property :available_time, as: 'availableTime' + collection :categories, as: 'categories' + property :description, as: 'description' + property :id, as: 'id' + collection :images, as: 'images', class: Google::Apis::RetailV2::GoogleCloudRetailV2Image, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2Image::Representation + + property :name, as: 'name' + property :price_info, as: 'priceInfo', class: Google::Apis::RetailV2::GoogleCloudRetailV2PriceInfo, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2PriceInfo::Representation + + property :primary_product_id, as: 'primaryProductId' + collection :tags, as: 'tags' + property :title, as: 'title' + property :type, as: 'type' + property :uri, as: 'uri' + end + end + + class GoogleCloudRetailV2ProductDetail + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :product, as: 'product', class: Google::Apis::RetailV2::GoogleCloudRetailV2Product, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation + + property :quantity, as: 'quantity' + end + end + + class GoogleCloudRetailV2ProductInlineSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :products, as: 'products', class: Google::Apis::RetailV2::GoogleCloudRetailV2Product, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation + + end + end + + class GoogleCloudRetailV2ProductInputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :big_query_source, as: 'bigQuerySource', class: Google::Apis::RetailV2::GoogleCloudRetailV2BigQuerySource, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2BigQuerySource::Representation + + property :gcs_source, as: 'gcsSource', class: Google::Apis::RetailV2::GoogleCloudRetailV2GcsSource, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2GcsSource::Representation + + property :product_inline_source, as: 'productInlineSource', class: Google::Apis::RetailV2::GoogleCloudRetailV2ProductInlineSource, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2ProductInlineSource::Representation + + end + end + + class GoogleCloudRetailV2ProductLevelConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ingestion_product_type, as: 'ingestionProductType' + property :merchant_center_product_id_field, as: 'merchantCenterProductIdField' + end + end + + class GoogleCloudRetailV2PurchaseTransaction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cost, as: 'cost' + property :currency_code, as: 'currencyCode' + property :id, as: 'id' + property :revenue, as: 'revenue' + property :tax, as: 'tax' + end + end + + class GoogleCloudRetailV2PurgeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2PurgeUserEventsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter' + property :force, as: 'force' + end + end + + class GoogleCloudRetailV2PurgeUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :purged_events_count, :numeric_string => true, as: 'purgedEventsCount' + end + end + + class GoogleCloudRetailV2RejoinUserEventsMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2RejoinUserEventsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :user_event_rejoin_scope, as: 'userEventRejoinScope' + end + end + + class GoogleCloudRetailV2RejoinUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rejoined_user_events_count, :numeric_string => true, as: 'rejoinedUserEventsCount' + end + end + + class GoogleCloudRetailV2UserEvent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :attributes, as: 'attributes', class: Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute::Representation + + property :attribution_token, as: 'attributionToken' + property :cart_id, as: 'cartId' + property :event_time, as: 'eventTime' + property :event_type, as: 'eventType' + collection :experiment_ids, as: 'experimentIds' + collection :page_categories, as: 'pageCategories' + property :page_view_id, as: 'pageViewId' + collection :product_details, as: 'productDetails', class: Google::Apis::RetailV2::GoogleCloudRetailV2ProductDetail, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2ProductDetail::Representation + + property :purchase_transaction, as: 'purchaseTransaction', class: Google::Apis::RetailV2::GoogleCloudRetailV2PurchaseTransaction, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2PurchaseTransaction::Representation + + property :referrer_uri, as: 'referrerUri' + property :search_query, as: 'searchQuery' + property :uri, as: 'uri' + property :user_info, as: 'userInfo', class: Google::Apis::RetailV2::GoogleCloudRetailV2UserInfo, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2UserInfo::Representation + + property :visitor_id, as: 'visitorId' + end + end + + class GoogleCloudRetailV2UserEventImportSummary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :joined_events_count, :numeric_string => true, as: 'joinedEventsCount' + property :unjoined_events_count, :numeric_string => true, as: 'unjoinedEventsCount' + end + end + + class GoogleCloudRetailV2UserEventInlineSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :user_events, as: 'userEvents', class: Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent::Representation + + end + end + + class GoogleCloudRetailV2UserEventInputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :big_query_source, as: 'bigQuerySource', class: Google::Apis::RetailV2::GoogleCloudRetailV2BigQuerySource, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2BigQuerySource::Representation + + property :gcs_source, as: 'gcsSource', class: Google::Apis::RetailV2::GoogleCloudRetailV2GcsSource, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2GcsSource::Representation + + property :user_event_inline_source, as: 'userEventInlineSource', class: Google::Apis::RetailV2::GoogleCloudRetailV2UserEventInlineSource, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2UserEventInlineSource::Representation + + end + end + + class GoogleCloudRetailV2UserInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :direct_user_request, as: 'directUserRequest' + property :ip_address, as: 'ipAddress' + property :user_agent, as: 'userAgent' + property :user_id, as: 'userId' + end + end + + class GoogleCloudRetailV2alphaExportErrorsConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_prefix, as: 'gcsPrefix' + end + end + + class GoogleCloudRetailV2alphaExportMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :update_time, as: 'updateTime' + end + end + + class GoogleCloudRetailV2alphaExportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2alphaExportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2alphaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaExportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2alphaExportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2alphaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaImportErrorsConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_prefix, as: 'gcsPrefix' + end + end + + class GoogleCloudRetailV2alphaImportMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :failure_count, :numeric_string => true, as: 'failureCount' + property :success_count, :numeric_string => true, as: 'successCount' + property :update_time, as: 'updateTime' + end + end + + class GoogleCloudRetailV2alphaImportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2alphaImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2alphaImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2alphaImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2alphaImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2::GoogleCloudRetailV2alphaUserEventImportSummary, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2alphaUserEventImportSummary::Representation + + end + end + + class GoogleCloudRetailV2alphaPurgeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2alphaPurgeUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :purged_events_count, :numeric_string => true, as: 'purgedEventsCount' + end + end + + class GoogleCloudRetailV2alphaRejoinUserEventsMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2alphaRejoinUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rejoined_user_events_count, :numeric_string => true, as: 'rejoinedUserEventsCount' + end + end + + class GoogleCloudRetailV2alphaUserEventImportSummary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :joined_events_count, :numeric_string => true, as: 'joinedEventsCount' + property :unjoined_events_count, :numeric_string => true, as: 'unjoinedEventsCount' + end + end + + class GoogleCloudRetailV2betaExportErrorsConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_prefix, as: 'gcsPrefix' + end + end + + class GoogleCloudRetailV2betaExportMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :update_time, as: 'updateTime' + end + end + + class GoogleCloudRetailV2betaExportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2betaExportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2betaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2betaExportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2betaExportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2betaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2betaImportErrorsConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_prefix, as: 'gcsPrefix' + end + end + + class GoogleCloudRetailV2betaImportMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :failure_count, :numeric_string => true, as: 'failureCount' + property :success_count, :numeric_string => true, as: 'successCount' + property :update_time, as: 'updateTime' + end + end + + class GoogleCloudRetailV2betaImportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2betaImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2betaImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2betaImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2betaImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2betaImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2::GoogleCloudRetailV2betaUserEventImportSummary, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2betaUserEventImportSummary::Representation + + end + end + + class GoogleCloudRetailV2betaPurgeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2betaPurgeUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :purged_events_count, :numeric_string => true, as: 'purgedEventsCount' + end + end + + class GoogleCloudRetailV2betaRejoinUserEventsMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2betaRejoinUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rejoined_user_events_count, :numeric_string => true, as: 'rejoinedUserEventsCount' + end + end + + class GoogleCloudRetailV2betaUserEventImportSummary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :joined_events_count, :numeric_string => true, as: 'joinedEventsCount' + property :unjoined_events_count, :numeric_string => true, as: 'unjoinedEventsCount' + end + end + + class GoogleCloudRetailV2mainExportErrorsConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_prefix, as: 'gcsPrefix' + end + end + + class GoogleCloudRetailV2mainExportMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :update_time, as: 'updateTime' + end + end + + class GoogleCloudRetailV2mainExportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2mainExportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2mainExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2mainExportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2mainExportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2mainExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2mainImportErrorsConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_prefix, as: 'gcsPrefix' + end + end + + class GoogleCloudRetailV2mainImportMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :failure_count, :numeric_string => true, as: 'failureCount' + property :success_count, :numeric_string => true, as: 'successCount' + property :update_time, as: 'updateTime' + end + end + + class GoogleCloudRetailV2mainImportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2mainImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2mainImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2mainImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2mainImportErrorsConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2mainImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2::GoogleCloudRetailV2mainUserEventImportSummary, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2mainUserEventImportSummary::Representation + + end + end + + class GoogleCloudRetailV2mainPurgeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2mainPurgeUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :purged_events_count, :numeric_string => true, as: 'purgedEventsCount' + end + end + + class GoogleCloudRetailV2mainRejoinUserEventsMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2mainRejoinUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rejoined_user_events_count, :numeric_string => true, as: 'rejoinedUserEventsCount' + end + end + + class GoogleCloudRetailV2mainUserEventImportSummary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :joined_events_count, :numeric_string => true, as: 'joinedEventsCount' + property :unjoined_events_count, :numeric_string => true, as: 'unjoinedEventsCount' + end + end + + class GoogleLongrunningListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::RetailV2::GoogleLongrunningOperation, decorator: Google::Apis::RetailV2::GoogleLongrunningOperation::Representation + + end + end + + class GoogleLongrunningOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::RetailV2::GoogleRpcStatus, decorator: Google::Apis::RetailV2::GoogleRpcStatus::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class GoogleProtobufEmpty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleRpcStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + end + end +end diff --git a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/service.rb b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/service.rb new file mode 100644 index 000000000..13d7c5aad --- /dev/null +++ b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/service.rb @@ -0,0 +1,776 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module RetailV2 + # Retail API + # + # Cloud Retail service enables customers to build end-to-end personalized + # recommendation systems without requiring a high level of expertise in machine + # learning, recommendation system, or Google Cloud. + # + # @example + # require 'google/apis/retail_v2' + # + # Retail = Google::Apis::RetailV2 # Alias the module + # service = Retail::CloudRetailService.new + # + # @see https://cloud.google.com/recommendations + class CloudRetailService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://retail.googleapis.com/', '', + client_name: 'google-apis-retail_v2', + client_version: Google::Apis::RetailV2::GEM_VERSION) + @batch_path = 'batch' + end + + # Lists all the Catalogs associated with the project. + # @param [String] parent + # Required. The account resource name with an associated location. If the caller + # does not have permission to list Catalogs under this location, regardless of + # whether or not this location exists, a PERMISSION_DENIED error is returned. + # @param [Fixnum] page_size + # Maximum number of Catalogs to return. If unspecified, defaults to 50. The + # maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If + # this field is negative, an INVALID_ARGUMENT is returned. + # @param [String] page_token + # A page token ListCatalogsResponse.next_page_token, received from a previous + # CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to CatalogService.ListCatalogs + # must match the call that provided the page token. Otherwise, an + # INVALID_ARGUMENT error is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_catalogs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/catalogs', options) + command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse::Representation + command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the Catalogs. + # @param [String] name + # Required. Immutable. The fully qualified resource name of the catalog. + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2Catalog] google_cloud_retail_v2_catalog_object + # @param [String] update_mask + # Indicates which fields in the provided Catalog to update. If not set, will + # only update the Catalog.product_level_config field, which is also the only + # currently supported field to update. If an unsupported or unknown field is + # provided, an INVALID_ARGUMENT error is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2Catalog] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2Catalog] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_catalog(name, google_cloud_retail_v2_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Catalog::Representation + command.request_object = google_cloud_retail_v2_catalog_object + command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Catalog::Representation + command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Catalog + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this method + # to poll the operation result at intervals as recommended by the API service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_catalog_branch_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Product. + # @param [String] parent + # Required. The parent catalog resource name, such as `projects/*/locations/ + # global/catalogs/default_catalog/branches/default_branch`. + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2Product] google_cloud_retail_v2_product_object + # @param [String] product_id + # Required. The ID to use for the Product, which will become the final component + # of the Product.name. If the caller does not have permission to create the + # Product, regardless of whether or not it exists, a PERMISSION_DENIED error is + # returned. This field must be unique among all Products with the same parent. + # Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 + # encoded string with a length limit of 128 characters. Otherwise, an + # INVALID_ARGUMENT error is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2Product] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2Product] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_catalog_branch_product(parent, google_cloud_retail_v2_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/products', options) + command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation + command.request_object = google_cloud_retail_v2_product_object + command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation + command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Product + command.params['parent'] = parent unless parent.nil? + command.query['productId'] = product_id unless product_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a Product. + # @param [String] name + # Required. Full resource name of Product, such as `projects/*/locations/global/ + # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If + # the caller does not have permission to delete the Product, regardless of + # whether or not it exists, a PERMISSION_DENIED error is returned. If the + # Product to delete does not exist, a NOT_FOUND error is returned. The Product + # to delete can neither be a Product.Type.COLLECTION Product member nor a + # Product.Type.PRIMARY Product with more than one variants. Otherwise, an + # INVALID_ARGUMENT error is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleProtobufEmpty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a Product. + # @param [String] name + # Required. Full resource name of Product, such as `projects/*/locations/global/ + # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If + # the caller does not have permission to access the Product, regardless of + # whether or not it exists, a PERMISSION_DENIED error is returned. If the + # requested Product does not exist, a NOT_FOUND error is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2Product] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2Product] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation + command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Product + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Bulk import of multiple Products. Request processing may be synchronous. No + # partial updating is supported. Non-existing items are created. Note that it is + # possible for a subset of the Products to be successfully updated. + # @param [String] parent + # Required. `projects/1234/locations/global/catalogs/default_catalog/branches/ + # default_branch` If no updateMask is specified, requires products.create + # permission. If updateMask is specified, requires products.update permission. + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2ImportProductsRequest] google_cloud_retail_v2_import_products_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def import_project_location_catalog_branch_product(parent, google_cloud_retail_v2_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/products:import', options) + command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ImportProductsRequest::Representation + command.request_object = google_cloud_retail_v2_import_products_request_object + command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a Product. + # @param [String] name + # Immutable. Full resource name of the product, such as `projects/*/locations/ + # global/catalogs/default_catalog/branches/default_branch/products/product_id`. + # The branch ID must be "default_branch". + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2Product] google_cloud_retail_v2_product_object + # @param [Boolean] allow_missing + # If set to true, and the Product is not found, a new Product will be created. + # In this situation, `update_mask` is ignored. + # @param [String] update_mask + # Indicates which fields in the provided Product to update. The immutable and + # output only fields are NOT supported. If not set, all supported fields (the + # fields that are neither immutable nor output only) are updated. If an + # unsupported or unknown field is provided, an INVALID_ARGUMENT error is + # returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2Product] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2Product] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_catalog_branch_product(name, google_cloud_retail_v2_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation + command.request_object = google_cloud_retail_v2_product_object + command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation + command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Product + command.params['name'] = name unless name.nil? + command.query['allowMissing'] = allow_missing unless allow_missing.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this method + # to poll the operation result at intervals as recommended by the API service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_catalog_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the server + # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` + # binding allows API services to override the binding to use different resource + # name schemes, such as `users/*/operations`. To override the binding, API + # services can add a binding such as `"/v1/`name=users/*`/operations"` to their + # service configuration. For backwards compatibility, the default name includes + # the operations collection id, however overriding users must ensure the name + # binding is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_catalog_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}/operations', options) + command.response_representation = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse::Representation + command.response_class = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Makes a recommendation prediction. + # @param [String] placement + # Required. Full resource name of the format: `name=projects/*/locations/global/ + # catalogs/default_catalog/placements/*` The id of the recommendation engine + # placement. This id is used to identify the set of models that will be used to + # make the prediction. We currently support three placements with the following + # IDs by default: * `shopping_cart`: Predicts products frequently bought + # together with one or more products in the same shopping session. Commonly + # displayed after `add-to-cart` events, on product detail pages, or on the + # shopping cart page. * `home_page`: Predicts the next product that a user will + # most likely engage with or purchase based on the shopping or viewing history + # of the specified `userId` or `visitorId`. For example - Recommendations for + # you. * `product_detail`: Predicts the next product that a user will most + # likely engage with or purchase. The prediction is based on the shopping or + # viewing history of the specified `userId` or `visitorId` and its relevance to + # a specified `CatalogItem`. Typically used on product detail pages. For example + # - More products like this. * `recently_viewed_default`: Returns up to 75 + # products recently viewed by the specified `userId` or `visitorId`, most recent + # ones first. Returns nothing if neither of them has viewed any products yet. + # For example - Recently viewed. The full list of available placements can be + # seen at https://console.cloud.google.com/recommendation/catalogs/ + # default_catalog/placements + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest] google_cloud_retail_v2_predict_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def predict_project_location_catalog_placement(placement, google_cloud_retail_v2_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+placement}:predict', options) + command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest::Representation + command.request_object = google_cloud_retail_v2_predict_request_object + command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse::Representation + command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse + command.params['placement'] = placement unless placement.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Writes a single user event from the browser. This uses a GET request to due to + # browser restriction of POST-ing to a 3rd party domain. This method is used + # only by the Retail API JavaScript pixel and Google Tag Manager. Users should + # not call this method directly. + # @param [String] parent + # Required. The parent catalog name, such as `projects/1234/locations/global/ + # catalogs/default_catalog`. + # @param [Fixnum] ets + # The event timestamp in milliseconds. This prevents browser caching of + # otherwise identical get requests. The name is abbreviated to reduce the + # payload bytes. + # @param [String] uri + # The URL including cgi-parameters but excluding the hash fragment with a length + # limit of 5,000 characters. This is often more useful than the referer URL, + # because many browsers only send the domain for 3rd party requests. + # @param [String] user_event + # Required. URL encoded UserEvent proto with a length limit of 2,000,000 + # characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleApiHttpBody] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleApiHttpBody] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def collect_project_location_catalog_user_event(parent, ets: nil, uri: nil, user_event: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/userEvents:collect', options) + command.response_representation = Google::Apis::RetailV2::GoogleApiHttpBody::Representation + command.response_class = Google::Apis::RetailV2::GoogleApiHttpBody + command.params['parent'] = parent unless parent.nil? + command.query['ets'] = ets unless ets.nil? + command.query['uri'] = uri unless uri.nil? + command.query['userEvent'] = user_event unless user_event.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Bulk import of User events. Request processing might be synchronous. Events + # that already exist are skipped. Use this method for backfilling historical + # user events. Operation.response is of type ImportResponse. Note that it is + # possible for a subset of the items to be successfully inserted. Operation. + # metadata is of type ImportMetadata. + # @param [String] parent + # Required. `projects/1234/locations/global/catalogs/default_catalog` + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2ImportUserEventsRequest] google_cloud_retail_v2_import_user_events_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def import_project_location_catalog_user_event(parent, google_cloud_retail_v2_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/userEvents:import', options) + command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ImportUserEventsRequest::Representation + command.request_object = google_cloud_retail_v2_import_user_events_request_object + command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes permanently all user events specified by the filter provided. + # Depending on the number of events specified by the filter, this operation + # could take hours or days to complete. To test a filter, use the list command + # first. + # @param [String] parent + # Required. The resource name of the catalog under which the events are created. + # The format is `projects/$`projectId`/locations/global/catalogs/$`catalogId`` + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2PurgeUserEventsRequest] google_cloud_retail_v2_purge_user_events_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def purge_project_location_catalog_user_event(parent, google_cloud_retail_v2_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/userEvents:purge', options) + command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PurgeUserEventsRequest::Representation + command.request_object = google_cloud_retail_v2_purge_user_events_request_object + command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Triggers a user event rejoin operation with latest product catalog. Events + # will not be annotated with detailed product information if product is missing + # from the catalog at the time the user event is ingested, and these events are + # stored as unjoined events with a limited usage on training and serving. This + # API can be used to trigger a 'join' operation on specified events with latest + # version of product catalog. It can also be used to correct events joined with + # wrong product catalog. + # @param [String] parent + # Required. The parent catalog resource name, such as `projects/1234/locations/ + # global/catalogs/default_catalog`. + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2RejoinUserEventsRequest] google_cloud_retail_v2_rejoin_user_events_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def rejoin_project_location_catalog_user_event(parent, google_cloud_retail_v2_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/userEvents:rejoin', options) + command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RejoinUserEventsRequest::Representation + command.request_object = google_cloud_retail_v2_rejoin_user_events_request_object + command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Writes a single user event. + # @param [String] parent + # Required. The parent catalog resource name, such as `projects/1234/locations/ + # global/catalogs/default_catalog`. + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent] google_cloud_retail_v2_user_event_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def write_project_location_catalog_user_event(parent, google_cloud_retail_v2_user_event_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/userEvents:write', options) + command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent::Representation + command.request_object = google_cloud_retail_v2_user_event_object + command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent::Representation + command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this method + # to poll the operation result at intervals as recommended by the API service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the server + # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` + # binding allows API services to override the binding to use different resource + # name schemes, such as `users/*/operations`. To override the binding, API + # services can add a binding such as `"/v1/`name=users/*`/operations"` to their + # service configuration. For backwards compatibility, the default name includes + # the operations collection id, however overriding users must ensure the name + # binding is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}/operations', options) + command.response_representation = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse::Representation + command.response_class = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google-apis-retail_v2/spec/generated_spec.rb b/generated/google-apis-retail_v2/spec/generated_spec.rb new file mode 100644 index 000000000..86a6a1fe9 --- /dev/null +++ b/generated/google-apis-retail_v2/spec/generated_spec.rb @@ -0,0 +1,27 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require "rspec" + +RSpec.describe "Google::Apis::RetailV2" do + # Minimal test just to ensure no syntax errors in generated code + it "should load" do + expect do + require "google/apis/retail_v2" + end.not_to raise_error + expect do + Google::Apis::RetailV2::CloudRetailService.new + end.not_to raise_error + end +end diff --git a/generated/google-apis-retail_v2/synth.metadata b/generated/google-apis-retail_v2/synth.metadata new file mode 100644 index 000000000..6336bab0b --- /dev/null +++ b/generated/google-apis-retail_v2/synth.metadata @@ -0,0 +1,11 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/google-api-ruby-client.git", + "sha": "6a65c71c4437d5f9e766960419b37cd84c9f4584" + } + } + ] +} \ No newline at end of file