google-cloud-retail-v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +75 -0
  6. data/lib/google-cloud-retail-v2.rb +21 -0
  7. data/lib/google/cloud/retail/v2.rb +41 -0
  8. data/lib/google/cloud/retail/v2/catalog_pb.rb +32 -0
  9. data/lib/google/cloud/retail/v2/catalog_service.rb +49 -0
  10. data/lib/google/cloud/retail/v2/catalog_service/client.rb +490 -0
  11. data/lib/google/cloud/retail/v2/catalog_service/credentials.rb +51 -0
  12. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +69 -0
  13. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +42 -0
  14. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +48 -0
  15. data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
  16. data/lib/google/cloud/retail/v2/import_config_pb.rb +104 -0
  17. data/lib/google/cloud/retail/v2/prediction_service.rb +49 -0
  18. data/lib/google/cloud/retail/v2/prediction_service/client.rb +472 -0
  19. data/lib/google/cloud/retail/v2/prediction_service/credentials.rb +51 -0
  20. data/lib/google/cloud/retail/v2/prediction_service/paths.rb +56 -0
  21. data/lib/google/cloud/retail/v2/prediction_service_pb.rb +46 -0
  22. data/lib/google/cloud/retail/v2/prediction_service_services_pb.rb +45 -0
  23. data/lib/google/cloud/retail/v2/product_pb.rb +58 -0
  24. data/lib/google/cloud/retail/v2/product_service.rb +51 -0
  25. data/lib/google/cloud/retail/v2/product_service/client.rb +752 -0
  26. data/lib/google/cloud/retail/v2/product_service/credentials.rb +51 -0
  27. data/lib/google/cloud/retail/v2/product_service/operations.rb +570 -0
  28. data/lib/google/cloud/retail/v2/product_service/paths.rb +77 -0
  29. data/lib/google/cloud/retail/v2/product_service_pb.rb +47 -0
  30. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +60 -0
  31. data/lib/google/cloud/retail/v2/purge_config_pb.rb +33 -0
  32. data/lib/google/cloud/retail/v2/user_event_pb.rb +55 -0
  33. data/lib/google/cloud/retail/v2/user_event_service.rb +50 -0
  34. data/lib/google/cloud/retail/v2/user_event_service/client.rb +760 -0
  35. data/lib/google/cloud/retail/v2/user_event_service/credentials.rb +51 -0
  36. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +570 -0
  37. data/lib/google/cloud/retail/v2/user_event_service/paths.rb +56 -0
  38. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +56 -0
  39. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +72 -0
  40. data/lib/google/cloud/retail/v2/version.rb +28 -0
  41. data/proto_docs/README.md +4 -0
  42. data/proto_docs/google/api/field_behavior.rb +59 -0
  43. data/proto_docs/google/api/httpbody.rb +75 -0
  44. data/proto_docs/google/api/resource.rb +283 -0
  45. data/proto_docs/google/cloud/retail/v2/catalog.rb +101 -0
  46. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +106 -0
  47. data/proto_docs/google/cloud/retail/v2/common.rb +169 -0
  48. data/proto_docs/google/cloud/retail/v2/import_config.rb +270 -0
  49. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +205 -0
  50. data/proto_docs/google/cloud/retail/v2/product.rb +278 -0
  51. data/proto_docs/google/cloud/retail/v2/product_service.rb +117 -0
  52. data/proto_docs/google/cloud/retail/v2/purge_config.rb +85 -0
  53. data/proto_docs/google/cloud/retail/v2/user_event.rb +238 -0
  54. data/proto_docs/google/cloud/retail/v2/user_event_service.rb +114 -0
  55. data/proto_docs/google/longrunning/operations.rb +150 -0
  56. data/proto_docs/google/protobuf/any.rb +138 -0
  57. data/proto_docs/google/protobuf/empty.rb +36 -0
  58. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  59. data/proto_docs/google/protobuf/struct.rb +96 -0
  60. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  61. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  62. data/proto_docs/google/rpc/status.rb +46 -0
  63. metadata +245 -0
