google-apis-retail_v2beta 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: 443fdb223da8ca51f54e4c90bf2cd815ebf0afe6ca150ec9dab4db36aa45fb35
4
+ data.tar.gz: 1785de40f1459b459bcbbcc488e2aeacf7bb12662539742467690fe9be454995
5
+ SHA512:
6
+ metadata.gz: 51e6dfd9dfd12226993e59552152707e32bdff348c88639235fa8b1912781d3e70007782991787748c107d7c0fa546598345b890bc98fbfbe4c4739944e6a5d9
7
+ data.tar.gz: 508920b039535c9fd252ab3a6f02bfc7e30335dd461ba713cf5a52c56d0b4abe2900550706a6be515567bb47b1f3815dbcf824b25ead894e5b5233f9fb4743a7
data/.yardopts ADDED
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-retail_v2beta
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/retail_v2beta/*.rb
9
+ lib/google/apis/retail_v2beta.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-retail_v2beta
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
+
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 V2beta of the Retail API
2
+
3
+ This is a simple client library for version V2beta 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_v2beta', '~> 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_v2beta
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_v2beta"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::RetailV2beta::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::RetailV2beta::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_v2beta`, 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_v2beta"
@@ -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_v2beta/service.rb'
16
+ require 'google/apis/retail_v2beta/classes.rb'
17
+ require 'google/apis/retail_v2beta/representations.rb'
18
+ require 'google/apis/retail_v2beta/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 RetailV2beta
30
+ # Version of the Retail API this client connects to.
31
+ # This is NOT the gem version.
32
+ VERSION = 'V2beta'
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 RetailV2beta
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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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
+ # Configuration of destination for Export related errors.
497
+ class GoogleCloudRetailV2alphaExportErrorsConfig
498
+ include Google::Apis::Core::Hashable
499
+
500
+ # Google Cloud Storage path for import errors. This must be an empty, existing
501
+ # Cloud Storage bucket. Export errors will be written to a file in this bucket,
502
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
503
+ # Corresponds to the JSON property `gcsPrefix`
504
+ # @return [String]
505
+ attr_accessor :gcs_prefix
506
+
507
+ def initialize(**args)
508
+ update!(**args)
509
+ end
510
+
511
+ # Update properties of this object
512
+ def update!(**args)
513
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
514
+ end
515
+ end
516
+
517
+ # Metadata related to the progress of the Export operation. This will be
518
+ # returned by the google.longrunning.Operation.metadata field.
519
+ class GoogleCloudRetailV2alphaExportMetadata
520
+ include Google::Apis::Core::Hashable
521
+
522
+ # Operation create time.
523
+ # Corresponds to the JSON property `createTime`
524
+ # @return [String]
525
+ attr_accessor :create_time
526
+
527
+ # Operation last update time. If the operation is done, this is also the finish
528
+ # time.
529
+ # Corresponds to the JSON property `updateTime`
530
+ # @return [String]
531
+ attr_accessor :update_time
532
+
533
+ def initialize(**args)
534
+ update!(**args)
535
+ end
536
+
537
+ # Update properties of this object
538
+ def update!(**args)
539
+ @create_time = args[:create_time] if args.key?(:create_time)
540
+ @update_time = args[:update_time] if args.key?(:update_time)
541
+ end
542
+ end
543
+
544
+ # Response of the ExportProductsRequest. If the long running operation is done,
545
+ # then this message is returned by the google.longrunning.Operations.response
546
+ # field if the operation was successful.
547
+ class GoogleCloudRetailV2alphaExportProductsResponse
548
+ include Google::Apis::Core::Hashable
549
+
550
+ # A sample of errors encountered while processing the request.
551
+ # Corresponds to the JSON property `errorSamples`
552
+ # @return [Array<Google::Apis::RetailV2beta::GoogleRpcStatus>]
553
+ attr_accessor :error_samples
554
+
555
+ # Configuration of destination for Export related errors.
556
+ # Corresponds to the JSON property `errorsConfig`
557
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaExportErrorsConfig]
558
+ attr_accessor :errors_config
559
+
560
+ def initialize(**args)
561
+ update!(**args)
562
+ end
563
+
564
+ # Update properties of this object
565
+ def update!(**args)
566
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
567
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
568
+ end
569
+ end
570
+
571
+ # Response of the ExportUserEventsRequest. If the long running operation was
572
+ # successful, then this message is returned by the google.longrunning.Operations.
573
+ # response field if the operation was successful.
574
+ class GoogleCloudRetailV2alphaExportUserEventsResponse
575
+ include Google::Apis::Core::Hashable
576
+
577
+ # A sample of errors encountered while processing the request.
578
+ # Corresponds to the JSON property `errorSamples`
579
+ # @return [Array<Google::Apis::RetailV2beta::GoogleRpcStatus>]
580
+ attr_accessor :error_samples
581
+
582
+ # Configuration of destination for Export related errors.
583
+ # Corresponds to the JSON property `errorsConfig`
584
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaExportErrorsConfig]
585
+ attr_accessor :errors_config
586
+
587
+ def initialize(**args)
588
+ update!(**args)
589
+ end
590
+
591
+ # Update properties of this object
592
+ def update!(**args)
593
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
594
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
595
+ end
596
+ end
597
+
598
+ # Configuration of destination for Import related errors.
599
+ class GoogleCloudRetailV2alphaImportErrorsConfig
600
+ include Google::Apis::Core::Hashable
601
+
602
+ # Google Cloud Storage path for import errors. This must be an empty, existing
603
+ # Cloud Storage bucket. Import errors will be written to a file in this bucket,
604
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
605
+ # Corresponds to the JSON property `gcsPrefix`
606
+ # @return [String]
607
+ attr_accessor :gcs_prefix
608
+
609
+ def initialize(**args)
610
+ update!(**args)
611
+ end
612
+
613
+ # Update properties of this object
614
+ def update!(**args)
615
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
616
+ end
617
+ end
618
+
619
+ # Metadata related to the progress of the Import operation. This will be
620
+ # returned by the google.longrunning.Operation.metadata field.
621
+ class GoogleCloudRetailV2alphaImportMetadata
622
+ include Google::Apis::Core::Hashable
623
+
624
+ # Operation create time.
625
+ # Corresponds to the JSON property `createTime`
626
+ # @return [String]
627
+ attr_accessor :create_time
628
+
629
+ # Count of entries that encountered errors while processing.
630
+ # Corresponds to the JSON property `failureCount`
631
+ # @return [Fixnum]
632
+ attr_accessor :failure_count
633
+
634
+ # Count of entries that were processed successfully.
635
+ # Corresponds to the JSON property `successCount`
636
+ # @return [Fixnum]
637
+ attr_accessor :success_count
638
+
639
+ # Operation last update time. If the operation is done, this is also the finish
640
+ # time.
641
+ # Corresponds to the JSON property `updateTime`
642
+ # @return [String]
643
+ attr_accessor :update_time
644
+
645
+ def initialize(**args)
646
+ update!(**args)
647
+ end
648
+
649
+ # Update properties of this object
650
+ def update!(**args)
651
+ @create_time = args[:create_time] if args.key?(:create_time)
652
+ @failure_count = args[:failure_count] if args.key?(:failure_count)
653
+ @success_count = args[:success_count] if args.key?(:success_count)
654
+ @update_time = args[:update_time] if args.key?(:update_time)
655
+ end
656
+ end
657
+
658
+ # Response of the ImportProductsRequest. If the long running operation is done,
659
+ # then this message is returned by the google.longrunning.Operations.response
660
+ # field if the operation was successful.
661
+ class GoogleCloudRetailV2alphaImportProductsResponse
662
+ include Google::Apis::Core::Hashable
663
+
664
+ # A sample of errors encountered while processing the request.
665
+ # Corresponds to the JSON property `errorSamples`
666
+ # @return [Array<Google::Apis::RetailV2beta::GoogleRpcStatus>]
667
+ attr_accessor :error_samples
668
+
669
+ # Configuration of destination for Import related errors.
670
+ # Corresponds to the JSON property `errorsConfig`
671
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaImportErrorsConfig]
672
+ attr_accessor :errors_config
673
+
674
+ def initialize(**args)
675
+ update!(**args)
676
+ end
677
+
678
+ # Update properties of this object
679
+ def update!(**args)
680
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
681
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
682
+ end
683
+ end
684
+
685
+ # Response of the ImportUserEventsRequest. If the long running operation was
686
+ # successful, then this message is returned by the google.longrunning.Operations.
687
+ # response field if the operation was successful.
688
+ class GoogleCloudRetailV2alphaImportUserEventsResponse
689
+ include Google::Apis::Core::Hashable
690
+
691
+ # A sample of errors encountered while processing the request.
692
+ # Corresponds to the JSON property `errorSamples`
693
+ # @return [Array<Google::Apis::RetailV2beta::GoogleRpcStatus>]
694
+ attr_accessor :error_samples
695
+
696
+ # Configuration of destination for Import related errors.
697
+ # Corresponds to the JSON property `errorsConfig`
698
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaImportErrorsConfig]
699
+ attr_accessor :errors_config
700
+
701
+ # A summary of import result. The UserEventImportSummary summarizes the import
702
+ # status for user events.
703
+ # Corresponds to the JSON property `importSummary`
704
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2alphaUserEventImportSummary]
705
+ attr_accessor :import_summary
706
+
707
+ def initialize(**args)
708
+ update!(**args)
709
+ end
710
+
711
+ # Update properties of this object
712
+ def update!(**args)
713
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
714
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
715
+ @import_summary = args[:import_summary] if args.key?(:import_summary)
716
+ end
717
+ end
718
+
719
+ # Metadata related to the progress of the Purge operation. This will be returned
720
+ # by the google.longrunning.Operation.metadata field.
721
+ class GoogleCloudRetailV2alphaPurgeMetadata
722
+ include Google::Apis::Core::Hashable
723
+
724
+ def initialize(**args)
725
+ update!(**args)
726
+ end
727
+
728
+ # Update properties of this object
729
+ def update!(**args)
730
+ end
731
+ end
732
+
733
+ # Response of the PurgeUserEventsRequest. If the long running operation is
734
+ # successfully done, then this message is returned by the google.longrunning.
735
+ # Operations.response field.
736
+ class GoogleCloudRetailV2alphaPurgeUserEventsResponse
737
+ include Google::Apis::Core::Hashable
738
+
739
+ # The total count of events purged as a result of the operation.
740
+ # Corresponds to the JSON property `purgedEventsCount`
741
+ # @return [Fixnum]
742
+ attr_accessor :purged_events_count
743
+
744
+ def initialize(**args)
745
+ update!(**args)
746
+ end
747
+
748
+ # Update properties of this object
749
+ def update!(**args)
750
+ @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
751
+ end
752
+ end
753
+
754
+ # Metadata for RejoinUserEvents method.
755
+ class GoogleCloudRetailV2alphaRejoinUserEventsMetadata
756
+ include Google::Apis::Core::Hashable
757
+
758
+ def initialize(**args)
759
+ update!(**args)
760
+ end
761
+
762
+ # Update properties of this object
763
+ def update!(**args)
764
+ end
765
+ end
766
+
767
+ # Response message for RejoinUserEvents method.
768
+ class GoogleCloudRetailV2alphaRejoinUserEventsResponse
769
+ include Google::Apis::Core::Hashable
770
+
771
+ # Number of user events that were joined with latest product catalog.
772
+ # Corresponds to the JSON property `rejoinedUserEventsCount`
773
+ # @return [Fixnum]
774
+ attr_accessor :rejoined_user_events_count
775
+
776
+ def initialize(**args)
777
+ update!(**args)
778
+ end
779
+
780
+ # Update properties of this object
781
+ def update!(**args)
782
+ @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
783
+ end
784
+ end
785
+
786
+ # A summary of import result. The UserEventImportSummary summarizes the import
787
+ # status for user events.
788
+ class GoogleCloudRetailV2alphaUserEventImportSummary
789
+ include Google::Apis::Core::Hashable
790
+
791
+ # Count of user events imported with complete existing catalog information.
792
+ # Corresponds to the JSON property `joinedEventsCount`
793
+ # @return [Fixnum]
794
+ attr_accessor :joined_events_count
795
+
796
+ # Count of user events imported, but with catalog information not found in the
797
+ # imported catalog.
798
+ # Corresponds to the JSON property `unjoinedEventsCount`
799
+ # @return [Fixnum]
800
+ attr_accessor :unjoined_events_count
801
+
802
+ def initialize(**args)
803
+ update!(**args)
804
+ end
805
+
806
+ # Update properties of this object
807
+ def update!(**args)
808
+ @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count)
809
+ @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count)
810
+ end
811
+ end
812
+
813
+ # BigQuery source import data from.
814
+ class GoogleCloudRetailV2betaBigQuerySource
815
+ include Google::Apis::Core::Hashable
816
+
817
+ # The schema to use when parsing the data from the source. Supported values for
818
+ # product imports: * `product` (default): One JSON Product per line. Each
819
+ # product must have a valid Product.id. * `product_merchant_center`: See [
820
+ # Importing catalog data from Merchant Center](https://cloud.google.com/retail/
821
+ # recommendations-ai/docs/upload-catalog#mc). Supported values for user events
822
+ # imports: * `user_event` (default): One JSON UserEvent per line. * `
823
+ # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719?
824
+ # hl=en.
825
+ # Corresponds to the JSON property `dataSchema`
826
+ # @return [String]
827
+ attr_accessor :data_schema
828
+
829
+ # Required. The BigQuery data set to copy the data from with a length limit of 1,
830
+ # 024 characters.
831
+ # Corresponds to the JSON property `datasetId`
832
+ # @return [String]
833
+ attr_accessor :dataset_id
834
+
835
+ # Intermediate Cloud Storage directory used for the import with a length limit
836
+ # of 2,000 characters. Can be specified if one wants to have the BigQuery export
837
+ # to a specific Cloud Storage directory.
838
+ # Corresponds to the JSON property `gcsStagingDir`
839
+ # @return [String]
840
+ attr_accessor :gcs_staging_dir
841
+
842
+ # The project id (can be project # or id) that the BigQuery source is in with a
843
+ # length limit of 128 characters. If not specified, inherits the project id from
844
+ # the parent request.
845
+ # Corresponds to the JSON property `projectId`
846
+ # @return [String]
847
+ attr_accessor :project_id
848
+
849
+ # Required. The BigQuery table to copy the data from with a length limit of 1,
850
+ # 024 characters.
851
+ # Corresponds to the JSON property `tableId`
852
+ # @return [String]
853
+ attr_accessor :table_id
854
+
855
+ def initialize(**args)
856
+ update!(**args)
857
+ end
858
+
859
+ # Update properties of this object
860
+ def update!(**args)
861
+ @data_schema = args[:data_schema] if args.key?(:data_schema)
862
+ @dataset_id = args[:dataset_id] if args.key?(:dataset_id)
863
+ @gcs_staging_dir = args[:gcs_staging_dir] if args.key?(:gcs_staging_dir)
864
+ @project_id = args[:project_id] if args.key?(:project_id)
865
+ @table_id = args[:table_id] if args.key?(:table_id)
866
+ end
867
+ end
868
+
869
+ # The catalog configuration.
870
+ class GoogleCloudRetailV2betaCatalog
871
+ include Google::Apis::Core::Hashable
872
+
873
+ # Required. Immutable. The catalog display name. This field must be a UTF-8
874
+ # encoded string with a length limit of 128 characters. Otherwise, an
875
+ # INVALID_ARGUMENT error is returned.
876
+ # Corresponds to the JSON property `displayName`
877
+ # @return [String]
878
+ attr_accessor :display_name
879
+
880
+ # Required. Immutable. The fully qualified resource name of the catalog.
881
+ # Corresponds to the JSON property `name`
882
+ # @return [String]
883
+ attr_accessor :name
884
+
885
+ # Configures what level the product should be uploaded with regards to how users
886
+ # will be send events and how predictions will be made.
887
+ # Corresponds to the JSON property `productLevelConfig`
888
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductLevelConfig]
889
+ attr_accessor :product_level_config
890
+
891
+ def initialize(**args)
892
+ update!(**args)
893
+ end
894
+
895
+ # Update properties of this object
896
+ def update!(**args)
897
+ @display_name = args[:display_name] if args.key?(:display_name)
898
+ @name = args[:name] if args.key?(:name)
899
+ @product_level_config = args[:product_level_config] if args.key?(:product_level_config)
900
+ end
901
+ end
902
+
903
+ # A custom attribute that is not explicitly modeled in Product.
904
+ class GoogleCloudRetailV2betaCustomAttribute
905
+ include Google::Apis::Core::Hashable
906
+
907
+ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when
908
+ # the key is "lengths_cm". At most 400 values are allowed.Otherwise, an
909
+ # INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be
910
+ # set. Otherwise, an INVALID_ARGUMENT error is returned.
911
+ # Corresponds to the JSON property `numbers`
912
+ # @return [Array<Float>]
913
+ attr_accessor :numbers
914
+
915
+ # The textual values of this custom attribute. For example, `["yellow", "green"]`
916
+ # when the key is "color". At most 400 values are allowed. Empty values are not
917
+ # allowed. Each value must be a UTF-8 encoded string with a length limit of 256
918
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of
919
+ # text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is
920
+ # returned.
921
+ # Corresponds to the JSON property `text`
922
+ # @return [Array<String>]
923
+ attr_accessor :text
924
+
925
+ def initialize(**args)
926
+ update!(**args)
927
+ end
928
+
929
+ # Update properties of this object
930
+ def update!(**args)
931
+ @numbers = args[:numbers] if args.key?(:numbers)
932
+ @text = args[:text] if args.key?(:text)
933
+ end
934
+ end
935
+
936
+ # Configuration of destination for Export related errors.
937
+ class GoogleCloudRetailV2betaExportErrorsConfig
938
+ include Google::Apis::Core::Hashable
939
+
940
+ # Google Cloud Storage path for import errors. This must be an empty, existing
941
+ # Cloud Storage bucket. Export errors will be written to a file in this bucket,
942
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
943
+ # Corresponds to the JSON property `gcsPrefix`
944
+ # @return [String]
945
+ attr_accessor :gcs_prefix
946
+
947
+ def initialize(**args)
948
+ update!(**args)
949
+ end
950
+
951
+ # Update properties of this object
952
+ def update!(**args)
953
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
954
+ end
955
+ end
956
+
957
+ # Metadata related to the progress of the Export operation. This will be
958
+ # returned by the google.longrunning.Operation.metadata field.
959
+ class GoogleCloudRetailV2betaExportMetadata
960
+ include Google::Apis::Core::Hashable
961
+
962
+ # Operation create time.
963
+ # Corresponds to the JSON property `createTime`
964
+ # @return [String]
965
+ attr_accessor :create_time
966
+
967
+ # Operation last update time. If the operation is done, this is also the finish
968
+ # time.
969
+ # Corresponds to the JSON property `updateTime`
970
+ # @return [String]
971
+ attr_accessor :update_time
972
+
973
+ def initialize(**args)
974
+ update!(**args)
975
+ end
976
+
977
+ # Update properties of this object
978
+ def update!(**args)
979
+ @create_time = args[:create_time] if args.key?(:create_time)
980
+ @update_time = args[:update_time] if args.key?(:update_time)
981
+ end
982
+ end
983
+
984
+ # Response of the ExportProductsRequest. If the long running operation is done,
985
+ # then this message is returned by the google.longrunning.Operations.response
986
+ # field if the operation was successful.
987
+ class GoogleCloudRetailV2betaExportProductsResponse
988
+ include Google::Apis::Core::Hashable
989
+
990
+ # A sample of errors encountered while processing the request.
991
+ # Corresponds to the JSON property `errorSamples`
992
+ # @return [Array<Google::Apis::RetailV2beta::GoogleRpcStatus>]
993
+ attr_accessor :error_samples
994
+
995
+ # Configuration of destination for Export related errors.
996
+ # Corresponds to the JSON property `errorsConfig`
997
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaExportErrorsConfig]
998
+ attr_accessor :errors_config
999
+
1000
+ def initialize(**args)
1001
+ update!(**args)
1002
+ end
1003
+
1004
+ # Update properties of this object
1005
+ def update!(**args)
1006
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
1007
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
1008
+ end
1009
+ end
1010
+
1011
+ # Response of the ExportUserEventsRequest. If the long running operation was
1012
+ # successful, then this message is returned by the google.longrunning.Operations.
1013
+ # response field if the operation was successful.
1014
+ class GoogleCloudRetailV2betaExportUserEventsResponse
1015
+ include Google::Apis::Core::Hashable
1016
+
1017
+ # A sample of errors encountered while processing the request.
1018
+ # Corresponds to the JSON property `errorSamples`
1019
+ # @return [Array<Google::Apis::RetailV2beta::GoogleRpcStatus>]
1020
+ attr_accessor :error_samples
1021
+
1022
+ # Configuration of destination for Export related errors.
1023
+ # Corresponds to the JSON property `errorsConfig`
1024
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaExportErrorsConfig]
1025
+ attr_accessor :errors_config
1026
+
1027
+ def initialize(**args)
1028
+ update!(**args)
1029
+ end
1030
+
1031
+ # Update properties of this object
1032
+ def update!(**args)
1033
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
1034
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
1035
+ end
1036
+ end
1037
+
1038
+ # Google Cloud Storage location for input content. format.
1039
+ class GoogleCloudRetailV2betaGcsSource
1040
+ include Google::Apis::Core::Hashable
1041
+
1042
+ # The schema to use when parsing the data from the source. Supported values for
1043
+ # product imports: * `product` (default): One JSON Product per line. Each
1044
+ # product must have a valid Product.id. * `product_merchant_center`: See [
1045
+ # Importing catalog data from Merchant Center](https://cloud.google.com/retail/
1046
+ # recommendations-ai/docs/upload-catalog#mcc). Supported values for user events
1047
+ # imports: * `user_event` (default): One JSON UserEvent per line. * `
1048
+ # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719?
1049
+ # hl=en.
1050
+ # Corresponds to the JSON property `dataSchema`
1051
+ # @return [String]
1052
+ attr_accessor :data_schema
1053
+
1054
+ # Required. Google Cloud Storage URIs to input files. URI can be up to 2000
1055
+ # characters long. URIs can match the full object path (for example, `gs://
1056
+ # bucket/directory/object.json`) or a pattern matching one or more files, such
1057
+ # as `gs://bucket/directory/*.json`. A request can contain at most 100 files,
1058
+ # and each file can be up to 2 GB. See [Importing product information](https://
1059
+ # cloud.google.com/recommendations-ai/docs/upload-catalog) for the expected file
1060
+ # format and setup instructions.
1061
+ # Corresponds to the JSON property `inputUris`
1062
+ # @return [Array<String>]
1063
+ attr_accessor :input_uris
1064
+
1065
+ def initialize(**args)
1066
+ update!(**args)
1067
+ end
1068
+
1069
+ # Update properties of this object
1070
+ def update!(**args)
1071
+ @data_schema = args[:data_schema] if args.key?(:data_schema)
1072
+ @input_uris = args[:input_uris] if args.key?(:input_uris)
1073
+ end
1074
+ end
1075
+
1076
+ # Product thumbnail/detail image.
1077
+ class GoogleCloudRetailV2betaImage
1078
+ include Google::Apis::Core::Hashable
1079
+
1080
+ # Height of the image in number of pixels. This field must be nonnegative.
1081
+ # Otherwise, an INVALID_ARGUMENT error is returned.
1082
+ # Corresponds to the JSON property `height`
1083
+ # @return [Fixnum]
1084
+ attr_accessor :height
1085
+
1086
+ # Required. URI of the image. This field must be a valid UTF-8 encoded URI with
1087
+ # a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
1088
+ # returned. Google Merchant Center property [image_link](https://support.google.
1089
+ # com/merchants/answer/6324350). Schema.org property [Product.image](https://
1090
+ # schema.org/image).
1091
+ # Corresponds to the JSON property `uri`
1092
+ # @return [String]
1093
+ attr_accessor :uri
1094
+
1095
+ # Width of the image in number of pixels. This field must be nonnegative.
1096
+ # Otherwise, an INVALID_ARGUMENT error is returned.
1097
+ # Corresponds to the JSON property `width`
1098
+ # @return [Fixnum]
1099
+ attr_accessor :width
1100
+
1101
+ def initialize(**args)
1102
+ update!(**args)
1103
+ end
1104
+
1105
+ # Update properties of this object
1106
+ def update!(**args)
1107
+ @height = args[:height] if args.key?(:height)
1108
+ @uri = args[:uri] if args.key?(:uri)
1109
+ @width = args[:width] if args.key?(:width)
1110
+ end
1111
+ end
1112
+
1113
+ # Configuration of destination for Import related errors.
1114
+ class GoogleCloudRetailV2betaImportErrorsConfig
1115
+ include Google::Apis::Core::Hashable
1116
+
1117
+ # Google Cloud Storage path for import errors. This must be an empty, existing
1118
+ # Cloud Storage bucket. Import errors will be written to a file in this bucket,
1119
+ # one per line, as a JSON-encoded `google.rpc.Status` message.
1120
+ # Corresponds to the JSON property `gcsPrefix`
1121
+ # @return [String]
1122
+ attr_accessor :gcs_prefix
1123
+
1124
+ def initialize(**args)
1125
+ update!(**args)
1126
+ end
1127
+
1128
+ # Update properties of this object
1129
+ def update!(**args)
1130
+ @gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
1131
+ end
1132
+ end
1133
+
1134
+ # Metadata related to the progress of the Import operation. This will be
1135
+ # returned by the google.longrunning.Operation.metadata field.
1136
+ class GoogleCloudRetailV2betaImportMetadata
1137
+ include Google::Apis::Core::Hashable
1138
+
1139
+ # Operation create time.
1140
+ # Corresponds to the JSON property `createTime`
1141
+ # @return [String]
1142
+ attr_accessor :create_time
1143
+
1144
+ # Count of entries that encountered errors while processing.
1145
+ # Corresponds to the JSON property `failureCount`
1146
+ # @return [Fixnum]
1147
+ attr_accessor :failure_count
1148
+
1149
+ # Count of entries that were processed successfully.
1150
+ # Corresponds to the JSON property `successCount`
1151
+ # @return [Fixnum]
1152
+ attr_accessor :success_count
1153
+
1154
+ # Operation last update time. If the operation is done, this is also the finish
1155
+ # time.
1156
+ # Corresponds to the JSON property `updateTime`
1157
+ # @return [String]
1158
+ attr_accessor :update_time
1159
+
1160
+ def initialize(**args)
1161
+ update!(**args)
1162
+ end
1163
+
1164
+ # Update properties of this object
1165
+ def update!(**args)
1166
+ @create_time = args[:create_time] if args.key?(:create_time)
1167
+ @failure_count = args[:failure_count] if args.key?(:failure_count)
1168
+ @success_count = args[:success_count] if args.key?(:success_count)
1169
+ @update_time = args[:update_time] if args.key?(:update_time)
1170
+ end
1171
+ end
1172
+
1173
+ # Request message for Import methods.
1174
+ class GoogleCloudRetailV2betaImportProductsRequest
1175
+ include Google::Apis::Core::Hashable
1176
+
1177
+ # Configuration of destination for Import related errors.
1178
+ # Corresponds to the JSON property `errorsConfig`
1179
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig]
1180
+ attr_accessor :errors_config
1181
+
1182
+ # The input config source for products.
1183
+ # Corresponds to the JSON property `inputConfig`
1184
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductInputConfig]
1185
+ attr_accessor :input_config
1186
+
1187
+ # Indicates which fields in the provided imported 'products' to update. If not
1188
+ # set, will by default update all fields.
1189
+ # Corresponds to the JSON property `updateMask`
1190
+ # @return [String]
1191
+ attr_accessor :update_mask
1192
+
1193
+ def initialize(**args)
1194
+ update!(**args)
1195
+ end
1196
+
1197
+ # Update properties of this object
1198
+ def update!(**args)
1199
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
1200
+ @input_config = args[:input_config] if args.key?(:input_config)
1201
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
1202
+ end
1203
+ end
1204
+
1205
+ # Response of the ImportProductsRequest. If the long running operation is done,
1206
+ # then this message is returned by the google.longrunning.Operations.response
1207
+ # field if the operation was successful.
1208
+ class GoogleCloudRetailV2betaImportProductsResponse
1209
+ include Google::Apis::Core::Hashable
1210
+
1211
+ # A sample of errors encountered while processing the request.
1212
+ # Corresponds to the JSON property `errorSamples`
1213
+ # @return [Array<Google::Apis::RetailV2beta::GoogleRpcStatus>]
1214
+ attr_accessor :error_samples
1215
+
1216
+ # Configuration of destination for Import related errors.
1217
+ # Corresponds to the JSON property `errorsConfig`
1218
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig]
1219
+ attr_accessor :errors_config
1220
+
1221
+ def initialize(**args)
1222
+ update!(**args)
1223
+ end
1224
+
1225
+ # Update properties of this object
1226
+ def update!(**args)
1227
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
1228
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
1229
+ end
1230
+ end
1231
+
1232
+ # Request message for the ImportUserEvents request.
1233
+ class GoogleCloudRetailV2betaImportUserEventsRequest
1234
+ include Google::Apis::Core::Hashable
1235
+
1236
+ # Configuration of destination for Import related errors.
1237
+ # Corresponds to the JSON property `errorsConfig`
1238
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig]
1239
+ attr_accessor :errors_config
1240
+
1241
+ # The input config source for user events.
1242
+ # Corresponds to the JSON property `inputConfig`
1243
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventInputConfig]
1244
+ attr_accessor :input_config
1245
+
1246
+ def initialize(**args)
1247
+ update!(**args)
1248
+ end
1249
+
1250
+ # Update properties of this object
1251
+ def update!(**args)
1252
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
1253
+ @input_config = args[:input_config] if args.key?(:input_config)
1254
+ end
1255
+ end
1256
+
1257
+ # Response of the ImportUserEventsRequest. If the long running operation was
1258
+ # successful, then this message is returned by the google.longrunning.Operations.
1259
+ # response field if the operation was successful.
1260
+ class GoogleCloudRetailV2betaImportUserEventsResponse
1261
+ include Google::Apis::Core::Hashable
1262
+
1263
+ # A sample of errors encountered while processing the request.
1264
+ # Corresponds to the JSON property `errorSamples`
1265
+ # @return [Array<Google::Apis::RetailV2beta::GoogleRpcStatus>]
1266
+ attr_accessor :error_samples
1267
+
1268
+ # Configuration of destination for Import related errors.
1269
+ # Corresponds to the JSON property `errorsConfig`
1270
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImportErrorsConfig]
1271
+ attr_accessor :errors_config
1272
+
1273
+ # A summary of import result. The UserEventImportSummary summarizes the import
1274
+ # status for user events.
1275
+ # Corresponds to the JSON property `importSummary`
1276
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventImportSummary]
1277
+ attr_accessor :import_summary
1278
+
1279
+ def initialize(**args)
1280
+ update!(**args)
1281
+ end
1282
+
1283
+ # Update properties of this object
1284
+ def update!(**args)
1285
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
1286
+ @errors_config = args[:errors_config] if args.key?(:errors_config)
1287
+ @import_summary = args[:import_summary] if args.key?(:import_summary)
1288
+ end
1289
+ end
1290
+
1291
+ # Response for CatalogService.ListCatalogs method.
1292
+ class GoogleCloudRetailV2betaListCatalogsResponse
1293
+ include Google::Apis::Core::Hashable
1294
+
1295
+ # All the customer's Catalogs.
1296
+ # Corresponds to the JSON property `catalogs`
1297
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalog>]
1298
+ attr_accessor :catalogs
1299
+
1300
+ # A token that can be sent as ListCatalogsRequest.page_token to retrieve the
1301
+ # next page. If this field is omitted, there are no subsequent pages.
1302
+ # Corresponds to the JSON property `nextPageToken`
1303
+ # @return [String]
1304
+ attr_accessor :next_page_token
1305
+
1306
+ def initialize(**args)
1307
+ update!(**args)
1308
+ end
1309
+
1310
+ # Update properties of this object
1311
+ def update!(**args)
1312
+ @catalogs = args[:catalogs] if args.key?(:catalogs)
1313
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1314
+ end
1315
+ end
1316
+
1317
+ # Request message for Predict method.
1318
+ class GoogleCloudRetailV2betaPredictRequest
1319
+ include Google::Apis::Core::Hashable
1320
+
1321
+ # Filter for restricting prediction results with a length limit of 5,000
1322
+ # characters. Accepts values for tags and the `filterOutOfStockItems` flag. *
1323
+ # Tag expressions. Restricts predictions to products that match all of the
1324
+ # specified tags. Boolean operators `OR` and `NOT` are supported if the
1325
+ # expression is enclosed in parentheses, and must be separated from the tag
1326
+ # values by a space. `-"tagA"` is also supported and is equivalent to `NOT "tagA"
1327
+ # `. Tag values must be double quoted UTF-8 encoded strings with a size limit of
1328
+ # 1,000 characters. * filterOutOfStockItems. Restricts predictions to products
1329
+ # that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR
1330
+ # "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems tag=(
1331
+ # -"promotional") * filterOutOfStockItems If your filter blocks all prediction
1332
+ # results, nothing will be returned. If you want generic (unfiltered) popular
1333
+ # products to be returned instead, set `strictFiltering` to false in `
1334
+ # PredictRequest.params`.
1335
+ # Corresponds to the JSON property `filter`
1336
+ # @return [String]
1337
+ attr_accessor :filter
1338
+
1339
+ # The labels for the predict request. * Label keys can contain lowercase letters,
1340
+ # digits and hyphens, must start with a letter, and must end with a letter or
1341
+ # digit. * Non-zero label values can contain lowercase letters, digits and
1342
+ # hyphens, must start with a letter, and must end with a letter or digit. * No
1343
+ # more than 64 labels can be associated with a given request. See https://goo.gl/
1344
+ # xmQnxf for more information on and examples of labels.
1345
+ # Corresponds to the JSON property `labels`
1346
+ # @return [Hash<String,String>]
1347
+ attr_accessor :labels
1348
+
1349
+ # Maximum number of results to return per page. Set this property to the number
1350
+ # of prediction results needed. If zero, the service will choose a reasonable
1351
+ # default. The maximum allowed value is 100. Values above 100 will be coerced to
1352
+ # 100.
1353
+ # Corresponds to the JSON property `pageSize`
1354
+ # @return [Fixnum]
1355
+ attr_accessor :page_size
1356
+
1357
+ # The previous PredictResponse.next_page_token.
1358
+ # Corresponds to the JSON property `pageToken`
1359
+ # @return [String]
1360
+ attr_accessor :page_token
1361
+
1362
+ # Additional domain specific parameters for the predictions. Allowed values: * `
1363
+ # returnProduct`: Boolean. If set to true, the associated product object will be
1364
+ # returned in the `results.metadata` field in the prediction response. * `
1365
+ # returnScore`: Boolean. If set to true, the prediction 'score' corresponding to
1366
+ # each returned product will be set in the `results.metadata` field in the
1367
+ # prediction response. The given 'score' indicates the probability of an product
1368
+ # being clicked/purchased given the user's context and history. * `
1369
+ # strictFiltering`: Boolean. True by default. If set to false, the service will
1370
+ # return generic (unfiltered) popular products instead of empty if your filter
1371
+ # blocks all prediction results.
1372
+ # Corresponds to the JSON property `params`
1373
+ # @return [Hash<String,Object>]
1374
+ attr_accessor :params
1375
+
1376
+ # UserEvent captures all metadata information Retail API needs to know about how
1377
+ # end users interact with customers' website.
1378
+ # Corresponds to the JSON property `userEvent`
1379
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEvent]
1380
+ attr_accessor :user_event
1381
+
1382
+ # Use validate only mode for this prediction query. If set to true, a dummy
1383
+ # model will be used that returns arbitrary products. Note that the validate
1384
+ # only mode should only be used for testing the API, or if the model is not
1385
+ # ready.
1386
+ # Corresponds to the JSON property `validateOnly`
1387
+ # @return [Boolean]
1388
+ attr_accessor :validate_only
1389
+ alias_method :validate_only?, :validate_only
1390
+
1391
+ def initialize(**args)
1392
+ update!(**args)
1393
+ end
1394
+
1395
+ # Update properties of this object
1396
+ def update!(**args)
1397
+ @filter = args[:filter] if args.key?(:filter)
1398
+ @labels = args[:labels] if args.key?(:labels)
1399
+ @page_size = args[:page_size] if args.key?(:page_size)
1400
+ @page_token = args[:page_token] if args.key?(:page_token)
1401
+ @params = args[:params] if args.key?(:params)
1402
+ @user_event = args[:user_event] if args.key?(:user_event)
1403
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1404
+ end
1405
+ end
1406
+
1407
+ # Response message for predict method.
1408
+ class GoogleCloudRetailV2betaPredictResponse
1409
+ include Google::Apis::Core::Hashable
1410
+
1411
+ # A unique attribution token. This should be included in the UserEvent logs
1412
+ # resulting from this recommendation, which enables accurate attribution of
1413
+ # recommendation model performance.
1414
+ # Corresponds to the JSON property `attributionToken`
1415
+ # @return [String]
1416
+ attr_accessor :attribution_token
1417
+
1418
+ # IDs of products in the request that were missing from the inventory.
1419
+ # Corresponds to the JSON property `missingIds`
1420
+ # @return [Array<String>]
1421
+ attr_accessor :missing_ids
1422
+
1423
+ # A list of recommended products. The order represents the ranking (from the
1424
+ # most relevant product to the least).
1425
+ # Corresponds to the JSON property `results`
1426
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPredictResponsePredictionResult>]
1427
+ attr_accessor :results
1428
+
1429
+ # True if the validateOnly property was set in the request.
1430
+ # Corresponds to the JSON property `validateOnly`
1431
+ # @return [Boolean]
1432
+ attr_accessor :validate_only
1433
+ alias_method :validate_only?, :validate_only
1434
+
1435
+ def initialize(**args)
1436
+ update!(**args)
1437
+ end
1438
+
1439
+ # Update properties of this object
1440
+ def update!(**args)
1441
+ @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
1442
+ @missing_ids = args[:missing_ids] if args.key?(:missing_ids)
1443
+ @results = args[:results] if args.key?(:results)
1444
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1445
+ end
1446
+ end
1447
+
1448
+ # PredictionResult represents the recommendation prediction results.
1449
+ class GoogleCloudRetailV2betaPredictResponsePredictionResult
1450
+ include Google::Apis::Core::Hashable
1451
+
1452
+ # ID of the recommended product
1453
+ # Corresponds to the JSON property `id`
1454
+ # @return [String]
1455
+ attr_accessor :id
1456
+
1457
+ # Additional product metadata / annotations. Possible values: * `product`: JSON
1458
+ # representation of the product. Will be set if `returnProduct` is set to true
1459
+ # in `PredictRequest.params`. * `score`: Prediction score in double value. Will
1460
+ # be set if `returnScore` is set to true in `PredictRequest.params`.
1461
+ # Corresponds to the JSON property `metadata`
1462
+ # @return [Hash<String,Object>]
1463
+ attr_accessor :metadata
1464
+
1465
+ def initialize(**args)
1466
+ update!(**args)
1467
+ end
1468
+
1469
+ # Update properties of this object
1470
+ def update!(**args)
1471
+ @id = args[:id] if args.key?(:id)
1472
+ @metadata = args[:metadata] if args.key?(:metadata)
1473
+ end
1474
+ end
1475
+
1476
+ # The price information of a Product.
1477
+ class GoogleCloudRetailV2betaPriceInfo
1478
+ include Google::Apis::Core::Hashable
1479
+
1480
+ # The costs associated with the sale of a particular product. Used for gross
1481
+ # profit reporting. * Profit = price - cost Google Merchant Center property [
1482
+ # cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
1483
+ # Corresponds to the JSON property `cost`
1484
+ # @return [Float]
1485
+ attr_accessor :cost
1486
+
1487
+ # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-
1488
+ # currency-codes.html). If this field is an unrecognizable currency code, an
1489
+ # INVALID_ARGUMENT error is returned.
1490
+ # Corresponds to the JSON property `currencyCode`
1491
+ # @return [String]
1492
+ attr_accessor :currency_code
1493
+
1494
+ # Price of the product without any discount. If zero, by default set to be the
1495
+ # price.
1496
+ # Corresponds to the JSON property `originalPrice`
1497
+ # @return [Float]
1498
+ attr_accessor :original_price
1499
+
1500
+ # Price of the product. Google Merchant Center property [price](https://support.
1501
+ # google.com/merchants/answer/6324371). Schema.org property [Offer.
1502
+ # priceSpecification](https://schema.org/priceSpecification).
1503
+ # Corresponds to the JSON property `price`
1504
+ # @return [Float]
1505
+ attr_accessor :price
1506
+
1507
+ def initialize(**args)
1508
+ update!(**args)
1509
+ end
1510
+
1511
+ # Update properties of this object
1512
+ def update!(**args)
1513
+ @cost = args[:cost] if args.key?(:cost)
1514
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
1515
+ @original_price = args[:original_price] if args.key?(:original_price)
1516
+ @price = args[:price] if args.key?(:price)
1517
+ end
1518
+ end
1519
+
1520
+ # Product captures all metadata information of items to be recommended or
1521
+ # searched.
1522
+ class GoogleCloudRetailV2betaProduct
1523
+ include Google::Apis::Core::Hashable
1524
+
1525
+ # Highly encouraged. Extra product attributes to be included. For example, for
1526
+ # products, this could include the store name, vendor, style, color, etc. These
1527
+ # are very strong signals for recommendation model, thus we highly recommend
1528
+ # providing the attributes here. Features that can take on one of a limited
1529
+ # number of possible values. Two types of features can be set are: Textual
1530
+ # features. some examples would be the brand/maker of a product, or country of a
1531
+ # customer. Numerical features. Some examples would be the height/weight of a
1532
+ # product, or age of a customer. For example: `` "vendor": `"text": ["vendor123",
1533
+ # "vendor456"]`, "lengths_cm": `"numbers":[2.3, 15.4]`, "heights_cm": `"numbers"
1534
+ # :[8.1, 6.4]` ``. This field needs to pass all below criteria, otherwise an
1535
+ # INVALID_ARGUMENT error is returned: * Max entries count: 150 by default; 100
1536
+ # for Type.VARIANT. * Max indexable entries count: 150 by default; 40 for Type.
1537
+ # VARIANT. * Max searchable entries count: 30. * The key must be a UTF-8 encoded
1538
+ # string with a length limit of 128 characters.
1539
+ # Corresponds to the JSON property `attributes`
1540
+ # @return [Hash<String,Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCustomAttribute>]
1541
+ attr_accessor :attributes
1542
+
1543
+ # The online availability of the Product. Default to Availability.IN_STOCK.
1544
+ # Google Merchant Center Property [availability](https://support.google.com/
1545
+ # merchants/answer/6324448). Schema.org Property [Offer.availability](https://
1546
+ # schema.org/availability).
1547
+ # Corresponds to the JSON property `availability`
1548
+ # @return [String]
1549
+ attr_accessor :availability
1550
+
1551
+ # The available quantity of the item.
1552
+ # Corresponds to the JSON property `availableQuantity`
1553
+ # @return [Fixnum]
1554
+ attr_accessor :available_quantity
1555
+
1556
+ # The timestamp when this Product becomes available recommendation and search.
1557
+ # Corresponds to the JSON property `availableTime`
1558
+ # @return [String]
1559
+ attr_accessor :available_time
1560
+
1561
+ # Product categories. This field is repeated for supporting one product
1562
+ # belonging to several parallel categories. Strongly recommended using the full
1563
+ # path for better search / recommendation quality. To represent full path of
1564
+ # category, use '>' sign to separate different hierarchies. If '>' is part of
1565
+ # the category name, please replace it with other character(s). For example, if
1566
+ # a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["
1567
+ # Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented
1568
+ # as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness >
1569
+ # Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an
1570
+ # INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product.
1571
+ # Empty values are not allowed. Each value must be a UTF-8 encoded string with
1572
+ # a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
1573
+ # returned. Google Merchant Center property google_product_category. Schema.org
1574
+ # property [Product.category] (https://schema.org/category). [
1575
+ # mc_google_product_category]: https://support.google.com/merchants/answer/
1576
+ # 6324436
1577
+ # Corresponds to the JSON property `categories`
1578
+ # @return [Array<String>]
1579
+ attr_accessor :categories
1580
+
1581
+ # Product description. This field must be a UTF-8 encoded string with a length
1582
+ # limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
1583
+ # Google Merchant Center property [description](https://support.google.com/
1584
+ # merchants/answer/6324468). schema.org property [Product.description](https://
1585
+ # schema.org/description).
1586
+ # Corresponds to the JSON property `description`
1587
+ # @return [String]
1588
+ attr_accessor :description
1589
+
1590
+ # Immutable. Product identifier, which is the final component of name. For
1591
+ # example, this field is "id_1", if name is `projects/*/locations/global/
1592
+ # catalogs/default_catalog/branches/default_branch/products/id_1`. This field
1593
+ # must be a UTF-8 encoded string with a length limit of 128 characters.
1594
+ # Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center
1595
+ # property [id](https://support.google.com/merchants/answer/6324405). Schema.org
1596
+ # Property [Product.sku](https://schema.org/sku).
1597
+ # Corresponds to the JSON property `id`
1598
+ # @return [String]
1599
+ attr_accessor :id
1600
+
1601
+ # Product images for the product. A maximum of 300 images are allowed. Google
1602
+ # Merchant Center property [image_link](https://support.google.com/merchants/
1603
+ # answer/6324350). Schema.org property [Product.image](https://schema.org/image).
1604
+ # Corresponds to the JSON property `images`
1605
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaImage>]
1606
+ attr_accessor :images
1607
+
1608
+ # Immutable. Full resource name of the product, such as `projects/*/locations/
1609
+ # global/catalogs/default_catalog/branches/default_branch/products/product_id`.
1610
+ # The branch ID must be "default_branch".
1611
+ # Corresponds to the JSON property `name`
1612
+ # @return [String]
1613
+ attr_accessor :name
1614
+
1615
+ # The price information of a Product.
1616
+ # Corresponds to the JSON property `priceInfo`
1617
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfo]
1618
+ attr_accessor :price_info
1619
+
1620
+ # Variant group identifier. Must be an id, with the same parent branch with this
1621
+ # product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field
1622
+ # can only be empty or set to the same value as id. For VARIANT Products, this
1623
+ # field cannot be empty. A maximum of 2,000 products are allowed to share the
1624
+ # same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned.
1625
+ # Google Merchant Center Property [item_group_id](https://support.google.com/
1626
+ # merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](
1627
+ # https://schema.org/inProductGroupWithID). This field must be enabled before it
1628
+ # can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id).
1629
+ # Corresponds to the JSON property `primaryProductId`
1630
+ # @return [String]
1631
+ attr_accessor :primary_product_id
1632
+
1633
+ # Custom tags associated with the product. At most 250 values are allowed per
1634
+ # Product. This value must be a UTF-8 encoded string with a length limit of 1,
1635
+ # 000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can
1636
+ # be used for filtering recommendation results by passing the tag as part of the
1637
+ # PredictRequest.filter. Google Merchant Center property [custom_label_0–4](
1638
+ # https://support.google.com/merchants/answer/6324473).
1639
+ # Corresponds to the JSON property `tags`
1640
+ # @return [Array<String>]
1641
+ attr_accessor :tags
1642
+
1643
+ # Required. Product title. This field must be a UTF-8 encoded string with a
1644
+ # length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
1645
+ # returned. Google Merchant Center property [title](https://support.google.com/
1646
+ # merchants/answer/6324415). Schema.org property [Product.name](https://schema.
1647
+ # org/name).
1648
+ # Corresponds to the JSON property `title`
1649
+ # @return [String]
1650
+ attr_accessor :title
1651
+
1652
+ # Immutable. The type of the product. This field is output-only.
1653
+ # Corresponds to the JSON property `type`
1654
+ # @return [String]
1655
+ attr_accessor :type
1656
+
1657
+ # Canonical URL directly linking to the product detail page. It is strongly
1658
+ # recommended to provide a valid uri for the product, otherwise the service
1659
+ # performance could be significantly degraded. This field must be a UTF-8
1660
+ # encoded string with a length limit of 5,000 characters. Otherwise, an
1661
+ # INVALID_ARGUMENT error is returned. Google Merchant Center property [link](
1662
+ # https://support.google.com/merchants/answer/6324416). Schema.org property [
1663
+ # Offer.url](https://schema.org/url).
1664
+ # Corresponds to the JSON property `uri`
1665
+ # @return [String]
1666
+ attr_accessor :uri
1667
+
1668
+ def initialize(**args)
1669
+ update!(**args)
1670
+ end
1671
+
1672
+ # Update properties of this object
1673
+ def update!(**args)
1674
+ @attributes = args[:attributes] if args.key?(:attributes)
1675
+ @availability = args[:availability] if args.key?(:availability)
1676
+ @available_quantity = args[:available_quantity] if args.key?(:available_quantity)
1677
+ @available_time = args[:available_time] if args.key?(:available_time)
1678
+ @categories = args[:categories] if args.key?(:categories)
1679
+ @description = args[:description] if args.key?(:description)
1680
+ @id = args[:id] if args.key?(:id)
1681
+ @images = args[:images] if args.key?(:images)
1682
+ @name = args[:name] if args.key?(:name)
1683
+ @price_info = args[:price_info] if args.key?(:price_info)
1684
+ @primary_product_id = args[:primary_product_id] if args.key?(:primary_product_id)
1685
+ @tags = args[:tags] if args.key?(:tags)
1686
+ @title = args[:title] if args.key?(:title)
1687
+ @type = args[:type] if args.key?(:type)
1688
+ @uri = args[:uri] if args.key?(:uri)
1689
+ end
1690
+ end
1691
+
1692
+ # Detailed product information associated with a user event.
1693
+ class GoogleCloudRetailV2betaProductDetail
1694
+ include Google::Apis::Core::Hashable
1695
+
1696
+ # Product captures all metadata information of items to be recommended or
1697
+ # searched.
1698
+ # Corresponds to the JSON property `product`
1699
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct]
1700
+ attr_accessor :product
1701
+
1702
+ # Quantity of the product associated with the user event. For example, this
1703
+ # field will be 2 if two products are added to the shopping cart for `purchase-
1704
+ # complete` event. Required for `add-to-cart` and `purchase-complete` event
1705
+ # types.
1706
+ # Corresponds to the JSON property `quantity`
1707
+ # @return [Fixnum]
1708
+ attr_accessor :quantity
1709
+
1710
+ def initialize(**args)
1711
+ update!(**args)
1712
+ end
1713
+
1714
+ # Update properties of this object
1715
+ def update!(**args)
1716
+ @product = args[:product] if args.key?(:product)
1717
+ @quantity = args[:quantity] if args.key?(:quantity)
1718
+ end
1719
+ end
1720
+
1721
+ # The inline source for the input config for ImportProducts method.
1722
+ class GoogleCloudRetailV2betaProductInlineSource
1723
+ include Google::Apis::Core::Hashable
1724
+
1725
+ # Required. A list of products to update/create. Each product must have a valid
1726
+ # Product.id. Recommended max of 10k items.
1727
+ # Corresponds to the JSON property `products`
1728
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProduct>]
1729
+ attr_accessor :products
1730
+
1731
+ def initialize(**args)
1732
+ update!(**args)
1733
+ end
1734
+
1735
+ # Update properties of this object
1736
+ def update!(**args)
1737
+ @products = args[:products] if args.key?(:products)
1738
+ end
1739
+ end
1740
+
1741
+ # The input config source for products.
1742
+ class GoogleCloudRetailV2betaProductInputConfig
1743
+ include Google::Apis::Core::Hashable
1744
+
1745
+ # BigQuery source import data from.
1746
+ # Corresponds to the JSON property `bigQuerySource`
1747
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaBigQuerySource]
1748
+ attr_accessor :big_query_source
1749
+
1750
+ # Google Cloud Storage location for input content. format.
1751
+ # Corresponds to the JSON property `gcsSource`
1752
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGcsSource]
1753
+ attr_accessor :gcs_source
1754
+
1755
+ # The inline source for the input config for ImportProducts method.
1756
+ # Corresponds to the JSON property `productInlineSource`
1757
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductInlineSource]
1758
+ attr_accessor :product_inline_source
1759
+
1760
+ def initialize(**args)
1761
+ update!(**args)
1762
+ end
1763
+
1764
+ # Update properties of this object
1765
+ def update!(**args)
1766
+ @big_query_source = args[:big_query_source] if args.key?(:big_query_source)
1767
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
1768
+ @product_inline_source = args[:product_inline_source] if args.key?(:product_inline_source)
1769
+ end
1770
+ end
1771
+
1772
+ # Configures what level the product should be uploaded with regards to how users
1773
+ # will be send events and how predictions will be made.
1774
+ class GoogleCloudRetailV2betaProductLevelConfig
1775
+ include Google::Apis::Core::Hashable
1776
+
1777
+ # The type of Products allowed to be ingested into the catalog. Acceptable
1778
+ # values are: * `primary` (default): You can only ingest Product.Type.PRIMARY
1779
+ # Products. This means Product.primary_product_id can only be empty or set to
1780
+ # the same value as Product.id. * `variant`: You can only ingest Product.Type.
1781
+ # VARIANT Products. This means Product.primary_product_id cannot be empty. If
1782
+ # this field is set to an invalid value other than these, an INVALID_ARGUMENT
1783
+ # error is returned. If this field is `variant` and
1784
+ # merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error
1785
+ # is returned. See [Using catalog levels](/retail/recommendations-ai/docs/
1786
+ # catalog#catalog-levels) for more details.
1787
+ # Corresponds to the JSON property `ingestionProductType`
1788
+ # @return [String]
1789
+ attr_accessor :ingestion_product_type
1790
+
1791
+ # Which field of [Merchant Center Product](/bigquery-transfer/docs/merchant-
1792
+ # center-products-schema) should be imported as Product.id. Acceptable values
1793
+ # are: * `offerId` (default): Import `offerId` as the product ID. * `itemGroupId`
1794
+ # : Import `itemGroupId` as the product ID. Notice that Retail API will choose
1795
+ # one item from the ones with the same `itemGroupId`, and use it to represent
1796
+ # the item group. If this field is set to an invalid value other than these, an
1797
+ # INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and
1798
+ # ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned.
1799
+ # See [Using catalog levels](/retail/recommendations-ai/docs/catalog#catalog-
1800
+ # levels) for more details.
1801
+ # Corresponds to the JSON property `merchantCenterProductIdField`
1802
+ # @return [String]
1803
+ attr_accessor :merchant_center_product_id_field
1804
+
1805
+ def initialize(**args)
1806
+ update!(**args)
1807
+ end
1808
+
1809
+ # Update properties of this object
1810
+ def update!(**args)
1811
+ @ingestion_product_type = args[:ingestion_product_type] if args.key?(:ingestion_product_type)
1812
+ @merchant_center_product_id_field = args[:merchant_center_product_id_field] if args.key?(:merchant_center_product_id_field)
1813
+ end
1814
+ end
1815
+
1816
+ # A transaction represents the entire purchase transaction.
1817
+ class GoogleCloudRetailV2betaPurchaseTransaction
1818
+ include Google::Apis::Core::Hashable
1819
+
1820
+ # All the costs associated with the products. These can be manufacturing costs,
1821
+ # shipping expenses not borne by the end user, or any other costs, such that: *
1822
+ # Profit = revenue - tax - cost
1823
+ # Corresponds to the JSON property `cost`
1824
+ # @return [Float]
1825
+ attr_accessor :cost
1826
+
1827
+ # Required. Currency code. Use three-character ISO-4217 code.
1828
+ # Corresponds to the JSON property `currencyCode`
1829
+ # @return [String]
1830
+ attr_accessor :currency_code
1831
+
1832
+ # The transaction ID with a length limit of 128 characters.
1833
+ # Corresponds to the JSON property `id`
1834
+ # @return [String]
1835
+ attr_accessor :id
1836
+
1837
+ # Required. Total non-zero revenue or grand total associated with the
1838
+ # transaction. This value include shipping, tax, or other adjustments to total
1839
+ # revenue that you want to include as part of your revenue calculations.
1840
+ # Corresponds to the JSON property `revenue`
1841
+ # @return [Float]
1842
+ attr_accessor :revenue
1843
+
1844
+ # All the taxes associated with the transaction.
1845
+ # Corresponds to the JSON property `tax`
1846
+ # @return [Float]
1847
+ attr_accessor :tax
1848
+
1849
+ def initialize(**args)
1850
+ update!(**args)
1851
+ end
1852
+
1853
+ # Update properties of this object
1854
+ def update!(**args)
1855
+ @cost = args[:cost] if args.key?(:cost)
1856
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
1857
+ @id = args[:id] if args.key?(:id)
1858
+ @revenue = args[:revenue] if args.key?(:revenue)
1859
+ @tax = args[:tax] if args.key?(:tax)
1860
+ end
1861
+ end
1862
+
1863
+ # Metadata related to the progress of the Purge operation. This will be returned
1864
+ # by the google.longrunning.Operation.metadata field.
1865
+ class GoogleCloudRetailV2betaPurgeMetadata
1866
+ include Google::Apis::Core::Hashable
1867
+
1868
+ def initialize(**args)
1869
+ update!(**args)
1870
+ end
1871
+
1872
+ # Update properties of this object
1873
+ def update!(**args)
1874
+ end
1875
+ end
1876
+
1877
+ # Request message for PurgeUserEvents method.
1878
+ class GoogleCloudRetailV2betaPurgeUserEventsRequest
1879
+ include Google::Apis::Core::Hashable
1880
+
1881
+ # Required. The filter string to specify the events to be deleted with a length
1882
+ # limit of 5,000 characters. Empty string filter is not allowed. The eligible
1883
+ # fields for filtering are: * `eventType`: Double quoted UserEvent.event_type
1884
+ # string. * `eventTime`: in ISO 8601 "zulu" format. * `visitorId`: Double quoted
1885
+ # string. Specifying this will delete all events associated with a visitor. * `
1886
+ # userId`: Double quoted string. Specifying this will delete all events
1887
+ # associated with a user. Examples: * Deleting all events in a time range: `
1888
+ # eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"`
1889
+ # * Deleting specific eventType in time range: `eventTime > "2012-04-23T18:25:43.
1890
+ # 511Z" eventType = "detail-page-view"` * Deleting all events for a specific
1891
+ # visitor: `visitorId = "visitor1024"` The filtering fields are assumed to have
1892
+ # an implicit AND.
1893
+ # Corresponds to the JSON property `filter`
1894
+ # @return [String]
1895
+ attr_accessor :filter
1896
+
1897
+ # Actually perform the purge. If `force` is set to false, the method will return
1898
+ # the expected purge count without deleting any user events.
1899
+ # Corresponds to the JSON property `force`
1900
+ # @return [Boolean]
1901
+ attr_accessor :force
1902
+ alias_method :force?, :force
1903
+
1904
+ def initialize(**args)
1905
+ update!(**args)
1906
+ end
1907
+
1908
+ # Update properties of this object
1909
+ def update!(**args)
1910
+ @filter = args[:filter] if args.key?(:filter)
1911
+ @force = args[:force] if args.key?(:force)
1912
+ end
1913
+ end
1914
+
1915
+ # Response of the PurgeUserEventsRequest. If the long running operation is
1916
+ # successfully done, then this message is returned by the google.longrunning.
1917
+ # Operations.response field.
1918
+ class GoogleCloudRetailV2betaPurgeUserEventsResponse
1919
+ include Google::Apis::Core::Hashable
1920
+
1921
+ # The total count of events purged as a result of the operation.
1922
+ # Corresponds to the JSON property `purgedEventsCount`
1923
+ # @return [Fixnum]
1924
+ attr_accessor :purged_events_count
1925
+
1926
+ def initialize(**args)
1927
+ update!(**args)
1928
+ end
1929
+
1930
+ # Update properties of this object
1931
+ def update!(**args)
1932
+ @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
1933
+ end
1934
+ end
1935
+
1936
+ # Metadata for RejoinUserEvents method.
1937
+ class GoogleCloudRetailV2betaRejoinUserEventsMetadata
1938
+ include Google::Apis::Core::Hashable
1939
+
1940
+ def initialize(**args)
1941
+ update!(**args)
1942
+ end
1943
+
1944
+ # Update properties of this object
1945
+ def update!(**args)
1946
+ end
1947
+ end
1948
+
1949
+ # Request message for RejoinUserEvents method.
1950
+ class GoogleCloudRetailV2betaRejoinUserEventsRequest
1951
+ include Google::Apis::Core::Hashable
1952
+
1953
+ # The type of the user event rejoin to define the scope and range of the user
1954
+ # events to be rejoined with the latest product catalog. Defaults to
1955
+ # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
1956
+ # invalid integer value.
1957
+ # Corresponds to the JSON property `userEventRejoinScope`
1958
+ # @return [String]
1959
+ attr_accessor :user_event_rejoin_scope
1960
+
1961
+ def initialize(**args)
1962
+ update!(**args)
1963
+ end
1964
+
1965
+ # Update properties of this object
1966
+ def update!(**args)
1967
+ @user_event_rejoin_scope = args[:user_event_rejoin_scope] if args.key?(:user_event_rejoin_scope)
1968
+ end
1969
+ end
1970
+
1971
+ # Response message for RejoinUserEvents method.
1972
+ class GoogleCloudRetailV2betaRejoinUserEventsResponse
1973
+ include Google::Apis::Core::Hashable
1974
+
1975
+ # Number of user events that were joined with latest product catalog.
1976
+ # Corresponds to the JSON property `rejoinedUserEventsCount`
1977
+ # @return [Fixnum]
1978
+ attr_accessor :rejoined_user_events_count
1979
+
1980
+ def initialize(**args)
1981
+ update!(**args)
1982
+ end
1983
+
1984
+ # Update properties of this object
1985
+ def update!(**args)
1986
+ @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
1987
+ end
1988
+ end
1989
+
1990
+ # UserEvent captures all metadata information Retail API needs to know about how
1991
+ # end users interact with customers' website.
1992
+ class GoogleCloudRetailV2betaUserEvent
1993
+ include Google::Apis::Core::Hashable
1994
+
1995
+ # Extra user event features to include in the recommendation model. The key must
1996
+ # be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
1997
+ # an INVALID_ARGUMENT error is returned. For product recommendation, an example
1998
+ # of extra user information is traffic_channel, i.e. how user arrives at the
1999
+ # site. Users can arrive at the site by coming to the site directly, or coming
2000
+ # through Google search, and etc.
2001
+ # Corresponds to the JSON property `attributes`
2002
+ # @return [Hash<String,Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCustomAttribute>]
2003
+ attr_accessor :attributes
2004
+
2005
+ # Highly recommended for user events that are the result of PredictionService.
2006
+ # Predict. This field enables accurate attribution of recommendation model
2007
+ # performance. The value must be a valid PredictResponse.attribution_token for
2008
+ # user events that are the result of PredictionService.Predict. This token
2009
+ # enables us to accurately attribute page view or purchase back to the event and
2010
+ # the particular predict response containing this clicked/purchased product. If
2011
+ # user clicks on product K in the recommendation results, pass PredictResponse.
2012
+ # attribution_token as a URL parameter to product K's page. When recording
2013
+ # events on product K's page, log the PredictResponse.attribution_token to this
2014
+ # field.
2015
+ # Corresponds to the JSON property `attributionToken`
2016
+ # @return [String]
2017
+ attr_accessor :attribution_token
2018
+
2019
+ # The id or name of the associated shopping cart. This id is used to associate
2020
+ # multiple items added or present in the cart before purchase. This can only be
2021
+ # set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view`
2022
+ # events.
2023
+ # Corresponds to the JSON property `cartId`
2024
+ # @return [String]
2025
+ attr_accessor :cart_id
2026
+
2027
+ # Only required for UserEventService.ImportUserEvents method. Timestamp of when
2028
+ # the user event happened.
2029
+ # Corresponds to the JSON property `eventTime`
2030
+ # @return [String]
2031
+ attr_accessor :event_time
2032
+
2033
+ # Required. User event type. Allowed values are: * `add-to-cart`: Products being
2034
+ # added to cart. * `category-page-view`: Special pages such as sale or promotion
2035
+ # pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-
2036
+ # view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * `
2037
+ # search`: Product search. * `shopping-cart-page-view`: User viewing a shopping
2038
+ # cart.
2039
+ # Corresponds to the JSON property `eventType`
2040
+ # @return [String]
2041
+ attr_accessor :event_type
2042
+
2043
+ # A list of identifiers for the independent experiment groups this user event
2044
+ # belongs to. This is used to distinguish between user events associated with
2045
+ # different experiment setups (e.g. using Retail API, using different
2046
+ # recommendation models).
2047
+ # Corresponds to the JSON property `experimentIds`
2048
+ # @return [Array<String>]
2049
+ attr_accessor :experiment_ids
2050
+
2051
+ # The categories associated with a category page. To represent full path of
2052
+ # category, use '>' sign to separate different hierarchies. If '>' is part of
2053
+ # the category name, please replace it with other character(s). Category pages
2054
+ # include special pages such as sales or promotions. For instance, a special
2055
+ # sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017
2056
+ # Black Friday Deals"]. Required for `category-page-view` events. At least one
2057
+ # of search_query or page_categories is required for `search` events. Other
2058
+ # event types should not set this field. Otherwise, an INVALID_ARGUMENT error is
2059
+ # returned.
2060
+ # Corresponds to the JSON property `pageCategories`
2061
+ # @return [Array<String>]
2062
+ attr_accessor :page_categories
2063
+
2064
+ # A unique id of a web page view. This should be kept the same for all user
2065
+ # events triggered from the same pageview. For example, an item detail page view
2066
+ # could trigger multiple events as the user is browsing the page. The `
2067
+ # pageViewId` property should be kept the same for all these events so that they
2068
+ # can be grouped together properly. When using the client side event reporting
2069
+ # with JavaScript pixel and Google Tag Manager, this value is filled in
2070
+ # automatically.
2071
+ # Corresponds to the JSON property `pageViewId`
2072
+ # @return [String]
2073
+ attr_accessor :page_view_id
2074
+
2075
+ # The main product details related to the event. This field is required for the
2076
+ # following event types: * `add-to-cart` * `detail-page-view` * `purchase-
2077
+ # complete` In a `search` event, this field represents the products returned to
2078
+ # the end user on the current page (the end user may have not finished broswing
2079
+ # the whole page yet). When a new page is returned to the end user, after
2080
+ # pagination/filtering/ordering even for the same query, a new `search` event
2081
+ # with different product_details is desired. The end user may have not finished
2082
+ # broswing the whole page yet.
2083
+ # Corresponds to the JSON property `productDetails`
2084
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductDetail>]
2085
+ attr_accessor :product_details
2086
+
2087
+ # A transaction represents the entire purchase transaction.
2088
+ # Corresponds to the JSON property `purchaseTransaction`
2089
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPurchaseTransaction]
2090
+ attr_accessor :purchase_transaction
2091
+
2092
+ # The referrer URL of the current page. When using the client side event
2093
+ # reporting with JavaScript pixel and Google Tag Manager, this value is filled
2094
+ # in automatically.
2095
+ # Corresponds to the JSON property `referrerUri`
2096
+ # @return [String]
2097
+ attr_accessor :referrer_uri
2098
+
2099
+ # The user's search query. The value must be a UTF-8 encoded string with a
2100
+ # length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
2101
+ # returned. At least one of search_query or page_categories is required for `
2102
+ # search` events. Other event types should not set this field. Otherwise, an
2103
+ # INVALID_ARGUMENT error is returned.
2104
+ # Corresponds to the JSON property `searchQuery`
2105
+ # @return [String]
2106
+ attr_accessor :search_query
2107
+
2108
+ # Complete URL (window.location.href) of the user's current page. When using the
2109
+ # client side event reporting with JavaScript pixel and Google Tag Manager, this
2110
+ # value is filled in automatically. Maximum length 5,000 characters.
2111
+ # Corresponds to the JSON property `uri`
2112
+ # @return [String]
2113
+ attr_accessor :uri
2114
+
2115
+ # Information of an end user.
2116
+ # Corresponds to the JSON property `userInfo`
2117
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserInfo]
2118
+ attr_accessor :user_info
2119
+
2120
+ # Required. A unique identifier for tracking visitors. For example, this could
2121
+ # be implemented with an HTTP cookie, which should be able to uniquely identify
2122
+ # a visitor on a single device. This unique identifier should not change if the
2123
+ # visitor log in/out of the website. The field must be a UTF-8 encoded string
2124
+ # with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
2125
+ # returned.
2126
+ # Corresponds to the JSON property `visitorId`
2127
+ # @return [String]
2128
+ attr_accessor :visitor_id
2129
+
2130
+ def initialize(**args)
2131
+ update!(**args)
2132
+ end
2133
+
2134
+ # Update properties of this object
2135
+ def update!(**args)
2136
+ @attributes = args[:attributes] if args.key?(:attributes)
2137
+ @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
2138
+ @cart_id = args[:cart_id] if args.key?(:cart_id)
2139
+ @event_time = args[:event_time] if args.key?(:event_time)
2140
+ @event_type = args[:event_type] if args.key?(:event_type)
2141
+ @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids)
2142
+ @page_categories = args[:page_categories] if args.key?(:page_categories)
2143
+ @page_view_id = args[:page_view_id] if args.key?(:page_view_id)
2144
+ @product_details = args[:product_details] if args.key?(:product_details)
2145
+ @purchase_transaction = args[:purchase_transaction] if args.key?(:purchase_transaction)
2146
+ @referrer_uri = args[:referrer_uri] if args.key?(:referrer_uri)
2147
+ @search_query = args[:search_query] if args.key?(:search_query)
2148
+ @uri = args[:uri] if args.key?(:uri)
2149
+ @user_info = args[:user_info] if args.key?(:user_info)
2150
+ @visitor_id = args[:visitor_id] if args.key?(:visitor_id)
2151
+ end
2152
+ end
2153
+
2154
+ # A summary of import result. The UserEventImportSummary summarizes the import
2155
+ # status for user events.
2156
+ class GoogleCloudRetailV2betaUserEventImportSummary
2157
+ include Google::Apis::Core::Hashable
2158
+
2159
+ # Count of user events imported with complete existing catalog information.
2160
+ # Corresponds to the JSON property `joinedEventsCount`
2161
+ # @return [Fixnum]
2162
+ attr_accessor :joined_events_count
2163
+
2164
+ # Count of user events imported, but with catalog information not found in the
2165
+ # imported catalog.
2166
+ # Corresponds to the JSON property `unjoinedEventsCount`
2167
+ # @return [Fixnum]
2168
+ attr_accessor :unjoined_events_count
2169
+
2170
+ def initialize(**args)
2171
+ update!(**args)
2172
+ end
2173
+
2174
+ # Update properties of this object
2175
+ def update!(**args)
2176
+ @joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count)
2177
+ @unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count)
2178
+ end
2179
+ end
2180
+
2181
+ # The inline source for the input config for ImportUserEvents method.
2182
+ class GoogleCloudRetailV2betaUserEventInlineSource
2183
+ include Google::Apis::Core::Hashable
2184
+
2185
+ # Required. A list of user events to import. Recommended max of 10k items.
2186
+ # Corresponds to the JSON property `userEvents`
2187
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEvent>]
2188
+ attr_accessor :user_events
2189
+
2190
+ def initialize(**args)
2191
+ update!(**args)
2192
+ end
2193
+
2194
+ # Update properties of this object
2195
+ def update!(**args)
2196
+ @user_events = args[:user_events] if args.key?(:user_events)
2197
+ end
2198
+ end
2199
+
2200
+ # The input config source for user events.
2201
+ class GoogleCloudRetailV2betaUserEventInputConfig
2202
+ include Google::Apis::Core::Hashable
2203
+
2204
+ # BigQuery source import data from.
2205
+ # Corresponds to the JSON property `bigQuerySource`
2206
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaBigQuerySource]
2207
+ attr_accessor :big_query_source
2208
+
2209
+ # Google Cloud Storage location for input content. format.
2210
+ # Corresponds to the JSON property `gcsSource`
2211
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaGcsSource]
2212
+ attr_accessor :gcs_source
2213
+
2214
+ # The inline source for the input config for ImportUserEvents method.
2215
+ # Corresponds to the JSON property `userEventInlineSource`
2216
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaUserEventInlineSource]
2217
+ attr_accessor :user_event_inline_source
2218
+
2219
+ def initialize(**args)
2220
+ update!(**args)
2221
+ end
2222
+
2223
+ # Update properties of this object
2224
+ def update!(**args)
2225
+ @big_query_source = args[:big_query_source] if args.key?(:big_query_source)
2226
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
2227
+ @user_event_inline_source = args[:user_event_inline_source] if args.key?(:user_event_inline_source)
2228
+ end
2229
+ end
2230
+
2231
+ # Information of an end user.
2232
+ class GoogleCloudRetailV2betaUserInfo
2233
+ include Google::Apis::Core::Hashable
2234
+
2235
+ # True if the request is made directly from the end user, in which case the
2236
+ # ip_address and user_agent can be populated from the HTTP request. This flag
2237
+ # should be set only if the API request is made directly from the end user such
2238
+ # as a mobile app (and not if a gateway or a server is processing and pushing
2239
+ # the user events). This should not be set when using the JavaScript tag in
2240
+ # UserEventService.CollectUserEvent.
2241
+ # Corresponds to the JSON property `directUserRequest`
2242
+ # @return [Boolean]
2243
+ attr_accessor :direct_user_request
2244
+ alias_method :direct_user_request?, :direct_user_request
2245
+
2246
+ # The end user's IP address. This field is used to extract location information
2247
+ # for personalization. This field must be either an IPv4 address (e.g. "104.133.
2248
+ # 9.80") or an IPv6 address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334").
2249
+ # Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when
2250
+ # using the JavaScript tag in UserEventService.CollectUserEvent or if
2251
+ # direct_user_request is set.
2252
+ # Corresponds to the JSON property `ipAddress`
2253
+ # @return [String]
2254
+ attr_accessor :ip_address
2255
+
2256
+ # User agent as included in the HTTP header. The field must be a UTF-8 encoded
2257
+ # string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT
2258
+ # error is returned. This should not be set when using the client side event
2259
+ # reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or
2260
+ # if direct_user_request is set.
2261
+ # Corresponds to the JSON property `userAgent`
2262
+ # @return [String]
2263
+ attr_accessor :user_agent
2264
+
2265
+ # Highly recommended for logged-in users. Unique identifier for logged-in user,
2266
+ # such as a user name. The field must be a UTF-8 encoded string with a length
2267
+ # limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
2268
+ # Corresponds to the JSON property `userId`
2269
+ # @return [String]
2270
+ attr_accessor :user_id
2271
+
2272
+ def initialize(**args)
2273
+ update!(**args)
2274
+ end
2275
+
2276
+ # Update properties of this object
2277
+ def update!(**args)
2278
+ @direct_user_request = args[:direct_user_request] if args.key?(:direct_user_request)
2279
+ @ip_address = args[:ip_address] if args.key?(:ip_address)
2280
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
2281
+ @user_id = args[:user_id] if args.key?(:user_id)
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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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::RetailV2beta::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