Debian Codegraph @

retail/apiv2/retailpb/prediction_service.pb.go

raw symbols SCIP
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.35.2
18 // protoc v4.25.7
19 // source: google/cloud/retail/v2/prediction_service.proto
20
21 package retailpb
22
23 import (
24 context "context"
25 _ "google.golang.org/genproto/googleapis/api/annotations"
26 grpc "google.golang.org/grpc"
27 codes "google.golang.org/grpc/codes"
28 status "google.golang.org/grpc/status"
29 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
30 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
31 structpb "google.golang.org/protobuf/types/known/structpb"
32 reflect "reflect"
33 sync "sync"
34 )
35
36 const (
37 // Verify that this generated code is sufficiently up-to-date.
38 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
39 // Verify that runtime/protoimpl is sufficiently up-to-date.
40 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
41 )
42
43 // Request message for Predict method.
44 type PredictRequest struct {
45 state protoimpl.MessageState
46 sizeCache protoimpl.SizeCache
47 unknownFields protoimpl.UnknownFields
48
49 // Required. Full resource name of the format:
50 // `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
51 // or
52 // `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
53 // We recommend using the `servingConfigs` resource. `placements` is a legacy
54 // resource.
55 // The ID of the Recommendations AI serving config or placement.
56 // Before you can request predictions from your model, you must create at
57 // least one serving config or placement for it. For more information, see
58 // [Manage serving configs]
59 // (https://cloud.google.com/retail/docs/manage-configs).
60 //
61 // The full list of available serving configs can be seen at
62 // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
63 Placement string `protobuf:"bytes,1,opt,name=placement,proto3" json:"placement,omitempty"`
64 // Required. Context about the user, what they are looking at and what action
65 // they took to trigger the predict request. Note that this user event detail
66 // won't be ingested to userEvent logs. Thus, a separate userEvent write
67 // request is required for event logging.
68 //
69 // Don't set
70 // [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id] or
71 // [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id] to the same
72 // fixed ID for different users. If you are trying to receive non-personalized
73 // recommendations (not recommended; this can negatively impact model
74 // performance), instead set
75 // [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id] to a
76 // random unique ID and leave
77 // [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id] unset.
78 UserEvent *UserEvent `protobuf:"bytes,2,opt,name=user_event,json=userEvent,proto3" json:"user_event,omitempty"`
79 // Maximum number of results to return. Set this property to the number of
80 // prediction results needed. If zero, the service will choose a reasonable
81 // default. The maximum allowed value is 100. Values above 100 will be coerced
82 // to 100.
83 PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
84 // This field is not used; leave it unset.
85 //
86 // Deprecated: Marked as deprecated in google/cloud/retail/v2/prediction_service.proto.
87 PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
88 // Filter for restricting prediction results with a length limit of 5,000
89 // characters. Accepts values for tags and the `filterOutOfStockItems` flag.
90 //
91 // - Tag expressions. Restricts predictions to products that match all of the
92 // specified tags. Boolean operators `OR` and `NOT` are supported if the
93 // expression is enclosed in parentheses, and must be separated from the
94 // tag values by a space. `-"tagA"` is also supported and is equivalent to
95 // `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings
96 // with a size limit of 1,000 characters.
97 //
98 // Note: "Recently viewed" models don't support tag filtering at the
99 // moment.
100 //
101 // - filterOutOfStockItems. Restricts predictions to products that do not
102 // have a
103 // stockState value of OUT_OF_STOCK.
104 //
105 // Examples:
106 //
107 // - tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional")
108 // - filterOutOfStockItems tag=(-"promotional")
109 // - filterOutOfStockItems
110 //
111 // If your filter blocks all prediction results, the API will return *no*
112 // results. If instead you want empty result sets to return generic
113 // (unfiltered) popular products, set `strictFiltering` to False in
114 // `PredictRequest.params`. Note that the API will never return items with
115 // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices.
116 //
117 // If `filterSyntaxV2` is set to true under the `params` field, then
118 // attribute-based expressions are expected instead of the above described
119 // tag-based syntax. Examples:
120 //
121 // - (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones"))
122 // - (availability: ANY("IN_STOCK")) AND
123 // (colors: ANY("Red") OR categories: ANY("Phones"))
124 //
125 // For more information, see
126 // [Filter recommendations](https://cloud.google.com/retail/docs/filter-recs).
127 Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
128 // Use validate only mode for this prediction query. If set to true, a
129 // dummy model will be used that returns arbitrary products.
130 // Note that the validate only mode should only be used for testing the API,
131 // or if the model is not ready.
132 ValidateOnly bool `protobuf:"varint,6,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"`
133 // Additional domain specific parameters for the predictions.
134 //
135 // Allowed values:
136 //
137 // - `returnProduct`: Boolean. If set to true, the associated product
138 // object will be returned in the `results.metadata` field in the
139 // prediction response.
140 // - `returnScore`: Boolean. If set to true, the prediction 'score'
141 // corresponding to each returned product will be set in the
142 // `results.metadata` field in the prediction response. The given
143 // 'score' indicates the probability of a product being clicked/purchased
144 // given the user's context and history.
145 // - `strictFiltering`: Boolean. True by default. If set to false, the service
146 // will return generic (unfiltered) popular products instead of empty if
147 // your filter blocks all prediction results.
148 // - `priceRerankLevel`: String. Default empty. If set to be non-empty, then
149 // it needs to be one of {'no-price-reranking', 'low-price-reranking',
150 // 'medium-price-reranking', 'high-price-reranking'}. This gives
151 // request-level control and adjusts prediction results based on product
152 // price.
153 // - `diversityLevel`: String. Default empty. If set to be non-empty, then
154 // it needs to be one of {'no-diversity', 'low-diversity',
155 // 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives
156 // request-level control and adjusts prediction results based on product
157 // category.
158 // - `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter`
159 // field is interpreteted according to the new, attribute-based syntax.
160 Params map[string]*structpb.Value `protobuf:"bytes,7,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
161 // The labels applied to a resource must meet the following requirements:
162 //
163 // - Each resource can have multiple labels, up to a maximum of 64.
164 // - Each label must be a key-value pair.
165 // - Keys have a minimum length of 1 character and a maximum length of 63
166 // characters and cannot be empty. Values can be empty and have a maximum
167 // length of 63 characters.
168 // - Keys and values can contain only lowercase letters, numeric characters,
169 // underscores, and dashes. All characters must use UTF-8 encoding, and
170 // international characters are allowed.
171 // - The key portion of a label must be unique. However, you can use the same
172 // key with multiple resources.
173 // - Keys must start with a lowercase letter or international character.
174 //
175 // See [Google Cloud
176 // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
177 // for more details.
178 Labels map[string]string `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
179 }
180
181 func (x *PredictRequest) Reset() {
182 *x = PredictRequest{}
183 mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[0]
184 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
185 ms.StoreMessageInfo(mi)
186 }
187
188 func (x *PredictRequest) String() string {
189 return protoimpl.X.MessageStringOf(x)
190 }
191
192 func (*PredictRequest) ProtoMessage() {}
193
194 func (x *PredictRequest) ProtoReflect() protoreflect.Message {
195 mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[0]
196 if x != nil {
197 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
198 if ms.LoadMessageInfo() == nil {
199 ms.StoreMessageInfo(mi)
200 }
201 return ms
202 }
203 return mi.MessageOf(x)
204 }
205
206 // Deprecated: Use PredictRequest.ProtoReflect.Descriptor instead.
207 func (*PredictRequest) Descriptor() ([]byte, []int) {
208 return file_google_cloud_retail_v2_prediction_service_proto_rawDescGZIP(), []int{0}
209 }
210
211 func (x *PredictRequest) GetPlacement() string {
212 if x != nil {
213 return x.Placement
214 }
215 return ""
216 }
217
218 func (x *PredictRequest) GetUserEvent() *UserEvent {
219 if x != nil {
220 return x.UserEvent
221 }
222 return nil
223 }
224
225 func (x *PredictRequest) GetPageSize() int32 {
226 if x != nil {
227 return x.PageSize
228 }
229 return 0
230 }
231
232 // Deprecated: Marked as deprecated in google/cloud/retail/v2/prediction_service.proto.
233 func (x *PredictRequest) GetPageToken() string {
234 if x != nil {
235 return x.PageToken
236 }
237 return ""
238 }
239
240 func (x *PredictRequest) GetFilter() string {
241 if x != nil {
242 return x.Filter
243 }
244 return ""
245 }
246
247 func (x *PredictRequest) GetValidateOnly() bool {
248 if x != nil {
249 return x.ValidateOnly
250 }
251 return false
252 }
253
254 func (x *PredictRequest) GetParams() map[string]*structpb.Value {
255 if x != nil {
256 return x.Params
257 }
258 return nil
259 }
260
261 func (x *PredictRequest) GetLabels() map[string]string {
262 if x != nil {
263 return x.Labels
264 }
265 return nil
266 }
267
268 // Response message for predict method.
269 type PredictResponse struct {
270 state protoimpl.MessageState
271 sizeCache protoimpl.SizeCache
272 unknownFields protoimpl.UnknownFields
273
274 // A list of recommended products. The order represents the ranking (from the
275 // most relevant product to the least).
276 Results []*PredictResponse_PredictionResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
277 // A unique attribution token. This should be included in the
278 // [UserEvent][google.cloud.retail.v2.UserEvent] logs resulting from this
279 // recommendation, which enables accurate attribution of recommendation model
280 // performance.
281 AttributionToken string `protobuf:"bytes,2,opt,name=attribution_token,json=attributionToken,proto3" json:"attribution_token,omitempty"`
282 // IDs of products in the request that were missing from the inventory.
283 MissingIds []string `protobuf:"bytes,3,rep,name=missing_ids,json=missingIds,proto3" json:"missing_ids,omitempty"`
284 // True if the validateOnly property was set in the request.
285 ValidateOnly bool `protobuf:"varint,4,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"`
286 }
287
288 func (x *PredictResponse) Reset() {
289 *x = PredictResponse{}
290 mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[1]
291 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
292 ms.StoreMessageInfo(mi)
293 }
294
295 func (x *PredictResponse) String() string {
296 return protoimpl.X.MessageStringOf(x)
297 }
298
299 func (*PredictResponse) ProtoMessage() {}
300
301 func (x *PredictResponse) ProtoReflect() protoreflect.Message {
302 mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[1]
303 if x != nil {
304 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
305 if ms.LoadMessageInfo() == nil {
306 ms.StoreMessageInfo(mi)
307 }
308 return ms
309 }
310 return mi.MessageOf(x)
311 }
312
313 // Deprecated: Use PredictResponse.ProtoReflect.Descriptor instead.
314 func (*PredictResponse) Descriptor() ([]byte, []int) {
315 return file_google_cloud_retail_v2_prediction_service_proto_rawDescGZIP(), []int{1}
316 }
317
318 func (x *PredictResponse) GetResults() []*PredictResponse_PredictionResult {
319 if x != nil {
320 return x.Results
321 }
322 return nil
323 }
324
325 func (x *PredictResponse) GetAttributionToken() string {
326 if x != nil {
327 return x.AttributionToken
328 }
329 return ""
330 }
331
332 func (x *PredictResponse) GetMissingIds() []string {
333 if x != nil {
334 return x.MissingIds
335 }
336 return nil
337 }
338
339 func (x *PredictResponse) GetValidateOnly() bool {
340 if x != nil {
341 return x.ValidateOnly
342 }
343 return false
344 }
345
346 // PredictionResult represents the recommendation prediction results.
347 type PredictResponse_PredictionResult struct {
348 state protoimpl.MessageState
349 sizeCache protoimpl.SizeCache
350 unknownFields protoimpl.UnknownFields
351
352 // ID of the recommended product
353 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
354 // Additional product metadata / annotations.
355 //
356 // Possible values:
357 //
358 // - `product`: JSON representation of the product. Is set if
359 // `returnProduct` is set to true in `PredictRequest.params`.
360 // - `score`: Prediction score in double value. Is set if
361 // `returnScore` is set to true in `PredictRequest.params`.
362 Metadata map[string]*structpb.Value `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
363 }
364
365 func (x *PredictResponse_PredictionResult) Reset() {
366 *x = PredictResponse_PredictionResult{}
367 mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[4]
368 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
369 ms.StoreMessageInfo(mi)
370 }
371
372 func (x *PredictResponse_PredictionResult) String() string {
373 return protoimpl.X.MessageStringOf(x)
374 }
375
376 func (*PredictResponse_PredictionResult) ProtoMessage() {}
377
378 func (x *PredictResponse_PredictionResult) ProtoReflect() protoreflect.Message {
379 mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[4]
380 if x != nil {
381 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
382 if ms.LoadMessageInfo() == nil {
383 ms.StoreMessageInfo(mi)
384 }
385 return ms
386 }
387 return mi.MessageOf(x)
388 }
389
390 // Deprecated: Use PredictResponse_PredictionResult.ProtoReflect.Descriptor instead.
391 func (*PredictResponse_PredictionResult) Descriptor() ([]byte, []int) {
392 return file_google_cloud_retail_v2_prediction_service_proto_rawDescGZIP(), []int{1, 0}
393 }
394
395 func (x *PredictResponse_PredictionResult) GetId() string {
396 if x != nil {
397 return x.Id
398 }
399 return ""
400 }
401
402 func (x *PredictResponse_PredictionResult) GetMetadata() map[string]*structpb.Value {
403 if x != nil {
404 return x.Metadata
405 }
406 return nil
407 }
408
409 var File_google_cloud_retail_v2_prediction_service_proto protoreflect.FileDescriptor
410
411 var file_google_cloud_retail_v2_prediction_service_proto_rawDesc = []byte{
412 0x0a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x72,
413 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74,
414 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
415 0x6f, 0x12, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e,
416 0x72, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
417 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
418 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
419 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
420 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65,
421 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
422 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65,
423 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x67, 0x6f,
424 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x72, 0x65, 0x74, 0x61, 0x69,
425 0x6c, 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e,
426 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
427 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72,
428 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x04, 0x0a, 0x0e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52,
429 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d,
430 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09,
431 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0a, 0x75, 0x73, 0x65,
432 0x72, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e,
433 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x65, 0x74,
434 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74,
435 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74,
436 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20,
437 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a,
438 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
439 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
440 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
441 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69,
442 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
443 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x4a, 0x0a,
444 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e,
445 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x65, 0x74,
446 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65,
447 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72,
448 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x6c, 0x61, 0x62,
449 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
450 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e,
451 0x76, 0x32, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
452 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c,
453 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x51, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45,
454 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
455 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
456 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
457 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76,
458 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65,
459 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
460 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
461 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
462 0x02, 0x38, 0x01, 0x22, 0xb6, 0x03, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52,
463 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c,
464 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
465 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x76,
466 0x32, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
467 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75,
468 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61,
469 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
470 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
471 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x69, 0x73, 0x73,
472 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d,
473 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c,
474 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
475 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0xdb,
476 0x01, 0x0a, 0x10, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
477 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
478 0x02, 0x69, 0x64, 0x12, 0x62, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18,
479 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63,
480 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x50,
481 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50,
482 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e,
483 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d,
484 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x53, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64,
485 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
486 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61,
487 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
488 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75,
489 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xe1, 0x02, 0x0a,
490 0x11, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
491 0x63, 0x65, 0x12, 0x80, 0x02, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x26,
492 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x65,
493 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52,
494 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
495 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x32, 0x2e,
496 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
497 0xa3, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x9c, 0x01, 0x3a, 0x01, 0x2a, 0x5a, 0x4f, 0x3a, 0x01,
498 0x2a, 0x22, 0x4a, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e,
499 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63,
500 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67,
501 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69,
502 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x22, 0x46, 0x2f,
503 0x76, 0x32, 0x2f, 0x7b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72,
504 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
505 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x2a, 0x2f,
506 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x70, 0x72,
507 0x65, 0x64, 0x69, 0x63, 0x74, 0x1a, 0x49, 0xca, 0x41, 0x15, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6c,
508 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2,
509 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f,
510 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74,
511 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
512 0x42, 0xc1, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
513 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x32, 0x42,
514 0x16, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
515 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6c, 0x6f, 0x75, 0x64,
516 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x72,
517 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x74, 0x61,
518 0x69, 0x6c, 0x70, 0x62, 0x3b, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x70, 0x62, 0xa2, 0x02, 0x06,
519 0x52, 0x45, 0x54, 0x41, 0x49, 0x4c, 0xaa, 0x02, 0x16, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
520 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x56, 0x32, 0xca,
521 0x02, 0x16, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x52,
522 0x65, 0x74, 0x61, 0x69, 0x6c, 0x5c, 0x56, 0x32, 0xea, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c,
523 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6c,
524 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
525 }
526
527 var (
528 file_google_cloud_retail_v2_prediction_service_proto_rawDescOnce sync.Once
529 file_google_cloud_retail_v2_prediction_service_proto_rawDescData = file_google_cloud_retail_v2_prediction_service_proto_rawDesc
530 )
531
532 func file_google_cloud_retail_v2_prediction_service_proto_rawDescGZIP() []byte {
533 file_google_cloud_retail_v2_prediction_service_proto_rawDescOnce.Do(func() {
534 file_google_cloud_retail_v2_prediction_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_retail_v2_prediction_service_proto_rawDescData)
535 })
536 return file_google_cloud_retail_v2_prediction_service_proto_rawDescData
537 }
538
539 var file_google_cloud_retail_v2_prediction_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
540 var file_google_cloud_retail_v2_prediction_service_proto_goTypes = []any{
541 (*PredictRequest)(nil), // 0: google.cloud.retail.v2.PredictRequest
542 (*PredictResponse)(nil), // 1: google.cloud.retail.v2.PredictResponse
543 nil, // 2: google.cloud.retail.v2.PredictRequest.ParamsEntry
544 nil, // 3: google.cloud.retail.v2.PredictRequest.LabelsEntry
545 (*PredictResponse_PredictionResult)(nil), // 4: google.cloud.retail.v2.PredictResponse.PredictionResult
546 nil, // 5: google.cloud.retail.v2.PredictResponse.PredictionResult.MetadataEntry
547 (*UserEvent)(nil), // 6: google.cloud.retail.v2.UserEvent
548 (*structpb.Value)(nil), // 7: google.protobuf.Value
549 }
550 var file_google_cloud_retail_v2_prediction_service_proto_depIdxs = []int32{
551 6, // 0: google.cloud.retail.v2.PredictRequest.user_event:type_name -> google.cloud.retail.v2.UserEvent
552 2, // 1: google.cloud.retail.v2.PredictRequest.params:type_name -> google.cloud.retail.v2.PredictRequest.ParamsEntry
553 3, // 2: google.cloud.retail.v2.PredictRequest.labels:type_name -> google.cloud.retail.v2.PredictRequest.LabelsEntry
554 4, // 3: google.cloud.retail.v2.PredictResponse.results:type_name -> google.cloud.retail.v2.PredictResponse.PredictionResult
555 7, // 4: google.cloud.retail.v2.PredictRequest.ParamsEntry.value:type_name -> google.protobuf.Value
556 5, // 5: google.cloud.retail.v2.PredictResponse.PredictionResult.metadata:type_name -> google.cloud.retail.v2.PredictResponse.PredictionResult.MetadataEntry
557 7, // 6: google.cloud.retail.v2.PredictResponse.PredictionResult.MetadataEntry.value:type_name -> google.protobuf.Value
558 0, // 7: google.cloud.retail.v2.PredictionService.Predict:input_type -> google.cloud.retail.v2.PredictRequest
559 1, // 8: google.cloud.retail.v2.PredictionService.Predict:output_type -> google.cloud.retail.v2.PredictResponse
560 8, // [8:9] is the sub-list for method output_type
561 7, // [7:8] is the sub-list for method input_type
562 7, // [7:7] is the sub-list for extension type_name
563 7, // [7:7] is the sub-list for extension extendee
564 0, // [0:7] is the sub-list for field type_name
565 }
566
567 func init() { file_google_cloud_retail_v2_prediction_service_proto_init() }
568 func file_google_cloud_retail_v2_prediction_service_proto_init() {
569 if File_google_cloud_retail_v2_prediction_service_proto != nil {
570 return
571 }
572 file_google_cloud_retail_v2_user_event_proto_init()
573 type x struct{}
574 out := protoimpl.TypeBuilder{
575 File: protoimpl.DescBuilder{
576 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
577 RawDescriptor: file_google_cloud_retail_v2_prediction_service_proto_rawDesc,
578 NumEnums: 0,
579 NumMessages: 6,
580 NumExtensions: 0,
581 NumServices: 1,
582 },
583 GoTypes: file_google_cloud_retail_v2_prediction_service_proto_goTypes,
584 DependencyIndexes: file_google_cloud_retail_v2_prediction_service_proto_depIdxs,
585 MessageInfos: file_google_cloud_retail_v2_prediction_service_proto_msgTypes,
586 }.Build()
587 File_google_cloud_retail_v2_prediction_service_proto = out.File
588 file_google_cloud_retail_v2_prediction_service_proto_rawDesc = nil
589 file_google_cloud_retail_v2_prediction_service_proto_goTypes = nil
590 file_google_cloud_retail_v2_prediction_service_proto_depIdxs = nil
591 }
592
593 // Reference imports to suppress errors if they are not otherwise used.
594 var _ context.Context
595 var _ grpc.ClientConnInterface
596
597 // This is a compile-time assertion to ensure that this generated file
598 // is compatible with the grpc package it is being compiled against.
599 const _ = grpc.SupportPackageIsVersion6
600
601 // PredictionServiceClient is the client API for PredictionService service.
602 //
603 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
604 type PredictionServiceClient interface {
605 // Makes a recommendation prediction.
606 Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error)
607 }
608
609 type predictionServiceClient struct {
610 cc grpc.ClientConnInterface
611 }
612
613 func NewPredictionServiceClient(cc grpc.ClientConnInterface) PredictionServiceClient {
614 return &predictionServiceClient{cc}
615 }
616
617 func (c *predictionServiceClient) Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error) {
618 out := new(PredictResponse)
619 err := c.cc.Invoke(ctx, "/google.cloud.retail.v2.PredictionService/Predict", in, out, opts...)
620 if err != nil {
621 return nil, err
622 }
623 return out, nil
624 }
625
626 // PredictionServiceServer is the server API for PredictionService service.
627 type PredictionServiceServer interface {
628 // Makes a recommendation prediction.
629 Predict(context.Context, *PredictRequest) (*PredictResponse, error)
630 }
631
632 // UnimplementedPredictionServiceServer can be embedded to have forward compatible implementations.
633 type UnimplementedPredictionServiceServer struct {
634 }
635
636 func (*UnimplementedPredictionServiceServer) Predict(context.Context, *PredictRequest) (*PredictResponse, error) {
637 return nil, status.Errorf(codes.Unimplemented, "method Predict not implemented")
638 }
639
640 func RegisterPredictionServiceServer(s *grpc.Server, srv PredictionServiceServer) {
641 s.RegisterService(&_PredictionService_serviceDesc, srv)
642 }
643
644 func _PredictionService_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
645 in := new(PredictRequest)
646 if err := dec(in); err != nil {
647 return nil, err
648 }
649 if interceptor == nil {
650 return srv.(PredictionServiceServer).Predict(ctx, in)
651 }
652 info := &grpc.UnaryServerInfo{
653 Server: srv,
654 FullMethod: "/google.cloud.retail.v2.PredictionService/Predict",
655 }
656 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
657 return srv.(PredictionServiceServer).Predict(ctx, req.(*PredictRequest))
658 }
659 return interceptor(ctx, in, info, handler)
660 }
661
662 var _PredictionService_serviceDesc = grpc.ServiceDesc{
663 ServiceName: "google.cloud.retail.v2.PredictionService",
664 HandlerType: (*PredictionServiceServer)(nil),
665 Methods: []grpc.MethodDesc{
666 {
667 MethodName: "Predict",
668 Handler: _PredictionService_Predict_Handler,
669 },
670 },
671 Streams: []grpc.StreamDesc{},
672 Metadata: "google/cloud/retail/v2/prediction_service.proto",
673 }