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