google-apis-retail_v2alpha 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6fe4eb649f03815515fbd268a21ca83eda9de29f95935ea5b924363087f10b35
4
+ data.tar.gz: 90d1c696c295b80aa2ba481afc62e197de37880ceda8d9e899b714835af386a5
5
+ SHA512:
6
+ metadata.gz: fe9e141627dbe2b5c2362acfd8800cb3a7a26fc3fb0b5123d8b22febc2b72c5dd90f4abbecf9cb132eb6bd83b6157e3c56c63fadde9e8a672106365942333e36
7
+ data.tar.gz: 81df18cda3eaadfc60ef65c39d998739d0c47a9b9c933a05f840eddf443447bb222a528cd42e0d38bda4388f5427855a497238c925d9835b89d0032b1fe1aa51
data/.yardopts ADDED
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-retail_v2alpha
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/retail_v2alpha/*.rb
9
+ lib/google/apis/retail_v2alpha.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Release history for google-apis-retail_v2alpha
2
+
3
+ ### v0.1.0 (2021-02-05)
4
+
5
+ * Regenerated from discovery document revision 20210129
6
+ * Regenerated using generator version 0.1.2
7
+ * Unspecified changes
8
+
data/LICENSE.md ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/OVERVIEW.md ADDED
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V2alpha of the Retail API
2
+
3
+ This is a simple client library for version V2alpha of the Retail API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/retail.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-retail_v2alpha', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-retail_v2alpha
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/retail_v2alpha"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::RetailV2alpha::CloudRetailService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Retail service in particular.)
67
+
68
+ For reference information on specific calls in the Retail API, see the {Google::Apis::RetailV2alpha::CloudRetailService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-retail_v2alpha`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://cloud.google.com/recommendations) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/retail_v2alpha"
@@ -0,0 +1,38 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/retail_v2alpha/service.rb'
16
+ require 'google/apis/retail_v2alpha/classes.rb'
17
+ require 'google/apis/retail_v2alpha/representations.rb'
18
+ require 'google/apis/retail_v2alpha/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Retail API
23
+ #
24
+ # Cloud Retail service enables customers to build end-to-end personalized
25
+ # recommendation systems without requiring a high level of expertise in machine
26
+ # learning, recommendation system, or Google Cloud.
27
+ #
28
+ # @see https://cloud.google.com/recommendations
29
+ module RetailV2alpha
30
+ # Version of the Retail API this client connects to.
31
+ # This is NOT the gem version.
32
+ VERSION = 'V2alpha'
33
+
34
+ # View and manage your data across Google Cloud Platform services
35
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,2746 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module RetailV2alpha
24
+
25
+ # Message that represents an arbitrary HTTP body. It should only be used for
26
+ # payload formats that can't be represented as JSON, such as raw binary or an
27
+ # HTML page. This message can be used both in streaming and non-streaming API
28
+ # methods in the request as well as the response. It can be used as a top-level
29
+ # request field, which is convenient if one wants to extract parameters from
30
+ # either the URL or HTTP template into the request fields and also want access
31
+ # to the raw HTTP body. Example: message GetResourceRequest ` // A unique
32
+ # request id. string request_id = 1; // The raw HTTP body is bound to this field.
33
+ # google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
34
+ # GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
35
+ # UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
36
+ # with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
37
+ # api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
38
+ # google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
39
+ # only changes how the request and response bodies are handled, all other
40
+ # features will continue to work unchanged.
41
+ class GoogleApiHttpBody
42
+ include Google::Apis::Core::Hashable
43
+
44
+ # The HTTP Content-Type header value specifying the content type of the body.
45
+ # Corresponds to the JSON property `contentType`
46
+ # @return [String]
47
+ attr_accessor :content_type
48
+
49
+ # The HTTP request/response body as raw binary.
50
+ # Corresponds to the JSON property `data`
51
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
52
+ # @return [String]
53
+ attr_accessor :data
54
+
55
+ # Application specific response metadata. Must be set in the first response for
56
+ # streaming APIs.
57
+ # Corresponds to the JSON property `extensions`
58
+ # @return [Array<Hash<String,Object>>]
59
+ attr_accessor :extensions
60
+
61
+ def initialize(**args)
62
+ update!(**args)
63
+ end
64
+
65
+ # Update properties of this object
66
+ def update!(**args)
67
+ @content_type = args[:content_type] if args.key?(:content_type)
68
+ @data = args[:data] if args.key?(:data)
69
+ @extensions = args[:extensions] if args.key?(:extensions)
70
+ end
71
+ end
72
+
73
+ # A description of the context in which an error occurred.
74
+ class GoogleCloudRetailLoggingErrorContext
75
+ include Google::Apis::Core::Hashable
76
+
77
+ # HTTP request data that is related to a reported error.
78
+ # Corresponds to the JSON property `httpRequest`
79
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingHttpRequestContext]
80
+ attr_accessor :http_request
81
+
82
+ # Indicates a location in the source code of the service for which errors are
83
+ # reported.
84
+ # Corresponds to the JSON property `reportLocation`
85
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingSourceLocation]
86
+ attr_accessor :report_location
87
+
88
+ def initialize(**args)
89
+ update!(**args)
90
+ end
91
+
92
+ # Update properties of this object
93
+ def update!(**args)
94
+ @http_request = args[:http_request] if args.key?(:http_request)
95
+ @report_location = args[:report_location] if args.key?(:report_location)
96
+ end
97
+ end
98
+
99
+ # An error log which is reported to the Error Reporting system. This proto a
100
+ # superset of google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent.
101
+ class GoogleCloudRetailLoggingErrorLog
102
+ include Google::Apis::Core::Hashable
103
+
104
+ # A description of the context in which an error occurred.
105
+ # Corresponds to the JSON property `context`
106
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingErrorContext]
107
+ attr_accessor :context
108
+
109
+ # The error payload that is populated on LRO import APIs. Including: "google.
110
+ # cloud.retail.v2.ProductService.ImportProducts" "google.cloud.retail.v2.
111
+ # EventService.ImportUserEvents"
112
+ # Corresponds to the JSON property `importPayload`
113
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingImportErrorContext]
114
+ attr_accessor :import_payload
115
+
116
+ # A message describing the error.
117
+ # Corresponds to the JSON property `message`
118
+ # @return [String]
119
+ attr_accessor :message
120
+
121
+ # The API request payload, represented as a protocol buffer. Most API request
122
+ # types are supported. For example: "type.googleapis.com/google.cloud.retail.v2.
123
+ # ProductService.CreateProductRequest" "type.googleapis.com/google.cloud.retail.
124
+ # v2.UserEventService.WriteUserEventRequest"
125
+ # Corresponds to the JSON property `requestPayload`
126
+ # @return [Hash<String,Object>]
127
+ attr_accessor :request_payload
128
+
129
+ # The API response payload, represented as a protocol buffer. This is used to
130
+ # log some "soft errors", where the response is valid but we consider there are
131
+ # some quality issues like unjoined events. The following API responses are
132
+ # supported and no PII is included: "google.cloud.retail.v2.PredictionService.
133
+ # Predict" "google.cloud.retail.v2.UserEventService.WriteUserEvent" "google.
134
+ # cloud.retail.v2.UserEventService.CollectUserEvent"
135
+ # Corresponds to the JSON property `responsePayload`
136
+ # @return [Hash<String,Object>]
137
+ attr_accessor :response_payload
138
+
139
+ # Describes a running service that sends errors.
140
+ # Corresponds to the JSON property `serviceContext`
141
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailLoggingServiceContext]
142
+ attr_accessor :service_context
143
+
144
+ # The `Status` type defines a logical error model that is suitable for different
145
+ # programming environments, including REST APIs and RPC APIs. It is used by [
146
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
147
+ # data: error code, error message, and error details. You can find out more
148
+ # about this error model and how to work with it in the [API Design Guide](https:
149
+ # //cloud.google.com/apis/design/errors).
150
+ # Corresponds to the JSON property `status`
151
+ # @return [Google::Apis::RetailV2alpha::GoogleRpcStatus]
152
+ attr_accessor :status
153
+
154
+ def initialize(**args)
155
+ update!(**args)
156
+ end
157
+
158
+ # Update properties of this object
159
+ def update!(**args)
160
+ @context = args[:context] if args.key?(:context)
161
+ @import_payload = args[:import_payload] if args.key?(:import_payload)
162
+ @message = args[:message] if args.key?(:message)
163
+ @request_payload = args[:request_payload] if args.key?(:request_payload)
164
+ @response_payload = args[:response_payload] if args.key?(:response_payload)
165
+ @service_context = args[:service_context] if args.key?(:service_context)
166
+ @status = args[:status] if args.key?(:status)
167
+ end
168
+ end
169
+
170
+ # HTTP request data that is related to a reported error.
171
+ class GoogleCloudRetailLoggingHttpRequestContext
172
+ include Google::Apis::Core::Hashable
173
+
174
+ # The HTTP response status code for the request.
175
+ # Corresponds to the JSON property `responseStatusCode`
176
+ # @return [Fixnum]
177
+ attr_accessor :response_status_code
178
+
179
+ def initialize(**args)
180
+ update!(**args)
181
+ end
182
+
183
+ # Update properties of this object
184
+ def update!(**args)
185
+ @response_status_code = args[:response_status_code] if args.key?(:response_status_code)
186
+ end
187
+ end
188
+
189
+ # The error payload that is populated on LRO import APIs. Including: "google.
190
+ # cloud.retail.v2.ProductService.ImportProducts" "google.cloud.retail.v2.
191
+ # EventService.ImportUserEvents"
192
+ class GoogleCloudRetailLoggingImportErrorContext
193
+ include Google::Apis::Core::Hashable
194
+
195
+ # The detailed content which caused the error on importing a catalog item.
196
+ # Corresponds to the JSON property `catalogItem`
197
+ # @return [String]
198
+ attr_accessor :catalog_item
199
+
200
+ # GCS file path of the import source. Can be set for batch operation error.
201
+ # Corresponds to the JSON property `gcsPath`
202
+ # @return [String]
203
+ attr_accessor :gcs_path
204
+
205
+ # Line number of the content in file. Should be empty for permission or batch
206
+ # operation error.
207
+ # Corresponds to the JSON property `lineNumber`
208
+ # @return [String]
209
+ attr_accessor :line_number
210
+
211
+ # The operation resource name of the LRO.
212
+ # Corresponds to the JSON property `operationName`
213
+ # @return [String]
214
+ attr_accessor :operation_name
215
+
216
+ # The detailed content which caused the error on importing a product.
217
+ # Corresponds to the JSON property `product`
218
+ # @return [String]
219
+ attr_accessor :product
220
+
221
+ # The detailed content which caused the error on importing a user event.
222
+ # Corresponds to the JSON property `userEvent`
223
+ # @return [String]
224
+ attr_accessor :user_event
225
+
226
+ def initialize(**args)
227
+ update!(**args)
228
+ end
229
+
230
+ # Update properties of this object
231
+ def update!(**args)
232
+ @catalog_item = args[:catalog_item] if args.key?(:catalog_item)
233
+ @gcs_path = args[:gcs_path] if args.key?(:gcs_path)
234
+ @line_number = args[:line_number] if args.key?(:line_number)
235
+ @operation_name = args[:operation_name] if args.key?(:operation_name)
236
+ @product = args[:product] if args.key?(:product)
237
+ @user_event = args[:user_event] if args.key?(:user_event)
238
+ end
239
+ end
240
+
241
+ # Describes a running service that sends errors.
242
+ class GoogleCloudRetailLoggingServiceContext
243
+ include Google::Apis::Core::Hashable
244
+
245
+ # An identifier of the service. For example, "retail.googleapis.com".
246
+ # Corresponds to the JSON property `service`
247
+ # @return [String]
248
+ attr_accessor :service
249
+
250
+ def initialize(**args)
251
+ update!(**args)
252
+ end
253
+
254
+ # Update properties of this object
255
+ def update!(**args)
256
+ @service = args[:service] if args.key?(:service)
257
+ end
258
+ end
259
+
260
+ # Indicates a location in the source code of the service for which errors are
261
+ # reported.
262
+ class GoogleCloudRetailLoggingSourceLocation
263
+ include Google::Apis::Core::Hashable
264
+
265
+ # Human-readable name of a function or method. For example, "google.cloud.retail.
266
+ # v2.UserEventService.ImportUserEvents".
267
+ # Corresponds to the JSON property `functionName`
268
+ # @return [String]
269
+ attr_accessor :function_name
270
+
271
+ def initialize(**args)
272
+ update!(**args)
273
+ end
274
+
275
+ # Update properties of this object
276
+ def update!(**args)
277
+ @function_name = args[:function_name] if args.key?(:function_name)
278
+ end
279
+ end
280
+
281
+ # Configuration of destination for Import related errors.
282
+ class GoogleCloudRetailV2ImportErrorsConfig
283
+ include Google::Apis::Core::Hashable
284
+
285
+ # Google Cloud Storage path for import errors. This must be an empty, existing
286
+ # Cloud Storage bucket. Import errors will be written to a file in this bucket,
287
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
288
+ # Corresponds to the JSON property `gcsPrefix`
289
+ # @return [String]
290
+ attr_accessor :gcs_prefix
291
+
292
+ def initialize(**args)
293
+ update!(**args)
294
+ end
295
+
296
+ # Update properties of this object
297
+ def update!(**args)
298
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
299
+ end
300
+ end
301
+
302
+ # Metadata related to the progress of the Import operation. This will be
303
+ # returned by the google.longrunning.Operation.metadata field.
304
+ class GoogleCloudRetailV2ImportMetadata
305
+ include Google::Apis::Core::Hashable
306
+
307
+ # Operation create time.
308
+ # Corresponds to the JSON property `createTime`
309
+ # @return [String]
310
+ attr_accessor :create_time
311
+
312
+ # Count of entries that encountered errors while processing.
313
+ # Corresponds to the JSON property `failureCount`
314
+ # @return [Fixnum]
315
+ attr_accessor :failure_count
316
+
317
+ # Count of entries that were processed successfully.
318
+ # Corresponds to the JSON property `successCount`
319
+ # @return [Fixnum]
320
+ attr_accessor :success_count
321
+
322
+ # Operation last update time. If the operation is done, this is also the finish
323
+ # time.
324
+ # Corresponds to the JSON property `updateTime`
325
+ # @return [String]
326
+ attr_accessor :update_time
327
+
328
+ def initialize(**args)
329
+ update!(**args)
330
+ end
331
+
332
+ # Update properties of this object
333
+ def update!(**args)
334
+ @create_time = args[:create_time] if args.key?(:create_time)
335
+ @failure_count = args[:failure_count] if args.key?(:failure_count)
336
+ @success_count = args[:success_count] if args.key?(:success_count)
337
+ @update_time = args[:update_time] if args.key?(:update_time)
338
+ end
339
+ end
340
+
341
+ # Response of the ImportProductsRequest. If the long running operation is done,
342
+ # then this message is returned by the google.longrunning.Operations.response
343
+ # field if the operation was successful.
344
+ class GoogleCloudRetailV2ImportProductsResponse
345
+ include Google::Apis::Core::Hashable
346
+
347
+ # A sample of errors encountered while processing the request.
348
+ # Corresponds to the JSON property `errorSamples`
349
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
350
+ attr_accessor :error_samples
351
+
352
+ # Configuration of destination for Import related errors.
353
+ # Corresponds to the JSON property `errorsConfig`
354
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2ImportErrorsConfig]
355
+ attr_accessor :errors_config
356
+
357
+ def initialize(**args)
358
+ update!(**args)
359
+ end
360
+
361
+ # Update properties of this object
362
+ def update!(**args)
363
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
364
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
365
+ end
366
+ end
367
+
368
+ # Response of the ImportUserEventsRequest. If the long running operation was
369
+ # successful, then this message is returned by the google.longrunning.Operations.
370
+ # response field if the operation was successful.
371
+ class GoogleCloudRetailV2ImportUserEventsResponse
372
+ include Google::Apis::Core::Hashable
373
+
374
+ # A sample of errors encountered while processing the request.
375
+ # Corresponds to the JSON property `errorSamples`
376
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
377
+ attr_accessor :error_samples
378
+
379
+ # Configuration of destination for Import related errors.
380
+ # Corresponds to the JSON property `errorsConfig`
381
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2ImportErrorsConfig]
382
+ attr_accessor :errors_config
383
+
384
+ # A summary of import result. The UserEventImportSummary summarizes the import
385
+ # status for user events.
386
+ # Corresponds to the JSON property `importSummary`
387
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2UserEventImportSummary]
388
+ attr_accessor :import_summary
389
+
390
+ def initialize(**args)
391
+ update!(**args)
392
+ end
393
+
394
+ # Update properties of this object
395
+ def update!(**args)
396
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
397
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
398
+ @import_summary = args[:import_summary] if args.key?(:import_summary)
399
+ end
400
+ end
401
+
402
+ # Metadata related to the progress of the Purge operation. This will be returned
403
+ # by the google.longrunning.Operation.metadata field.
404
+ class GoogleCloudRetailV2PurgeMetadata
405
+ include Google::Apis::Core::Hashable
406
+
407
+ def initialize(**args)
408
+ update!(**args)
409
+ end
410
+
411
+ # Update properties of this object
412
+ def update!(**args)
413
+ end
414
+ end
415
+
416
+ # Response of the PurgeUserEventsRequest. If the long running operation is
417
+ # successfully done, then this message is returned by the google.longrunning.
418
+ # Operations.response field.
419
+ class GoogleCloudRetailV2PurgeUserEventsResponse
420
+ include Google::Apis::Core::Hashable
421
+
422
+ # The total count of events purged as a result of the operation.
423
+ # Corresponds to the JSON property `purgedEventsCount`
424
+ # @return [Fixnum]
425
+ attr_accessor :purged_events_count
426
+
427
+ def initialize(**args)
428
+ update!(**args)
429
+ end
430
+
431
+ # Update properties of this object
432
+ def update!(**args)
433
+ @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
434
+ end
435
+ end
436
+
437
+ # Metadata for RejoinUserEvents method.
438
+ class GoogleCloudRetailV2RejoinUserEventsMetadata
439
+ include Google::Apis::Core::Hashable
440
+
441
+ def initialize(**args)
442
+ update!(**args)
443
+ end
444
+
445
+ # Update properties of this object
446
+ def update!(**args)
447
+ end
448
+ end
449
+
450
+ # Response message for RejoinUserEvents method.
451
+ class GoogleCloudRetailV2RejoinUserEventsResponse
452
+ include Google::Apis::Core::Hashable
453
+
454
+ # Number of user events that were joined with latest product catalog.
455
+ # Corresponds to the JSON property `rejoinedUserEventsCount`
456
+ # @return [Fixnum]
457
+ attr_accessor :rejoined_user_events_count
458
+
459
+ def initialize(**args)
460
+ update!(**args)
461
+ end
462
+
463
+ # Update properties of this object
464
+ def update!(**args)
465
+ @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
466
+ end
467
+ end
468
+
469
+ # A summary of import result. The UserEventImportSummary summarizes the import
470
+ # status for user events.
471
+ class GoogleCloudRetailV2UserEventImportSummary
472
+ include Google::Apis::Core::Hashable
473
+
474
+ # Count of user events imported with complete existing catalog information.
475
+ # Corresponds to the JSON property `joinedEventsCount`
476
+ # @return [Fixnum]
477
+ attr_accessor :joined_events_count
478
+
479
+ # Count of user events imported, but with catalog information not found in the
480
+ # imported catalog.
481
+ # Corresponds to the JSON property `unjoinedEventsCount`
482
+ # @return [Fixnum]
483
+ attr_accessor :unjoined_events_count
484
+
485
+ def initialize(**args)
486
+ update!(**args)
487
+ end
488
+
489
+ # Update properties of this object
490
+ def update!(**args)
491
+ @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count)
492
+ @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count)
493
+ end
494
+ end
495
+
496
+ # BigQuery source import data from.
497
+ class GoogleCloudRetailV2alphaBigQuerySource
498
+ include Google::Apis::Core::Hashable
499
+
500
+ # The schema to use when parsing the data from the source. Supported values for
501
+ # product imports: * `product` (default): One JSON Product per line. Each
502
+ # product must have a valid Product.id. * `product_merchant_center`: See [
503
+ # Importing catalog data from Merchant Center](https://cloud.google.com/retail/
504
+ # recommendations-ai/docs/upload-catalog#mc). Supported values for user events
505
+ # imports: * `user_event` (default): One JSON UserEvent per line. * `
506
+ # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719?
507
+ # hl=en.
508
+ # Corresponds to the JSON property `dataSchema`
509
+ # @return [String]
510
+ attr_accessor :data_schema
511
+
512
+ # Required. The BigQuery data set to copy the data from with a length limit of 1,
513
+ # 024 characters.
514
+ # Corresponds to the JSON property `datasetId`
515
+ # @return [String]
516
+ attr_accessor :dataset_id
517
+
518
+ # Intermediate Cloud Storage directory used for the import with a length limit
519
+ # of 2,000 characters. Can be specified if one wants to have the BigQuery export
520
+ # to a specific Cloud Storage directory.
521
+ # Corresponds to the JSON property `gcsStagingDir`
522
+ # @return [String]
523
+ attr_accessor :gcs_staging_dir
524
+
525
+ # The project id (can be project # or id) that the BigQuery source is in with a
526
+ # length limit of 128 characters. If not specified, inherits the project id from
527
+ # the parent request.
528
+ # Corresponds to the JSON property `projectId`
529
+ # @return [String]
530
+ attr_accessor :project_id
531
+
532
+ # Required. The BigQuery table to copy the data from with a length limit of 1,
533
+ # 024 characters.
534
+ # Corresponds to the JSON property `tableId`
535
+ # @return [String]
536
+ attr_accessor :table_id
537
+
538
+ def initialize(**args)
539
+ update!(**args)
540
+ end
541
+
542
+ # Update properties of this object
543
+ def update!(**args)
544
+ @data_schema = args[:data_schema] if args.key?(:data_schema)
545
+ @dataset_id = args[:dataset_id] if args.key?(:dataset_id)
546
+ @gcs_staging_dir = args[:gcs_staging_dir] if args.key?(:gcs_staging_dir)
547
+ @project_id = args[:project_id] if args.key?(:project_id)
548
+ @table_id = args[:table_id] if args.key?(:table_id)
549
+ end
550
+ end
551
+
552
+ # The catalog configuration.
553
+ class GoogleCloudRetailV2alphaCatalog
554
+ include Google::Apis::Core::Hashable
555
+
556
+ # Required. Immutable. The catalog display name. This field must be a UTF-8
557
+ # encoded string with a length limit of 128 characters. Otherwise, an
558
+ # INVALID_ARGUMENT error is returned.
559
+ # Corresponds to the JSON property `displayName`
560
+ # @return [String]
561
+ attr_accessor :display_name
562
+
563
+ # Required. Immutable. The fully qualified resource name of the catalog.
564
+ # Corresponds to the JSON property `name`
565
+ # @return [String]
566
+ attr_accessor :name
567
+
568
+ # Configures what level the product should be uploaded with regards to how users
569
+ # will be send events and how predictions will be made.
570
+ # Corresponds to the JSON property `productLevelConfig`
571
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductLevelConfig]
572
+ attr_accessor :product_level_config
573
+
574
+ def initialize(**args)
575
+ update!(**args)
576
+ end
577
+
578
+ # Update properties of this object
579
+ def update!(**args)
580
+ @display_name = args[:display_name] if args.key?(:display_name)
581
+ @name = args[:name] if args.key?(:name)
582
+ @product_level_config = args[:product_level_config] if args.key?(:product_level_config)
583
+ end
584
+ end
585
+
586
+ # A custom attribute that is not explicitly modeled in Product.
587
+ class GoogleCloudRetailV2alphaCustomAttribute
588
+ include Google::Apis::Core::Hashable
589
+
590
+ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when
591
+ # the key is "lengths_cm". At most 400 values are allowed.Otherwise, an
592
+ # INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be
593
+ # set. Otherwise, an INVALID_ARGUMENT error is returned.
594
+ # Corresponds to the JSON property `numbers`
595
+ # @return [Array<Float>]
596
+ attr_accessor :numbers
597
+
598
+ # The textual values of this custom attribute. For example, `["yellow", "green"]`
599
+ # when the key is "color". At most 400 values are allowed. Empty values are not
600
+ # allowed. Each value must be a UTF-8 encoded string with a length limit of 256
601
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of
602
+ # text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is
603
+ # returned.
604
+ # Corresponds to the JSON property `text`
605
+ # @return [Array<String>]
606
+ attr_accessor :text
607
+
608
+ def initialize(**args)
609
+ update!(**args)
610
+ end
611
+
612
+ # Update properties of this object
613
+ def update!(**args)
614
+ @numbers = args[:numbers] if args.key?(:numbers)
615
+ @text = args[:text] if args.key?(:text)
616
+ end
617
+ end
618
+
619
+ # Configuration of destination for Export related errors.
620
+ class GoogleCloudRetailV2alphaExportErrorsConfig
621
+ include Google::Apis::Core::Hashable
622
+
623
+ # Google Cloud Storage path for import errors. This must be an empty, existing
624
+ # Cloud Storage bucket. Export errors will be written to a file in this bucket,
625
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
626
+ # Corresponds to the JSON property `gcsPrefix`
627
+ # @return [String]
628
+ attr_accessor :gcs_prefix
629
+
630
+ def initialize(**args)
631
+ update!(**args)
632
+ end
633
+
634
+ # Update properties of this object
635
+ def update!(**args)
636
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
637
+ end
638
+ end
639
+
640
+ # Metadata related to the progress of the Export operation. This will be
641
+ # returned by the google.longrunning.Operation.metadata field.
642
+ class GoogleCloudRetailV2alphaExportMetadata
643
+ include Google::Apis::Core::Hashable
644
+
645
+ # Operation create time.
646
+ # Corresponds to the JSON property `createTime`
647
+ # @return [String]
648
+ attr_accessor :create_time
649
+
650
+ # Operation last update time. If the operation is done, this is also the finish
651
+ # time.
652
+ # Corresponds to the JSON property `updateTime`
653
+ # @return [String]
654
+ attr_accessor :update_time
655
+
656
+ def initialize(**args)
657
+ update!(**args)
658
+ end
659
+
660
+ # Update properties of this object
661
+ def update!(**args)
662
+ @create_time = args[:create_time] if args.key?(:create_time)
663
+ @update_time = args[:update_time] if args.key?(:update_time)
664
+ end
665
+ end
666
+
667
+ # Response of the ExportProductsRequest. If the long running operation is done,
668
+ # then this message is returned by the google.longrunning.Operations.response
669
+ # field if the operation was successful.
670
+ class GoogleCloudRetailV2alphaExportProductsResponse
671
+ include Google::Apis::Core::Hashable
672
+
673
+ # A sample of errors encountered while processing the request.
674
+ # Corresponds to the JSON property `errorSamples`
675
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
676
+ attr_accessor :error_samples
677
+
678
+ # Configuration of destination for Export related errors.
679
+ # Corresponds to the JSON property `errorsConfig`
680
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportErrorsConfig]
681
+ attr_accessor :errors_config
682
+
683
+ def initialize(**args)
684
+ update!(**args)
685
+ end
686
+
687
+ # Update properties of this object
688
+ def update!(**args)
689
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
690
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
691
+ end
692
+ end
693
+
694
+ # Response of the ExportUserEventsRequest. If the long running operation was
695
+ # successful, then this message is returned by the google.longrunning.Operations.
696
+ # response field if the operation was successful.
697
+ class GoogleCloudRetailV2alphaExportUserEventsResponse
698
+ include Google::Apis::Core::Hashable
699
+
700
+ # A sample of errors encountered while processing the request.
701
+ # Corresponds to the JSON property `errorSamples`
702
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
703
+ attr_accessor :error_samples
704
+
705
+ # Configuration of destination for Export related errors.
706
+ # Corresponds to the JSON property `errorsConfig`
707
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportErrorsConfig]
708
+ attr_accessor :errors_config
709
+
710
+ def initialize(**args)
711
+ update!(**args)
712
+ end
713
+
714
+ # Update properties of this object
715
+ def update!(**args)
716
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
717
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
718
+ end
719
+ end
720
+
721
+ # Google Cloud Storage location for input content. format.
722
+ class GoogleCloudRetailV2alphaGcsSource
723
+ include Google::Apis::Core::Hashable
724
+
725
+ # The schema to use when parsing the data from the source. Supported values for
726
+ # product imports: * `product` (default): One JSON Product per line. Each
727
+ # product must have a valid Product.id. * `product_merchant_center`: See [
728
+ # Importing catalog data from Merchant Center](https://cloud.google.com/retail/
729
+ # recommendations-ai/docs/upload-catalog#mcc). Supported values for user events
730
+ # imports: * `user_event` (default): One JSON UserEvent per line. * `
731
+ # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719?
732
+ # hl=en.
733
+ # Corresponds to the JSON property `dataSchema`
734
+ # @return [String]
735
+ attr_accessor :data_schema
736
+
737
+ # Required. Google Cloud Storage URIs to input files. URI can be up to 2000
738
+ # characters long. URIs can match the full object path (for example, `gs://
739
+ # bucket/directory/object.json`) or a pattern matching one or more files, such
740
+ # as `gs://bucket/directory/*.json`. A request can contain at most 100 files,
741
+ # and each file can be up to 2 GB. See [Importing product information](https://
742
+ # cloud.google.com/recommendations-ai/docs/upload-catalog) for the expected file
743
+ # format and setup instructions.
744
+ # Corresponds to the JSON property `inputUris`
745
+ # @return [Array<String>]
746
+ attr_accessor :input_uris
747
+
748
+ def initialize(**args)
749
+ update!(**args)
750
+ end
751
+
752
+ # Update properties of this object
753
+ def update!(**args)
754
+ @data_schema = args[:data_schema] if args.key?(:data_schema)
755
+ @input_uris = args[:input_uris] if args.key?(:input_uris)
756
+ end
757
+ end
758
+
759
+ # Product thumbnail/detail image.
760
+ class GoogleCloudRetailV2alphaImage
761
+ include Google::Apis::Core::Hashable
762
+
763
+ # Height of the image in number of pixels. This field must be nonnegative.
764
+ # Otherwise, an INVALID_ARGUMENT error is returned.
765
+ # Corresponds to the JSON property `height`
766
+ # @return [Fixnum]
767
+ attr_accessor :height
768
+
769
+ # Required. URI of the image. This field must be a valid UTF-8 encoded URI with
770
+ # a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
771
+ # returned. Google Merchant Center property [image_link](https://support.google.
772
+ # com/merchants/answer/6324350). Schema.org property [Product.image](https://
773
+ # schema.org/image).
774
+ # Corresponds to the JSON property `uri`
775
+ # @return [String]
776
+ attr_accessor :uri
777
+
778
+ # Width of the image in number of pixels. This field must be nonnegative.
779
+ # Otherwise, an INVALID_ARGUMENT error is returned.
780
+ # Corresponds to the JSON property `width`
781
+ # @return [Fixnum]
782
+ attr_accessor :width
783
+
784
+ def initialize(**args)
785
+ update!(**args)
786
+ end
787
+
788
+ # Update properties of this object
789
+ def update!(**args)
790
+ @height = args[:height] if args.key?(:height)
791
+ @uri = args[:uri] if args.key?(:uri)
792
+ @width = args[:width] if args.key?(:width)
793
+ end
794
+ end
795
+
796
+ # Configuration of destination for Import related errors.
797
+ class GoogleCloudRetailV2alphaImportErrorsConfig
798
+ include Google::Apis::Core::Hashable
799
+
800
+ # Google Cloud Storage path for import errors. This must be an empty, existing
801
+ # Cloud Storage bucket. Import errors will be written to a file in this bucket,
802
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
803
+ # Corresponds to the JSON property `gcsPrefix`
804
+ # @return [String]
805
+ attr_accessor :gcs_prefix
806
+
807
+ def initialize(**args)
808
+ update!(**args)
809
+ end
810
+
811
+ # Update properties of this object
812
+ def update!(**args)
813
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
814
+ end
815
+ end
816
+
817
+ # Metadata related to the progress of the Import operation. This will be
818
+ # returned by the google.longrunning.Operation.metadata field.
819
+ class GoogleCloudRetailV2alphaImportMetadata
820
+ include Google::Apis::Core::Hashable
821
+
822
+ # Operation create time.
823
+ # Corresponds to the JSON property `createTime`
824
+ # @return [String]
825
+ attr_accessor :create_time
826
+
827
+ # Count of entries that encountered errors while processing.
828
+ # Corresponds to the JSON property `failureCount`
829
+ # @return [Fixnum]
830
+ attr_accessor :failure_count
831
+
832
+ # Count of entries that were processed successfully.
833
+ # Corresponds to the JSON property `successCount`
834
+ # @return [Fixnum]
835
+ attr_accessor :success_count
836
+
837
+ # Operation last update time. If the operation is done, this is also the finish
838
+ # time.
839
+ # Corresponds to the JSON property `updateTime`
840
+ # @return [String]
841
+ attr_accessor :update_time
842
+
843
+ def initialize(**args)
844
+ update!(**args)
845
+ end
846
+
847
+ # Update properties of this object
848
+ def update!(**args)
849
+ @create_time = args[:create_time] if args.key?(:create_time)
850
+ @failure_count = args[:failure_count] if args.key?(:failure_count)
851
+ @success_count = args[:success_count] if args.key?(:success_count)
852
+ @update_time = args[:update_time] if args.key?(:update_time)
853
+ end
854
+ end
855
+
856
+ # Request message for Import methods.
857
+ class GoogleCloudRetailV2alphaImportProductsRequest
858
+ include Google::Apis::Core::Hashable
859
+
860
+ # Configuration of destination for Import related errors.
861
+ # Corresponds to the JSON property `errorsConfig`
862
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig]
863
+ attr_accessor :errors_config
864
+
865
+ # The input config source for products.
866
+ # Corresponds to the JSON property `inputConfig`
867
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInputConfig]
868
+ attr_accessor :input_config
869
+
870
+ # Indicates which fields in the provided imported 'products' to update. If not
871
+ # set, will by default update all fields.
872
+ # Corresponds to the JSON property `updateMask`
873
+ # @return [String]
874
+ attr_accessor :update_mask
875
+
876
+ def initialize(**args)
877
+ update!(**args)
878
+ end
879
+
880
+ # Update properties of this object
881
+ def update!(**args)
882
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
883
+ @input_config = args[:input_config] if args.key?(:input_config)
884
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
885
+ end
886
+ end
887
+
888
+ # Response of the ImportProductsRequest. If the long running operation is done,
889
+ # then this message is returned by the google.longrunning.Operations.response
890
+ # field if the operation was successful.
891
+ class GoogleCloudRetailV2alphaImportProductsResponse
892
+ include Google::Apis::Core::Hashable
893
+
894
+ # A sample of errors encountered while processing the request.
895
+ # Corresponds to the JSON property `errorSamples`
896
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
897
+ attr_accessor :error_samples
898
+
899
+ # Configuration of destination for Import related errors.
900
+ # Corresponds to the JSON property `errorsConfig`
901
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig]
902
+ attr_accessor :errors_config
903
+
904
+ def initialize(**args)
905
+ update!(**args)
906
+ end
907
+
908
+ # Update properties of this object
909
+ def update!(**args)
910
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
911
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
912
+ end
913
+ end
914
+
915
+ # Request message for the ImportUserEvents request.
916
+ class GoogleCloudRetailV2alphaImportUserEventsRequest
917
+ include Google::Apis::Core::Hashable
918
+
919
+ # Configuration of destination for Import related errors.
920
+ # Corresponds to the JSON property `errorsConfig`
921
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig]
922
+ attr_accessor :errors_config
923
+
924
+ # The input config source for user events.
925
+ # Corresponds to the JSON property `inputConfig`
926
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventInputConfig]
927
+ attr_accessor :input_config
928
+
929
+ def initialize(**args)
930
+ update!(**args)
931
+ end
932
+
933
+ # Update properties of this object
934
+ def update!(**args)
935
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
936
+ @input_config = args[:input_config] if args.key?(:input_config)
937
+ end
938
+ end
939
+
940
+ # Response of the ImportUserEventsRequest. If the long running operation was
941
+ # successful, then this message is returned by the google.longrunning.Operations.
942
+ # response field if the operation was successful.
943
+ class GoogleCloudRetailV2alphaImportUserEventsResponse
944
+ include Google::Apis::Core::Hashable
945
+
946
+ # A sample of errors encountered while processing the request.
947
+ # Corresponds to the JSON property `errorSamples`
948
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
949
+ attr_accessor :error_samples
950
+
951
+ # Configuration of destination for Import related errors.
952
+ # Corresponds to the JSON property `errorsConfig`
953
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportErrorsConfig]
954
+ attr_accessor :errors_config
955
+
956
+ # A summary of import result. The UserEventImportSummary summarizes the import
957
+ # status for user events.
958
+ # Corresponds to the JSON property `importSummary`
959
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventImportSummary]
960
+ attr_accessor :import_summary
961
+
962
+ def initialize(**args)
963
+ update!(**args)
964
+ end
965
+
966
+ # Update properties of this object
967
+ def update!(**args)
968
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
969
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
970
+ @import_summary = args[:import_summary] if args.key?(:import_summary)
971
+ end
972
+ end
973
+
974
+ # Response for CatalogService.ListCatalogs method.
975
+ class GoogleCloudRetailV2alphaListCatalogsResponse
976
+ include Google::Apis::Core::Hashable
977
+
978
+ # All the customer's Catalogs.
979
+ # Corresponds to the JSON property `catalogs`
980
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog>]
981
+ attr_accessor :catalogs
982
+
983
+ # A token that can be sent as ListCatalogsRequest.page_token to retrieve the
984
+ # next page. If this field is omitted, there are no subsequent pages.
985
+ # Corresponds to the JSON property `nextPageToken`
986
+ # @return [String]
987
+ attr_accessor :next_page_token
988
+
989
+ def initialize(**args)
990
+ update!(**args)
991
+ end
992
+
993
+ # Update properties of this object
994
+ def update!(**args)
995
+ @catalogs = args[:catalogs] if args.key?(:catalogs)
996
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
997
+ end
998
+ end
999
+
1000
+ # Request message for Predict method.
1001
+ class GoogleCloudRetailV2alphaPredictRequest
1002
+ include Google::Apis::Core::Hashable
1003
+
1004
+ # Filter for restricting prediction results with a length limit of 5,000
1005
+ # characters. Accepts values for tags and the `filterOutOfStockItems` flag. *
1006
+ # Tag expressions. Restricts predictions to products that match all of the
1007
+ # specified tags. Boolean operators `OR` and `NOT` are supported if the
1008
+ # expression is enclosed in parentheses, and must be separated from the tag
1009
+ # values by a space. `-"tagA"` is also supported and is equivalent to `NOT "tagA"
1010
+ # `. Tag values must be double quoted UTF-8 encoded strings with a size limit of
1011
+ # 1,000 characters. * filterOutOfStockItems. Restricts predictions to products
1012
+ # that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR
1013
+ # "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems tag=(
1014
+ # -"promotional") * filterOutOfStockItems If your filter blocks all prediction
1015
+ # results, nothing will be returned. If you want generic (unfiltered) popular
1016
+ # products to be returned instead, set `strictFiltering` to false in `
1017
+ # PredictRequest.params`.
1018
+ # Corresponds to the JSON property `filter`
1019
+ # @return [String]
1020
+ attr_accessor :filter
1021
+
1022
+ # The labels for the predict request. * Label keys can contain lowercase letters,
1023
+ # digits and hyphens, must start with a letter, and must end with a letter or
1024
+ # digit. * Non-zero label values can contain lowercase letters, digits and
1025
+ # hyphens, must start with a letter, and must end with a letter or digit. * No
1026
+ # more than 64 labels can be associated with a given request. See https://goo.gl/
1027
+ # xmQnxf for more information on and examples of labels.
1028
+ # Corresponds to the JSON property `labels`
1029
+ # @return [Hash<String,String>]
1030
+ attr_accessor :labels
1031
+
1032
+ # Maximum number of results to return per page. Set this property to the number
1033
+ # of prediction results needed. If zero, the service will choose a reasonable
1034
+ # default. The maximum allowed value is 100. Values above 100 will be coerced to
1035
+ # 100.
1036
+ # Corresponds to the JSON property `pageSize`
1037
+ # @return [Fixnum]
1038
+ attr_accessor :page_size
1039
+
1040
+ # The previous PredictResponse.next_page_token.
1041
+ # Corresponds to the JSON property `pageToken`
1042
+ # @return [String]
1043
+ attr_accessor :page_token
1044
+
1045
+ # Additional domain specific parameters for the predictions. Allowed values: * `
1046
+ # returnProduct`: Boolean. If set to true, the associated product object will be
1047
+ # returned in the `results.metadata` field in the prediction response. * `
1048
+ # returnScore`: Boolean. If set to true, the prediction 'score' corresponding to
1049
+ # each returned product will be set in the `results.metadata` field in the
1050
+ # prediction response. The given 'score' indicates the probability of an product
1051
+ # being clicked/purchased given the user's context and history. * `
1052
+ # strictFiltering`: Boolean. True by default. If set to false, the service will
1053
+ # return generic (unfiltered) popular products instead of empty if your filter
1054
+ # blocks all prediction results.
1055
+ # Corresponds to the JSON property `params`
1056
+ # @return [Hash<String,Object>]
1057
+ attr_accessor :params
1058
+
1059
+ # UserEvent captures all metadata information Retail API needs to know about how
1060
+ # end users interact with customers' website.
1061
+ # Corresponds to the JSON property `userEvent`
1062
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent]
1063
+ attr_accessor :user_event
1064
+
1065
+ # Use validate only mode for this prediction query. If set to true, a dummy
1066
+ # model will be used that returns arbitrary products. Note that the validate
1067
+ # only mode should only be used for testing the API, or if the model is not
1068
+ # ready.
1069
+ # Corresponds to the JSON property `validateOnly`
1070
+ # @return [Boolean]
1071
+ attr_accessor :validate_only
1072
+ alias_method :validate_only?, :validate_only
1073
+
1074
+ def initialize(**args)
1075
+ update!(**args)
1076
+ end
1077
+
1078
+ # Update properties of this object
1079
+ def update!(**args)
1080
+ @filter = args[:filter] if args.key?(:filter)
1081
+ @labels = args[:labels] if args.key?(:labels)
1082
+ @page_size = args[:page_size] if args.key?(:page_size)
1083
+ @page_token = args[:page_token] if args.key?(:page_token)
1084
+ @params = args[:params] if args.key?(:params)
1085
+ @user_event = args[:user_event] if args.key?(:user_event)
1086
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1087
+ end
1088
+ end
1089
+
1090
+ # Response message for predict method.
1091
+ class GoogleCloudRetailV2alphaPredictResponse
1092
+ include Google::Apis::Core::Hashable
1093
+
1094
+ # A unique attribution token. This should be included in the UserEvent logs
1095
+ # resulting from this recommendation, which enables accurate attribution of
1096
+ # recommendation model performance.
1097
+ # Corresponds to the JSON property `attributionToken`
1098
+ # @return [String]
1099
+ attr_accessor :attribution_token
1100
+
1101
+ # IDs of products in the request that were missing from the inventory.
1102
+ # Corresponds to the JSON property `missingIds`
1103
+ # @return [Array<String>]
1104
+ attr_accessor :missing_ids
1105
+
1106
+ # A list of recommended products. The order represents the ranking (from the
1107
+ # most relevant product to the least).
1108
+ # Corresponds to the JSON property `results`
1109
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponsePredictionResult>]
1110
+ attr_accessor :results
1111
+
1112
+ # True if the validateOnly property was set in the request.
1113
+ # Corresponds to the JSON property `validateOnly`
1114
+ # @return [Boolean]
1115
+ attr_accessor :validate_only
1116
+ alias_method :validate_only?, :validate_only
1117
+
1118
+ def initialize(**args)
1119
+ update!(**args)
1120
+ end
1121
+
1122
+ # Update properties of this object
1123
+ def update!(**args)
1124
+ @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
1125
+ @missing_ids = args[:missing_ids] if args.key?(:missing_ids)
1126
+ @results = args[:results] if args.key?(:results)
1127
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1128
+ end
1129
+ end
1130
+
1131
+ # PredictionResult represents the recommendation prediction results.
1132
+ class GoogleCloudRetailV2alphaPredictResponsePredictionResult
1133
+ include Google::Apis::Core::Hashable
1134
+
1135
+ # ID of the recommended product
1136
+ # Corresponds to the JSON property `id`
1137
+ # @return [String]
1138
+ attr_accessor :id
1139
+
1140
+ # Additional product metadata / annotations. Possible values: * `product`: JSON
1141
+ # representation of the product. Will be set if `returnProduct` is set to true
1142
+ # in `PredictRequest.params`. * `score`: Prediction score in double value. Will
1143
+ # be set if `returnScore` is set to true in `PredictRequest.params`.
1144
+ # Corresponds to the JSON property `metadata`
1145
+ # @return [Hash<String,Object>]
1146
+ attr_accessor :metadata
1147
+
1148
+ def initialize(**args)
1149
+ update!(**args)
1150
+ end
1151
+
1152
+ # Update properties of this object
1153
+ def update!(**args)
1154
+ @id = args[:id] if args.key?(:id)
1155
+ @metadata = args[:metadata] if args.key?(:metadata)
1156
+ end
1157
+ end
1158
+
1159
+ # The price information of a Product.
1160
+ class GoogleCloudRetailV2alphaPriceInfo
1161
+ include Google::Apis::Core::Hashable
1162
+
1163
+ # The costs associated with the sale of a particular product. Used for gross
1164
+ # profit reporting. * Profit = price - cost Google Merchant Center property [
1165
+ # cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
1166
+ # Corresponds to the JSON property `cost`
1167
+ # @return [Float]
1168
+ attr_accessor :cost
1169
+
1170
+ # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-
1171
+ # currency-codes.html). If this field is an unrecognizable currency code, an
1172
+ # INVALID_ARGUMENT error is returned.
1173
+ # Corresponds to the JSON property `currencyCode`
1174
+ # @return [String]
1175
+ attr_accessor :currency_code
1176
+
1177
+ # Price of the product without any discount. If zero, by default set to be the
1178
+ # price.
1179
+ # Corresponds to the JSON property `originalPrice`
1180
+ # @return [Float]
1181
+ attr_accessor :original_price
1182
+
1183
+ # Price of the product. Google Merchant Center property [price](https://support.
1184
+ # google.com/merchants/answer/6324371). Schema.org property [Offer.
1185
+ # priceSpecification](https://schema.org/priceSpecification).
1186
+ # Corresponds to the JSON property `price`
1187
+ # @return [Float]
1188
+ attr_accessor :price
1189
+
1190
+ def initialize(**args)
1191
+ update!(**args)
1192
+ end
1193
+
1194
+ # Update properties of this object
1195
+ def update!(**args)
1196
+ @cost = args[:cost] if args.key?(:cost)
1197
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
1198
+ @original_price = args[:original_price] if args.key?(:original_price)
1199
+ @price = args[:price] if args.key?(:price)
1200
+ end
1201
+ end
1202
+
1203
+ # Product captures all metadata information of items to be recommended or
1204
+ # searched.
1205
+ class GoogleCloudRetailV2alphaProduct
1206
+ include Google::Apis::Core::Hashable
1207
+
1208
+ # Highly encouraged. Extra product attributes to be included. For example, for
1209
+ # products, this could include the store name, vendor, style, color, etc. These
1210
+ # are very strong signals for recommendation model, thus we highly recommend
1211
+ # providing the attributes here. Features that can take on one of a limited
1212
+ # number of possible values. Two types of features can be set are: Textual
1213
+ # features. some examples would be the brand/maker of a product, or country of a
1214
+ # customer. Numerical features. Some examples would be the height/weight of a
1215
+ # product, or age of a customer. For example: `` "vendor": `"text": ["vendor123",
1216
+ # "vendor456"]`, "lengths_cm": `"numbers":[2.3, 15.4]`, "heights_cm": `"numbers"
1217
+ # :[8.1, 6.4]` ``. This field needs to pass all below criteria, otherwise an
1218
+ # INVALID_ARGUMENT error is returned: * Max entries count: 150 by default; 100
1219
+ # for Type.VARIANT. * Max indexable entries count: 150 by default; 40 for Type.
1220
+ # VARIANT. * Max searchable entries count: 30. * The key must be a UTF-8 encoded
1221
+ # string with a length limit of 128 characters.
1222
+ # Corresponds to the JSON property `attributes`
1223
+ # @return [Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>]
1224
+ attr_accessor :attributes
1225
+
1226
+ # The online availability of the Product. Default to Availability.IN_STOCK.
1227
+ # Google Merchant Center Property [availability](https://support.google.com/
1228
+ # merchants/answer/6324448). Schema.org Property [Offer.availability](https://
1229
+ # schema.org/availability).
1230
+ # Corresponds to the JSON property `availability`
1231
+ # @return [String]
1232
+ attr_accessor :availability
1233
+
1234
+ # The available quantity of the item.
1235
+ # Corresponds to the JSON property `availableQuantity`
1236
+ # @return [Fixnum]
1237
+ attr_accessor :available_quantity
1238
+
1239
+ # The timestamp when this Product becomes available recommendation and search.
1240
+ # Corresponds to the JSON property `availableTime`
1241
+ # @return [String]
1242
+ attr_accessor :available_time
1243
+
1244
+ # Product categories. This field is repeated for supporting one product
1245
+ # belonging to several parallel categories. Strongly recommended using the full
1246
+ # path for better search / recommendation quality. To represent full path of
1247
+ # category, use '>' sign to separate different hierarchies. If '>' is part of
1248
+ # the category name, please replace it with other character(s). For example, if
1249
+ # a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["
1250
+ # Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented
1251
+ # as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness >
1252
+ # Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an
1253
+ # INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product.
1254
+ # Empty values are not allowed. Each value must be a UTF-8 encoded string with
1255
+ # a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
1256
+ # returned. Google Merchant Center property google_product_category. Schema.org
1257
+ # property [Product.category] (https://schema.org/category). [
1258
+ # mc_google_product_category]: https://support.google.com/merchants/answer/
1259
+ # 6324436
1260
+ # Corresponds to the JSON property `categories`
1261
+ # @return [Array<String>]
1262
+ attr_accessor :categories
1263
+
1264
+ # Product description. This field must be a UTF-8 encoded string with a length
1265
+ # limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
1266
+ # Google Merchant Center property [description](https://support.google.com/
1267
+ # merchants/answer/6324468). schema.org property [Product.description](https://
1268
+ # schema.org/description).
1269
+ # Corresponds to the JSON property `description`
1270
+ # @return [String]
1271
+ attr_accessor :description
1272
+
1273
+ # Immutable. Product identifier, which is the final component of name. For
1274
+ # example, this field is "id_1", if name is `projects/*/locations/global/
1275
+ # catalogs/default_catalog/branches/default_branch/products/id_1`. This field
1276
+ # must be a UTF-8 encoded string with a length limit of 128 characters.
1277
+ # Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center
1278
+ # property [id](https://support.google.com/merchants/answer/6324405). Schema.org
1279
+ # Property [Product.sku](https://schema.org/sku).
1280
+ # Corresponds to the JSON property `id`
1281
+ # @return [String]
1282
+ attr_accessor :id
1283
+
1284
+ # Product images for the product. A maximum of 300 images are allowed. Google
1285
+ # Merchant Center property [image_link](https://support.google.com/merchants/
1286
+ # answer/6324350). Schema.org property [Product.image](https://schema.org/image).
1287
+ # Corresponds to the JSON property `images`
1288
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImage>]
1289
+ attr_accessor :images
1290
+
1291
+ # Immutable. Full resource name of the product, such as `projects/*/locations/
1292
+ # global/catalogs/default_catalog/branches/default_branch/products/product_id`.
1293
+ # The branch ID must be "default_branch".
1294
+ # Corresponds to the JSON property `name`
1295
+ # @return [String]
1296
+ attr_accessor :name
1297
+
1298
+ # The price information of a Product.
1299
+ # Corresponds to the JSON property `priceInfo`
1300
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo]
1301
+ attr_accessor :price_info
1302
+
1303
+ # Variant group identifier. Must be an id, with the same parent branch with this
1304
+ # product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field
1305
+ # can only be empty or set to the same value as id. For VARIANT Products, this
1306
+ # field cannot be empty. A maximum of 2,000 products are allowed to share the
1307
+ # same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned.
1308
+ # Google Merchant Center Property [item_group_id](https://support.google.com/
1309
+ # merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](
1310
+ # https://schema.org/inProductGroupWithID). This field must be enabled before it
1311
+ # can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id).
1312
+ # Corresponds to the JSON property `primaryProductId`
1313
+ # @return [String]
1314
+ attr_accessor :primary_product_id
1315
+
1316
+ # Custom tags associated with the product. At most 250 values are allowed per
1317
+ # Product. This value must be a UTF-8 encoded string with a length limit of 1,
1318
+ # 000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can
1319
+ # be used for filtering recommendation results by passing the tag as part of the
1320
+ # PredictRequest.filter. Google Merchant Center property [custom_label_0–4](
1321
+ # https://support.google.com/merchants/answer/6324473).
1322
+ # Corresponds to the JSON property `tags`
1323
+ # @return [Array<String>]
1324
+ attr_accessor :tags
1325
+
1326
+ # Required. Product title. This field must be a UTF-8 encoded string with a
1327
+ # length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
1328
+ # returned. Google Merchant Center property [title](https://support.google.com/
1329
+ # merchants/answer/6324415). Schema.org property [Product.name](https://schema.
1330
+ # org/name).
1331
+ # Corresponds to the JSON property `title`
1332
+ # @return [String]
1333
+ attr_accessor :title
1334
+
1335
+ # Immutable. The type of the product. This field is output-only.
1336
+ # Corresponds to the JSON property `type`
1337
+ # @return [String]
1338
+ attr_accessor :type
1339
+
1340
+ # Canonical URL directly linking to the product detail page. It is strongly
1341
+ # recommended to provide a valid uri for the product, otherwise the service
1342
+ # performance could be significantly degraded. This field must be a UTF-8
1343
+ # encoded string with a length limit of 5,000 characters. Otherwise, an
1344
+ # INVALID_ARGUMENT error is returned. Google Merchant Center property [link](
1345
+ # https://support.google.com/merchants/answer/6324416). Schema.org property [
1346
+ # Offer.url](https://schema.org/url).
1347
+ # Corresponds to the JSON property `uri`
1348
+ # @return [String]
1349
+ attr_accessor :uri
1350
+
1351
+ def initialize(**args)
1352
+ update!(**args)
1353
+ end
1354
+
1355
+ # Update properties of this object
1356
+ def update!(**args)
1357
+ @attributes = args[:attributes] if args.key?(:attributes)
1358
+ @availability = args[:availability] if args.key?(:availability)
1359
+ @available_quantity = args[:available_quantity] if args.key?(:available_quantity)
1360
+ @available_time = args[:available_time] if args.key?(:available_time)
1361
+ @categories = args[:categories] if args.key?(:categories)
1362
+ @description = args[:description] if args.key?(:description)
1363
+ @id = args[:id] if args.key?(:id)
1364
+ @images = args[:images] if args.key?(:images)
1365
+ @name = args[:name] if args.key?(:name)
1366
+ @price_info = args[:price_info] if args.key?(:price_info)
1367
+ @primary_product_id = args[:primary_product_id] if args.key?(:primary_product_id)
1368
+ @tags = args[:tags] if args.key?(:tags)
1369
+ @title = args[:title] if args.key?(:title)
1370
+ @type = args[:type] if args.key?(:type)
1371
+ @uri = args[:uri] if args.key?(:uri)
1372
+ end
1373
+ end
1374
+
1375
+ # Detailed product information associated with a user event.
1376
+ class GoogleCloudRetailV2alphaProductDetail
1377
+ include Google::Apis::Core::Hashable
1378
+
1379
+ # Product captures all metadata information of items to be recommended or
1380
+ # searched.
1381
+ # Corresponds to the JSON property `product`
1382
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct]
1383
+ attr_accessor :product
1384
+
1385
+ # Quantity of the product associated with the user event. For example, this
1386
+ # field will be 2 if two products are added to the shopping cart for `purchase-
1387
+ # complete` event. Required for `add-to-cart` and `purchase-complete` event
1388
+ # types.
1389
+ # Corresponds to the JSON property `quantity`
1390
+ # @return [Fixnum]
1391
+ attr_accessor :quantity
1392
+
1393
+ def initialize(**args)
1394
+ update!(**args)
1395
+ end
1396
+
1397
+ # Update properties of this object
1398
+ def update!(**args)
1399
+ @product = args[:product] if args.key?(:product)
1400
+ @quantity = args[:quantity] if args.key?(:quantity)
1401
+ end
1402
+ end
1403
+
1404
+ # The inline source for the input config for ImportProducts method.
1405
+ class GoogleCloudRetailV2alphaProductInlineSource
1406
+ include Google::Apis::Core::Hashable
1407
+
1408
+ # Required. A list of products to update/create. Each product must have a valid
1409
+ # Product.id. Recommended max of 10k items.
1410
+ # Corresponds to the JSON property `products`
1411
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct>]
1412
+ attr_accessor :products
1413
+
1414
+ def initialize(**args)
1415
+ update!(**args)
1416
+ end
1417
+
1418
+ # Update properties of this object
1419
+ def update!(**args)
1420
+ @products = args[:products] if args.key?(:products)
1421
+ end
1422
+ end
1423
+
1424
+ # The input config source for products.
1425
+ class GoogleCloudRetailV2alphaProductInputConfig
1426
+ include Google::Apis::Core::Hashable
1427
+
1428
+ # BigQuery source import data from.
1429
+ # Corresponds to the JSON property `bigQuerySource`
1430
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBigQuerySource]
1431
+ attr_accessor :big_query_source
1432
+
1433
+ # Google Cloud Storage location for input content. format.
1434
+ # Corresponds to the JSON property `gcsSource`
1435
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGcsSource]
1436
+ attr_accessor :gcs_source
1437
+
1438
+ # The inline source for the input config for ImportProducts method.
1439
+ # Corresponds to the JSON property `productInlineSource`
1440
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInlineSource]
1441
+ attr_accessor :product_inline_source
1442
+
1443
+ def initialize(**args)
1444
+ update!(**args)
1445
+ end
1446
+
1447
+ # Update properties of this object
1448
+ def update!(**args)
1449
+ @big_query_source = args[:big_query_source] if args.key?(:big_query_source)
1450
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
1451
+ @product_inline_source = args[:product_inline_source] if args.key?(:product_inline_source)
1452
+ end
1453
+ end
1454
+
1455
+ # Configures what level the product should be uploaded with regards to how users
1456
+ # will be send events and how predictions will be made.
1457
+ class GoogleCloudRetailV2alphaProductLevelConfig
1458
+ include Google::Apis::Core::Hashable
1459
+
1460
+ # The type of Products allowed to be ingested into the catalog. Acceptable
1461
+ # values are: * `primary` (default): You can only ingest Product.Type.PRIMARY
1462
+ # Products. This means Product.primary_product_id can only be empty or set to
1463
+ # the same value as Product.id. * `variant`: You can only ingest Product.Type.
1464
+ # VARIANT Products. This means Product.primary_product_id cannot be empty. If
1465
+ # this field is set to an invalid value other than these, an INVALID_ARGUMENT
1466
+ # error is returned. If this field is `variant` and
1467
+ # merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error
1468
+ # is returned. See [Using catalog levels](/retail/recommendations-ai/docs/
1469
+ # catalog#catalog-levels) for more details.
1470
+ # Corresponds to the JSON property `ingestionProductType`
1471
+ # @return [String]
1472
+ attr_accessor :ingestion_product_type
1473
+
1474
+ # Which field of [Merchant Center Product](/bigquery-transfer/docs/merchant-
1475
+ # center-products-schema) should be imported as Product.id. Acceptable values
1476
+ # are: * `offerId` (default): Import `offerId` as the product ID. * `itemGroupId`
1477
+ # : Import `itemGroupId` as the product ID. Notice that Retail API will choose
1478
+ # one item from the ones with the same `itemGroupId`, and use it to represent
1479
+ # the item group. If this field is set to an invalid value other than these, an
1480
+ # INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and
1481
+ # ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned.
1482
+ # See [Using catalog levels](/retail/recommendations-ai/docs/catalog#catalog-
1483
+ # levels) for more details.
1484
+ # Corresponds to the JSON property `merchantCenterProductIdField`
1485
+ # @return [String]
1486
+ attr_accessor :merchant_center_product_id_field
1487
+
1488
+ def initialize(**args)
1489
+ update!(**args)
1490
+ end
1491
+
1492
+ # Update properties of this object
1493
+ def update!(**args)
1494
+ @ingestion_product_type = args[:ingestion_product_type] if args.key?(:ingestion_product_type)
1495
+ @merchant_center_product_id_field = args[:merchant_center_product_id_field] if args.key?(:merchant_center_product_id_field)
1496
+ end
1497
+ end
1498
+
1499
+ # A transaction represents the entire purchase transaction.
1500
+ class GoogleCloudRetailV2alphaPurchaseTransaction
1501
+ include Google::Apis::Core::Hashable
1502
+
1503
+ # All the costs associated with the products. These can be manufacturing costs,
1504
+ # shipping expenses not borne by the end user, or any other costs, such that: *
1505
+ # Profit = revenue - tax - cost
1506
+ # Corresponds to the JSON property `cost`
1507
+ # @return [Float]
1508
+ attr_accessor :cost
1509
+
1510
+ # Required. Currency code. Use three-character ISO-4217 code.
1511
+ # Corresponds to the JSON property `currencyCode`
1512
+ # @return [String]
1513
+ attr_accessor :currency_code
1514
+
1515
+ # The transaction ID with a length limit of 128 characters.
1516
+ # Corresponds to the JSON property `id`
1517
+ # @return [String]
1518
+ attr_accessor :id
1519
+
1520
+ # Required. Total non-zero revenue or grand total associated with the
1521
+ # transaction. This value include shipping, tax, or other adjustments to total
1522
+ # revenue that you want to include as part of your revenue calculations.
1523
+ # Corresponds to the JSON property `revenue`
1524
+ # @return [Float]
1525
+ attr_accessor :revenue
1526
+
1527
+ # All the taxes associated with the transaction.
1528
+ # Corresponds to the JSON property `tax`
1529
+ # @return [Float]
1530
+ attr_accessor :tax
1531
+
1532
+ def initialize(**args)
1533
+ update!(**args)
1534
+ end
1535
+
1536
+ # Update properties of this object
1537
+ def update!(**args)
1538
+ @cost = args[:cost] if args.key?(:cost)
1539
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
1540
+ @id = args[:id] if args.key?(:id)
1541
+ @revenue = args[:revenue] if args.key?(:revenue)
1542
+ @tax = args[:tax] if args.key?(:tax)
1543
+ end
1544
+ end
1545
+
1546
+ # Metadata related to the progress of the Purge operation. This will be returned
1547
+ # by the google.longrunning.Operation.metadata field.
1548
+ class GoogleCloudRetailV2alphaPurgeMetadata
1549
+ include Google::Apis::Core::Hashable
1550
+
1551
+ def initialize(**args)
1552
+ update!(**args)
1553
+ end
1554
+
1555
+ # Update properties of this object
1556
+ def update!(**args)
1557
+ end
1558
+ end
1559
+
1560
+ # Request message for PurgeUserEvents method.
1561
+ class GoogleCloudRetailV2alphaPurgeUserEventsRequest
1562
+ include Google::Apis::Core::Hashable
1563
+
1564
+ # Required. The filter string to specify the events to be deleted with a length
1565
+ # limit of 5,000 characters. Empty string filter is not allowed. The eligible
1566
+ # fields for filtering are: * `eventType`: Double quoted UserEvent.event_type
1567
+ # string. * `eventTime`: in ISO 8601 "zulu" format. * `visitorId`: Double quoted
1568
+ # string. Specifying this will delete all events associated with a visitor. * `
1569
+ # userId`: Double quoted string. Specifying this will delete all events
1570
+ # associated with a user. Examples: * Deleting all events in a time range: `
1571
+ # eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"`
1572
+ # * Deleting specific eventType in time range: `eventTime > "2012-04-23T18:25:43.
1573
+ # 511Z" eventType = "detail-page-view"` * Deleting all events for a specific
1574
+ # visitor: `visitorId = "visitor1024"` The filtering fields are assumed to have
1575
+ # an implicit AND.
1576
+ # Corresponds to the JSON property `filter`
1577
+ # @return [String]
1578
+ attr_accessor :filter
1579
+
1580
+ # Actually perform the purge. If `force` is set to false, the method will return
1581
+ # the expected purge count without deleting any user events.
1582
+ # Corresponds to the JSON property `force`
1583
+ # @return [Boolean]
1584
+ attr_accessor :force
1585
+ alias_method :force?, :force
1586
+
1587
+ def initialize(**args)
1588
+ update!(**args)
1589
+ end
1590
+
1591
+ # Update properties of this object
1592
+ def update!(**args)
1593
+ @filter = args[:filter] if args.key?(:filter)
1594
+ @force = args[:force] if args.key?(:force)
1595
+ end
1596
+ end
1597
+
1598
+ # Response of the PurgeUserEventsRequest. If the long running operation is
1599
+ # successfully done, then this message is returned by the google.longrunning.
1600
+ # Operations.response field.
1601
+ class GoogleCloudRetailV2alphaPurgeUserEventsResponse
1602
+ include Google::Apis::Core::Hashable
1603
+
1604
+ # The total count of events purged as a result of the operation.
1605
+ # Corresponds to the JSON property `purgedEventsCount`
1606
+ # @return [Fixnum]
1607
+ attr_accessor :purged_events_count
1608
+
1609
+ def initialize(**args)
1610
+ update!(**args)
1611
+ end
1612
+
1613
+ # Update properties of this object
1614
+ def update!(**args)
1615
+ @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
1616
+ end
1617
+ end
1618
+
1619
+ # Metadata for RejoinUserEvents method.
1620
+ class GoogleCloudRetailV2alphaRejoinUserEventsMetadata
1621
+ include Google::Apis::Core::Hashable
1622
+
1623
+ def initialize(**args)
1624
+ update!(**args)
1625
+ end
1626
+
1627
+ # Update properties of this object
1628
+ def update!(**args)
1629
+ end
1630
+ end
1631
+
1632
+ # Request message for RejoinUserEvents method.
1633
+ class GoogleCloudRetailV2alphaRejoinUserEventsRequest
1634
+ include Google::Apis::Core::Hashable
1635
+
1636
+ # The type of the user event rejoin to define the scope and range of the user
1637
+ # events to be rejoined with the latest product catalog. Defaults to
1638
+ # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
1639
+ # invalid integer value.
1640
+ # Corresponds to the JSON property `userEventRejoinScope`
1641
+ # @return [String]
1642
+ attr_accessor :user_event_rejoin_scope
1643
+
1644
+ def initialize(**args)
1645
+ update!(**args)
1646
+ end
1647
+
1648
+ # Update properties of this object
1649
+ def update!(**args)
1650
+ @user_event_rejoin_scope = args[:user_event_rejoin_scope] if args.key?(:user_event_rejoin_scope)
1651
+ end
1652
+ end
1653
+
1654
+ # Response message for RejoinUserEvents method.
1655
+ class GoogleCloudRetailV2alphaRejoinUserEventsResponse
1656
+ include Google::Apis::Core::Hashable
1657
+
1658
+ # Number of user events that were joined with latest product catalog.
1659
+ # Corresponds to the JSON property `rejoinedUserEventsCount`
1660
+ # @return [Fixnum]
1661
+ attr_accessor :rejoined_user_events_count
1662
+
1663
+ def initialize(**args)
1664
+ update!(**args)
1665
+ end
1666
+
1667
+ # Update properties of this object
1668
+ def update!(**args)
1669
+ @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
1670
+ end
1671
+ end
1672
+
1673
+ # UserEvent captures all metadata information Retail API needs to know about how
1674
+ # end users interact with customers' website.
1675
+ class GoogleCloudRetailV2alphaUserEvent
1676
+ include Google::Apis::Core::Hashable
1677
+
1678
+ # Extra user event features to include in the recommendation model. The key must
1679
+ # be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
1680
+ # an INVALID_ARGUMENT error is returned. For product recommendation, an example
1681
+ # of extra user information is traffic_channel, i.e. how user arrives at the
1682
+ # site. Users can arrive at the site by coming to the site directly, or coming
1683
+ # through Google search, and etc.
1684
+ # Corresponds to the JSON property `attributes`
1685
+ # @return [Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>]
1686
+ attr_accessor :attributes
1687
+
1688
+ # Highly recommended for user events that are the result of PredictionService.
1689
+ # Predict. This field enables accurate attribution of recommendation model
1690
+ # performance. The value must be a valid PredictResponse.attribution_token for
1691
+ # user events that are the result of PredictionService.Predict. This token
1692
+ # enables us to accurately attribute page view or purchase back to the event and
1693
+ # the particular predict response containing this clicked/purchased product. If
1694
+ # user clicks on product K in the recommendation results, pass PredictResponse.
1695
+ # attribution_token as a URL parameter to product K's page. When recording
1696
+ # events on product K's page, log the PredictResponse.attribution_token to this
1697
+ # field.
1698
+ # Corresponds to the JSON property `attributionToken`
1699
+ # @return [String]
1700
+ attr_accessor :attribution_token
1701
+
1702
+ # The id or name of the associated shopping cart. This id is used to associate
1703
+ # multiple items added or present in the cart before purchase. This can only be
1704
+ # set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view`
1705
+ # events.
1706
+ # Corresponds to the JSON property `cartId`
1707
+ # @return [String]
1708
+ attr_accessor :cart_id
1709
+
1710
+ # Only required for UserEventService.ImportUserEvents method. Timestamp of when
1711
+ # the user event happened.
1712
+ # Corresponds to the JSON property `eventTime`
1713
+ # @return [String]
1714
+ attr_accessor :event_time
1715
+
1716
+ # Required. User event type. Allowed values are: * `add-to-cart`: Products being
1717
+ # added to cart. * `category-page-view`: Special pages such as sale or promotion
1718
+ # pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-
1719
+ # view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * `
1720
+ # search`: Product search. * `shopping-cart-page-view`: User viewing a shopping
1721
+ # cart.
1722
+ # Corresponds to the JSON property `eventType`
1723
+ # @return [String]
1724
+ attr_accessor :event_type
1725
+
1726
+ # A list of identifiers for the independent experiment groups this user event
1727
+ # belongs to. This is used to distinguish between user events associated with
1728
+ # different experiment setups (e.g. using Retail API, using different
1729
+ # recommendation models).
1730
+ # Corresponds to the JSON property `experimentIds`
1731
+ # @return [Array<String>]
1732
+ attr_accessor :experiment_ids
1733
+
1734
+ # The categories associated with a category page. To represent full path of
1735
+ # category, use '>' sign to separate different hierarchies. If '>' is part of
1736
+ # the category name, please replace it with other character(s). Category pages
1737
+ # include special pages such as sales or promotions. For instance, a special
1738
+ # sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017
1739
+ # Black Friday Deals"]. Required for `category-page-view` events. At least one
1740
+ # of search_query or page_categories is required for `search` events. Other
1741
+ # event types should not set this field. Otherwise, an INVALID_ARGUMENT error is
1742
+ # returned.
1743
+ # Corresponds to the JSON property `pageCategories`
1744
+ # @return [Array<String>]
1745
+ attr_accessor :page_categories
1746
+
1747
+ # A unique id of a web page view. This should be kept the same for all user
1748
+ # events triggered from the same pageview. For example, an item detail page view
1749
+ # could trigger multiple events as the user is browsing the page. The `
1750
+ # pageViewId` property should be kept the same for all these events so that they
1751
+ # can be grouped together properly. When using the client side event reporting
1752
+ # with JavaScript pixel and Google Tag Manager, this value is filled in
1753
+ # automatically.
1754
+ # Corresponds to the JSON property `pageViewId`
1755
+ # @return [String]
1756
+ attr_accessor :page_view_id
1757
+
1758
+ # The main product details related to the event. This field is required for the
1759
+ # following event types: * `add-to-cart` * `detail-page-view` * `purchase-
1760
+ # complete` In a `search` event, this field represents the products returned to
1761
+ # the end user on the current page (the end user may have not finished broswing
1762
+ # the whole page yet). When a new page is returned to the end user, after
1763
+ # pagination/filtering/ordering even for the same query, a new `search` event
1764
+ # with different product_details is desired. The end user may have not finished
1765
+ # broswing the whole page yet.
1766
+ # Corresponds to the JSON property `productDetails`
1767
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductDetail>]
1768
+ attr_accessor :product_details
1769
+
1770
+ # A transaction represents the entire purchase transaction.
1771
+ # Corresponds to the JSON property `purchaseTransaction`
1772
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPurchaseTransaction]
1773
+ attr_accessor :purchase_transaction
1774
+
1775
+ # The referrer URL of the current page. When using the client side event
1776
+ # reporting with JavaScript pixel and Google Tag Manager, this value is filled
1777
+ # in automatically.
1778
+ # Corresponds to the JSON property `referrerUri`
1779
+ # @return [String]
1780
+ attr_accessor :referrer_uri
1781
+
1782
+ # The user's search query. The value must be a UTF-8 encoded string with a
1783
+ # length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
1784
+ # returned. At least one of search_query or page_categories is required for `
1785
+ # search` events. Other event types should not set this field. Otherwise, an
1786
+ # INVALID_ARGUMENT error is returned.
1787
+ # Corresponds to the JSON property `searchQuery`
1788
+ # @return [String]
1789
+ attr_accessor :search_query
1790
+
1791
+ # Complete URL (window.location.href) of the user's current page. When using the
1792
+ # client side event reporting with JavaScript pixel and Google Tag Manager, this
1793
+ # value is filled in automatically. Maximum length 5,000 characters.
1794
+ # Corresponds to the JSON property `uri`
1795
+ # @return [String]
1796
+ attr_accessor :uri
1797
+
1798
+ # Information of an end user.
1799
+ # Corresponds to the JSON property `userInfo`
1800
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserInfo]
1801
+ attr_accessor :user_info
1802
+
1803
+ # Required. A unique identifier for tracking visitors. For example, this could
1804
+ # be implemented with an HTTP cookie, which should be able to uniquely identify
1805
+ # a visitor on a single device. This unique identifier should not change if the
1806
+ # visitor log in/out of the website. The field must be a UTF-8 encoded string
1807
+ # with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
1808
+ # returned.
1809
+ # Corresponds to the JSON property `visitorId`
1810
+ # @return [String]
1811
+ attr_accessor :visitor_id
1812
+
1813
+ def initialize(**args)
1814
+ update!(**args)
1815
+ end
1816
+
1817
+ # Update properties of this object
1818
+ def update!(**args)
1819
+ @attributes = args[:attributes] if args.key?(:attributes)
1820
+ @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
1821
+ @cart_id = args[:cart_id] if args.key?(:cart_id)
1822
+ @event_time = args[:event_time] if args.key?(:event_time)
1823
+ @event_type = args[:event_type] if args.key?(:event_type)
1824
+ @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids)
1825
+ @page_categories = args[:page_categories] if args.key?(:page_categories)
1826
+ @page_view_id = args[:page_view_id] if args.key?(:page_view_id)
1827
+ @product_details = args[:product_details] if args.key?(:product_details)
1828
+ @purchase_transaction = args[:purchase_transaction] if args.key?(:purchase_transaction)
1829
+ @referrer_uri = args[:referrer_uri] if args.key?(:referrer_uri)
1830
+ @search_query = args[:search_query] if args.key?(:search_query)
1831
+ @uri = args[:uri] if args.key?(:uri)
1832
+ @user_info = args[:user_info] if args.key?(:user_info)
1833
+ @visitor_id = args[:visitor_id] if args.key?(:visitor_id)
1834
+ end
1835
+ end
1836
+
1837
+ # A summary of import result. The UserEventImportSummary summarizes the import
1838
+ # status for user events.
1839
+ class GoogleCloudRetailV2alphaUserEventImportSummary
1840
+ include Google::Apis::Core::Hashable
1841
+
1842
+ # Count of user events imported with complete existing catalog information.
1843
+ # Corresponds to the JSON property `joinedEventsCount`
1844
+ # @return [Fixnum]
1845
+ attr_accessor :joined_events_count
1846
+
1847
+ # Count of user events imported, but with catalog information not found in the
1848
+ # imported catalog.
1849
+ # Corresponds to the JSON property `unjoinedEventsCount`
1850
+ # @return [Fixnum]
1851
+ attr_accessor :unjoined_events_count
1852
+
1853
+ def initialize(**args)
1854
+ update!(**args)
1855
+ end
1856
+
1857
+ # Update properties of this object
1858
+ def update!(**args)
1859
+ @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count)
1860
+ @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count)
1861
+ end
1862
+ end
1863
+
1864
+ # The inline source for the input config for ImportUserEvents method.
1865
+ class GoogleCloudRetailV2alphaUserEventInlineSource
1866
+ include Google::Apis::Core::Hashable
1867
+
1868
+ # Required. A list of user events to import. Recommended max of 10k items.
1869
+ # Corresponds to the JSON property `userEvents`
1870
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent>]
1871
+ attr_accessor :user_events
1872
+
1873
+ def initialize(**args)
1874
+ update!(**args)
1875
+ end
1876
+
1877
+ # Update properties of this object
1878
+ def update!(**args)
1879
+ @user_events = args[:user_events] if args.key?(:user_events)
1880
+ end
1881
+ end
1882
+
1883
+ # The input config source for user events.
1884
+ class GoogleCloudRetailV2alphaUserEventInputConfig
1885
+ include Google::Apis::Core::Hashable
1886
+
1887
+ # BigQuery source import data from.
1888
+ # Corresponds to the JSON property `bigQuerySource`
1889
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBigQuerySource]
1890
+ attr_accessor :big_query_source
1891
+
1892
+ # Google Cloud Storage location for input content. format.
1893
+ # Corresponds to the JSON property `gcsSource`
1894
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGcsSource]
1895
+ attr_accessor :gcs_source
1896
+
1897
+ # The inline source for the input config for ImportUserEvents method.
1898
+ # Corresponds to the JSON property `userEventInlineSource`
1899
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEventInlineSource]
1900
+ attr_accessor :user_event_inline_source
1901
+
1902
+ def initialize(**args)
1903
+ update!(**args)
1904
+ end
1905
+
1906
+ # Update properties of this object
1907
+ def update!(**args)
1908
+ @big_query_source = args[:big_query_source] if args.key?(:big_query_source)
1909
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
1910
+ @user_event_inline_source = args[:user_event_inline_source] if args.key?(:user_event_inline_source)
1911
+ end
1912
+ end
1913
+
1914
+ # Information of an end user.
1915
+ class GoogleCloudRetailV2alphaUserInfo
1916
+ include Google::Apis::Core::Hashable
1917
+
1918
+ # True if the request is made directly from the end user, in which case the
1919
+ # ip_address and user_agent can be populated from the HTTP request. This flag
1920
+ # should be set only if the API request is made directly from the end user such
1921
+ # as a mobile app (and not if a gateway or a server is processing and pushing
1922
+ # the user events). This should not be set when using the JavaScript tag in
1923
+ # UserEventService.CollectUserEvent.
1924
+ # Corresponds to the JSON property `directUserRequest`
1925
+ # @return [Boolean]
1926
+ attr_accessor :direct_user_request
1927
+ alias_method :direct_user_request?, :direct_user_request
1928
+
1929
+ # The end user's IP address. This field is used to extract location information
1930
+ # for personalization. This field must be either an IPv4 address (e.g. "104.133.
1931
+ # 9.80") or an IPv6 address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334").
1932
+ # Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when
1933
+ # using the JavaScript tag in UserEventService.CollectUserEvent or if
1934
+ # direct_user_request is set.
1935
+ # Corresponds to the JSON property `ipAddress`
1936
+ # @return [String]
1937
+ attr_accessor :ip_address
1938
+
1939
+ # User agent as included in the HTTP header. The field must be a UTF-8 encoded
1940
+ # string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT
1941
+ # error is returned. This should not be set when using the client side event
1942
+ # reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or
1943
+ # if direct_user_request is set.
1944
+ # Corresponds to the JSON property `userAgent`
1945
+ # @return [String]
1946
+ attr_accessor :user_agent
1947
+
1948
+ # Highly recommended for logged-in users. Unique identifier for logged-in user,
1949
+ # such as a user name. The field must be a UTF-8 encoded string with a length
1950
+ # limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
1951
+ # Corresponds to the JSON property `userId`
1952
+ # @return [String]
1953
+ attr_accessor :user_id
1954
+
1955
+ def initialize(**args)
1956
+ update!(**args)
1957
+ end
1958
+
1959
+ # Update properties of this object
1960
+ def update!(**args)
1961
+ @direct_user_request = args[:direct_user_request] if args.key?(:direct_user_request)
1962
+ @ip_address = args[:ip_address] if args.key?(:ip_address)
1963
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
1964
+ @user_id = args[:user_id] if args.key?(:user_id)
1965
+ end
1966
+ end
1967
+
1968
+ # Configuration of destination for Export related errors.
1969
+ class GoogleCloudRetailV2betaExportErrorsConfig
1970
+ include Google::Apis::Core::Hashable
1971
+
1972
+ # Google Cloud Storage path for import errors. This must be an empty, existing
1973
+ # Cloud Storage bucket. Export errors will be written to a file in this bucket,
1974
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
1975
+ # Corresponds to the JSON property `gcsPrefix`
1976
+ # @return [String]
1977
+ attr_accessor :gcs_prefix
1978
+
1979
+ def initialize(**args)
1980
+ update!(**args)
1981
+ end
1982
+
1983
+ # Update properties of this object
1984
+ def update!(**args)
1985
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
1986
+ end
1987
+ end
1988
+
1989
+ # Metadata related to the progress of the Export operation. This will be
1990
+ # returned by the google.longrunning.Operation.metadata field.
1991
+ class GoogleCloudRetailV2betaExportMetadata
1992
+ include Google::Apis::Core::Hashable
1993
+
1994
+ # Operation create time.
1995
+ # Corresponds to the JSON property `createTime`
1996
+ # @return [String]
1997
+ attr_accessor :create_time
1998
+
1999
+ # Operation last update time. If the operation is done, this is also the finish
2000
+ # time.
2001
+ # Corresponds to the JSON property `updateTime`
2002
+ # @return [String]
2003
+ attr_accessor :update_time
2004
+
2005
+ def initialize(**args)
2006
+ update!(**args)
2007
+ end
2008
+
2009
+ # Update properties of this object
2010
+ def update!(**args)
2011
+ @create_time = args[:create_time] if args.key?(:create_time)
2012
+ @update_time = args[:update_time] if args.key?(:update_time)
2013
+ end
2014
+ end
2015
+
2016
+ # Response of the ExportProductsRequest. If the long running operation is done,
2017
+ # then this message is returned by the google.longrunning.Operations.response
2018
+ # field if the operation was successful.
2019
+ class GoogleCloudRetailV2betaExportProductsResponse
2020
+ include Google::Apis::Core::Hashable
2021
+
2022
+ # A sample of errors encountered while processing the request.
2023
+ # Corresponds to the JSON property `errorSamples`
2024
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
2025
+ attr_accessor :error_samples
2026
+
2027
+ # Configuration of destination for Export related errors.
2028
+ # Corresponds to the JSON property `errorsConfig`
2029
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaExportErrorsConfig]
2030
+ attr_accessor :errors_config
2031
+
2032
+ def initialize(**args)
2033
+ update!(**args)
2034
+ end
2035
+
2036
+ # Update properties of this object
2037
+ def update!(**args)
2038
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
2039
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
2040
+ end
2041
+ end
2042
+
2043
+ # Response of the ExportUserEventsRequest. If the long running operation was
2044
+ # successful, then this message is returned by the google.longrunning.Operations.
2045
+ # response field if the operation was successful.
2046
+ class GoogleCloudRetailV2betaExportUserEventsResponse
2047
+ include Google::Apis::Core::Hashable
2048
+
2049
+ # A sample of errors encountered while processing the request.
2050
+ # Corresponds to the JSON property `errorSamples`
2051
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
2052
+ attr_accessor :error_samples
2053
+
2054
+ # Configuration of destination for Export related errors.
2055
+ # Corresponds to the JSON property `errorsConfig`
2056
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaExportErrorsConfig]
2057
+ attr_accessor :errors_config
2058
+
2059
+ def initialize(**args)
2060
+ update!(**args)
2061
+ end
2062
+
2063
+ # Update properties of this object
2064
+ def update!(**args)
2065
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
2066
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
2067
+ end
2068
+ end
2069
+
2070
+ # Configuration of destination for Import related errors.
2071
+ class GoogleCloudRetailV2betaImportErrorsConfig
2072
+ include Google::Apis::Core::Hashable
2073
+
2074
+ # Google Cloud Storage path for import errors. This must be an empty, existing
2075
+ # Cloud Storage bucket. Import errors will be written to a file in this bucket,
2076
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
2077
+ # Corresponds to the JSON property `gcsPrefix`
2078
+ # @return [String]
2079
+ attr_accessor :gcs_prefix
2080
+
2081
+ def initialize(**args)
2082
+ update!(**args)
2083
+ end
2084
+
2085
+ # Update properties of this object
2086
+ def update!(**args)
2087
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
2088
+ end
2089
+ end
2090
+
2091
+ # Metadata related to the progress of the Import operation. This will be
2092
+ # returned by the google.longrunning.Operation.metadata field.
2093
+ class GoogleCloudRetailV2betaImportMetadata
2094
+ include Google::Apis::Core::Hashable
2095
+
2096
+ # Operation create time.
2097
+ # Corresponds to the JSON property `createTime`
2098
+ # @return [String]
2099
+ attr_accessor :create_time
2100
+
2101
+ # Count of entries that encountered errors while processing.
2102
+ # Corresponds to the JSON property `failureCount`
2103
+ # @return [Fixnum]
2104
+ attr_accessor :failure_count
2105
+
2106
+ # Count of entries that were processed successfully.
2107
+ # Corresponds to the JSON property `successCount`
2108
+ # @return [Fixnum]
2109
+ attr_accessor :success_count
2110
+
2111
+ # Operation last update time. If the operation is done, this is also the finish
2112
+ # time.
2113
+ # Corresponds to the JSON property `updateTime`
2114
+ # @return [String]
2115
+ attr_accessor :update_time
2116
+
2117
+ def initialize(**args)
2118
+ update!(**args)
2119
+ end
2120
+
2121
+ # Update properties of this object
2122
+ def update!(**args)
2123
+ @create_time = args[:create_time] if args.key?(:create_time)
2124
+ @failure_count = args[:failure_count] if args.key?(:failure_count)
2125
+ @success_count = args[:success_count] if args.key?(:success_count)
2126
+ @update_time = args[:update_time] if args.key?(:update_time)
2127
+ end
2128
+ end
2129
+
2130
+ # Response of the ImportProductsRequest. If the long running operation is done,
2131
+ # then this message is returned by the google.longrunning.Operations.response
2132
+ # field if the operation was successful.
2133
+ class GoogleCloudRetailV2betaImportProductsResponse
2134
+ include Google::Apis::Core::Hashable
2135
+
2136
+ # A sample of errors encountered while processing the request.
2137
+ # Corresponds to the JSON property `errorSamples`
2138
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
2139
+ attr_accessor :error_samples
2140
+
2141
+ # Configuration of destination for Import related errors.
2142
+ # Corresponds to the JSON property `errorsConfig`
2143
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaImportErrorsConfig]
2144
+ attr_accessor :errors_config
2145
+
2146
+ def initialize(**args)
2147
+ update!(**args)
2148
+ end
2149
+
2150
+ # Update properties of this object
2151
+ def update!(**args)
2152
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
2153
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
2154
+ end
2155
+ end
2156
+
2157
+ # Response of the ImportUserEventsRequest. If the long running operation was
2158
+ # successful, then this message is returned by the google.longrunning.Operations.
2159
+ # response field if the operation was successful.
2160
+ class GoogleCloudRetailV2betaImportUserEventsResponse
2161
+ include Google::Apis::Core::Hashable
2162
+
2163
+ # A sample of errors encountered while processing the request.
2164
+ # Corresponds to the JSON property `errorSamples`
2165
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
2166
+ attr_accessor :error_samples
2167
+
2168
+ # Configuration of destination for Import related errors.
2169
+ # Corresponds to the JSON property `errorsConfig`
2170
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaImportErrorsConfig]
2171
+ attr_accessor :errors_config
2172
+
2173
+ # A summary of import result. The UserEventImportSummary summarizes the import
2174
+ # status for user events.
2175
+ # Corresponds to the JSON property `importSummary`
2176
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2betaUserEventImportSummary]
2177
+ attr_accessor :import_summary
2178
+
2179
+ def initialize(**args)
2180
+ update!(**args)
2181
+ end
2182
+
2183
+ # Update properties of this object
2184
+ def update!(**args)
2185
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
2186
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
2187
+ @import_summary = args[:import_summary] if args.key?(:import_summary)
2188
+ end
2189
+ end
2190
+
2191
+ # Metadata related to the progress of the Purge operation. This will be returned
2192
+ # by the google.longrunning.Operation.metadata field.
2193
+ class GoogleCloudRetailV2betaPurgeMetadata
2194
+ include Google::Apis::Core::Hashable
2195
+
2196
+ def initialize(**args)
2197
+ update!(**args)
2198
+ end
2199
+
2200
+ # Update properties of this object
2201
+ def update!(**args)
2202
+ end
2203
+ end
2204
+
2205
+ # Response of the PurgeUserEventsRequest. If the long running operation is
2206
+ # successfully done, then this message is returned by the google.longrunning.
2207
+ # Operations.response field.
2208
+ class GoogleCloudRetailV2betaPurgeUserEventsResponse
2209
+ include Google::Apis::Core::Hashable
2210
+
2211
+ # The total count of events purged as a result of the operation.
2212
+ # Corresponds to the JSON property `purgedEventsCount`
2213
+ # @return [Fixnum]
2214
+ attr_accessor :purged_events_count
2215
+
2216
+ def initialize(**args)
2217
+ update!(**args)
2218
+ end
2219
+
2220
+ # Update properties of this object
2221
+ def update!(**args)
2222
+ @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
2223
+ end
2224
+ end
2225
+
2226
+ # Metadata for RejoinUserEvents method.
2227
+ class GoogleCloudRetailV2betaRejoinUserEventsMetadata
2228
+ include Google::Apis::Core::Hashable
2229
+
2230
+ def initialize(**args)
2231
+ update!(**args)
2232
+ end
2233
+
2234
+ # Update properties of this object
2235
+ def update!(**args)
2236
+ end
2237
+ end
2238
+
2239
+ # Response message for RejoinUserEvents method.
2240
+ class GoogleCloudRetailV2betaRejoinUserEventsResponse
2241
+ include Google::Apis::Core::Hashable
2242
+
2243
+ # Number of user events that were joined with latest product catalog.
2244
+ # Corresponds to the JSON property `rejoinedUserEventsCount`
2245
+ # @return [Fixnum]
2246
+ attr_accessor :rejoined_user_events_count
2247
+
2248
+ def initialize(**args)
2249
+ update!(**args)
2250
+ end
2251
+
2252
+ # Update properties of this object
2253
+ def update!(**args)
2254
+ @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
2255
+ end
2256
+ end
2257
+
2258
+ # A summary of import result. The UserEventImportSummary summarizes the import
2259
+ # status for user events.
2260
+ class GoogleCloudRetailV2betaUserEventImportSummary
2261
+ include Google::Apis::Core::Hashable
2262
+
2263
+ # Count of user events imported with complete existing catalog information.
2264
+ # Corresponds to the JSON property `joinedEventsCount`
2265
+ # @return [Fixnum]
2266
+ attr_accessor :joined_events_count
2267
+
2268
+ # Count of user events imported, but with catalog information not found in the
2269
+ # imported catalog.
2270
+ # Corresponds to the JSON property `unjoinedEventsCount`
2271
+ # @return [Fixnum]
2272
+ attr_accessor :unjoined_events_count
2273
+
2274
+ def initialize(**args)
2275
+ update!(**args)
2276
+ end
2277
+
2278
+ # Update properties of this object
2279
+ def update!(**args)
2280
+ @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count)
2281
+ @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count)
2282
+ end
2283
+ end
2284
+
2285
+ # Configuration of destination for Export related errors.
2286
+ class GoogleCloudRetailV2mainExportErrorsConfig
2287
+ include Google::Apis::Core::Hashable
2288
+
2289
+ # Google Cloud Storage path for import errors. This must be an empty, existing
2290
+ # Cloud Storage bucket. Export errors will be written to a file in this bucket,
2291
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
2292
+ # Corresponds to the JSON property `gcsPrefix`
2293
+ # @return [String]
2294
+ attr_accessor :gcs_prefix
2295
+
2296
+ def initialize(**args)
2297
+ update!(**args)
2298
+ end
2299
+
2300
+ # Update properties of this object
2301
+ def update!(**args)
2302
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
2303
+ end
2304
+ end
2305
+
2306
+ # Metadata related to the progress of the Export operation. This will be
2307
+ # returned by the google.longrunning.Operation.metadata field.
2308
+ class GoogleCloudRetailV2mainExportMetadata
2309
+ include Google::Apis::Core::Hashable
2310
+
2311
+ # Operation create time.
2312
+ # Corresponds to the JSON property `createTime`
2313
+ # @return [String]
2314
+ attr_accessor :create_time
2315
+
2316
+ # Operation last update time. If the operation is done, this is also the finish
2317
+ # time.
2318
+ # Corresponds to the JSON property `updateTime`
2319
+ # @return [String]
2320
+ attr_accessor :update_time
2321
+
2322
+ def initialize(**args)
2323
+ update!(**args)
2324
+ end
2325
+
2326
+ # Update properties of this object
2327
+ def update!(**args)
2328
+ @create_time = args[:create_time] if args.key?(:create_time)
2329
+ @update_time = args[:update_time] if args.key?(:update_time)
2330
+ end
2331
+ end
2332
+
2333
+ # Response of the ExportProductsRequest. If the long running operation is done,
2334
+ # then this message is returned by the google.longrunning.Operations.response
2335
+ # field if the operation was successful.
2336
+ class GoogleCloudRetailV2mainExportProductsResponse
2337
+ include Google::Apis::Core::Hashable
2338
+
2339
+ # A sample of errors encountered while processing the request.
2340
+ # Corresponds to the JSON property `errorSamples`
2341
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
2342
+ attr_accessor :error_samples
2343
+
2344
+ # Configuration of destination for Export related errors.
2345
+ # Corresponds to the JSON property `errorsConfig`
2346
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainExportErrorsConfig]
2347
+ attr_accessor :errors_config
2348
+
2349
+ def initialize(**args)
2350
+ update!(**args)
2351
+ end
2352
+
2353
+ # Update properties of this object
2354
+ def update!(**args)
2355
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
2356
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
2357
+ end
2358
+ end
2359
+
2360
+ # Response of the ExportUserEventsRequest. If the long running operation was
2361
+ # successful, then this message is returned by the google.longrunning.Operations.
2362
+ # response field if the operation was successful.
2363
+ class GoogleCloudRetailV2mainExportUserEventsResponse
2364
+ include Google::Apis::Core::Hashable
2365
+
2366
+ # A sample of errors encountered while processing the request.
2367
+ # Corresponds to the JSON property `errorSamples`
2368
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
2369
+ attr_accessor :error_samples
2370
+
2371
+ # Configuration of destination for Export related errors.
2372
+ # Corresponds to the JSON property `errorsConfig`
2373
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainExportErrorsConfig]
2374
+ attr_accessor :errors_config
2375
+
2376
+ def initialize(**args)
2377
+ update!(**args)
2378
+ end
2379
+
2380
+ # Update properties of this object
2381
+ def update!(**args)
2382
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
2383
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
2384
+ end
2385
+ end
2386
+
2387
+ # Configuration of destination for Import related errors.
2388
+ class GoogleCloudRetailV2mainImportErrorsConfig
2389
+ include Google::Apis::Core::Hashable
2390
+
2391
+ # Google Cloud Storage path for import errors. This must be an empty, existing
2392
+ # Cloud Storage bucket. Import errors will be written to a file in this bucket,
2393
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
2394
+ # Corresponds to the JSON property `gcsPrefix`
2395
+ # @return [String]
2396
+ attr_accessor :gcs_prefix
2397
+
2398
+ def initialize(**args)
2399
+ update!(**args)
2400
+ end
2401
+
2402
+ # Update properties of this object
2403
+ def update!(**args)
2404
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
2405
+ end
2406
+ end
2407
+
2408
+ # Metadata related to the progress of the Import operation. This will be
2409
+ # returned by the google.longrunning.Operation.metadata field.
2410
+ class GoogleCloudRetailV2mainImportMetadata
2411
+ include Google::Apis::Core::Hashable
2412
+
2413
+ # Operation create time.
2414
+ # Corresponds to the JSON property `createTime`
2415
+ # @return [String]
2416
+ attr_accessor :create_time
2417
+
2418
+ # Count of entries that encountered errors while processing.
2419
+ # Corresponds to the JSON property `failureCount`
2420
+ # @return [Fixnum]
2421
+ attr_accessor :failure_count
2422
+
2423
+ # Count of entries that were processed successfully.
2424
+ # Corresponds to the JSON property `successCount`
2425
+ # @return [Fixnum]
2426
+ attr_accessor :success_count
2427
+
2428
+ # Operation last update time. If the operation is done, this is also the finish
2429
+ # time.
2430
+ # Corresponds to the JSON property `updateTime`
2431
+ # @return [String]
2432
+ attr_accessor :update_time
2433
+
2434
+ def initialize(**args)
2435
+ update!(**args)
2436
+ end
2437
+
2438
+ # Update properties of this object
2439
+ def update!(**args)
2440
+ @create_time = args[:create_time] if args.key?(:create_time)
2441
+ @failure_count = args[:failure_count] if args.key?(:failure_count)
2442
+ @success_count = args[:success_count] if args.key?(:success_count)
2443
+ @update_time = args[:update_time] if args.key?(:update_time)
2444
+ end
2445
+ end
2446
+
2447
+ # Response of the ImportProductsRequest. If the long running operation is done,
2448
+ # then this message is returned by the google.longrunning.Operations.response
2449
+ # field if the operation was successful.
2450
+ class GoogleCloudRetailV2mainImportProductsResponse
2451
+ include Google::Apis::Core::Hashable
2452
+
2453
+ # A sample of errors encountered while processing the request.
2454
+ # Corresponds to the JSON property `errorSamples`
2455
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
2456
+ attr_accessor :error_samples
2457
+
2458
+ # Configuration of destination for Import related errors.
2459
+ # Corresponds to the JSON property `errorsConfig`
2460
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainImportErrorsConfig]
2461
+ attr_accessor :errors_config
2462
+
2463
+ def initialize(**args)
2464
+ update!(**args)
2465
+ end
2466
+
2467
+ # Update properties of this object
2468
+ def update!(**args)
2469
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
2470
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
2471
+ end
2472
+ end
2473
+
2474
+ # Response of the ImportUserEventsRequest. If the long running operation was
2475
+ # successful, then this message is returned by the google.longrunning.Operations.
2476
+ # response field if the operation was successful.
2477
+ class GoogleCloudRetailV2mainImportUserEventsResponse
2478
+ include Google::Apis::Core::Hashable
2479
+
2480
+ # A sample of errors encountered while processing the request.
2481
+ # Corresponds to the JSON property `errorSamples`
2482
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
2483
+ attr_accessor :error_samples
2484
+
2485
+ # Configuration of destination for Import related errors.
2486
+ # Corresponds to the JSON property `errorsConfig`
2487
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainImportErrorsConfig]
2488
+ attr_accessor :errors_config
2489
+
2490
+ # A summary of import result. The UserEventImportSummary summarizes the import
2491
+ # status for user events.
2492
+ # Corresponds to the JSON property `importSummary`
2493
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2mainUserEventImportSummary]
2494
+ attr_accessor :import_summary
2495
+
2496
+ def initialize(**args)
2497
+ update!(**args)
2498
+ end
2499
+
2500
+ # Update properties of this object
2501
+ def update!(**args)
2502
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
2503
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
2504
+ @import_summary = args[:import_summary] if args.key?(:import_summary)
2505
+ end
2506
+ end
2507
+
2508
+ # Metadata related to the progress of the Purge operation. This will be returned
2509
+ # by the google.longrunning.Operation.metadata field.
2510
+ class GoogleCloudRetailV2mainPurgeMetadata
2511
+ include Google::Apis::Core::Hashable
2512
+
2513
+ def initialize(**args)
2514
+ update!(**args)
2515
+ end
2516
+
2517
+ # Update properties of this object
2518
+ def update!(**args)
2519
+ end
2520
+ end
2521
+
2522
+ # Response of the PurgeUserEventsRequest. If the long running operation is
2523
+ # successfully done, then this message is returned by the google.longrunning.
2524
+ # Operations.response field.
2525
+ class GoogleCloudRetailV2mainPurgeUserEventsResponse
2526
+ include Google::Apis::Core::Hashable
2527
+
2528
+ # The total count of events purged as a result of the operation.
2529
+ # Corresponds to the JSON property `purgedEventsCount`
2530
+ # @return [Fixnum]
2531
+ attr_accessor :purged_events_count
2532
+
2533
+ def initialize(**args)
2534
+ update!(**args)
2535
+ end
2536
+
2537
+ # Update properties of this object
2538
+ def update!(**args)
2539
+ @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
2540
+ end
2541
+ end
2542
+
2543
+ # Metadata for RejoinUserEvents method.
2544
+ class GoogleCloudRetailV2mainRejoinUserEventsMetadata
2545
+ include Google::Apis::Core::Hashable
2546
+
2547
+ def initialize(**args)
2548
+ update!(**args)
2549
+ end
2550
+
2551
+ # Update properties of this object
2552
+ def update!(**args)
2553
+ end
2554
+ end
2555
+
2556
+ # Response message for RejoinUserEvents method.
2557
+ class GoogleCloudRetailV2mainRejoinUserEventsResponse
2558
+ include Google::Apis::Core::Hashable
2559
+
2560
+ # Number of user events that were joined with latest product catalog.
2561
+ # Corresponds to the JSON property `rejoinedUserEventsCount`
2562
+ # @return [Fixnum]
2563
+ attr_accessor :rejoined_user_events_count
2564
+
2565
+ def initialize(**args)
2566
+ update!(**args)
2567
+ end
2568
+
2569
+ # Update properties of this object
2570
+ def update!(**args)
2571
+ @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
2572
+ end
2573
+ end
2574
+
2575
+ # A summary of import result. The UserEventImportSummary summarizes the import
2576
+ # status for user events.
2577
+ class GoogleCloudRetailV2mainUserEventImportSummary
2578
+ include Google::Apis::Core::Hashable
2579
+
2580
+ # Count of user events imported with complete existing catalog information.
2581
+ # Corresponds to the JSON property `joinedEventsCount`
2582
+ # @return [Fixnum]
2583
+ attr_accessor :joined_events_count
2584
+
2585
+ # Count of user events imported, but with catalog information not found in the
2586
+ # imported catalog.
2587
+ # Corresponds to the JSON property `unjoinedEventsCount`
2588
+ # @return [Fixnum]
2589
+ attr_accessor :unjoined_events_count
2590
+
2591
+ def initialize(**args)
2592
+ update!(**args)
2593
+ end
2594
+
2595
+ # Update properties of this object
2596
+ def update!(**args)
2597
+ @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count)
2598
+ @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count)
2599
+ end
2600
+ end
2601
+
2602
+ # The response message for Operations.ListOperations.
2603
+ class GoogleLongrunningListOperationsResponse
2604
+ include Google::Apis::Core::Hashable
2605
+
2606
+ # The standard List next-page token.
2607
+ # Corresponds to the JSON property `nextPageToken`
2608
+ # @return [String]
2609
+ attr_accessor :next_page_token
2610
+
2611
+ # A list of operations that matches the specified filter in the request.
2612
+ # Corresponds to the JSON property `operations`
2613
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleLongrunningOperation>]
2614
+ attr_accessor :operations
2615
+
2616
+ def initialize(**args)
2617
+ update!(**args)
2618
+ end
2619
+
2620
+ # Update properties of this object
2621
+ def update!(**args)
2622
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2623
+ @operations = args[:operations] if args.key?(:operations)
2624
+ end
2625
+ end
2626
+
2627
+ # This resource represents a long-running operation that is the result of a
2628
+ # network API call.
2629
+ class GoogleLongrunningOperation
2630
+ include Google::Apis::Core::Hashable
2631
+
2632
+ # If the value is `false`, it means the operation is still in progress. If `true`
2633
+ # , the operation is completed, and either `error` or `response` is available.
2634
+ # Corresponds to the JSON property `done`
2635
+ # @return [Boolean]
2636
+ attr_accessor :done
2637
+ alias_method :done?, :done
2638
+
2639
+ # The `Status` type defines a logical error model that is suitable for different
2640
+ # programming environments, including REST APIs and RPC APIs. It is used by [
2641
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
2642
+ # data: error code, error message, and error details. You can find out more
2643
+ # about this error model and how to work with it in the [API Design Guide](https:
2644
+ # //cloud.google.com/apis/design/errors).
2645
+ # Corresponds to the JSON property `error`
2646
+ # @return [Google::Apis::RetailV2alpha::GoogleRpcStatus]
2647
+ attr_accessor :error
2648
+
2649
+ # Service-specific metadata associated with the operation. It typically contains
2650
+ # progress information and common metadata such as create time. Some services
2651
+ # might not provide such metadata. Any method that returns a long-running
2652
+ # operation should document the metadata type, if any.
2653
+ # Corresponds to the JSON property `metadata`
2654
+ # @return [Hash<String,Object>]
2655
+ attr_accessor :metadata
2656
+
2657
+ # The server-assigned name, which is only unique within the same service that
2658
+ # originally returns it. If you use the default HTTP mapping, the `name` should
2659
+ # be a resource name ending with `operations/`unique_id``.
2660
+ # Corresponds to the JSON property `name`
2661
+ # @return [String]
2662
+ attr_accessor :name
2663
+
2664
+ # The normal response of the operation in case of success. If the original
2665
+ # method returns no data on success, such as `Delete`, the response is `google.
2666
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
2667
+ # the response should be the resource. For other methods, the response should
2668
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
2669
+ # example, if the original method name is `TakeSnapshot()`, the inferred
2670
+ # response type is `TakeSnapshotResponse`.
2671
+ # Corresponds to the JSON property `response`
2672
+ # @return [Hash<String,Object>]
2673
+ attr_accessor :response
2674
+
2675
+ def initialize(**args)
2676
+ update!(**args)
2677
+ end
2678
+
2679
+ # Update properties of this object
2680
+ def update!(**args)
2681
+ @done = args[:done] if args.key?(:done)
2682
+ @error = args[:error] if args.key?(:error)
2683
+ @metadata = args[:metadata] if args.key?(:metadata)
2684
+ @name = args[:name] if args.key?(:name)
2685
+ @response = args[:response] if args.key?(:response)
2686
+ end
2687
+ end
2688
+
2689
+ # A generic empty message that you can re-use to avoid defining duplicated empty
2690
+ # messages in your APIs. A typical example is to use it as the request or the
2691
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
2692
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
2693
+ # `Empty` is empty JSON object ````.
2694
+ class GoogleProtobufEmpty
2695
+ include Google::Apis::Core::Hashable
2696
+
2697
+ def initialize(**args)
2698
+ update!(**args)
2699
+ end
2700
+
2701
+ # Update properties of this object
2702
+ def update!(**args)
2703
+ end
2704
+ end
2705
+
2706
+ # The `Status` type defines a logical error model that is suitable for different
2707
+ # programming environments, including REST APIs and RPC APIs. It is used by [
2708
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
2709
+ # data: error code, error message, and error details. You can find out more
2710
+ # about this error model and how to work with it in the [API Design Guide](https:
2711
+ # //cloud.google.com/apis/design/errors).
2712
+ class GoogleRpcStatus
2713
+ include Google::Apis::Core::Hashable
2714
+
2715
+ # The status code, which should be an enum value of google.rpc.Code.
2716
+ # Corresponds to the JSON property `code`
2717
+ # @return [Fixnum]
2718
+ attr_accessor :code
2719
+
2720
+ # A list of messages that carry the error details. There is a common set of
2721
+ # message types for APIs to use.
2722
+ # Corresponds to the JSON property `details`
2723
+ # @return [Array<Hash<String,Object>>]
2724
+ attr_accessor :details
2725
+
2726
+ # A developer-facing error message, which should be in English. Any user-facing
2727
+ # error message should be localized and sent in the google.rpc.Status.details
2728
+ # field, or localized by the client.
2729
+ # Corresponds to the JSON property `message`
2730
+ # @return [String]
2731
+ attr_accessor :message
2732
+
2733
+ def initialize(**args)
2734
+ update!(**args)
2735
+ end
2736
+
2737
+ # Update properties of this object
2738
+ def update!(**args)
2739
+ @code = args[:code] if args.key?(:code)
2740
+ @details = args[:details] if args.key?(:details)
2741
+ @message = args[:message] if args.key?(:message)
2742
+ end
2743
+ end
2744
+ end
2745
+ end
2746
+ end