diff --git a/generated/google-apis-retail_v2alpha/lib/google-apis-retail_v2alpha.rb b/generated/google-apis-retail_v2alpha/lib/google-apis-retail_v2alpha.rb new file mode 100644 index 000000000..1a70c51a3 --- /dev/null +++ b/generated/google-apis-retail_v2alpha/lib/google-apis-retail_v2alpha.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_v2alpha" diff --git a/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha.rb b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha.rb new file mode 100644 index 000000000..57f01b2d3 --- /dev/null +++ b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha.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_v2alpha/service.rb' +require 'google/apis/retail_v2alpha/classes.rb' +require 'google/apis/retail_v2alpha/representations.rb' +require 'google/apis/retail_v2alpha/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 RetailV2alpha + # Version of the Retail API this client connects to. + # This is NOT the gem version. + VERSION = 'V2alpha' + + # 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_v2alpha/lib/google/apis/retail_v2alpha/classes.rb b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha/classes.rb new file mode 100644 index 000000000..acff895d0 --- /dev/null +++ b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha/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 RetailV2alpha + + # 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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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 + + # 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 + + # 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::RetailV2alpha::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 + + # 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::RetailV2alpha::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::RetailV2alpha::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 + + # 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 + + # 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 + + # 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 + + # 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 + + # BigQuery source import data from. + class GoogleCloudRetailV2alphaBigQuerySource + 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 GoogleCloudRetailV2alphaCatalog + 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::RetailV2alpha::GoogleCloudRetailV2alphaProductLevelConfig] + 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 GoogleCloudRetailV2alphaCustomAttribute + 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 + + # 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::RetailV2alpha::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::RetailV2alpha::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 + + # Google Cloud Storage location for input content. format. + class GoogleCloudRetailV2alphaGcsSource + 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 GoogleCloudRetailV2alphaImage + 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 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 + + # Request message for Import methods. + class GoogleCloudRetailV2alphaImportProductsRequest + include Google::Apis::Core::Hashable + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig] + attr_accessor :errors_config + + # The input config source for products. + # Corresponds to the JSON property `inputConfig` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInputConfig] + 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 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::RetailV2alpha::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 + + # Request message for the ImportUserEvents request. + class GoogleCloudRetailV2alphaImportUserEventsRequest + include Google::Apis::Core::Hashable + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig] + attr_accessor :errors_config + + # The input config source for user events. + # Corresponds to the JSON property `inputConfig` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventInputConfig] + 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 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::RetailV2alpha::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::RetailV2alpha::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 + + # Response for CatalogService.ListCatalogs method. + class GoogleCloudRetailV2alphaListCatalogsResponse + 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 GoogleCloudRetailV2alphaPredictRequest + 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::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent] + 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 GoogleCloudRetailV2alphaPredictResponse + 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 GoogleCloudRetailV2alphaPredictResponsePredictionResult + 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 GoogleCloudRetailV2alphaPriceInfo + 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 GoogleCloudRetailV2alphaProduct + 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::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo] + 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 GoogleCloudRetailV2alphaProductDetail + 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::RetailV2alpha::GoogleCloudRetailV2alphaProduct] + 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 GoogleCloudRetailV2alphaProductInlineSource + 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 GoogleCloudRetailV2alphaProductInputConfig + include Google::Apis::Core::Hashable + + # BigQuery source import data from. + # Corresponds to the JSON property `bigQuerySource` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBigQuerySource] + attr_accessor :big_query_source + + # Google Cloud Storage location for input content. format. + # Corresponds to the JSON property `gcsSource` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGcsSource] + attr_accessor :gcs_source + + # The inline source for the input config for ImportProducts method. + # Corresponds to the JSON property `productInlineSource` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInlineSource] + 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 GoogleCloudRetailV2alphaProductLevelConfig + 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 GoogleCloudRetailV2alphaPurchaseTransaction + 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 GoogleCloudRetailV2alphaPurgeMetadata + 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 GoogleCloudRetailV2alphaPurgeUserEventsRequest + 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 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 + + # Request message for RejoinUserEvents method. + class GoogleCloudRetailV2alphaRejoinUserEventsRequest + 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 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 + + # UserEvent captures all metadata information Retail API needs to know about how + # end users interact with customers' website. + class GoogleCloudRetailV2alphaUserEvent + 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::RetailV2alpha::GoogleCloudRetailV2alphaPurchaseTransaction] + 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::RetailV2alpha::GoogleCloudRetailV2alphaUserInfo] + 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 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 + + # The inline source for the input config for ImportUserEvents method. + class GoogleCloudRetailV2alphaUserEventInlineSource + 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 GoogleCloudRetailV2alphaUserEventInputConfig + include Google::Apis::Core::Hashable + + # BigQuery source import data from. + # Corresponds to the JSON property `bigQuerySource` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBigQuerySource] + attr_accessor :big_query_source + + # Google Cloud Storage location for input content. format. + # Corresponds to the JSON property `gcsSource` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGcsSource] + attr_accessor :gcs_source + + # The inline source for the input config for ImportUserEvents method. + # Corresponds to the JSON property `userEventInlineSource` + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventInlineSource] + 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 GoogleCloudRetailV2alphaUserInfo + 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 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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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::RetailV2alpha::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_v2alpha/lib/google/apis/retail_v2alpha/gem_version.rb b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha/gem_version.rb new file mode 100644 index 000000000..6fd60cd8e --- /dev/null +++ b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha/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 RetailV2alpha + # Version of the google-apis-retail_v2alpha 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_v2alpha/lib/google/apis/retail_v2alpha/representations.rb b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha/representations.rb new file mode 100644 index 000000000..2da215e0f --- /dev/null +++ b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha/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 RetailV2alpha + + 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 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 GoogleCloudRetailV2ImportProductsResponse + 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 GoogleCloudRetailV2PurgeMetadata + 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 GoogleCloudRetailV2RejoinUserEventsResponse + 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 GoogleCloudRetailV2alphaBigQuerySource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaCatalog + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaCustomAttribute + 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 GoogleCloudRetailV2alphaGcsSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaImage + 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 GoogleCloudRetailV2alphaImportProductsRequest + 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 GoogleCloudRetailV2alphaImportUserEventsRequest + 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 GoogleCloudRetailV2alphaListCatalogsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaPredictRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaPredictResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaPredictResponsePredictionResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaPriceInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaProduct + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaProductDetail + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaProductInlineSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaProductInputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaProductLevelConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaPurchaseTransaction + 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 GoogleCloudRetailV2alphaPurgeUserEventsRequest + 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 GoogleCloudRetailV2alphaRejoinUserEventsRequest + 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 GoogleCloudRetailV2alphaUserEvent + 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 GoogleCloudRetailV2alphaUserEventInlineSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaUserEventInputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2alphaUserInfo + 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::RetailV2alpha::GoogleCloudRetailLoggingHttpRequestContext, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingHttpRequestContext::Representation + + property :report_location, as: 'reportLocation', class: Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingSourceLocation, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingSourceLocation::Representation + + end + end + + class GoogleCloudRetailLoggingErrorLog + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :context, as: 'context', class: Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingErrorContext, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingErrorContext::Representation + + property :import_payload, as: 'importPayload', class: Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingImportErrorContext, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingImportErrorContext::Representation + + property :message, as: 'message' + hash :request_payload, as: 'requestPayload' + hash :response_payload, as: 'responsePayload' + property :service_context, as: 'serviceContext', class: Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingServiceContext, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingServiceContext::Representation + + property :status, as: 'status', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::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 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 GoogleCloudRetailV2ImportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2ImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2ImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2ImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2ImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2ImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2UserEventImportSummary, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2UserEventImportSummary::Representation + + end + end + + class GoogleCloudRetailV2PurgeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + 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 GoogleCloudRetailV2RejoinUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rejoined_user_events_count, :numeric_string => true, as: 'rejoinedUserEventsCount' + 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 GoogleCloudRetailV2alphaBigQuerySource + # @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 GoogleCloudRetailV2alphaCatalog + # @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::RetailV2alpha::GoogleCloudRetailV2alphaProductLevelConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductLevelConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaCustomAttribute + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :numbers, as: 'numbers' + collection :text, as: 'text' + 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::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaExportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaGcsSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data_schema, as: 'dataSchema' + collection :input_uris, as: 'inputUris' + end + end + + class GoogleCloudRetailV2alphaImage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :height, as: 'height' + property :uri, as: 'uri' + property :width, as: 'width' + 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 GoogleCloudRetailV2alphaImportProductsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig::Representation + + property :input_config, as: 'inputConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInputConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInputConfig::Representation + + property :update_mask, as: 'updateMask' + end + end + + class GoogleCloudRetailV2alphaImportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaImportUserEventsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig::Representation + + property :input_config, as: 'inputConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventInputConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventInputConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventImportSummary, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventImportSummary::Representation + + end + end + + class GoogleCloudRetailV2alphaListCatalogsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :catalogs, as: 'catalogs', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class GoogleCloudRetailV2alphaPredictRequest + # @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::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent::Representation + + property :validate_only, as: 'validateOnly' + end + end + + class GoogleCloudRetailV2alphaPredictResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attribution_token, as: 'attributionToken' + collection :missing_ids, as: 'missingIds' + collection :results, as: 'results', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponsePredictionResult, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponsePredictionResult::Representation + + property :validate_only, as: 'validateOnly' + end + end + + class GoogleCloudRetailV2alphaPredictResponsePredictionResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + hash :metadata, as: 'metadata' + end + end + + class GoogleCloudRetailV2alphaPriceInfo + # @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 GoogleCloudRetailV2alphaProduct + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :attributes, as: 'attributes', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute::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::RetailV2alpha::GoogleCloudRetailV2alphaImage, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImage::Representation + + property :name, as: 'name' + property :price_info, as: 'priceInfo', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo::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 GoogleCloudRetailV2alphaProductDetail + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :product, as: 'product', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation + + property :quantity, as: 'quantity' + end + end + + class GoogleCloudRetailV2alphaProductInlineSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :products, as: 'products', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation + + end + end + + class GoogleCloudRetailV2alphaProductInputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :big_query_source, as: 'bigQuerySource', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBigQuerySource, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBigQuerySource::Representation + + property :gcs_source, as: 'gcsSource', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGcsSource, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGcsSource::Representation + + property :product_inline_source, as: 'productInlineSource', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInlineSource, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInlineSource::Representation + + end + end + + class GoogleCloudRetailV2alphaProductLevelConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ingestion_product_type, as: 'ingestionProductType' + property :merchant_center_product_id_field, as: 'merchantCenterProductIdField' + end + end + + class GoogleCloudRetailV2alphaPurchaseTransaction + # @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 GoogleCloudRetailV2alphaPurgeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2alphaPurgeUserEventsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter' + property :force, as: 'force' + 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 GoogleCloudRetailV2alphaRejoinUserEventsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :user_event_rejoin_scope, as: 'userEventRejoinScope' + end + end + + class GoogleCloudRetailV2alphaRejoinUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rejoined_user_events_count, :numeric_string => true, as: 'rejoinedUserEventsCount' + end + end + + class GoogleCloudRetailV2alphaUserEvent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :attributes, as: 'attributes', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute::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::RetailV2alpha::GoogleCloudRetailV2alphaProductDetail, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductDetail::Representation + + property :purchase_transaction, as: 'purchaseTransaction', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPurchaseTransaction, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPurchaseTransaction::Representation + + property :referrer_uri, as: 'referrerUri' + property :search_query, as: 'searchQuery' + property :uri, as: 'uri' + property :user_info, as: 'userInfo', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserInfo, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserInfo::Representation + + property :visitor_id, as: 'visitorId' + 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 GoogleCloudRetailV2alphaUserEventInlineSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :user_events, as: 'userEvents', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent::Representation + + end + end + + class GoogleCloudRetailV2alphaUserEventInputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :big_query_source, as: 'bigQuerySource', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBigQuerySource, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBigQuerySource::Representation + + property :gcs_source, as: 'gcsSource', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGcsSource, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGcsSource::Representation + + property :user_event_inline_source, as: 'userEventInlineSource', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventInlineSource, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventInlineSource::Representation + + end + end + + class GoogleCloudRetailV2alphaUserInfo + # @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 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::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaExportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2betaExportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaExportErrorsConfig, decorator: Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2betaImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaUserEventImportSummary, decorator: Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainExportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2mainExportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainExportErrorsConfig, decorator: Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2mainImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainImportErrorsConfig, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainUserEventImportSummary, decorator: Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleLongrunningOperation, decorator: Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation + + end + end + + class GoogleLongrunningOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::RetailV2alpha::GoogleRpcStatus, decorator: Google::Apis::RetailV2alpha::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_v2alpha/lib/google/apis/retail_v2alpha/service.rb b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha/service.rb new file mode 100644 index 000000000..25561ad75 --- /dev/null +++ b/generated/google-apis-retail_v2alpha/lib/google/apis/retail_v2alpha/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 RetailV2alpha + # 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_v2alpha' + # + # Retail = Google::Apis::RetailV2alpha # 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_v2alpha', + client_version: Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaListCatalogsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListCatalogsResponse] + # + # @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, 'v2alpha/{+parent}/catalogs', options) + command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListCatalogsResponse::Representation + command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListCatalogsResponse + 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::RetailV2alpha::GoogleCloudRetailV2alphaCatalog] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleCloudRetailV2alphaCatalog] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog] + # + # @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_v2alpha_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2alpha/{+name}', options) + command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog::Representation + command.request_object = google_cloud_retail_v2alpha_catalog_object + command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog::Representation + command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog + 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::RetailV2alpha::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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, 'v2alpha/{+name}', options) + command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaProduct] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleCloudRetailV2alphaProduct] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct] + # + # @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_v2alpha_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2alpha/{+parent}/products', options) + command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation + command.request_object = google_cloud_retail_v2alpha_product_object + command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation + command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct + 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::RetailV2alpha::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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, 'v2alpha/{+name}', options) + command.response_representation = Google::Apis::RetailV2alpha::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaProduct] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct] + # + # @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, 'v2alpha/{+name}', options) + command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation + command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct + 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::RetailV2alpha::GoogleCloudRetailV2alphaImportProductsRequest] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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_v2alpha_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2alpha/{+parent}/products:import', options) + command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportProductsRequest::Representation + command.request_object = google_cloud_retail_v2alpha_import_products_request_object + command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaProduct] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleCloudRetailV2alphaProduct] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct] + # + # @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_v2alpha_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2alpha/{+name}', options) + command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation + command.request_object = google_cloud_retail_v2alpha_product_object + command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation + command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct + 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::RetailV2alpha::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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, 'v2alpha/{+name}', options) + command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleLongrunningListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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, 'v2alpha/{+name}/operations', options) + command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningListOperationsResponse::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaPredictRequest] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse] + # + # @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_v2alpha_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2alpha/{+placement}:predict', options) + command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictRequest::Representation + command.request_object = google_cloud_retail_v2alpha_predict_request_object + command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse::Representation + command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse + 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::RetailV2alpha::GoogleApiHttpBody] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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, 'v2alpha/{+parent}/userEvents:collect', options) + command.response_representation = Google::Apis::RetailV2alpha::GoogleApiHttpBody::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaImportUserEventsRequest] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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_v2alpha_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2alpha/{+parent}/userEvents:import', options) + command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportUserEventsRequest::Representation + command.request_object = google_cloud_retail_v2alpha_import_user_events_request_object + command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaPurgeUserEventsRequest] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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_v2alpha_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2alpha/{+parent}/userEvents:purge', options) + command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPurgeUserEventsRequest::Representation + command.request_object = google_cloud_retail_v2alpha_purge_user_events_request_object + command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaRejoinUserEventsRequest] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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_v2alpha_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2alpha/{+parent}/userEvents:rejoin', options) + command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRejoinUserEventsRequest::Representation + command.request_object = google_cloud_retail_v2alpha_rejoin_user_events_request_object + command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent] google_cloud_retail_v2alpha_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::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent] + # + # @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_v2alpha_user_event_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2alpha/{+parent}/userEvents:write', options) + command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent::Representation + command.request_object = google_cloud_retail_v2alpha_user_event_object + command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent::Representation + command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent + 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::RetailV2alpha::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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, 'v2alpha/{+name}', options) + command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleLongrunningListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2alpha::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, 'v2alpha/{+name}/operations', options) + command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningListOperationsResponse::Representation + command.response_class = Google::Apis::RetailV2alpha::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_v2alpha/spec/generated_spec.rb b/generated/google-apis-retail_v2alpha/spec/generated_spec.rb new file mode 100644 index 000000000..a22350843 --- /dev/null +++ b/generated/google-apis-retail_v2alpha/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::RetailV2alpha" do + # Minimal test just to ensure no syntax errors in generated code + it "should load" do + expect do + require "google/apis/retail_v2alpha" + end.not_to raise_error + expect do + Google::Apis::RetailV2alpha::CloudRetailService.new + end.not_to raise_error + end +end diff --git a/generated/google-apis-retail_v2beta/lib/google-apis-retail_v2beta.rb b/generated/google-apis-retail_v2beta/lib/google-apis-retail_v2beta.rb new file mode 100644 index 000000000..451a2d77a --- /dev/null +++ b/generated/google-apis-retail_v2beta/lib/google-apis-retail_v2beta.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_v2beta" diff --git a/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta.rb b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta.rb new file mode 100644 index 000000000..82c29d992 --- /dev/null +++ b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta.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_v2beta/service.rb' +require 'google/apis/retail_v2beta/classes.rb' +require 'google/apis/retail_v2beta/representations.rb' +require 'google/apis/retail_v2beta/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 RetailV2beta + # Version of the Retail API this client connects to. + # This is NOT the gem version. + VERSION = 'V2beta' + + # 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_v2beta/lib/google/apis/retail_v2beta/classes.rb b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/classes.rb new file mode 100644 index 000000000..fea6fa6e2 --- /dev/null +++ b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/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 RetailV2beta + + # 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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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 + + # 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 + + # 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::RetailV2beta::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 + + # 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::RetailV2beta::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::RetailV2beta::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 + + # 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 + + # 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 + + # 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 + + # 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 + + # 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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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 + + # BigQuery source import data from. + class GoogleCloudRetailV2betaBigQuerySource + 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 GoogleCloudRetailV2betaCatalog + 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::RetailV2beta::GoogleCloudRetailV2betaProductLevelConfig] + 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 GoogleCloudRetailV2betaCustomAttribute + 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 + + # 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::RetailV2beta::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::RetailV2beta::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 + + # Google Cloud Storage location for input content. format. + class GoogleCloudRetailV2betaGcsSource + 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 GoogleCloudRetailV2betaImage + 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 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 + + # Request message for Import methods. + class GoogleCloudRetailV2betaImportProductsRequest + include Google::Apis::Core::Hashable + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig] + attr_accessor :errors_config + + # The input config source for products. + # Corresponds to the JSON property `inputConfig` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductInputConfig] + 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 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::RetailV2beta::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 + + # Request message for the ImportUserEvents request. + class GoogleCloudRetailV2betaImportUserEventsRequest + include Google::Apis::Core::Hashable + + # Configuration of destination for Import related errors. + # Corresponds to the JSON property `errorsConfig` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig] + attr_accessor :errors_config + + # The input config source for user events. + # Corresponds to the JSON property `inputConfig` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventInputConfig] + 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 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::RetailV2beta::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::RetailV2beta::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 + + # Response for CatalogService.ListCatalogs method. + class GoogleCloudRetailV2betaListCatalogsResponse + 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 GoogleCloudRetailV2betaPredictRequest + 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::RetailV2beta::GoogleCloudRetailV2betaUserEvent] + 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 GoogleCloudRetailV2betaPredictResponse + 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 GoogleCloudRetailV2betaPredictResponsePredictionResult + 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 GoogleCloudRetailV2betaPriceInfo + 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 GoogleCloudRetailV2betaProduct + 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::RetailV2beta::GoogleCloudRetailV2betaPriceInfo] + 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 GoogleCloudRetailV2betaProductDetail + 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::RetailV2beta::GoogleCloudRetailV2betaProduct] + 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 GoogleCloudRetailV2betaProductInlineSource + 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 GoogleCloudRetailV2betaProductInputConfig + include Google::Apis::Core::Hashable + + # BigQuery source import data from. + # Corresponds to the JSON property `bigQuerySource` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaBigQuerySource] + attr_accessor :big_query_source + + # Google Cloud Storage location for input content. format. + # Corresponds to the JSON property `gcsSource` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGcsSource] + attr_accessor :gcs_source + + # The inline source for the input config for ImportProducts method. + # Corresponds to the JSON property `productInlineSource` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductInlineSource] + 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 GoogleCloudRetailV2betaProductLevelConfig + 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 GoogleCloudRetailV2betaPurchaseTransaction + 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 GoogleCloudRetailV2betaPurgeMetadata + 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 GoogleCloudRetailV2betaPurgeUserEventsRequest + 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 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 + + # Request message for RejoinUserEvents method. + class GoogleCloudRetailV2betaRejoinUserEventsRequest + 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 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 + + # UserEvent captures all metadata information Retail API needs to know about how + # end users interact with customers' website. + class GoogleCloudRetailV2betaUserEvent + 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::RetailV2beta::GoogleCloudRetailV2betaPurchaseTransaction] + 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::RetailV2beta::GoogleCloudRetailV2betaUserInfo] + 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 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 + + # The inline source for the input config for ImportUserEvents method. + class GoogleCloudRetailV2betaUserEventInlineSource + 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 GoogleCloudRetailV2betaUserEventInputConfig + include Google::Apis::Core::Hashable + + # BigQuery source import data from. + # Corresponds to the JSON property `bigQuerySource` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaBigQuerySource] + attr_accessor :big_query_source + + # Google Cloud Storage location for input content. format. + # Corresponds to the JSON property `gcsSource` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGcsSource] + attr_accessor :gcs_source + + # The inline source for the input config for ImportUserEvents method. + # Corresponds to the JSON property `userEventInlineSource` + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventInlineSource] + 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 GoogleCloudRetailV2betaUserInfo + 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 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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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_v2beta/lib/google/apis/retail_v2beta/gem_version.rb b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/gem_version.rb new file mode 100644 index 000000000..05ee6397b --- /dev/null +++ b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/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 RetailV2beta + # Version of the google-apis-retail_v2beta 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_v2beta/lib/google/apis/retail_v2beta/representations.rb b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/representations.rb new file mode 100644 index 000000000..40533f69f --- /dev/null +++ b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/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 RetailV2beta + + 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 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 GoogleCloudRetailV2ImportProductsResponse + 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 GoogleCloudRetailV2PurgeMetadata + 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 GoogleCloudRetailV2RejoinUserEventsResponse + 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 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 GoogleCloudRetailV2betaBigQuerySource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaCatalog + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaCustomAttribute + 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 GoogleCloudRetailV2betaGcsSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaImage + 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 GoogleCloudRetailV2betaImportProductsRequest + 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 GoogleCloudRetailV2betaImportUserEventsRequest + 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 GoogleCloudRetailV2betaListCatalogsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaPredictRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaPredictResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaPredictResponsePredictionResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaPriceInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaProduct + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaProductDetail + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaProductInlineSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaProductInputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaProductLevelConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaPurchaseTransaction + 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 GoogleCloudRetailV2betaPurgeUserEventsRequest + 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 GoogleCloudRetailV2betaRejoinUserEventsRequest + 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 GoogleCloudRetailV2betaUserEvent + 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 GoogleCloudRetailV2betaUserEventInlineSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaUserEventInputConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2betaUserInfo + 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::RetailV2beta::GoogleCloudRetailLoggingHttpRequestContext, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailLoggingHttpRequestContext::Representation + + property :report_location, as: 'reportLocation', class: Google::Apis::RetailV2beta::GoogleCloudRetailLoggingSourceLocation, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailLoggingSourceLocation::Representation + + end + end + + class GoogleCloudRetailLoggingErrorLog + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :context, as: 'context', class: Google::Apis::RetailV2beta::GoogleCloudRetailLoggingErrorContext, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailLoggingErrorContext::Representation + + property :import_payload, as: 'importPayload', class: Google::Apis::RetailV2beta::GoogleCloudRetailLoggingImportErrorContext, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailLoggingImportErrorContext::Representation + + property :message, as: 'message' + hash :request_payload, as: 'requestPayload' + hash :response_payload, as: 'responsePayload' + property :service_context, as: 'serviceContext', class: Google::Apis::RetailV2beta::GoogleCloudRetailLoggingServiceContext, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailLoggingServiceContext::Representation + + property :status, as: 'status', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::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 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 GoogleCloudRetailV2ImportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2ImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2ImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2ImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2ImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2ImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2UserEventImportSummary, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2UserEventImportSummary::Representation + + end + end + + class GoogleCloudRetailV2PurgeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + 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 GoogleCloudRetailV2RejoinUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rejoined_user_events_count, :numeric_string => true, as: 'rejoinedUserEventsCount' + 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 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::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaExportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaExportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaExportErrorsConfig, decorator: Google::Apis::RetailV2beta::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::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2alphaImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaUserEventImportSummary, decorator: Google::Apis::RetailV2beta::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 GoogleCloudRetailV2betaBigQuerySource + # @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 GoogleCloudRetailV2betaCatalog + # @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::RetailV2beta::GoogleCloudRetailV2betaProductLevelConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductLevelConfig::Representation + + end + end + + class GoogleCloudRetailV2betaCustomAttribute + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :numbers, as: 'numbers' + collection :text, as: 'text' + 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::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaExportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2betaExportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaExportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2betaGcsSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data_schema, as: 'dataSchema' + collection :input_uris, as: 'inputUris' + end + end + + class GoogleCloudRetailV2betaImage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :height, as: 'height' + property :uri, as: 'uri' + property :width, as: 'width' + 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 GoogleCloudRetailV2betaImportProductsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig::Representation + + property :input_config, as: 'inputConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductInputConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductInputConfig::Representation + + property :update_mask, as: 'updateMask' + end + end + + class GoogleCloudRetailV2betaImportProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2betaImportUserEventsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig::Representation + + property :input_config, as: 'inputConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventInputConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventInputConfig::Representation + + end + end + + class GoogleCloudRetailV2betaImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventImportSummary, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventImportSummary::Representation + + end + end + + class GoogleCloudRetailV2betaListCatalogsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :catalogs, as: 'catalogs', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalog, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalog::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class GoogleCloudRetailV2betaPredictRequest + # @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::RetailV2beta::GoogleCloudRetailV2betaUserEvent, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEvent::Representation + + property :validate_only, as: 'validateOnly' + end + end + + class GoogleCloudRetailV2betaPredictResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attribution_token, as: 'attributionToken' + collection :missing_ids, as: 'missingIds' + collection :results, as: 'results', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictResponsePredictionResult, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictResponsePredictionResult::Representation + + property :validate_only, as: 'validateOnly' + end + end + + class GoogleCloudRetailV2betaPredictResponsePredictionResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + hash :metadata, as: 'metadata' + end + end + + class GoogleCloudRetailV2betaPriceInfo + # @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 GoogleCloudRetailV2betaProduct + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :attributes, as: 'attributes', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCustomAttribute, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCustomAttribute::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::RetailV2beta::GoogleCloudRetailV2betaImage, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImage::Representation + + property :name, as: 'name' + property :price_info, as: 'priceInfo', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfo, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfo::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 GoogleCloudRetailV2betaProductDetail + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :product, as: 'product', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct::Representation + + property :quantity, as: 'quantity' + end + end + + class GoogleCloudRetailV2betaProductInlineSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :products, as: 'products', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct::Representation + + end + end + + class GoogleCloudRetailV2betaProductInputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :big_query_source, as: 'bigQuerySource', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaBigQuerySource, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaBigQuerySource::Representation + + property :gcs_source, as: 'gcsSource', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGcsSource, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGcsSource::Representation + + property :product_inline_source, as: 'productInlineSource', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductInlineSource, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductInlineSource::Representation + + end + end + + class GoogleCloudRetailV2betaProductLevelConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ingestion_product_type, as: 'ingestionProductType' + property :merchant_center_product_id_field, as: 'merchantCenterProductIdField' + end + end + + class GoogleCloudRetailV2betaPurchaseTransaction + # @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 GoogleCloudRetailV2betaPurgeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRetailV2betaPurgeUserEventsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter' + property :force, as: 'force' + 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 GoogleCloudRetailV2betaRejoinUserEventsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :user_event_rejoin_scope, as: 'userEventRejoinScope' + end + end + + class GoogleCloudRetailV2betaRejoinUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rejoined_user_events_count, :numeric_string => true, as: 'rejoinedUserEventsCount' + end + end + + class GoogleCloudRetailV2betaUserEvent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :attributes, as: 'attributes', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCustomAttribute, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCustomAttribute::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::RetailV2beta::GoogleCloudRetailV2betaProductDetail, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductDetail::Representation + + property :purchase_transaction, as: 'purchaseTransaction', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPurchaseTransaction, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPurchaseTransaction::Representation + + property :referrer_uri, as: 'referrerUri' + property :search_query, as: 'searchQuery' + property :uri, as: 'uri' + property :user_info, as: 'userInfo', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserInfo, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserInfo::Representation + + property :visitor_id, as: 'visitorId' + 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 GoogleCloudRetailV2betaUserEventInlineSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :user_events, as: 'userEvents', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEvent, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEvent::Representation + + end + end + + class GoogleCloudRetailV2betaUserEventInputConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :big_query_source, as: 'bigQuerySource', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaBigQuerySource, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaBigQuerySource::Representation + + property :gcs_source, as: 'gcsSource', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGcsSource, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGcsSource::Representation + + property :user_event_inline_source, as: 'userEventInlineSource', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventInlineSource, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventInlineSource::Representation + + end + end + + class GoogleCloudRetailV2betaUserInfo + # @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 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::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2mainExportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2mainExportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2mainExportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2mainExportErrorsConfig, decorator: Google::Apis::RetailV2beta::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::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2mainImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2mainImportErrorsConfig::Representation + + end + end + + class GoogleCloudRetailV2mainImportUserEventsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :error_samples, as: 'errorSamples', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::GoogleRpcStatus::Representation + + property :errors_config, as: 'errorsConfig', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2mainImportErrorsConfig, decorator: Google::Apis::RetailV2beta::GoogleCloudRetailV2mainImportErrorsConfig::Representation + + property :import_summary, as: 'importSummary', class: Google::Apis::RetailV2beta::GoogleCloudRetailV2mainUserEventImportSummary, decorator: Google::Apis::RetailV2beta::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::RetailV2beta::GoogleLongrunningOperation, decorator: Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + + end + end + + class GoogleLongrunningOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::RetailV2beta::GoogleRpcStatus, decorator: Google::Apis::RetailV2beta::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_v2beta/lib/google/apis/retail_v2beta/service.rb b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/service.rb new file mode 100644 index 000000000..39670efc9 --- /dev/null +++ b/generated/google-apis-retail_v2beta/lib/google/apis/retail_v2beta/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 RetailV2beta + # 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_v2beta' + # + # Retail = Google::Apis::RetailV2beta # 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_v2beta', + client_version: Google::Apis::RetailV2beta::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::RetailV2beta::GoogleCloudRetailV2betaListCatalogsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListCatalogsResponse] + # + # @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, 'v2beta/{+parent}/catalogs', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListCatalogsResponse::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaListCatalogsResponse + 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::RetailV2beta::GoogleCloudRetailV2betaCatalog] google_cloud_retail_v2beta_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::RetailV2beta::GoogleCloudRetailV2betaCatalog] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalog] + # + # @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_v2beta_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2beta/{+name}', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalog::Representation + command.request_object = google_cloud_retail_v2beta_catalog_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalog::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalog + 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::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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, 'v2beta/{+name}', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleCloudRetailV2betaProduct] google_cloud_retail_v2beta_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::RetailV2beta::GoogleCloudRetailV2betaProduct] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct] + # + # @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_v2beta_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+parent}/products', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct::Representation + command.request_object = google_cloud_retail_v2beta_product_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct + 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::RetailV2beta::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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, 'v2beta/{+name}', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleCloudRetailV2betaProduct] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct] + # + # @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, 'v2beta/{+name}', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct + 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::RetailV2beta::GoogleCloudRetailV2betaImportProductsRequest] google_cloud_retail_v2beta_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::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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_v2beta_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+parent}/products:import', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportProductsRequest::Representation + command.request_object = google_cloud_retail_v2beta_import_products_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleCloudRetailV2betaProduct] google_cloud_retail_v2beta_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::RetailV2beta::GoogleCloudRetailV2betaProduct] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct] + # + # @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_v2beta_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2beta/{+name}', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct::Representation + command.request_object = google_cloud_retail_v2beta_product_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct + 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::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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, 'v2beta/{+name}', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleLongrunningListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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, 'v2beta/{+name}/operations', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningListOperationsResponse::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleCloudRetailV2betaPredictRequest] google_cloud_retail_v2beta_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::RetailV2beta::GoogleCloudRetailV2betaPredictResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictResponse] + # + # @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_v2beta_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+placement}:predict', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictRequest::Representation + command.request_object = google_cloud_retail_v2beta_predict_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictResponse::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictResponse + 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::RetailV2beta::GoogleApiHttpBody] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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, 'v2beta/{+parent}/userEvents:collect', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleApiHttpBody::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleCloudRetailV2betaImportUserEventsRequest] google_cloud_retail_v2beta_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::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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_v2beta_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+parent}/userEvents:import', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportUserEventsRequest::Representation + command.request_object = google_cloud_retail_v2beta_import_user_events_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleCloudRetailV2betaPurgeUserEventsRequest] google_cloud_retail_v2beta_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::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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_v2beta_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+parent}/userEvents:purge', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPurgeUserEventsRequest::Representation + command.request_object = google_cloud_retail_v2beta_purge_user_events_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleCloudRetailV2betaRejoinUserEventsRequest] google_cloud_retail_v2beta_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::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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_v2beta_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+parent}/userEvents:rejoin', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRejoinUserEventsRequest::Representation + command.request_object = google_cloud_retail_v2beta_rejoin_user_events_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleCloudRetailV2betaUserEvent] google_cloud_retail_v2beta_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::RetailV2beta::GoogleCloudRetailV2betaUserEvent] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEvent] + # + # @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_v2beta_user_event_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+parent}/userEvents:write', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEvent::Representation + command.request_object = google_cloud_retail_v2beta_user_event_object + command.response_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEvent::Representation + command.response_class = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEvent + 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::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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, 'v2beta/{+name}', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::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::RetailV2beta::GoogleLongrunningListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::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, 'v2beta/{+name}/operations', options) + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningListOperationsResponse::Representation + command.response_class = Google::Apis::RetailV2beta::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_v2beta/spec/generated_spec.rb b/generated/google-apis-retail_v2beta/spec/generated_spec.rb new file mode 100644 index 000000000..135d4dece --- /dev/null +++ b/generated/google-apis-retail_v2beta/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::RetailV2beta" do + # Minimal test just to ensure no syntax errors in generated code + it "should load" do + expect do + require "google/apis/retail_v2beta" + end.not_to raise_error + expect do + Google::Apis::RetailV2beta::CloudRetailService.new + end.not_to raise_error + end +end diff --git a/generated/google-apis-run_v1alpha1/synth.metadata b/generated/google-apis-run_v1alpha1/synth.metadata index 3e2d7a7c9..6336bab0b 100644 --- a/generated/google-apis-run_v1alpha1/synth.metadata +++ b/generated/google-apis-run_v1alpha1/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-ruby-client.git", - "sha": "5cf13c7513f641f61fc53c7b2adda475ab7ba41a" + "sha": "6a65c71c4437d5f9e766960419b37cd84c9f4584" } } ]