google-cloud-retail-v2 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +2 -2
- data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +2 -2
- data/lib/google/cloud/retail/v2/common_pb.rb +6 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +11 -4
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +2 -2
- data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +11 -4
- data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +2 -2
- data/lib/google/cloud/retail/v2/completion_service/rest.rb +1 -1
- data/lib/google/cloud/retail/v2/completion_service.rb +1 -1
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/control_service/client.rb +2 -2
- data/lib/google/cloud/retail/v2/control_service/rest/client.rb +2 -2
- data/lib/google/cloud/retail/v2/model_pb.rb +70 -0
- data/lib/google/cloud/retail/v2/model_service/client.rb +1126 -0
- data/lib/google/cloud/retail/v2/model_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/model_service/operations.rb +768 -0
- data/lib/google/cloud/retail/v2/model_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/model_service/rest/client.rb +904 -0
- data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +828 -0
- data/lib/google/cloud/retail/v2/model_service/rest/service_stub.rb +525 -0
- data/lib/google/cloud/retail/v2/model_service/rest.rb +64 -0
- data/lib/google/cloud/retail/v2/model_service.rb +67 -0
- data/lib/google/cloud/retail/v2/model_service_pb.rb +80 -0
- data/lib/google/cloud/retail/v2/model_service_services_pb.rb +73 -0
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +5 -2
- data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +5 -2
- data/lib/google/cloud/retail/v2/product_service/client.rb +18 -17
- data/lib/google/cloud/retail/v2/product_service/operations.rb +2 -2
- data/lib/google/cloud/retail/v2/product_service/rest/client.rb +18 -17
- data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +2 -2
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +16 -15
- data/lib/google/cloud/retail/v2/rest.rb +1 -0
- data/lib/google/cloud/retail/v2/search_service/client.rb +11 -4
- data/lib/google/cloud/retail/v2/search_service/rest/client.rb +11 -4
- data/lib/google/cloud/retail/v2/search_service_pb.rb +14 -0
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +2 -2
- data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +2 -2
- data/lib/google/cloud/retail/v2/user_event_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +3 -3
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +2 -2
- data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +3 -3
- data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +2 -2
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +1 -0
- data/proto_docs/google/api/client.rb +57 -3
- data/proto_docs/google/cloud/retail/v2/catalog.rb +11 -6
- data/proto_docs/google/cloud/retail/v2/common.rb +15 -1
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +10 -2
- data/proto_docs/google/cloud/retail/v2/import_config.rb +1 -1
- data/proto_docs/google/cloud/retail/v2/model.rb +228 -0
- data/proto_docs/google/cloud/retail/v2/model_service.rb +172 -0
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +3 -0
- data/proto_docs/google/cloud/retail/v2/product.rb +2 -3
- data/proto_docs/google/cloud/retail/v2/search_service.rb +56 -2
- data/proto_docs/google/cloud/retail/v2/serving_config.rb +3 -3
- data/proto_docs/google/cloud/retail/v2/user_event.rb +7 -0
- data/proto_docs/google/cloud/retail/v2/user_event_service.rb +1 -1
- metadata +16 -2
@@ -674,9 +674,9 @@ module Google
|
|
674
674
|
# * (`String`) The path to a service account key file in JSON format
|
675
675
|
# * (`Hash`) A service account key as a Hash
|
676
676
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
677
|
-
# (see the [googleauth docs](https://
|
677
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
678
678
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
679
|
-
# (see the [signet docs](https://
|
679
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
680
680
|
# * (`nil`) indicating no credentials
|
681
681
|
# @return [::Object]
|
682
682
|
# @!attribute [rw] scope
|
@@ -32,6 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
32
32
|
optional :uri, :string, 13
|
33
33
|
optional :referrer_uri, :string, 14
|
34
34
|
optional :page_view_id, :string, 15
|
35
|
+
optional :entity, :string, 23
|
35
36
|
end
|
36
37
|
add_message "google.cloud.retail.v2.ProductDetail" do
|
37
38
|
optional :product, :message, 1, "google.cloud.retail.v2.Product"
|
@@ -303,7 +303,7 @@ module Google
|
|
303
303
|
#
|
304
304
|
# @param prebuilt_rule [::String]
|
305
305
|
# The prebuilt rule name that can convert a specific type of raw_json.
|
306
|
-
# For example: "
|
306
|
+
# For example: "ga4_bq" rule for the GA4 user event schema.
|
307
307
|
# @param parent [::String]
|
308
308
|
# Required. The parent catalog name, such as
|
309
309
|
# `projects/1234/locations/global/catalogs/default_catalog`.
|
@@ -763,9 +763,9 @@ module Google
|
|
763
763
|
# * (`String`) The path to a service account key file in JSON format
|
764
764
|
# * (`Hash`) A service account key as a Hash
|
765
765
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
766
|
-
# (see the [googleauth docs](https://
|
766
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
767
767
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
768
|
-
# (see the [signet docs](https://
|
768
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
769
769
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
770
770
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
771
771
|
# * (`nil`) indicating no credentials
|
@@ -620,9 +620,9 @@ module Google
|
|
620
620
|
# * (`String`) The path to a service account key file in JSON format
|
621
621
|
# * (`Hash`) A service account key as a Hash
|
622
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
623
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
624
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
625
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
626
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
627
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
628
628
|
# * (`nil`) indicating no credentials
|
@@ -271,7 +271,7 @@ module Google
|
|
271
271
|
#
|
272
272
|
# @param prebuilt_rule [::String]
|
273
273
|
# The prebuilt rule name that can convert a specific type of raw_json.
|
274
|
-
# For example: "
|
274
|
+
# For example: "ga4_bq" rule for the GA4 user event schema.
|
275
275
|
# @param parent [::String]
|
276
276
|
# Required. The parent catalog name, such as
|
277
277
|
# `projects/1234/locations/global/catalogs/default_catalog`.
|
@@ -618,9 +618,9 @@ module Google
|
|
618
618
|
# * (`String`) The path to a service account key file in JSON format
|
619
619
|
# * (`Hash`) A service account key as a Hash
|
620
620
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
621
|
-
# (see the [googleauth docs](https://
|
621
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
622
622
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
623
|
-
# (see the [signet docs](https://
|
623
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
624
624
|
# * (`nil`) indicating no credentials
|
625
625
|
# @return [::Object]
|
626
626
|
# @!attribute [rw] scope
|
@@ -411,9 +411,9 @@ module Google
|
|
411
411
|
# * (`String`) The path to a service account key file in JSON format
|
412
412
|
# * (`Hash`) A service account key as a Hash
|
413
413
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
414
|
-
# (see the [googleauth docs](https://
|
414
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
415
415
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
416
|
-
# (see the [signet docs](https://
|
416
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
417
417
|
# * (`nil`) indicating no credentials
|
418
418
|
# @return [::Object]
|
419
419
|
# @!attribute [rw] scope
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/retail/v2/catalog_service"
|
20
20
|
require "google/cloud/retail/v2/completion_service"
|
21
21
|
require "google/cloud/retail/v2/control_service"
|
22
|
+
require "google/cloud/retail/v2/model_service"
|
22
23
|
require "google/cloud/retail/v2/prediction_service"
|
23
24
|
require "google/cloud/retail/v2/product_service"
|
24
25
|
require "google/cloud/retail/v2/search_service"
|
@@ -35,7 +35,9 @@ module Google
|
|
35
35
|
# Details about how and where to publish client libraries.
|
36
36
|
# @!attribute [rw] version
|
37
37
|
# @return [::String]
|
38
|
-
# Version of the API to apply these settings to.
|
38
|
+
# Version of the API to apply these settings to. This is the full protobuf
|
39
|
+
# package for the API, ending in the version element.
|
40
|
+
# Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
|
39
41
|
# @!attribute [rw] launch_stage
|
40
42
|
# @return [::Google::Api::LaunchStage]
|
41
43
|
# Launch stage of this version of the API.
|
@@ -111,6 +113,10 @@ module Google
|
|
111
113
|
# Client library settings. If the same version string appears multiple
|
112
114
|
# times in this list, then the last one wins. Settings from earlier
|
113
115
|
# settings with the same version string are discarded.
|
116
|
+
# @!attribute [rw] proto_reference_documentation_uri
|
117
|
+
# @return [::String]
|
118
|
+
# Optional link to proto reference documentation. Example:
|
119
|
+
# https://cloud.google.com/pubsub/lite/docs/reference/rpc
|
114
120
|
class Publishing
|
115
121
|
include ::Google::Protobuf::MessageExts
|
116
122
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -203,9 +209,57 @@ module Google
|
|
203
209
|
# @!attribute [rw] common
|
204
210
|
# @return [::Google::Api::CommonLanguageSettings]
|
205
211
|
# Some settings.
|
212
|
+
# @!attribute [rw] renamed_services
|
213
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
214
|
+
# Map from original service names to renamed versions.
|
215
|
+
# This is used when the default generated types
|
216
|
+
# would cause a naming conflict. (Neither name is
|
217
|
+
# fully-qualified.)
|
218
|
+
# Example: Subscriber to SubscriberServiceApi.
|
219
|
+
# @!attribute [rw] renamed_resources
|
220
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
221
|
+
# Map from full resource types to the effective short name
|
222
|
+
# for the resource. This is used when otherwise resource
|
223
|
+
# named from different services would cause naming collisions.
|
224
|
+
# Example entry:
|
225
|
+
# "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
|
226
|
+
# @!attribute [rw] ignored_resources
|
227
|
+
# @return [::Array<::String>]
|
228
|
+
# List of full resource types to ignore during generation.
|
229
|
+
# This is typically used for API-specific Location resources,
|
230
|
+
# which should be handled by the generator as if they were actually
|
231
|
+
# the common Location resources.
|
232
|
+
# Example entry: "documentai.googleapis.com/Location"
|
233
|
+
# @!attribute [rw] forced_namespace_aliases
|
234
|
+
# @return [::Array<::String>]
|
235
|
+
# Namespaces which must be aliased in snippets due to
|
236
|
+
# a known (but non-generator-predictable) naming collision
|
237
|
+
# @!attribute [rw] handwritten_signatures
|
238
|
+
# @return [::Array<::String>]
|
239
|
+
# Method signatures (in the form "service.method(signature)")
|
240
|
+
# which are provided separately, so shouldn't be generated.
|
241
|
+
# Snippets *calling* these methods are still generated, however.
|
206
242
|
class DotnetSettings
|
207
243
|
include ::Google::Protobuf::MessageExts
|
208
244
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
|
246
|
+
# @!attribute [rw] key
|
247
|
+
# @return [::String]
|
248
|
+
# @!attribute [rw] value
|
249
|
+
# @return [::String]
|
250
|
+
class RenamedServicesEntry
|
251
|
+
include ::Google::Protobuf::MessageExts
|
252
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
253
|
+
end
|
254
|
+
|
255
|
+
# @!attribute [rw] key
|
256
|
+
# @return [::String]
|
257
|
+
# @!attribute [rw] value
|
258
|
+
# @return [::String]
|
259
|
+
class RenamedResourcesEntry
|
260
|
+
include ::Google::Protobuf::MessageExts
|
261
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
262
|
+
end
|
209
263
|
end
|
210
264
|
|
211
265
|
# Settings for Ruby client libraries.
|
@@ -240,8 +294,8 @@ module Google
|
|
240
294
|
# Example of a YAML configuration::
|
241
295
|
#
|
242
296
|
# publishing:
|
243
|
-
#
|
244
|
-
# - selector:
|
297
|
+
# method_settings:
|
298
|
+
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
|
245
299
|
# long_running:
|
246
300
|
# initial_poll_delay:
|
247
301
|
# seconds: 60 # 1 minute
|
@@ -89,6 +89,10 @@ module Google
|
|
89
89
|
# characters and underscores. For example, an attribute named
|
90
90
|
# `attributes.abc_xyz` can be indexed, but an attribute named
|
91
91
|
# `attributes.abc-xyz` cannot be indexed.
|
92
|
+
#
|
93
|
+
# If the attribute key starts with `attributes.`, then the attribute is a
|
94
|
+
# custom attribute. Attributes such as `brands`, `patterns`, and `title` are
|
95
|
+
# built-in and called system attributes.
|
92
96
|
# @!attribute [r] in_use
|
93
97
|
# @return [::Boolean]
|
94
98
|
# Output only. Indicates whether this attribute has been used by any
|
@@ -153,11 +157,14 @@ module Google
|
|
153
157
|
# @return [::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption]
|
154
158
|
# If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
|
155
159
|
# This property only applies to textual custom attributes and requires
|
156
|
-
# indexable set to enabled to enable exact-searchable.
|
160
|
+
# indexable set to enabled to enable exact-searchable. If unset, the server
|
161
|
+
# behavior defaults to
|
162
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption::EXACT_SEARCHABLE_DISABLED EXACT_SEARCHABLE_DISABLED}.
|
157
163
|
# @!attribute [rw] retrievable_option
|
158
164
|
# @return [::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption]
|
159
165
|
# If RETRIEVABLE_ENABLED, attribute values are retrievable in the search
|
160
|
-
# results.
|
166
|
+
# results. If unset, the server behavior defaults to
|
167
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption::RETRIEVABLE_DISABLED RETRIEVABLE_DISABLED}.
|
161
168
|
class CatalogAttribute
|
162
169
|
include ::Google::Protobuf::MessageExts
|
163
170
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -215,8 +222,7 @@ module Google
|
|
215
222
|
|
216
223
|
# The status of the exact-searchable option of a catalog attribute.
|
217
224
|
module ExactSearchableOption
|
218
|
-
# Value used when unset.
|
219
|
-
# {::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption::EXACT_SEARCHABLE_DISABLED EXACT_SEARCHABLE_DISABLED}.
|
225
|
+
# Value used when unset.
|
220
226
|
EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0
|
221
227
|
|
222
228
|
# Exact searchable option enabled for an attribute.
|
@@ -228,8 +234,7 @@ module Google
|
|
228
234
|
|
229
235
|
# The status of the retrievable option of a catalog attribute.
|
230
236
|
module RetrievableOption
|
231
|
-
# Value used when unset.
|
232
|
-
# {::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption::RETRIEVABLE_DISABLED RETRIEVABLE_DISABLED}.
|
237
|
+
# Value used when unset.
|
233
238
|
RETRIEVABLE_OPTION_UNSPECIFIED = 0
|
234
239
|
|
235
240
|
# Retrievable option enabled for an attribute.
|
@@ -350,7 +350,7 @@ module Google
|
|
350
350
|
# it is expected to have only 1 color. May consider using single "Mixed"
|
351
351
|
# instead of multiple values.
|
352
352
|
#
|
353
|
-
# A maximum of
|
353
|
+
# A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
|
354
354
|
# string with a length limit of 128 characters. Otherwise, an
|
355
355
|
# INVALID_ARGUMENT error is returned.
|
356
356
|
#
|
@@ -805,6 +805,20 @@ module Google
|
|
805
805
|
SOLUTION_TYPE_SEARCH = 2
|
806
806
|
end
|
807
807
|
|
808
|
+
# If filtering for recommendations is enabled.
|
809
|
+
module RecommendationsFilteringOption
|
810
|
+
# Value used when unset.
|
811
|
+
# In this case, server behavior defaults to
|
812
|
+
# {::Google::Cloud::Retail::V2::RecommendationsFilteringOption::RECOMMENDATIONS_FILTERING_DISABLED RECOMMENDATIONS_FILTERING_DISABLED}.
|
813
|
+
RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED = 0
|
814
|
+
|
815
|
+
# Recommendation filtering is disabled.
|
816
|
+
RECOMMENDATIONS_FILTERING_DISABLED = 1
|
817
|
+
|
818
|
+
# Recommendation filtering is enabled.
|
819
|
+
RECOMMENDATIONS_FILTERING_ENABLED = 3
|
820
|
+
end
|
821
|
+
|
808
822
|
# The use case of Cloud Retail Search.
|
809
823
|
module SearchSolutionUseCase
|
810
824
|
# The value when it's unspecified. In this case, server behavior defaults to
|
@@ -21,7 +21,7 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module Retail
|
23
23
|
module V2
|
24
|
-
#
|
24
|
+
# Autocomplete parameters.
|
25
25
|
# @!attribute [rw] catalog
|
26
26
|
# @return [::String]
|
27
27
|
# Required. Catalog for which the completion is performed.
|
@@ -94,12 +94,20 @@ module Google
|
|
94
94
|
#
|
95
95
|
# The maximum allowed max suggestions is 20. If it is set higher, it will be
|
96
96
|
# capped by 20.
|
97
|
+
# @!attribute [rw] entity
|
98
|
+
# @return [::String]
|
99
|
+
# The entity for customers that may run multiple different entities, domains,
|
100
|
+
# sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
|
101
|
+
# `google.com`, `youtube.com`, etc.
|
102
|
+
# If this is set, it should be exactly matched with
|
103
|
+
# {::Google::Cloud::Retail::V2::UserEvent#entity UserEvent.entity} to get
|
104
|
+
# per-entity autocomplete results.
|
97
105
|
class CompleteQueryRequest
|
98
106
|
include ::Google::Protobuf::MessageExts
|
99
107
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
100
108
|
end
|
101
109
|
|
102
|
-
# Response of the
|
110
|
+
# Response of the autocomplete query.
|
103
111
|
# @!attribute [rw] completion_results
|
104
112
|
# @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::CompletionResult>]
|
105
113
|
# Results of the matching suggestions. The result list is ordered and the
|
@@ -113,7 +113,7 @@ module Google
|
|
113
113
|
# The schema is available here:
|
114
114
|
# https://support.google.com/analytics/answer/7029846.
|
115
115
|
#
|
116
|
-
# Supported values for
|
116
|
+
# Supported values for autocomplete imports:
|
117
117
|
#
|
118
118
|
# * `suggestions` (default): One JSON completion suggestion per line.
|
119
119
|
# * `denylist`: One JSON deny suggestion per line.
|
@@ -0,0 +1,228 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 that describes the training and serving parameters of a
|
25
|
+
# {::Google::Cloud::Retail::V2::Model Model}. A
|
26
|
+
# {::Google::Cloud::Retail::V2::Model Model} can be associated with a
|
27
|
+
# {::Google::Cloud::Retail::V2::ServingConfig ServingConfig} and then queried
|
28
|
+
# through the Predict API.
|
29
|
+
# @!attribute [rw] name
|
30
|
+
# @return [::String]
|
31
|
+
# Required. The fully qualified resource name of the model.
|
32
|
+
#
|
33
|
+
# Format:
|
34
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
|
35
|
+
# catalog_id has char limit of 50.
|
36
|
+
# recommendation_model_id has char limit of 40.
|
37
|
+
# @!attribute [rw] display_name
|
38
|
+
# @return [::String]
|
39
|
+
# Required. The display name of the model.
|
40
|
+
#
|
41
|
+
# Should be human readable, used to display Recommendation Models in the
|
42
|
+
# Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
|
43
|
+
# characters.
|
44
|
+
# @!attribute [rw] training_state
|
45
|
+
# @return [::Google::Cloud::Retail::V2::Model::TrainingState]
|
46
|
+
# Optional. The training state that the model is in (e.g.
|
47
|
+
# `TRAINING` or `PAUSED`).
|
48
|
+
#
|
49
|
+
# Since part of the cost of running the service
|
50
|
+
# is frequency of training - this can be used to determine when to train
|
51
|
+
# model in order to control cost. If not specified: the default value for
|
52
|
+
# `CreateModel` method is `TRAINING`. The default value for
|
53
|
+
# `UpdateModel` method is to keep the state the same as before.
|
54
|
+
# @!attribute [r] serving_state
|
55
|
+
# @return [::Google::Cloud::Retail::V2::Model::ServingState]
|
56
|
+
# Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
|
57
|
+
# @!attribute [r] create_time
|
58
|
+
# @return [::Google::Protobuf::Timestamp]
|
59
|
+
# Output only. Timestamp the Recommendation Model was created at.
|
60
|
+
# @!attribute [r] update_time
|
61
|
+
# @return [::Google::Protobuf::Timestamp]
|
62
|
+
# Output only. Timestamp the Recommendation Model was last updated. E.g.
|
63
|
+
# if a Recommendation Model was paused - this would be the time the pause was
|
64
|
+
# initiated.
|
65
|
+
# @!attribute [rw] type
|
66
|
+
# @return [::String]
|
67
|
+
# Required. The type of model e.g. `home-page`.
|
68
|
+
#
|
69
|
+
# Currently supported values: `recommended-for-you`, `others-you-may-like`,
|
70
|
+
# `frequently-bought-together`, `page-optimization`, `similar-items`,
|
71
|
+
# `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value).
|
72
|
+
#
|
73
|
+
#
|
74
|
+
# This field together with
|
75
|
+
# {::Google::Cloud::Retail::V2::Model#optimization_objective optimization_objective}
|
76
|
+
# describe model metadata to use to control model training and serving.
|
77
|
+
# See https://cloud.google.com/retail/docs/models
|
78
|
+
# for more details on what the model metadata control and which combination
|
79
|
+
# of parameters are valid. For invalid combinations of parameters (e.g. type
|
80
|
+
# = `frequently-bought-together` and optimization_objective = `ctr`), you
|
81
|
+
# receive an error 400 if you try to create/update a recommendation with
|
82
|
+
# this set of knobs.
|
83
|
+
# @!attribute [rw] optimization_objective
|
84
|
+
# @return [::String]
|
85
|
+
# Optional. The optimization objective e.g. `cvr`.
|
86
|
+
#
|
87
|
+
# Currently supported
|
88
|
+
# values: `ctr`, `cvr`, `revenue-per-order`.
|
89
|
+
#
|
90
|
+
# If not specified, we choose default based on model type.
|
91
|
+
# Default depends on type of recommendation:
|
92
|
+
#
|
93
|
+
# `recommended-for-you` => `ctr`
|
94
|
+
#
|
95
|
+
# `others-you-may-like` => `ctr`
|
96
|
+
#
|
97
|
+
# `frequently-bought-together` => `revenue_per_order`
|
98
|
+
#
|
99
|
+
# This field together with
|
100
|
+
# {::Google::Cloud::Retail::V2::Model#type optimization_objective}
|
101
|
+
# describe model metadata to use to control model training and serving.
|
102
|
+
# See https://cloud.google.com/retail/docs/models
|
103
|
+
# for more details on what the model metadata control and which combination
|
104
|
+
# of parameters are valid. For invalid combinations of parameters (e.g. type
|
105
|
+
# = `frequently-bought-together` and optimization_objective = `ctr`), you
|
106
|
+
# receive an error 400 if you try to create/update a recommendation with
|
107
|
+
# this set of knobs.
|
108
|
+
# @!attribute [rw] periodic_tuning_state
|
109
|
+
# @return [::Google::Cloud::Retail::V2::Model::PeriodicTuningState]
|
110
|
+
# Optional. The state of periodic tuning.
|
111
|
+
#
|
112
|
+
# The period we use is 3 months - to do a
|
113
|
+
# one-off tune earlier use the `TuneModel` method. Default value
|
114
|
+
# is `PERIODIC_TUNING_ENABLED`.
|
115
|
+
# @!attribute [r] last_tune_time
|
116
|
+
# @return [::Google::Protobuf::Timestamp]
|
117
|
+
# Output only. The timestamp when the latest successful tune finished.
|
118
|
+
# @!attribute [r] tuning_operation
|
119
|
+
# @return [::String]
|
120
|
+
# Output only. The tune operation associated with the model.
|
121
|
+
#
|
122
|
+
# Can be used to determine if there is an ongoing tune for this
|
123
|
+
# recommendation. Empty field implies no tune is goig on.
|
124
|
+
# @!attribute [r] data_state
|
125
|
+
# @return [::Google::Cloud::Retail::V2::Model::DataState]
|
126
|
+
# Output only. The state of data requirements for this model: `DATA_OK` and
|
127
|
+
# `DATA_ERROR`.
|
128
|
+
#
|
129
|
+
# Recommendation model cannot be trained if the data is in
|
130
|
+
# `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
|
131
|
+
# if serving state is `ACTIVE`: models were trained successfully before, but
|
132
|
+
# cannot be refreshed because model no longer has sufficient
|
133
|
+
# data for training.
|
134
|
+
# @!attribute [rw] filtering_option
|
135
|
+
# @return [::Google::Cloud::Retail::V2::RecommendationsFilteringOption]
|
136
|
+
# Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
|
137
|
+
# by attributes is enabled for the model.
|
138
|
+
# @!attribute [r] serving_config_lists
|
139
|
+
# @return [::Array<::Google::Cloud::Retail::V2::Model::ServingConfigList>]
|
140
|
+
# Output only. The list of valid serving configs associated with the
|
141
|
+
# PageOptimizationConfig.
|
142
|
+
class Model
|
143
|
+
include ::Google::Protobuf::MessageExts
|
144
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
145
|
+
|
146
|
+
# Represents an ordered combination of valid serving configs, which
|
147
|
+
# can be used for `PAGE_OPTIMIZATION` recommendations.
|
148
|
+
# @!attribute [rw] serving_config_ids
|
149
|
+
# @return [::Array<::String>]
|
150
|
+
# Optional. A set of valid serving configs that may be used for
|
151
|
+
# `PAGE_OPTIMIZATION`.
|
152
|
+
class ServingConfigList
|
153
|
+
include ::Google::Protobuf::MessageExts
|
154
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
155
|
+
end
|
156
|
+
|
157
|
+
# The serving state of the model.
|
158
|
+
module ServingState
|
159
|
+
# Unspecified serving state.
|
160
|
+
SERVING_STATE_UNSPECIFIED = 0
|
161
|
+
|
162
|
+
# The model is not serving.
|
163
|
+
INACTIVE = 1
|
164
|
+
|
165
|
+
# The model is serving and can be queried.
|
166
|
+
ACTIVE = 2
|
167
|
+
|
168
|
+
# The model is trained on tuned hyperparameters and can be
|
169
|
+
# queried.
|
170
|
+
TUNED = 3
|
171
|
+
end
|
172
|
+
|
173
|
+
# The training state of the model.
|
174
|
+
module TrainingState
|
175
|
+
# Unspecified training state.
|
176
|
+
TRAINING_STATE_UNSPECIFIED = 0
|
177
|
+
|
178
|
+
# The model training is paused.
|
179
|
+
PAUSED = 1
|
180
|
+
|
181
|
+
# The model is training.
|
182
|
+
TRAINING = 2
|
183
|
+
end
|
184
|
+
|
185
|
+
# Describes whether periodic tuning is enabled for this model
|
186
|
+
# or not. Periodic tuning is scheduled at most every three months. You can
|
187
|
+
# start a tuning process manually by using the `TuneModel`
|
188
|
+
# method, which starts a tuning process immediately and resets the quarterly
|
189
|
+
# schedule. Enabling or disabling periodic tuning does not affect any
|
190
|
+
# current tuning processes.
|
191
|
+
module PeriodicTuningState
|
192
|
+
# Unspecified default value, should never be explicitly set.
|
193
|
+
PERIODIC_TUNING_STATE_UNSPECIFIED = 0
|
194
|
+
|
195
|
+
# The model has periodic tuning disabled. Tuning
|
196
|
+
# can be reenabled by calling the `EnableModelPeriodicTuning`
|
197
|
+
# method or by calling the `TuneModel` method.
|
198
|
+
PERIODIC_TUNING_DISABLED = 1
|
199
|
+
|
200
|
+
# The model cannot be tuned with periodic tuning OR the
|
201
|
+
# `TuneModel` method. Hide the options in customer UI and
|
202
|
+
# reject any requests through the backend self serve API.
|
203
|
+
ALL_TUNING_DISABLED = 3
|
204
|
+
|
205
|
+
# The model has periodic tuning enabled. Tuning
|
206
|
+
# can be disabled by calling the `DisableModelPeriodicTuning`
|
207
|
+
# method.
|
208
|
+
PERIODIC_TUNING_ENABLED = 2
|
209
|
+
end
|
210
|
+
|
211
|
+
# Describes whether this model have sufficient training data
|
212
|
+
# to be continuously trained.
|
213
|
+
module DataState
|
214
|
+
# Unspecified default value, should never be explicitly set.
|
215
|
+
DATA_STATE_UNSPECIFIED = 0
|
216
|
+
|
217
|
+
# The model has sufficient training data.
|
218
|
+
DATA_OK = 1
|
219
|
+
|
220
|
+
# The model does not have sufficient training data. Error
|
221
|
+
# messages can be queried via Stackdriver.
|
222
|
+
DATA_ERROR = 2
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|