@@ -0,0 +1,117 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Retail
23
+ module V2
24
+ # Request message for [CreateProduct][] method.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. The parent catalog resource name, such as
28
+ # "projects/*/locations/global/catalogs/default_catalog/branches/default_branch".
29
+ # @!attribute [rw] product
30
+ # @return [::Google::Cloud::Retail::V2::Product]
31
+ # Required. The {::Google::Cloud::Retail::V2::Product Product} to create.
32
+ # @!attribute [rw] product_id
33
+ # @return [::String]
34
+ # Required. The ID to use for the {::Google::Cloud::Retail::V2::Product Product},
35
+ # which will become the final component of the
36
+ # {::Google::Cloud::Retail::V2::Product#name Product.name}.
37
+ #
38
+ # If the caller does not have permission to create the
39
+ # {::Google::Cloud::Retail::V2::Product Product}, regardless of whether or not it
40
+ # exists, a PERMISSION_DENIED error is returned.
41
+ #
42
+ # This field must be unique among all
43
+ # {::Google::Cloud::Retail::V2::Product Product}s with the same
44
+ # {::Google::Cloud::Retail::V2::CreateProductRequest#parent parent}. Otherwise, an
45
+ # ALREADY_EXISTS error is returned.
46
+ #
47
+ # This field must be a UTF-8 encoded string with a length limit of 128
48
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
49
+ class CreateProductRequest
50
+ include ::Google::Protobuf::MessageExts
51
+ extend ::Google::Protobuf::MessageExts::ClassMethods
52
+ end
53
+
54
+ # Request message for [GetProduct][] method.
55
+ # @!attribute [rw] name
56
+ # @return [::String]
57
+ # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
58
+ # such as
59
+ # "projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id".
60
+ #
61
+ # If the caller does not have permission to access the
62
+ # {::Google::Cloud::Retail::V2::Product Product}, regardless of whether or not it
63
+ # exists, a PERMISSION_DENIED error is returned.
64
+ #
65
+ # If the requested {::Google::Cloud::Retail::V2::Product Product} does not exist,
66
+ # a NOT_FOUND error is returned.
67
+ class GetProductRequest
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+ end
71
+
72
+ # Request message for [UpdateProduct][] method.
73
+ # @!attribute [rw] product
74
+ # @return [::Google::Cloud::Retail::V2::Product]
75
+ # Required. The product to update/create.
76
+ #
77
+ # If the caller does not have permission to update the
78
+ # {::Google::Cloud::Retail::V2::Product Product}, regardless of whether or not it
79
+ # exists, a PERMISSION_DENIED error is returned.
80
+ #
81
+ # If the {::Google::Cloud::Retail::V2::Product Product} to update does not exist,
82
+ # a NOT_FOUND error is returned.
83
+ # @!attribute [rw] update_mask
84
+ # @return [::Google::Protobuf::FieldMask]
85
+ # Indicates which fields in the provided
86
+ # {::Google::Cloud::Retail::V2::Product Product} to update. The immutable and
87
+ # output only fields are NOT supported. If not set, all supported fields (the
88
+ # fields that are neither immutable nor output only) are updated.
89
+ #
90
+ # If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
91
+ # is returned.
92
+ class UpdateProductRequest
93
+ include ::Google::Protobuf::MessageExts
94
+ extend ::Google::Protobuf::MessageExts::ClassMethods
95
+ end
96
+
97
+ # Request message for [DeleteProduct][] method.
98
+ # @!attribute [rw] name
99
+ # @return [::String]
100
+ # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
101
+ # such as
102
+ # "projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id".
103
+ #
104
+ # If the caller does not have permission to delete the
105
+ # {::Google::Cloud::Retail::V2::Product Product}, regardless of whether or not it
106
+ # exists, a PERMISSION_DENIED error is returned.
107
+ #
108
+ # If the {::Google::Cloud::Retail::V2::Product Product} to delete does not exist,
109
+ # a NOT_FOUND error is returned.
110
+ class DeleteProductRequest
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Retail
23
+ module V2
24
+ # Metadata related to the progress of the Purge operation.
25
+ # This will be returned by the google.longrunning.Operation.metadata field.
26
+ class PurgeMetadata
27
+ include ::Google::Protobuf::MessageExts
28
+ extend ::Google::Protobuf::MessageExts::ClassMethods
29
+ end
30
+
31
+ # Request message for PurgeUserEvents method.
32
+ # @!attribute [rw] parent
33
+ # @return [::String]
34
+ # Required. The resource name of the catalog under which the events are
35
+ # created. The format is
36
+ # "projects/$\\{projectId}/locations/global/catalogs/$\\{catalogId}"
37
+ # @!attribute [rw] filter
38
+ # @return [::String]
39
+ # Required. The filter string to specify the events to be deleted with a
40
+ # length limit of 5,000 characters. Empty string filter is not allowed. The
41
+ # eligible fields for filtering are:
42
+ #
43
+ # * `eventType`: Double quoted
44
+ # {::Google::Cloud::Retail::V2::UserEvent#event_type UserEvent.event_type} string.
45
+ # * `eventTime`: in ISO 8601 "zulu" format.
46
+ # * `visitorId`: Double quoted string. Specifying this will delete all
47
+ # events associated with a visitor.
48
+ # * `userId`: Double quoted string. Specifying this will delete all events
49
+ # associated with a user.
50
+ #
51
+ # Examples:
52
+ #
53
+ # * Deleting all events in a time range:
54
+ # `eventTime > "2012-04-23T18:25:43.511Z"
55
+ # eventTime < "2012-04-23T18:30:43.511Z"`
56
+ # * Deleting specific eventType in time range:
57
+ # `eventTime > "2012-04-23T18:25:43.511Z" eventType = "detail-page-view"`
58
+ # * Deleting all events for a specific visitor:
59
+ # `visitorId = "visitor1024"`
60
+ #
61
+ # The filtering fields are assumed to have an implicit AND.
62
+ # @!attribute [rw] force
63
+ # @return [::Boolean]
64
+ # Actually perform the purge.
65
+ # If `force` is set to false, the method will return the expected purge count
66
+ # without deleting any user events.
67
+ class PurgeUserEventsRequest
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+ end
71
+
72
+ # Response of the PurgeUserEventsRequest. If the long running operation is
73
+ # successfully done, then this message is returned by the
74
+ # google.longrunning.Operations.response field.
75
+ # @!attribute [rw] purged_events_count
76
+ # @return [::Integer]
77
+ # The total count of events purged as a result of the operation.
78
+ class PurgeUserEventsResponse
79
+ include ::Google::Protobuf::MessageExts
80
+ extend ::Google::Protobuf::MessageExts::ClassMethods
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,238 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Retail
23
+ module V2
24
+ # UserEvent captures all metadata information Retail API needs to know about
25
+ # how end users interact with customers' website.
26
+ # @!attribute [rw] event_type
27
+ # @return [::String]
28
+ # Required. User event type. Allowed values are:
29
+ #
30
+ # * `add-to-cart`: Products being added to cart.
31
+ # * `category-page-view`: Special pages such as sale or promotion pages
32
+ # viewed.
33
+ # * `detail-page-view`: Products detail page viewed.
34
+ # * `home-page-view`: Homepage viewed.
35
+ # * `purchase-complete`: User finishing a purchase.
36
+ # * `search`: Product search.
37
+ # * `shopping-cart-page-view`: User viewing a shopping cart.
38
+ # @!attribute [rw] visitor_id
39
+ # @return [::String]
40
+ # Required. A unique identifier for tracking visitors.
41
+ #
42
+ # For example, this could be implemented with an HTTP cookie, which should be
43
+ # able to uniquely identify a visitor on a single device. This unique
44
+ # identifier should not change if the visitor log in/out of the website.
45
+ #
46
+ # The field must be a UTF-8 encoded string with a length limit of 128
47
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
48
+ # @!attribute [rw] event_time
49
+ # @return [::Google::Protobuf::Timestamp]
50
+ # Only required for
51
+ # {::Google::Cloud::Retail::V2::UserEventService::Client#import_user_events UserEventService.ImportUserEvents}
52
+ # method. Timestamp of when the user event happened.
53
+ # @!attribute [rw] experiment_ids
54
+ # @return [::Array<::String>]
55
+ # A list of identifiers for the independent experiment groups this user event
56
+ # belongs to. This is used to distinguish between user events associated with
57
+ # different experiment setups (e.g. using Retail API, using different
58
+ # recommendation models).
59
+ # @!attribute [rw] attribution_token
60
+ # @return [::String]
61
+ # Highly recommended for user events that are the result of
62
+ # {::Google::Cloud::Retail::V2::PredictionService::Client#predict PredictionService.Predict}.
63
+ # This field enables accurate attribution of recommendation model
64
+ # performance.
65
+ #
66
+ # The value must be a valid
67
+ # {::Google::Cloud::Retail::V2::PredictResponse#attribution_token PredictResponse.attribution_token}
68
+ # for user events that are the result of
69
+ # {::Google::Cloud::Retail::V2::PredictionService::Client#predict PredictionService.Predict}.
70
+ #
71
+ # This token enables us to accurately attribute page view or purchase back to
72
+ # the event and the particular predict response containing this
73
+ # clicked/purchased product. If user clicks on product K in the
74
+ # recommendation results, pass
75
+ # {::Google::Cloud::Retail::V2::PredictResponse#attribution_token PredictResponse.attribution_token}
76
+ # as a URL parameter to product K's page. When recording events on product
77
+ # K's page, log the
78
+ # {::Google::Cloud::Retail::V2::PredictResponse#attribution_token PredictResponse.attribution_token}
79
+ # to this field.
80
+ # @!attribute [rw] product_details
81
+ # @return [::Array<::Google::Cloud::Retail::V2::ProductDetail>]
82
+ # The main product details related to the event.
83
+ #
84
+ # This field is required for the following event types:
85
+ #
86
+ # * `add-to-cart`
87
+ # * `detail-page-view`
88
+ # * `purchase-complete`
89
+ #
90
+ # In a `search` event, this field represents the products returned to the end
91
+ # user on the current page (the end user may have not finished broswing the
92
+ # whole page yet). When a new page is returned to the end user, after
93
+ # pagination/filtering/ordering even for the same query, a new `search` event
94
+ # with different
95
+ # {::Google::Cloud::Retail::V2::UserEvent#product_details product_details} is
96
+ # desired. The end user may have not finished broswing the whole page yet.
97
+ # @!attribute [rw] attributes
98
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
99
+ # Extra user event features to include in the recommendation model.
100
+ #
101
+ # The key must be a UTF-8 encoded string with a length limit of 5,000
102
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
103
+ #
104
+ # For product recommendation, an example of extra user information is
105
+ # traffic_channel, i.e. how user arrives at the site. Users can arrive
106
+ # at the site by coming to the site directly, or coming through Google
107
+ # search, and etc.
108
+ # @!attribute [rw] cart_id
109
+ # @return [::String]
110
+ # The id or name of the associated shopping cart. This id is used
111
+ # to associate multiple items added or present in the cart before purchase.
112
+ #
113
+ # This can only be set for `add-to-cart`, `purchase-complete`, or
114
+ # `shopping-cart-page-view` events.
115
+ # @!attribute [rw] purchase_transaction
116
+ # @return [::Google::Cloud::Retail::V2::PurchaseTransaction]
117
+ # A transaction represents the entire purchase transaction.
118
+ #
119
+ # Required for `purchase-complete` events. Other event types should not set
120
+ # this field. Otherwise, an INVALID_ARGUMENT error is returned.
121
+ # @!attribute [rw] search_query
122
+ # @return [::String]
123
+ # The user's search query.
124
+ #
125
+ # The value must be a UTF-8 encoded string with a length limit of 5,000
126
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
127
+ #
128
+ # Required for `search` events. Other event types should not set this field.
129
+ # Otherwise, an INVALID_ARGUMENT error is returned.
130
+ # @!attribute [rw] page_categories
131
+ # @return [::Array<::String>]
132
+ # The categories associated with a category page.
133
+ #
134
+ # To represent full path of category, use '>' sign to separate different
135
+ # hierarchies. If '>' is part of the category name, please replace it with
136
+ # other character(s).
137
+ #
138
+ # Category pages include special pages such as sales or promotions. For
139
+ # instance, a special sale page may have the category hierarchy:
140
+ # "pageCategories" : ["Sales > 2017 Black Friday Deals"].
141
+ #
142
+ # Required for `category-page-view` events. Other event types should not set
143
+ # this field. Otherwise, an INVALID_ARGUMENT error is returned.
144
+ # @!attribute [rw] user_info
145
+ # @return [::Google::Cloud::Retail::V2::UserInfo]
146
+ # User information.
147
+ # @!attribute [rw] uri
148
+ # @return [::String]
149
+ # Complete URL (window.location.href) of the user's current page.
150
+ #
151
+ # When using the client side event reporting with JavaScript pixel and Google
152
+ # Tag Manager, this value is filled in automatically. Maximum length 5,000
153
+ # characters.
154
+ # @!attribute [rw] referrer_uri
155
+ # @return [::String]
156
+ # The referrer URL of the current page.
157
+ #
158
+ # When using the client side event reporting with JavaScript pixel and Google
159
+ # Tag Manager, this value is filled in automatically.
160
+ # @!attribute [rw] page_view_id
161
+ # @return [::String]
162
+ # A unique id of a web page view.
163
+ #
164
+ # This should be kept the same for all user events triggered from the same
165
+ # pageview. For example, an item detail page view could trigger multiple
166
+ # events as the user is browsing the page. The `pageViewId` property should
167
+ # be kept the same for all these events so that they can be grouped together
168
+ # properly.
169
+ #
170
+ # When using the client side event reporting with JavaScript pixel and Google
171
+ # Tag Manager, this value is filled in automatically.
172
+ class UserEvent
173
+ include ::Google::Protobuf::MessageExts
174
+ extend ::Google::Protobuf::MessageExts::ClassMethods
175
+
176
+ # @!attribute [rw] key
177
+ # @return [::String]
178
+ # @!attribute [rw] value
179
+ # @return [::Google::Cloud::Retail::V2::CustomAttribute]
180
+ class AttributesEntry
181
+ include ::Google::Protobuf::MessageExts
182
+ extend ::Google::Protobuf::MessageExts::ClassMethods
183
+ end
184
+ end
185
+
186
+ # Detailed product information associated with a user event.
187
+ # @!attribute [rw] product
188
+ # @return [::Google::Cloud::Retail::V2::Product]
189
+ # Required. {::Google::Cloud::Retail::V2::Product Product} information.
190
+ #
191
+ # Only {::Google::Cloud::Retail::V2::Product#id Product.id} field is used when
192
+ # ingesting an event, all other product fields are ignored as we will look
193
+ # them up from the catalog.
194
+ # @!attribute [rw] quantity
195
+ # @return [::Google::Protobuf::Int32Value]
196
+ # Quantity of the product associated with the user event.
197
+ #
198
+ # For example, this field will be 2 if two products are added to the shopping
199
+ # cart for `purchase-complete` event. Required for `add-to-cart` and
200
+ # `purchase-complete` event types.
201
+ class ProductDetail
202
+ include ::Google::Protobuf::MessageExts
203
+ extend ::Google::Protobuf::MessageExts::ClassMethods
204
+ end
205
+
206
+ # A transaction represents the entire purchase transaction.
207
+ # @!attribute [rw] id
208
+ # @return [::String]
209
+ # The transaction ID with a length limit of 128 characters.
210
+ # @!attribute [rw] revenue
211
+ # @return [::Float]
212
+ # Required. Total non-zero revenue or grand total associated with the
213
+ # transaction. This value include shipping, tax, or other adjustments to
214
+ # total revenue that you want to include as part of your revenue
215
+ # calculations.
216
+ # @!attribute [rw] tax
217
+ # @return [::Float]
218
+ # All the taxes associated with the transaction.
219
+ # @!attribute [rw] cost
220
+ # @return [::Float]
221
+ # All the costs associated with the products. These can be manufacturing
222
+ # costs, shipping expenses not borne by the end user, or any other costs,
223
+ # such that:
224
+ #
225
+ # * Profit = {::Google::Cloud::Retail::V2::PurchaseTransaction#revenue revenue} -
226
+ # {::Google::Cloud::Retail::V2::PurchaseTransaction#tax tax} -
227
+ # {::Google::Cloud::Retail::V2::PurchaseTransaction#cost cost}
228
+ # @!attribute [rw] currency_code
229
+ # @return [::String]
230
+ # Required. Currency code. Use three-character ISO-4217 code.
231
+ class PurchaseTransaction
232
+ include ::Google::Protobuf::MessageExts
233
+ extend ::Google::Protobuf::MessageExts::ClassMethods
234
+ end
235
+ end
236
+ end
237
+ end
238
+ end
@@ -0,0 +1,114 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Retail
23
+ module V2
24
+ # Request message for WriteUserEvent method.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. The parent catalog resource name, such as
28
+ # "projects/1234/locations/global/catalogs/default_catalog".
29
+ # @!attribute [rw] user_event
30
+ # @return [::Google::Cloud::Retail::V2::UserEvent]
31
+ # Required. User event to write.
32
+ class WriteUserEventRequest
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
+ end
36
+
37
+ # Request message for CollectUserEvent method.
38
+ # @!attribute [rw] parent
39
+ # @return [::String]
40
+ # Required. The parent catalog name, such as
41
+ # "projects/1234/locations/global/catalogs/default_catalog".
42
+ # @!attribute [rw] user_event
43
+ # @return [::String]
44
+ # Required. URL encoded UserEvent proto with a length limit of 2,000,000
45
+ # characters.
46
+ # @!attribute [rw] uri
47
+ # @return [::String]
48
+ # The URL including cgi-parameters but excluding the hash fragment with a
49
+ # length limit of 5,000 characters. This is often more useful than the
50
+ # referer URL, because many browsers only send the domain for 3rd party
51
+ # requests.
52
+ # @!attribute [rw] ets
53
+ # @return [::Integer]
54
+ # The event timestamp in milliseconds. This prevents browser caching of
55
+ # otherwise identical get requests. The name is abbreviated to reduce the
56
+ # payload bytes.
57
+ class CollectUserEventRequest
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+ end
61
+
62
+ # Request message for RejoinUserEvents method.
63
+ # @!attribute [rw] parent
64
+ # @return [::String]
65
+ # Required. The parent catalog resource name, such as
66
+ # "projects/1234/locations/global/catalogs/default_catalog".
67
+ # @!attribute [rw] user_event_rejoin_scope
68
+ # @return [::Google::Cloud::Retail::V2::RejoinUserEventsRequest::UserEventRejoinScope]
69
+ # The type of the user event rejoin to define the scope and range of the user
70
+ # events to be rejoined with the latest product catalog. Defaults to
71
+ # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
72
+ # invalid integer value.
73
+ class RejoinUserEventsRequest
74
+ include ::Google::Protobuf::MessageExts
75
+ extend ::Google::Protobuf::MessageExts::ClassMethods
76
+
77
+ # The scope of user events to be rejoined with the latest product catalog.
78
+ # If the rejoining aims at reducing number of unjoined events, set
79
+ # UserEventRejoinScope to UNJOINED_EVENTS.
80
+ # If the rejoining aims at correcting product catalog information in joined
81
+ # events, set UserEventRejoinScope to JOINED_EVENTS.
82
+ # If all events needs to be rejoined, set UserEventRejoinScope to
83
+ # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED.
84
+ module UserEventRejoinScope
85
+ # Rejoin all events with the latest product catalog, including both joined
86
+ # events and unjoined events.
87
+ USER_EVENT_REJOIN_SCOPE_UNSPECIFIED = 0
88
+
89
+ # Only rejoin joined events with the latest product catalog.
90
+ JOINED_EVENTS = 1
91
+
92
+ # Only rejoin unjoined events with the latest product catalog.
93
+ UNJOINED_EVENTS = 2
94
+ end
95
+ end
96
+
97
+ # Response message for RejoinUserEvents method.
98
+ # @!attribute [rw] rejoined_user_events_count
99
+ # @return [::Integer]
100
+ # Number of user events that were joined with latest product catalog.
101
+ class RejoinUserEventsResponse
102
+ include ::Google::Protobuf::MessageExts
103
+ extend ::Google::Protobuf::MessageExts::ClassMethods
104
+ end
105
+
106
+ # Metadata for RejoinUserEvents method.
107
+ class RejoinUserEventsMetadata
108
+ include ::Google::Protobuf::MessageExts
109
+ extend ::Google::Protobuf::MessageExts::ClassMethods
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end