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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/retail/v2/catalog_service/client.rb +2 -2
  4. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +2 -2
  5. data/lib/google/cloud/retail/v2/common_pb.rb +6 -0
  6. data/lib/google/cloud/retail/v2/completion_service/client.rb +11 -4
  7. data/lib/google/cloud/retail/v2/completion_service/operations.rb +2 -2
  8. data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +11 -4
  9. data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +2 -2
  10. data/lib/google/cloud/retail/v2/completion_service/rest.rb +1 -1
  11. data/lib/google/cloud/retail/v2/completion_service.rb +1 -1
  12. data/lib/google/cloud/retail/v2/completion_service_pb.rb +1 -0
  13. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +1 -1
  14. data/lib/google/cloud/retail/v2/control_service/client.rb +2 -2
  15. data/lib/google/cloud/retail/v2/control_service/rest/client.rb +2 -2
  16. data/lib/google/cloud/retail/v2/model_pb.rb +70 -0
  17. data/lib/google/cloud/retail/v2/model_service/client.rb +1126 -0
  18. data/lib/google/cloud/retail/v2/model_service/credentials.rb +51 -0
  19. data/lib/google/cloud/retail/v2/model_service/operations.rb +768 -0
  20. data/lib/google/cloud/retail/v2/model_service/paths.rb +73 -0
  21. data/lib/google/cloud/retail/v2/model_service/rest/client.rb +904 -0
  22. data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +828 -0
  23. data/lib/google/cloud/retail/v2/model_service/rest/service_stub.rb +525 -0
  24. data/lib/google/cloud/retail/v2/model_service/rest.rb +64 -0
  25. data/lib/google/cloud/retail/v2/model_service.rb +67 -0
  26. data/lib/google/cloud/retail/v2/model_service_pb.rb +80 -0
  27. data/lib/google/cloud/retail/v2/model_service_services_pb.rb +73 -0
  28. data/lib/google/cloud/retail/v2/prediction_service/client.rb +5 -2
  29. data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +5 -2
  30. data/lib/google/cloud/retail/v2/product_service/client.rb +18 -17
  31. data/lib/google/cloud/retail/v2/product_service/operations.rb +2 -2
  32. data/lib/google/cloud/retail/v2/product_service/rest/client.rb +18 -17
  33. data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +2 -2
  34. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +16 -15
  35. data/lib/google/cloud/retail/v2/rest.rb +1 -0
  36. data/lib/google/cloud/retail/v2/search_service/client.rb +11 -4
  37. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +11 -4
  38. data/lib/google/cloud/retail/v2/search_service_pb.rb +14 -0
  39. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +2 -2
  40. data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +2 -2
  41. data/lib/google/cloud/retail/v2/user_event_pb.rb +1 -0
  42. data/lib/google/cloud/retail/v2/user_event_service/client.rb +3 -3
  43. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +2 -2
  44. data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +3 -3
  45. data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +2 -2
  46. data/lib/google/cloud/retail/v2/version.rb +1 -1
  47. data/lib/google/cloud/retail/v2.rb +1 -0
  48. data/proto_docs/google/api/client.rb +57 -3
  49. data/proto_docs/google/cloud/retail/v2/catalog.rb +11 -6
  50. data/proto_docs/google/cloud/retail/v2/common.rb +15 -1
  51. data/proto_docs/google/cloud/retail/v2/completion_service.rb +10 -2
  52. data/proto_docs/google/cloud/retail/v2/import_config.rb +1 -1
  53. data/proto_docs/google/cloud/retail/v2/model.rb +228 -0
  54. data/proto_docs/google/cloud/retail/v2/model_service.rb +172 -0
  55. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +3 -0
  56. data/proto_docs/google/cloud/retail/v2/product.rb +2 -3
  57. data/proto_docs/google/cloud/retail/v2/search_service.rb +56 -2
  58. data/proto_docs/google/cloud/retail/v2/serving_config.rb +3 -3
  59. data/proto_docs/google/cloud/retail/v2/user_event.rb +7 -0
  60. data/proto_docs/google/cloud/retail/v2/user_event_service.rb +1 -1
  61. metadata +16 -2
