google-cloud-retail-v2 0.8.0 → 0.11.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 +5 -5
- data/lib/google/cloud/retail/v2/catalog_pb.rb +55 -0
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +718 -0
- data/lib/google/cloud/retail/v2/catalog_service/paths.rb +38 -0
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +34 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +38 -0
- data/lib/google/cloud/retail/v2/common_pb.rb +86 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +7 -3
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +3 -0
- data/lib/google/cloud/retail/v2/control_pb.rb +33 -0
- data/lib/google/cloud/retail/v2/control_service/client.rb +807 -0
- data/lib/google/cloud/retail/v2/control_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/control_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/control_service.rb +49 -0
- data/lib/google/cloud/retail/v2/control_service_pb.rb +57 -0
- data/lib/google/cloud/retail/v2/control_service_services_pb.rb +65 -0
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +28 -13
- data/lib/google/cloud/retail/v2/product_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +87 -42
- data/lib/google/cloud/retail/v2/product_service/operations.rb +3 -0
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +67 -23
- data/lib/google/cloud/retail/v2/search_service/client.rb +15 -2
- data/lib/google/cloud/retail/v2/search_service_pb.rb +5 -0
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +44 -0
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +998 -0
- data/lib/google/cloud/retail/v2/serving_config_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/serving_config_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/serving_config_service.rb +49 -0
- data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +66 -0
- data/lib/google/cloud/retail/v2/serving_config_service_services_pb.rb +74 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +2 -2
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +3 -0
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +2 -0
- data/proto_docs/google/cloud/retail/v2/catalog.rb +233 -0
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +133 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +314 -4
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +9 -4
- data/proto_docs/google/cloud/retail/v2/control.rb +76 -0
- data/proto_docs/google/cloud/retail/v2/control_service.rb +122 -0
- data/proto_docs/google/cloud/retail/v2/import_config.rb +20 -35
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +27 -12
- data/proto_docs/google/cloud/retail/v2/product.rb +7 -1
- data/proto_docs/google/cloud/retail/v2/product_service.rb +49 -21
- data/proto_docs/google/cloud/retail/v2/search_service.rb +72 -13
- data/proto_docs/google/cloud/retail/v2/serving_config.rb +238 -0
- data/proto_docs/google/cloud/retail/v2/serving_config_service.rb +143 -0
- data/proto_docs/google/protobuf/empty.rb +0 -2
- metadata +29 -11
@@ -25,7 +25,9 @@ module Google
|
|
25
25
|
# {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search} method.
|
26
26
|
# @!attribute [rw] placement
|
27
27
|
# @return [::String]
|
28
|
-
# Required. The resource name of the
|
28
|
+
# Required. The resource name of the Retail Search serving config, such as
|
29
|
+
# `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
|
30
|
+
# or the name of the legacy placement resource, such as
|
29
31
|
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
|
30
32
|
# This field is used to identify the serving configuration name and the set
|
31
33
|
# of models that will be used to make the search.
|
@@ -136,7 +138,9 @@ module Google
|
|
136
138
|
# Boost specification to boost certain products. See more details at this
|
137
139
|
# [user guide](https://cloud.google.com/retail/docs/boosting).
|
138
140
|
#
|
139
|
-
# Notice that if both
|
141
|
+
# Notice that if both
|
142
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#boost_control_ids ServingConfig.boost_control_ids}
|
143
|
+
# and
|
140
144
|
# {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
|
141
145
|
# are set, the boost conditions from both places are evaluated. If a search
|
142
146
|
# request matches multiple boost conditions, the final boost score is equal
|
@@ -239,6 +243,15 @@ module Google
|
|
239
243
|
# @!attribute [rw] personalization_spec
|
240
244
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec]
|
241
245
|
# The specification for personalization.
|
246
|
+
#
|
247
|
+
# Notice that if both
|
248
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}
|
249
|
+
# and
|
250
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
|
251
|
+
# are set.
|
252
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
|
253
|
+
# will override
|
254
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}.
|
242
255
|
# @!attribute [rw] labels
|
243
256
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
244
257
|
# The labels applied to a resource must meet the following requirements:
|
@@ -431,16 +444,24 @@ module Google
|
|
431
444
|
# "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the
|
432
445
|
# "categories" facet will give only "Women > Shoe" and "Men > Shoe".
|
433
446
|
# Only supported on textual fields. Maximum is 10.
|
447
|
+
# @!attribute [rw] case_insensitive
|
448
|
+
# @return [::Boolean]
|
449
|
+
# True to make facet keys case insensitive when getting faceting
|
450
|
+
# values with prefixes or contains; false otherwise.
|
434
451
|
# @!attribute [rw] order_by
|
435
452
|
# @return [::String]
|
436
|
-
# The order in which
|
453
|
+
# The order in which
|
454
|
+
# {::Google::Cloud::Retail::V2::SearchResponse::Facet#values SearchResponse.Facet.values}
|
455
|
+
# are returned.
|
437
456
|
#
|
438
457
|
# Allowed values are:
|
439
458
|
#
|
440
|
-
# * "count desc", which means order by
|
459
|
+
# * "count desc", which means order by
|
460
|
+
# {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#count SearchResponse.Facet.values.count}
|
441
461
|
# descending.
|
442
462
|
#
|
443
|
-
# * "value desc", which means order by
|
463
|
+
# * "value desc", which means order by
|
464
|
+
# {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#value SearchResponse.Facet.values.value}
|
444
465
|
# descending.
|
445
466
|
# Only applies to textual facets.
|
446
467
|
#
|
@@ -461,9 +482,11 @@ module Google
|
|
461
482
|
# {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
|
462
483
|
# when query is specified.
|
463
484
|
#
|
464
|
-
# In the response,
|
465
|
-
#
|
466
|
-
#
|
485
|
+
# In the response,
|
486
|
+
# {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#value SearchResponse.Facet.values.value}
|
487
|
+
# will be always "1" and
|
488
|
+
# {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#count SearchResponse.Facet.values.count}
|
489
|
+
# will be the number of results that match the query.
|
467
490
|
#
|
468
491
|
# For example, you can set a customized facet for "shipToStore",
|
469
492
|
# where
|
@@ -473,6 +496,10 @@ module Google
|
|
473
496
|
# is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
|
474
497
|
# Then the facet will count the products that are both in stock and ship
|
475
498
|
# to store "123".
|
499
|
+
# @!attribute [rw] return_min_max
|
500
|
+
# @return [::Boolean]
|
501
|
+
# Returns the min and max value for each numerical facet intervals.
|
502
|
+
# Ignored for textual facets.
|
476
503
|
class FacetKey
|
477
504
|
include ::Google::Protobuf::MessageExts
|
478
505
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -579,7 +606,8 @@ module Google
|
|
579
606
|
|
580
607
|
# Enum describing under which condition query expansion should occur.
|
581
608
|
module Condition
|
582
|
-
# Unspecified query expansion condition.
|
609
|
+
# Unspecified query expansion condition. In this case, server behavior
|
610
|
+
# defaults to
|
583
611
|
# {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec::Condition::DISABLED Condition.DISABLED}.
|
584
612
|
CONDITION_UNSPECIFIED = 0
|
585
613
|
|
@@ -604,11 +632,12 @@ module Google
|
|
604
632
|
|
605
633
|
# The personalization mode of each search request.
|
606
634
|
module Mode
|
607
|
-
# Default value.
|
635
|
+
# Default value. In this case, server behavior defaults to
|
608
636
|
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO Mode.AUTO}.
|
609
637
|
MODE_UNSPECIFIED = 0
|
610
638
|
|
611
|
-
# Let CRS decide whether to use personalization
|
639
|
+
# Let CRS decide whether to use personalization based on quality of user
|
640
|
+
# event data.
|
612
641
|
AUTO = 1
|
613
642
|
|
614
643
|
# Disable personalization.
|
@@ -628,7 +657,8 @@ module Google
|
|
628
657
|
|
629
658
|
# Enum describing under which mode spell correction should occur.
|
630
659
|
module Mode
|
631
|
-
# Unspecified spell correction mode.
|
660
|
+
# Unspecified spell correction mode. In this case, server behavior
|
661
|
+
# defaults to
|
632
662
|
# {::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
|
633
663
|
MODE_UNSPECIFIED = 0
|
634
664
|
|
@@ -704,7 +734,7 @@ module Google
|
|
704
734
|
# @return [::String]
|
705
735
|
# Contains the spell corrected query, if found. If the spell correction type
|
706
736
|
# is AUTOMATIC, then the search results are based on corrected_query.
|
707
|
-
# Otherwise the original query
|
737
|
+
# Otherwise the original query is used for search.
|
708
738
|
# @!attribute [rw] attribution_token
|
709
739
|
# @return [::String]
|
710
740
|
# A unique search token. This should be included in the
|
@@ -811,6 +841,21 @@ module Google
|
|
811
841
|
# {::Google::Protobuf::Value google.protobuf.Value}. For example,
|
812
842
|
# `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
|
813
843
|
# are 10 variants in this product are available in the store "store1".
|
844
|
+
# @!attribute [rw] personal_labels
|
845
|
+
# @return [::Array<::String>]
|
846
|
+
# Specifies previous events related to this product for this user based on
|
847
|
+
# {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
|
848
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
|
849
|
+
# or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
|
850
|
+
#
|
851
|
+
# This is set only when
|
852
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
|
853
|
+
# is
|
854
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
|
855
|
+
#
|
856
|
+
# Possible values:
|
857
|
+
#
|
858
|
+
# * `purchased`: Indicates that this product has been purchased before.
|
814
859
|
class SearchResult
|
815
860
|
include ::Google::Protobuf::MessageExts
|
816
861
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -859,6 +904,20 @@ module Google
|
|
859
904
|
# @!attribute [rw] count
|
860
905
|
# @return [::Integer]
|
861
906
|
# Number of items that have this facet value.
|
907
|
+
# @!attribute [rw] min_value
|
908
|
+
# @return [::Float]
|
909
|
+
# The minimum value in the
|
910
|
+
# {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}.
|
911
|
+
# Only supported on numerical facets and returned if
|
912
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max}
|
913
|
+
# is true.
|
914
|
+
# @!attribute [rw] max_value
|
915
|
+
# @return [::Float]
|
916
|
+
# The maximum value in the
|
917
|
+
# {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}.
|
918
|
+
# Only supported on numerical facets and returned if
|
919
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max}
|
920
|
+
# is true.
|
862
921
|
class FacetValue
|
863
922
|
include ::Google::Protobuf::MessageExts
|
864
923
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,238 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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
|
+
# Configures metadata that is used to generate serving time results (e.g.
|
25
|
+
# search results or recommendation predictions).
|
26
|
+
# @!attribute [rw] name
|
27
|
+
# @return [::String]
|
28
|
+
# Immutable. Fully qualified name
|
29
|
+
# `projects/*/locations/global/catalogs/*/servingConfig/*`
|
30
|
+
# @!attribute [rw] display_name
|
31
|
+
# @return [::String]
|
32
|
+
# Required. The human readable serving config display name. Used in Retail
|
33
|
+
# UI.
|
34
|
+
#
|
35
|
+
# This field must be a UTF-8 encoded string with a length limit of 128
|
36
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
37
|
+
# @!attribute [rw] model_id
|
38
|
+
# @return [::String]
|
39
|
+
# The id of the model in the same {::Google::Cloud::Retail::V2::Catalog Catalog}
|
40
|
+
# to use at serving time. Currently only RecommendationModels are supported:
|
41
|
+
# https://cloud.google.com/retail/recommendations-ai/docs/create-models
|
42
|
+
# Can be changed but only to a compatible model (e.g.
|
43
|
+
# others-you-may-like CTR to others-you-may-like CVR).
|
44
|
+
#
|
45
|
+
# Required when
|
46
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
47
|
+
# [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
48
|
+
# @!attribute [rw] price_reranking_level
|
49
|
+
# @return [::String]
|
50
|
+
# How much price ranking we want in serving results.
|
51
|
+
# Price reranking causes product items with a similar
|
52
|
+
# recommendation probability to be ordered by price, with the
|
53
|
+
# highest-priced items first. This setting could result in a decrease in
|
54
|
+
# click-through and conversion rates.
|
55
|
+
# Allowed values are:
|
56
|
+
#
|
57
|
+
# * 'no-price-reranking'
|
58
|
+
# * 'low-price-raranking'
|
59
|
+
# * 'medium-price-reranking'
|
60
|
+
# * 'high-price-reranking'
|
61
|
+
#
|
62
|
+
# If not specified, we choose default based on model type. Default value:
|
63
|
+
# 'no-price-reranking'.
|
64
|
+
#
|
65
|
+
# Can only be set if
|
66
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
67
|
+
# [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
68
|
+
# @!attribute [rw] facet_control_ids
|
69
|
+
# @return [::Array<::String>]
|
70
|
+
# Facet specifications for faceted search. If empty, no facets are returned.
|
71
|
+
# The ids refer to the ids of {::Google::Cloud::Retail::V2::Control Control}
|
72
|
+
# resources with only the Facet control set. These controls are assumed to be
|
73
|
+
# in the same {::Google::Cloud::Retail::V2::Catalog Catalog} as the
|
74
|
+
# {::Google::Cloud::Retail::V2::ServingConfig ServingConfig}.
|
75
|
+
# A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
|
76
|
+
# is returned.
|
77
|
+
#
|
78
|
+
# Can only be set if
|
79
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
80
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
81
|
+
# @!attribute [rw] dynamic_facet_spec
|
82
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec]
|
83
|
+
# The specification for dynamically generated facets. Notice that only
|
84
|
+
# textual facets can be dynamically generated.
|
85
|
+
#
|
86
|
+
# Can only be set if
|
87
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
88
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
89
|
+
# @!attribute [rw] boost_control_ids
|
90
|
+
# @return [::Array<::String>]
|
91
|
+
# Condition boost specifications. If a product matches multiple conditions
|
92
|
+
# in the specifications, boost scores from these specifications are all
|
93
|
+
# applied and combined in a non-linear way. Maximum number of
|
94
|
+
# specifications is 100.
|
95
|
+
#
|
96
|
+
# Notice that if both
|
97
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#boost_control_ids ServingConfig.boost_control_ids}
|
98
|
+
# and
|
99
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
|
100
|
+
# are set, the boost conditions from both places are evaluated. If a search
|
101
|
+
# request matches multiple boost conditions, the final boost score is equal
|
102
|
+
# to the sum of the boost scores from all matched boost conditions.
|
103
|
+
#
|
104
|
+
# Can only be set if
|
105
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
106
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
107
|
+
# @!attribute [rw] filter_control_ids
|
108
|
+
# @return [::Array<::String>]
|
109
|
+
# Condition filter specifications. If a product matches multiple conditions
|
110
|
+
# in the specifications, filters from these specifications are all
|
111
|
+
# applied and combined via the AND operator. Maximum number of
|
112
|
+
# specifications is 100.
|
113
|
+
#
|
114
|
+
# Can only be set if
|
115
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
116
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
117
|
+
# @!attribute [rw] redirect_control_ids
|
118
|
+
# @return [::Array<::String>]
|
119
|
+
# Condition redirect specifications. Only the first triggered redirect action
|
120
|
+
# is applied, even if multiple apply. Maximum number of specifications is
|
121
|
+
# 1000.
|
122
|
+
#
|
123
|
+
# Can only be set if
|
124
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
125
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
126
|
+
# @!attribute [rw] twoway_synonyms_control_ids
|
127
|
+
# @return [::Array<::String>]
|
128
|
+
# Condition synonyms specifications. If multiple syonyms conditions match,
|
129
|
+
# all matching synonyms control in the list will execute. Order of controls
|
130
|
+
# in the list will not matter. Maximum number of specifications is
|
131
|
+
# 100.
|
132
|
+
#
|
133
|
+
# Can only be set if
|
134
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
135
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
136
|
+
# @!attribute [rw] oneway_synonyms_control_ids
|
137
|
+
# @return [::Array<::String>]
|
138
|
+
# Condition oneway synonyms specifications. If multiple oneway synonyms
|
139
|
+
# conditions match, all matching oneway synonyms controls in the list will
|
140
|
+
# execute. Order of controls in the list will not matter. Maximum number of
|
141
|
+
# specifications is 100.
|
142
|
+
#
|
143
|
+
# Can only be set if
|
144
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
145
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
146
|
+
# @!attribute [rw] do_not_associate_control_ids
|
147
|
+
# @return [::Array<::String>]
|
148
|
+
# Condition do not associate specifications. If multiple do not associate
|
149
|
+
# conditions match, all matching do not associate controls in the list will
|
150
|
+
# execute.
|
151
|
+
# - Order does not matter.
|
152
|
+
# - Maximum number of specifications is 100.
|
153
|
+
#
|
154
|
+
# Can only be set if
|
155
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
156
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
157
|
+
# @!attribute [rw] replacement_control_ids
|
158
|
+
# @return [::Array<::String>]
|
159
|
+
# Condition replacement specifications.
|
160
|
+
# - Applied according to the order in the list.
|
161
|
+
# - A previously replaced term can not be re-replaced.
|
162
|
+
# - Maximum number of specifications is 100.
|
163
|
+
#
|
164
|
+
# Can only be set if
|
165
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
166
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
167
|
+
# @!attribute [rw] ignore_control_ids
|
168
|
+
# @return [::Array<::String>]
|
169
|
+
# Condition ignore specifications. If multiple ignore
|
170
|
+
# conditions match, all matching ignore controls in the list will
|
171
|
+
# execute.
|
172
|
+
# - Order does not matter.
|
173
|
+
# - Maximum number of specifications is 100.
|
174
|
+
#
|
175
|
+
# Can only be set if
|
176
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
177
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
178
|
+
# @!attribute [rw] diversity_level
|
179
|
+
# @return [::String]
|
180
|
+
# How much diversity to use in recommendation model results e.g.
|
181
|
+
# 'medium-diversity' or 'high-diversity'. Currently supported values:
|
182
|
+
#
|
183
|
+
# * 'no-diversity'
|
184
|
+
# * 'low-diversity'
|
185
|
+
# * 'medium-diversity'
|
186
|
+
# * 'high-diversity'
|
187
|
+
# * 'auto-diversity'
|
188
|
+
#
|
189
|
+
# If not specified, we choose default based on recommendation model
|
190
|
+
# type. Default value: 'no-diversity'.
|
191
|
+
#
|
192
|
+
# Can only be set if
|
193
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
194
|
+
# [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
195
|
+
# @!attribute [rw] enable_category_filter_level
|
196
|
+
# @return [::String]
|
197
|
+
# Whether to add additional category filters on the 'similar-items' model.
|
198
|
+
# If not specified, we enable it by default.
|
199
|
+
# Allowed values are:
|
200
|
+
#
|
201
|
+
# * 'no-category-match': No additional filtering of original results from
|
202
|
+
# the model and the customer's filters.
|
203
|
+
# * 'relaxed-category-match': Only keep results with categories that match
|
204
|
+
# at least one item categories in the PredictRequests's context item.
|
205
|
+
# * If customer also sends filters in the PredictRequest, then the results
|
206
|
+
# will satisfy both conditions (user given and category match).
|
207
|
+
#
|
208
|
+
# Can only be set if
|
209
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
210
|
+
# [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
211
|
+
# @!attribute [rw] personalization_spec
|
212
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec]
|
213
|
+
# The specification for personalization spec.
|
214
|
+
#
|
215
|
+
# Can only be set if
|
216
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
217
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
218
|
+
#
|
219
|
+
# Notice that if both
|
220
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}
|
221
|
+
# and
|
222
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
|
223
|
+
# are set.
|
224
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
|
225
|
+
# will override
|
226
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}.
|
227
|
+
# @!attribute [rw] solution_types
|
228
|
+
# @return [::Array<::Google::Cloud::Retail::V2::SolutionType>]
|
229
|
+
# Required. Immutable. Specifies the solution types that a serving config can
|
230
|
+
# be associated with. Currently we support setting only one type of solution.
|
231
|
+
class ServingConfig
|
232
|
+
include ::Google::Protobuf::MessageExts
|
233
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
@@ -0,0 +1,143 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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 for CreateServingConfig method.
|
25
|
+
# @!attribute [rw] parent
|
26
|
+
# @return [::String]
|
27
|
+
# Required. Full resource name of parent. Format:
|
28
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
|
29
|
+
# @!attribute [rw] serving_config
|
30
|
+
# @return [::Google::Cloud::Retail::V2::ServingConfig]
|
31
|
+
# Required. The ServingConfig to create.
|
32
|
+
# @!attribute [rw] serving_config_id
|
33
|
+
# @return [::String]
|
34
|
+
# Required. The ID to use for the ServingConfig, which will become the final
|
35
|
+
# component of the ServingConfig's resource name.
|
36
|
+
#
|
37
|
+
# This value should be 4-63 characters, and valid characters
|
38
|
+
# are /[a-z][0-9]-_/.
|
39
|
+
class CreateServingConfigRequest
|
40
|
+
include ::Google::Protobuf::MessageExts
|
41
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
42
|
+
end
|
43
|
+
|
44
|
+
# Request for UpdateServingConfig method.
|
45
|
+
# @!attribute [rw] serving_config
|
46
|
+
# @return [::Google::Cloud::Retail::V2::ServingConfig]
|
47
|
+
# Required. The ServingConfig to update.
|
48
|
+
# @!attribute [rw] update_mask
|
49
|
+
# @return [::Google::Protobuf::FieldMask]
|
50
|
+
# Indicates which fields in the provided
|
51
|
+
# {::Google::Cloud::Retail::V2::ServingConfig ServingConfig} to update. The
|
52
|
+
# following are NOT supported:
|
53
|
+
#
|
54
|
+
# * {::Google::Cloud::Retail::V2::ServingConfig#name ServingConfig.name}
|
55
|
+
#
|
56
|
+
# If not set, all supported fields are updated.
|
57
|
+
class UpdateServingConfigRequest
|
58
|
+
include ::Google::Protobuf::MessageExts
|
59
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
60
|
+
end
|
61
|
+
|
62
|
+
# Request for DeleteServingConfig method.
|
63
|
+
# @!attribute [rw] name
|
64
|
+
# @return [::String]
|
65
|
+
# Required. The resource name of the ServingConfig to delete. Format:
|
66
|
+
# projects/\\{project_number}/locations/\\{location_id}/catalogs/\\{catalog_id}/servingConfigs/\\{serving_config_id}
|
67
|
+
class DeleteServingConfigRequest
|
68
|
+
include ::Google::Protobuf::MessageExts
|
69
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
70
|
+
end
|
71
|
+
|
72
|
+
# Request for GetServingConfig method.
|
73
|
+
# @!attribute [rw] name
|
74
|
+
# @return [::String]
|
75
|
+
# Required. The resource name of the ServingConfig to get. Format:
|
76
|
+
# projects/\\{project_number}/locations/\\{location_id}/catalogs/\\{catalog_id}/servingConfigs/\\{serving_config_id}
|
77
|
+
class GetServingConfigRequest
|
78
|
+
include ::Google::Protobuf::MessageExts
|
79
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
80
|
+
end
|
81
|
+
|
82
|
+
# Request for ListServingConfigs method.
|
83
|
+
# @!attribute [rw] parent
|
84
|
+
# @return [::String]
|
85
|
+
# Required. The catalog resource name. Format:
|
86
|
+
# projects/\\{project_number}/locations/\\{location_id}/catalogs/\\{catalog_id}
|
87
|
+
# @!attribute [rw] page_size
|
88
|
+
# @return [::Integer]
|
89
|
+
# Optional. Maximum number of results to return. If unspecified, defaults
|
90
|
+
# to 100. If a value greater than 100 is provided, at most 100 results are
|
91
|
+
# returned.
|
92
|
+
# @!attribute [rw] page_token
|
93
|
+
# @return [::String]
|
94
|
+
# Optional. A page token, received from a previous `ListServingConfigs` call.
|
95
|
+
# Provide this to retrieve the subsequent page.
|
96
|
+
class ListServingConfigsRequest
|
97
|
+
include ::Google::Protobuf::MessageExts
|
98
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
99
|
+
end
|
100
|
+
|
101
|
+
# Response for ListServingConfigs method.
|
102
|
+
# @!attribute [rw] serving_configs
|
103
|
+
# @return [::Array<::Google::Cloud::Retail::V2::ServingConfig>]
|
104
|
+
# All the ServingConfigs for a given catalog.
|
105
|
+
# @!attribute [rw] next_page_token
|
106
|
+
# @return [::String]
|
107
|
+
# Pagination token, if not returned indicates the last page.
|
108
|
+
class ListServingConfigsResponse
|
109
|
+
include ::Google::Protobuf::MessageExts
|
110
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
111
|
+
end
|
112
|
+
|
113
|
+
# Request for AddControl method.
|
114
|
+
# @!attribute [rw] serving_config
|
115
|
+
# @return [::String]
|
116
|
+
# Required. The source ServingConfig resource name . Format:
|
117
|
+
# projects/\\{project_number}/locations/\\{location_id}/catalogs/\\{catalog_id}/servingConfigs/\\{serving_config_id}
|
118
|
+
# @!attribute [rw] control_id
|
119
|
+
# @return [::String]
|
120
|
+
# Required. The id of the control to apply. Assumed to be in the same catalog
|
121
|
+
# as the serving config - if id is not found a NOT_FOUND error is returned.
|
122
|
+
class AddControlRequest
|
123
|
+
include ::Google::Protobuf::MessageExts
|
124
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
end
|
126
|
+
|
127
|
+
# Request for RemoveControl method.
|
128
|
+
# @!attribute [rw] serving_config
|
129
|
+
# @return [::String]
|
130
|
+
# Required. The source ServingConfig resource name . Format:
|
131
|
+
# projects/\\{project_number}/locations/\\{location_id}/catalogs/\\{catalog_id}/servingConfigs/\\{serving_config_id}
|
132
|
+
# @!attribute [rw] control_id
|
133
|
+
# @return [::String]
|
134
|
+
# Required. The id of the control to apply. Assumed to be in the same catalog
|
135
|
+
# as the serving config.
|
136
|
+
class RemoveControlRequest
|
137
|
+
include ::Google::Protobuf::MessageExts
|
138
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -26,8 +26,6 @@ module Google
|
|
26
26
|
# service Foo {
|
27
27
|
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
28
28
|
# }
|
29
|
-
#
|
30
|
-
# The JSON representation for `Empty` is empty JSON object `{}`.
|
31
29
|
class Empty
|
32
30
|
include ::Google::Protobuf::MessageExts
|
33
31
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|