@@ -0,0 +1,172 @@
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
+ # Request for creating a model.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. The parent resource under which to create the model. Format:
28
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
29
+ # @!attribute [rw] model
30
+ # @return [::Google::Cloud::Retail::V2::Model]
31
+ # Required. The payload of the {::Google::Cloud::Retail::V2::Model Model} to
32
+ # create.
33
+ # @!attribute [rw] dry_run
34
+ # @return [::Boolean]
35
+ # Optional. Whether to run a dry run to validate the request (without
36
+ # actually creating the model).
37
+ class CreateModelRequest
38
+ include ::Google::Protobuf::MessageExts
39
+ extend ::Google::Protobuf::MessageExts::ClassMethods
40
+ end
41
+
42
+ # Request for updating an existing model.
43
+ # @!attribute [rw] model
44
+ # @return [::Google::Cloud::Retail::V2::Model]
45
+ # Required. The body of the updated {::Google::Cloud::Retail::V2::Model Model}.
46
+ # @!attribute [rw] update_mask
47
+ # @return [::Google::Protobuf::FieldMask]
48
+ # Optional. Indicates which fields in the provided 'model' to
49
+ # update. If not set, by default updates all fields.
50
+ class UpdateModelRequest
51
+ include ::Google::Protobuf::MessageExts
52
+ extend ::Google::Protobuf::MessageExts::ClassMethods
53
+ end
54
+
55
+ # Request for getting a model.
56
+ # @!attribute [rw] name
57
+ # @return [::String]
58
+ # Required. The resource name of the {::Google::Cloud::Retail::V2::Model Model} to
59
+ # get. Format:
60
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}`
61
+ class GetModelRequest
62
+ include ::Google::Protobuf::MessageExts
63
+ extend ::Google::Protobuf::MessageExts::ClassMethods
64
+ end
65
+
66
+ # Request for pausing training of a model.
67
+ # @!attribute [rw] name
68
+ # @return [::String]
69
+ # Required. The name of the model to pause.
70
+ # Format:
71
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
72
+ class PauseModelRequest
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+ end
76
+
77
+ # Request for resuming training of a model.
78
+ # @!attribute [rw] name
79
+ # @return [::String]
80
+ # Required. The name of the model to resume.
81
+ # Format:
82
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
83
+ class ResumeModelRequest
84
+ include ::Google::Protobuf::MessageExts
85
+ extend ::Google::Protobuf::MessageExts::ClassMethods
86
+ end
87
+
88
+ # Request for listing models associated with a resource.
89
+ # @!attribute [rw] parent
90
+ # @return [::String]
91
+ # Required. The parent for which to list models.
92
+ # Format:
93
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
94
+ # @!attribute [rw] page_size
95
+ # @return [::Integer]
96
+ # Optional. Maximum number of results to return. If unspecified, defaults
97
+ # to 50. Max allowed value is 1000.
98
+ # @!attribute [rw] page_token
99
+ # @return [::String]
100
+ # Optional. A page token, received from a previous `ListModels`
101
+ # call. Provide this to retrieve the subsequent page.
102
+ class ListModelsRequest
103
+ include ::Google::Protobuf::MessageExts
104
+ extend ::Google::Protobuf::MessageExts::ClassMethods
105
+ end
106
+
107
+ # Request for deleting a model.
108
+ # @!attribute [rw] name
109
+ # @return [::String]
110
+ # Required. The resource name of the {::Google::Cloud::Retail::V2::Model Model} to
111
+ # delete. Format:
112
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
113
+ class DeleteModelRequest
114
+ include ::Google::Protobuf::MessageExts
115
+ extend ::Google::Protobuf::MessageExts::ClassMethods
116
+ end
117
+
118
+ # Response to a ListModelRequest.
119
+ # @!attribute [rw] models
120
+ # @return [::Array<::Google::Cloud::Retail::V2::Model>]
121
+ # List of Models.
122
+ # @!attribute [rw] next_page_token
123
+ # @return [::String]
124
+ # Pagination token, if not returned indicates the last page.
125
+ class ListModelsResponse
126
+ include ::Google::Protobuf::MessageExts
127
+ extend ::Google::Protobuf::MessageExts::ClassMethods
128
+ end
129
+
130
+ # Request to manually start a tuning process now (instead of waiting for
131
+ # the periodically scheduled tuning to happen).
132
+ # @!attribute [rw] name
133
+ # @return [::String]
134
+ # Required. The resource name of the model to tune.
135
+ # Format:
136
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
137
+ class TuneModelRequest
138
+ include ::Google::Protobuf::MessageExts
139
+ extend ::Google::Protobuf::MessageExts::ClassMethods
140
+ end
141
+
142
+ # Metadata associated with a create operation.
143
+ # @!attribute [rw] model
144
+ # @return [::String]
145
+ # The resource name of the model that this create applies to.
146
+ # Format:
147
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
148
+ class CreateModelMetadata
149
+ include ::Google::Protobuf::MessageExts
150
+ extend ::Google::Protobuf::MessageExts::ClassMethods
151
+ end
152
+
153
+ # Metadata associated with a tune operation.
154
+ # @!attribute [rw] model
155
+ # @return [::String]
156
+ # The resource name of the model that this tune applies to.
157
+ # Format:
158
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
159
+ class TuneModelMetadata
160
+ include ::Google::Protobuf::MessageExts
161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
162
+ end
163
+
164
+ # Response associated with a tune operation.
165
+ class TuneModelResponse
166
+ include ::Google::Protobuf::MessageExts
167
+ extend ::Google::Protobuf::MessageExts::ClassMethods
168
+ end
169
+ end
170
+ end
171
+ end
172
+ end
@@ -101,6 +101,9 @@ module Google
101
101
  # * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones"))
102
102
  # * (availability: ANY("IN_STOCK")) AND
103
103
  # (colors: ANY("Red") OR categories: ANY("Phones"))
104
+ #
105
+ # For more information, see
106
+ # [Filter recommendations](https://cloud.google.com/retail/docs/filter-recs).
104
107
  # @!attribute [rw] validate_only
105
108
  # @return [::Boolean]
106
109
  # Use validate only mode for this prediction query. If set to true, a
@@ -496,12 +496,11 @@ module Google
496
496
  # @return [::Array<::Google::Cloud::Retail::V2::LocalInventory>]
497
497
  # Output only. A list of local inventories specific to different places.
498
498
  #
499
- # This is only available for users who have Retail Search enabled, and it can
500
- # be managed by
499
+ # This field can be managed by
501
500
  # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
502
501
  # and
503
502
  # {::Google::Cloud::Retail::V2::ProductService::Client#remove_local_inventories ProductService.RemoveLocalInventories}
504
- # APIs.
503
+ # APIs if fine-grained, high-volume updates are necessary.
505
504
  class Product
506
505
  include ::Google::Protobuf::MessageExts
507
506
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -124,7 +124,7 @@ module Google
124
124
  # @return [::Array<::Google::Cloud::Retail::V2::SearchRequest::FacetSpec>]
125
125
  # Facet specifications for faceted search. If empty, no facets are returned.
126
126
  #
127
- # A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
127
+ # A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error
128
128
  # is returned.
129
129
  # @!attribute [rw] dynamic_facet_spec
130
130
  # @return [::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec]
@@ -275,6 +275,14 @@ module Google
275
275
  # @return [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec]
276
276
  # The spell correction specification that specifies the mode under
277
277
  # which spell correction will take effect.
278
+ # @!attribute [rw] entity
279
+ # @return [::String]
280
+ # The entity for customers that may run multiple different entities, domains,
281
+ # sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
282
+ # `google.com`, `youtube.com`, etc.
283
+ # If this is set, it should be exactly matched with
284
+ # {::Google::Cloud::Retail::V2::UserEvent#entity UserEvent.entity} to get search
285
+ # results boosted by entity.
278
286
  class SearchRequest
279
287
  include ::Google::Protobuf::MessageExts
280
288
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -402,7 +410,16 @@ module Google
402
410
  # @return [::Array<::Google::Cloud::Retail::V2::Interval>]
403
411
  # Set only if values should be bucketized into intervals. Must be set
404
412
  # for facets with numerical values. Must not be set for facet with text
405
- # values. Maximum number of intervals is 30.
413
+ # values. Maximum number of intervals is 40.
414
+ #
415
+ # For all numerical facet keys that appear in the list of products from
416
+ # the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are
417
+ # computed from their distribution weekly. If the model assigns a high
418
+ # score to a numerical facet key and its intervals are not specified in
419
+ # the search request, these percentiles will become the bounds
420
+ # for its intervals and will be returned in the response. If the
421
+ # facet key intervals are specified in the request, then the specified
422
+ # intervals will be returned instead.
406
423
  # @!attribute [rw] restricted_values
407
424
  # @return [::Array<::String>]
408
425
  # Only get facet for the given restricted values. For example, when using
@@ -772,6 +789,10 @@ module Google
772
789
  # The invalid
773
790
  # {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs SearchRequest.BoostSpec.condition_boost_specs}
774
791
  # that are not applied during serving.
792
+ # @!attribute [rw] experiment_info
793
+ # @return [::Array<::Google::Cloud::Retail::V2::ExperimentInfo>]
794
+ # Metadata related to A/B testing [Experiment][] associated with this
795
+ # response. Only exists when an experiment is triggered.
775
796
  class SearchResponse
776
797
  include ::Google::Protobuf::MessageExts
777
798
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -947,6 +968,39 @@ module Google
947
968
  extend ::Google::Protobuf::MessageExts::ClassMethods
948
969
  end
949
970
  end
971
+
972
+ # Metadata for active A/B testing [Experiments][].
973
+ # @!attribute [rw] serving_config_experiment
974
+ # @return [::Google::Cloud::Retail::V2::ExperimentInfo::ServingConfigExperiment]
975
+ # A/B test between existing Cloud Retail Search
976
+ # {::Google::Cloud::Retail::V2::ServingConfig ServingConfig}s.
977
+ # @!attribute [rw] experiment
978
+ # @return [::String]
979
+ # The fully qualified resource name of the experiment that provides the
980
+ # serving config under test, should an active experiment exist. For example:
981
+ # `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_id`
982
+ class ExperimentInfo
983
+ include ::Google::Protobuf::MessageExts
984
+ extend ::Google::Protobuf::MessageExts::ClassMethods
985
+
986
+ # Metadata for active serving config A/B tests.
987
+ # @!attribute [rw] original_serving_config
988
+ # @return [::String]
989
+ # The fully qualified resource name of the original
990
+ # {::Google::Cloud::Retail::V2::SearchRequest#placement SearchRequest.placement}
991
+ # in the search request prior to reassignment by experiment API. For
992
+ # example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.
993
+ # @!attribute [rw] experiment_serving_config
994
+ # @return [::String]
995
+ # The fully qualified resource name of the serving config
996
+ # [VariantArm.serving_config_id][] responsible for generating the search
997
+ # response. For example:
998
+ # `projects/*/locations/*/catalogs/*/servingConfigs/*`.
999
+ class ServingConfigExperiment
1000
+ include ::Google::Protobuf::MessageExts
1001
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1002
+ end
1003
+ end
950
1004
  end
951
1005
  end
952
1006
  end
@@ -55,7 +55,7 @@ module Google
55
55
  # Allowed values are:
56
56
  #
57
57
  # * `no-price-reranking`
58
- # * `low-price-raranking`
58
+ # * `low-price-reranking`
59
59
  # * `medium-price-reranking`
60
60
  # * `high-price-reranking`
61
61
  #
@@ -194,8 +194,8 @@ module Google
194
194
  # [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
195
195
  # @!attribute [rw] diversity_type
196
196
  # @return [::Google::Cloud::Retail::V2::ServingConfig::DiversityType]
197
- # What kind of diversity to use - data driven or rule based. If unset,
198
- # the server behavior defaults to
197
+ # What kind of diversity to use - data driven or rule based. If unset, the
198
+ # server behavior defaults to
199
199
  # {::Google::Cloud::Retail::V2::ServingConfig::DiversityType::RULE_BASED_DIVERSITY RULE_BASED_DIVERSITY}.
200
200
  # @!attribute [rw] enable_category_filter_level
201
201
  # @return [::String]
@@ -257,6 +257,13 @@ module Google
257
257
  #
258
258
  # When using the client side event reporting with JavaScript pixel and Google
259
259
  # Tag Manager, this value is filled in automatically.
260
+ # @!attribute [rw] entity
261
+ # @return [::String]
262
+ # The entity for customers that may run multiple different entities, domains,
263
+ # sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
264
+ # `google.com`, `youtube.com`, etc.
265
+ # It is recommended to set this field to get better per-entity search,
266
+ # completion and prediction results.
260
267
  class UserEvent
261
268
  include ::Google::Protobuf::MessageExts
262
269
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -44,7 +44,7 @@ module Google
44
44
  # @!attribute [rw] prebuilt_rule
45
45
  # @return [::String]
46
46
  # The prebuilt rule name that can convert a specific type of raw_json.
47
- # For example: "default_schema/v1.0"
47
+ # For example: "ga4_bq" rule for the GA4 user event schema.
48
48
  # @!attribute [rw] parent
49
49
  # @return [::String]
50
50
  # Required. The parent catalog name, such as
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-retail-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-08 00:00:00.000000000 Z
11
+ date: 2023-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -225,6 +225,18 @@ files:
225
225
  - lib/google/cloud/retail/v2/control_service_pb.rb
226
226
  - lib/google/cloud/retail/v2/control_service_services_pb.rb
227
227
  - lib/google/cloud/retail/v2/import_config_pb.rb
228
+ - lib/google/cloud/retail/v2/model_pb.rb
229
+ - lib/google/cloud/retail/v2/model_service.rb
230
+ - lib/google/cloud/retail/v2/model_service/client.rb
231
+ - lib/google/cloud/retail/v2/model_service/credentials.rb
232
+ - lib/google/cloud/retail/v2/model_service/operations.rb
233
+ - lib/google/cloud/retail/v2/model_service/paths.rb
234
+ - lib/google/cloud/retail/v2/model_service/rest.rb
235
+ - lib/google/cloud/retail/v2/model_service/rest/client.rb
236
+ - lib/google/cloud/retail/v2/model_service/rest/operations.rb
237
+ - lib/google/cloud/retail/v2/model_service/rest/service_stub.rb
238
+ - lib/google/cloud/retail/v2/model_service_pb.rb
239
+ - lib/google/cloud/retail/v2/model_service_services_pb.rb
228
240
  - lib/google/cloud/retail/v2/prediction_service.rb
229
241
  - lib/google/cloud/retail/v2/prediction_service/client.rb
230
242
  - lib/google/cloud/retail/v2/prediction_service/credentials.rb
@@ -294,6 +306,8 @@ files:
294
306
  - proto_docs/google/cloud/retail/v2/control.rb
295
307
  - proto_docs/google/cloud/retail/v2/control_service.rb
296
308
  - proto_docs/google/cloud/retail/v2/import_config.rb
309
+ - proto_docs/google/cloud/retail/v2/model.rb
310
+ - proto_docs/google/cloud/retail/v2/model_service.rb
297
311
  - proto_docs/google/cloud/retail/v2/prediction_service.rb
298
312
  - proto_docs/google/cloud/retail/v2/product.rb
299
313
  - proto_docs/google/cloud/retail/v2/product_service.rb