1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/cloud/recommendationengine/v1beta1/user_event.proto
3
4package recommendationengine
5
6import (
7	fmt "fmt"
8	math "math"
9
10	proto "github.com/golang/protobuf/proto"
11	timestamp "github.com/golang/protobuf/ptypes/timestamp"
12	_ "google.golang.org/genproto/googleapis/api/annotations"
13)
14
15// Reference imports to suppress errors if they are not otherwise used.
16var _ = proto.Marshal
17var _ = fmt.Errorf
18var _ = math.Inf
19
20// This is a compile-time assertion to ensure that this generated file
21// is compatible with the proto package it is being compiled against.
22// A compilation error at this line likely means your copy of the
23// proto package needs to be updated.
24const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
25
26// User event source.
27type UserEvent_EventSource int32
28
29const (
30	// Unspecified event source.
31	UserEvent_EVENT_SOURCE_UNSPECIFIED UserEvent_EventSource = 0
32	// The event is ingested via a javascript pixel or Recommendations AI Tag
33	// through automl datalayer or JS Macros.
34	UserEvent_AUTOML UserEvent_EventSource = 1
35	// The event is ingested via Recommendations AI Tag through Enhanced
36	// Ecommerce datalayer.
37	UserEvent_ECOMMERCE UserEvent_EventSource = 2
38	// The event is ingested via Import user events API.
39	UserEvent_BATCH_UPLOAD UserEvent_EventSource = 3
40)
41
42var UserEvent_EventSource_name = map[int32]string{
43	0: "EVENT_SOURCE_UNSPECIFIED",
44	1: "AUTOML",
45	2: "ECOMMERCE",
46	3: "BATCH_UPLOAD",
47}
48
49var UserEvent_EventSource_value = map[string]int32{
50	"EVENT_SOURCE_UNSPECIFIED": 0,
51	"AUTOML":                   1,
52	"ECOMMERCE":                2,
53	"BATCH_UPLOAD":             3,
54}
55
56func (x UserEvent_EventSource) String() string {
57	return proto.EnumName(UserEvent_EventSource_name, int32(x))
58}
59
60func (UserEvent_EventSource) EnumDescriptor() ([]byte, []int) {
61	return fileDescriptor_f86607756c01e62b, []int{0, 0}
62}
63
64// UserEvent captures all metadata information recommendation engine needs to
65// know about how end users interact with customers' website.
66type UserEvent struct {
67	// Required. User event type. Allowed values are:
68	//
69	// * `add-to-cart` Products being added to cart.
70	// * `add-to-list` Items being added to a list (shopping list, favorites
71	//   etc).
72	// * `category-page-view` Special pages such as sale or promotion pages
73	//   viewed.
74	// * `checkout-start` User starting a checkout process.
75	// * `detail-page-view` Products detail page viewed.
76	// * `home-page-view` Homepage viewed.
77	// * `page-visit` Generic page visits not included in the event types above.
78	// * `purchase-complete` User finishing a purchase.
79	// * `refund` Purchased items being refunded or returned.
80	// * `remove-from-cart` Products being removed from cart.
81	// * `remove-from-list` Items being removed from a list.
82	// * `search` Product search.
83	// * `shopping-cart-page-view` User viewing a shopping cart.
84	// * `impression` List of items displayed. Used by Google Tag Manager.
85	EventType string `protobuf:"bytes,1,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"`
86	// Required. User information.
87	UserInfo *UserInfo `protobuf:"bytes,2,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
88	// Optional. User event detailed information common across different
89	// recommendation types.
90	EventDetail *EventDetail `protobuf:"bytes,3,opt,name=event_detail,json=eventDetail,proto3" json:"event_detail,omitempty"`
91	// Optional. Retail product specific user event metadata.
92	//
93	// This field is required for the following event types:
94	//
95	// * `add-to-cart`
96	// * `add-to-list`
97	// * `category-page-view`
98	// * `checkout-start`
99	// * `detail-page-view`
100	// * `purchase-complete`
101	// * `refund`
102	// * `remove-from-cart`
103	// * `remove-from-list`
104	// * `search`
105	//
106	// This field is optional for the following event types:
107	//
108	// * `page-visit`
109	// * `shopping-cart-page-view` - note that 'product_event_detail' should be
110	//   set for this unless the shopping cart is empty.
111	//
112	// This field is not allowed for the following event types:
113	//
114	// * `home-page-view`
115	ProductEventDetail *ProductEventDetail `protobuf:"bytes,4,opt,name=product_event_detail,json=productEventDetail,proto3" json:"product_event_detail,omitempty"`
116	// Optional. Only required for ImportUserEvents method. Timestamp of user
117	// event created.
118	EventTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"`
119	// Optional. This field should *not* be set when using JavaScript pixel
120	// or the Recommendations AI Tag. Defaults to `EVENT_SOURCE_UNSPECIFIED`.
121	EventSource          UserEvent_EventSource `protobuf:"varint,6,opt,name=event_source,json=eventSource,proto3,enum=google.cloud.recommendationengine.v1beta1.UserEvent_EventSource" json:"event_source,omitempty"`
122	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
123	XXX_unrecognized     []byte                `json:"-"`
124	XXX_sizecache        int32                 `json:"-"`
125}
126
127func (m *UserEvent) Reset()         { *m = UserEvent{} }
128func (m *UserEvent) String() string { return proto.CompactTextString(m) }
129func (*UserEvent) ProtoMessage()    {}
130func (*UserEvent) Descriptor() ([]byte, []int) {
131	return fileDescriptor_f86607756c01e62b, []int{0}
132}
133
134func (m *UserEvent) XXX_Unmarshal(b []byte) error {
135	return xxx_messageInfo_UserEvent.Unmarshal(m, b)
136}
137func (m *UserEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
138	return xxx_messageInfo_UserEvent.Marshal(b, m, deterministic)
139}
140func (m *UserEvent) XXX_Merge(src proto.Message) {
141	xxx_messageInfo_UserEvent.Merge(m, src)
142}
143func (m *UserEvent) XXX_Size() int {
144	return xxx_messageInfo_UserEvent.Size(m)
145}
146func (m *UserEvent) XXX_DiscardUnknown() {
147	xxx_messageInfo_UserEvent.DiscardUnknown(m)
148}
149
150var xxx_messageInfo_UserEvent proto.InternalMessageInfo
151
152func (m *UserEvent) GetEventType() string {
153	if m != nil {
154		return m.EventType
155	}
156	return ""
157}
158
159func (m *UserEvent) GetUserInfo() *UserInfo {
160	if m != nil {
161		return m.UserInfo
162	}
163	return nil
164}
165
166func (m *UserEvent) GetEventDetail() *EventDetail {
167	if m != nil {
168		return m.EventDetail
169	}
170	return nil
171}
172
173func (m *UserEvent) GetProductEventDetail() *ProductEventDetail {
174	if m != nil {
175		return m.ProductEventDetail
176	}
177	return nil
178}
179
180func (m *UserEvent) GetEventTime() *timestamp.Timestamp {
181	if m != nil {
182		return m.EventTime
183	}
184	return nil
185}
186
187func (m *UserEvent) GetEventSource() UserEvent_EventSource {
188	if m != nil {
189		return m.EventSource
190	}
191	return UserEvent_EVENT_SOURCE_UNSPECIFIED
192}
193
194// Information of end users.
195type UserInfo struct {
196	// Required. A unique identifier for tracking visitors with a length limit of
197	// 128 bytes.
198	//
199	// For example, this could be implemented with a http cookie, which should be
200	// able to uniquely identify a visitor on a single device. This unique
201	// identifier should not change if the visitor log in/out of the website.
202	// Maximum length 128 bytes. Cannot be empty.
203	VisitorId string `protobuf:"bytes,1,opt,name=visitor_id,json=visitorId,proto3" json:"visitor_id,omitempty"`
204	// Optional. Unique identifier for logged-in user with a length limit of 128
205	// bytes. Required only for logged-in users.
206	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
207	// Optional. IP address of the user. This could be either IPv4 (e.g. 104.133.9.80) or
208	// IPv6 (e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334). This should *not* be
209	// set when using the javascript pixel or if `direct_user_request` is set.
210	// Used to extract location information for personalization.
211	IpAddress string `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
212	// Optional. User agent as included in the HTTP header. UTF-8 encoded string
213	// with a length limit of 1 KiB.
214	//
215	// This should *not* be set when using the JavaScript pixel or if
216	// `directUserRequest` is set.
217	UserAgent string `protobuf:"bytes,4,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
218	// Optional. Indicates if the request is made directly from the end user
219	// in which case the user_agent and ip_address fields can be populated
220	// from the HTTP request. This should *not* be set when using the javascript
221	// pixel. This flag should be set only if the API request is made directly
222	// from the end user such as a mobile app (and not if a gateway or a server is
223	// processing and pushing the user events).
224	DirectUserRequest    bool     `protobuf:"varint,5,opt,name=direct_user_request,json=directUserRequest,proto3" json:"direct_user_request,omitempty"`
225	XXX_NoUnkeyedLiteral struct{} `json:"-"`
226	XXX_unrecognized     []byte   `json:"-"`
227	XXX_sizecache        int32    `json:"-"`
228}
229
230func (m *UserInfo) Reset()         { *m = UserInfo{} }
231func (m *UserInfo) String() string { return proto.CompactTextString(m) }
232func (*UserInfo) ProtoMessage()    {}
233func (*UserInfo) Descriptor() ([]byte, []int) {
234	return fileDescriptor_f86607756c01e62b, []int{1}
235}
236
237func (m *UserInfo) XXX_Unmarshal(b []byte) error {
238	return xxx_messageInfo_UserInfo.Unmarshal(m, b)
239}
240func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
241	return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic)
242}
243func (m *UserInfo) XXX_Merge(src proto.Message) {
244	xxx_messageInfo_UserInfo.Merge(m, src)
245}
246func (m *UserInfo) XXX_Size() int {
247	return xxx_messageInfo_UserInfo.Size(m)
248}
249func (m *UserInfo) XXX_DiscardUnknown() {
250	xxx_messageInfo_UserInfo.DiscardUnknown(m)
251}
252
253var xxx_messageInfo_UserInfo proto.InternalMessageInfo
254
255func (m *UserInfo) GetVisitorId() string {
256	if m != nil {
257		return m.VisitorId
258	}
259	return ""
260}
261
262func (m *UserInfo) GetUserId() string {
263	if m != nil {
264		return m.UserId
265	}
266	return ""
267}
268
269func (m *UserInfo) GetIpAddress() string {
270	if m != nil {
271		return m.IpAddress
272	}
273	return ""
274}
275
276func (m *UserInfo) GetUserAgent() string {
277	if m != nil {
278		return m.UserAgent
279	}
280	return ""
281}
282
283func (m *UserInfo) GetDirectUserRequest() bool {
284	if m != nil {
285		return m.DirectUserRequest
286	}
287	return false
288}
289
290// User event details shared by all recommendation types.
291type EventDetail struct {
292	// Optional. Complete url (window.location.href) of the user's current page.
293	// When using the JavaScript pixel, this value is filled in automatically.
294	// Maximum length 5KB.
295	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
296	// Optional. The referrer url of the current page. When using
297	// the JavaScript pixel, this value is filled in automatically.
298	ReferrerUri string `protobuf:"bytes,6,opt,name=referrer_uri,json=referrerUri,proto3" json:"referrer_uri,omitempty"`
299	// Optional. A unique id of a web page view.
300	// This should be kept the same for all user events triggered from the same
301	// pageview. For example, an item detail page view could trigger multiple
302	// events as the user is browsing the page.
303	// The `pageViewId` property should be kept the same for all these events so
304	// that they can be grouped together properly. This `pageViewId` will be
305	// automatically generated if using the JavaScript pixel.
306	PageViewId string `protobuf:"bytes,2,opt,name=page_view_id,json=pageViewId,proto3" json:"page_view_id,omitempty"`
307	// Optional. A list of identifiers for the independent experiment groups
308	// this user event belongs to. This is used to distinguish between user events
309	// associated with different experiment setups (e.g. using Recommendation
310	// Engine system, using different recommendation models).
311	ExperimentIds []string `protobuf:"bytes,3,rep,name=experiment_ids,json=experimentIds,proto3" json:"experiment_ids,omitempty"`
312	// Optional. Recommendation token included in the recommendation prediction
313	// response.
314	//
315	// This field enables accurate attribution of recommendation model
316	// performance.
317	//
318	// This token enables us to accurately attribute page view or purchase back to
319	// the event and the particular predict response containing this
320	// clicked/purchased item. If user clicks on product K in the recommendation
321	// results, pass the `PredictResponse.recommendationToken` property as a url
322	// parameter to product K's page. When recording events on product K's page,
323	// log the PredictResponse.recommendation_token to this field.
324	//
325	// Optional, but highly encouraged for user events that are the result of a
326	// recommendation prediction query.
327	RecommendationToken string `protobuf:"bytes,4,opt,name=recommendation_token,json=recommendationToken,proto3" json:"recommendation_token,omitempty"`
328	// Optional. Extra user event features to include in the recommendation
329	// model.
330	//
331	// For product recommendation, an example of extra user information is
332	// traffic_channel, i.e. how user arrives at the site. Users can arrive
333	// at the site by coming to the site directly, or coming through Google
334	// search, and etc.
335	EventAttributes      *FeatureMap `protobuf:"bytes,5,opt,name=event_attributes,json=eventAttributes,proto3" json:"event_attributes,omitempty"`
336	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
337	XXX_unrecognized     []byte      `json:"-"`
338	XXX_sizecache        int32       `json:"-"`
339}
340
341func (m *EventDetail) Reset()         { *m = EventDetail{} }
342func (m *EventDetail) String() string { return proto.CompactTextString(m) }
343func (*EventDetail) ProtoMessage()    {}
344func (*EventDetail) Descriptor() ([]byte, []int) {
345	return fileDescriptor_f86607756c01e62b, []int{2}
346}
347
348func (m *EventDetail) XXX_Unmarshal(b []byte) error {
349	return xxx_messageInfo_EventDetail.Unmarshal(m, b)
350}
351func (m *EventDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
352	return xxx_messageInfo_EventDetail.Marshal(b, m, deterministic)
353}
354func (m *EventDetail) XXX_Merge(src proto.Message) {
355	xxx_messageInfo_EventDetail.Merge(m, src)
356}
357func (m *EventDetail) XXX_Size() int {
358	return xxx_messageInfo_EventDetail.Size(m)
359}
360func (m *EventDetail) XXX_DiscardUnknown() {
361	xxx_messageInfo_EventDetail.DiscardUnknown(m)
362}
363
364var xxx_messageInfo_EventDetail proto.InternalMessageInfo
365
366func (m *EventDetail) GetUri() string {
367	if m != nil {
368		return m.Uri
369	}
370	return ""
371}
372
373func (m *EventDetail) GetReferrerUri() string {
374	if m != nil {
375		return m.ReferrerUri
376	}
377	return ""
378}
379
380func (m *EventDetail) GetPageViewId() string {
381	if m != nil {
382		return m.PageViewId
383	}
384	return ""
385}
386
387func (m *EventDetail) GetExperimentIds() []string {
388	if m != nil {
389		return m.ExperimentIds
390	}
391	return nil
392}
393
394func (m *EventDetail) GetRecommendationToken() string {
395	if m != nil {
396		return m.RecommendationToken
397	}
398	return ""
399}
400
401func (m *EventDetail) GetEventAttributes() *FeatureMap {
402	if m != nil {
403		return m.EventAttributes
404	}
405	return nil
406}
407
408// ProductEventDetail captures user event information specific to retail
409// products.
410type ProductEventDetail struct {
411	// Required for `search` events. Other event types should not set this field.
412	// The user's search query as UTF-8 encoded text with a length limit of 5 KiB.
413	SearchQuery string `protobuf:"bytes,1,opt,name=search_query,json=searchQuery,proto3" json:"search_query,omitempty"`
414	// Required for `category-page-view` events. Other event types should not set
415	// this field.
416	// The categories associated with a category page.
417	// Category pages include special pages such as sales or promotions. For
418	// instance, a special sale page may have the category hierarchy:
419	// categories : ["Sales", "2017 Black Friday Deals"].
420	PageCategories []*CatalogItem_CategoryHierarchy `protobuf:"bytes,2,rep,name=page_categories,json=pageCategories,proto3" json:"page_categories,omitempty"`
421	// The main product details related to the event.
422	//
423	// This field is required for the following event types:
424	//
425	// * `add-to-cart`
426	// * `add-to-list`
427	// * `checkout-start`
428	// * `detail-page-view`
429	// * `purchase-complete`
430	// * `refund`
431	// * `remove-from-cart`
432	// * `remove-from-list`
433	//
434	// This field is optional for the following event types:
435	//
436	// * `page-visit`
437	// * `shopping-cart-page-view` - note that 'product_details' should be set for
438	//   this unless the shopping cart is empty.
439	//
440	// This field is not allowed for the following event types:
441	//
442	// * `category-page-view`
443	// * `home-page-view`
444	// * `search`
445	ProductDetails []*ProductDetail `protobuf:"bytes,3,rep,name=product_details,json=productDetails,proto3" json:"product_details,omitempty"`
446	// Required for `add-to-list` and `remove-from-list` events. The id or name of
447	// the list that the item is being added to or removed from. Other event types
448	// should not set this field.
449	ListId string `protobuf:"bytes,4,opt,name=list_id,json=listId,proto3" json:"list_id,omitempty"`
450	// Optional. The id or name of the associated shopping cart. This id is used
451	// to associate multiple items added or present in the cart before purchase.
452	//
453	// This can only be set for `add-to-cart`, `remove-from-cart`,
454	// `checkout-start`, `purchase-complete`, or `shopping-cart-page-view` events.
455	CartId string `protobuf:"bytes,5,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"`
456	// Optional. A transaction represents the entire purchase transaction.
457	// Required for `purchase-complete` events. Optional for `checkout-start`
458	// events. Other event types should not set this field.
459	PurchaseTransaction  *PurchaseTransaction `protobuf:"bytes,6,opt,name=purchase_transaction,json=purchaseTransaction,proto3" json:"purchase_transaction,omitempty"`
460	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
461	XXX_unrecognized     []byte               `json:"-"`
462	XXX_sizecache        int32                `json:"-"`
463}
464
465func (m *ProductEventDetail) Reset()         { *m = ProductEventDetail{} }
466func (m *ProductEventDetail) String() string { return proto.CompactTextString(m) }
467func (*ProductEventDetail) ProtoMessage()    {}
468func (*ProductEventDetail) Descriptor() ([]byte, []int) {
469	return fileDescriptor_f86607756c01e62b, []int{3}
470}
471
472func (m *ProductEventDetail) XXX_Unmarshal(b []byte) error {
473	return xxx_messageInfo_ProductEventDetail.Unmarshal(m, b)
474}
475func (m *ProductEventDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
476	return xxx_messageInfo_ProductEventDetail.Marshal(b, m, deterministic)
477}
478func (m *ProductEventDetail) XXX_Merge(src proto.Message) {
479	xxx_messageInfo_ProductEventDetail.Merge(m, src)
480}
481func (m *ProductEventDetail) XXX_Size() int {
482	return xxx_messageInfo_ProductEventDetail.Size(m)
483}
484func (m *ProductEventDetail) XXX_DiscardUnknown() {
485	xxx_messageInfo_ProductEventDetail.DiscardUnknown(m)
486}
487
488var xxx_messageInfo_ProductEventDetail proto.InternalMessageInfo
489
490func (m *ProductEventDetail) GetSearchQuery() string {
491	if m != nil {
492		return m.SearchQuery
493	}
494	return ""
495}
496
497func (m *ProductEventDetail) GetPageCategories() []*CatalogItem_CategoryHierarchy {
498	if m != nil {
499		return m.PageCategories
500	}
501	return nil
502}
503
504func (m *ProductEventDetail) GetProductDetails() []*ProductDetail {
505	if m != nil {
506		return m.ProductDetails
507	}
508	return nil
509}
510
511func (m *ProductEventDetail) GetListId() string {
512	if m != nil {
513		return m.ListId
514	}
515	return ""
516}
517
518func (m *ProductEventDetail) GetCartId() string {
519	if m != nil {
520		return m.CartId
521	}
522	return ""
523}
524
525func (m *ProductEventDetail) GetPurchaseTransaction() *PurchaseTransaction {
526	if m != nil {
527		return m.PurchaseTransaction
528	}
529	return nil
530}
531
532// A transaction represents the entire purchase transaction.
533type PurchaseTransaction struct {
534	// Optional. The transaction ID with a length limit of 128 bytes.
535	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
536	// Required. Total revenue or grand total associated with the transaction.
537	// This value include shipping, tax, or other adjustments to total revenue
538	// that you want to include as part of your revenue calculations. This field
539	// is not required if the event type is `refund`.
540	Revenue float32 `protobuf:"fixed32,2,opt,name=revenue,proto3" json:"revenue,omitempty"`
541	// Optional. All the taxes associated with the transaction.
542	Taxes map[string]float32 `protobuf:"bytes,3,rep,name=taxes,proto3" json:"taxes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
543	// Optional. All the costs associated with the product. These can be
544	// manufacturing costs, shipping expenses not borne by the end user, or any
545	// other costs.
546	//
547	// Total product cost such that
548	//   profit = revenue - (sum(taxes) + sum(costs))
549	// If product_cost is not set, then
550	//   profit = revenue - tax - shipping - sum(CatalogItem.costs).
551	//
552	// If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
553	// based profit *cannot* be calculated for this Transaction.
554	Costs map[string]float32 `protobuf:"bytes,4,rep,name=costs,proto3" json:"costs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
555	// Required. Currency code. Use three-character ISO-4217 code. This field
556	// is not required if the event type is `refund`.
557	CurrencyCode         string   `protobuf:"bytes,6,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
558	XXX_NoUnkeyedLiteral struct{} `json:"-"`
559	XXX_unrecognized     []byte   `json:"-"`
560	XXX_sizecache        int32    `json:"-"`
561}
562
563func (m *PurchaseTransaction) Reset()         { *m = PurchaseTransaction{} }
564func (m *PurchaseTransaction) String() string { return proto.CompactTextString(m) }
565func (*PurchaseTransaction) ProtoMessage()    {}
566func (*PurchaseTransaction) Descriptor() ([]byte, []int) {
567	return fileDescriptor_f86607756c01e62b, []int{4}
568}
569
570func (m *PurchaseTransaction) XXX_Unmarshal(b []byte) error {
571	return xxx_messageInfo_PurchaseTransaction.Unmarshal(m, b)
572}
573func (m *PurchaseTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
574	return xxx_messageInfo_PurchaseTransaction.Marshal(b, m, deterministic)
575}
576func (m *PurchaseTransaction) XXX_Merge(src proto.Message) {
577	xxx_messageInfo_PurchaseTransaction.Merge(m, src)
578}
579func (m *PurchaseTransaction) XXX_Size() int {
580	return xxx_messageInfo_PurchaseTransaction.Size(m)
581}
582func (m *PurchaseTransaction) XXX_DiscardUnknown() {
583	xxx_messageInfo_PurchaseTransaction.DiscardUnknown(m)
584}
585
586var xxx_messageInfo_PurchaseTransaction proto.InternalMessageInfo
587
588func (m *PurchaseTransaction) GetId() string {
589	if m != nil {
590		return m.Id
591	}
592	return ""
593}
594
595func (m *PurchaseTransaction) GetRevenue() float32 {
596	if m != nil {
597		return m.Revenue
598	}
599	return 0
600}
601
602func (m *PurchaseTransaction) GetTaxes() map[string]float32 {
603	if m != nil {
604		return m.Taxes
605	}
606	return nil
607}
608
609func (m *PurchaseTransaction) GetCosts() map[string]float32 {
610	if m != nil {
611		return m.Costs
612	}
613	return nil
614}
615
616func (m *PurchaseTransaction) GetCurrencyCode() string {
617	if m != nil {
618		return m.CurrencyCode
619	}
620	return ""
621}
622
623// Detailed product information associated with a user event.
624type ProductDetail struct {
625	// Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
626	// characters.
627	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
628	// Optional. Currency code for price/costs. Use three-character ISO-4217
629	// code. Required only if originalPrice or displayPrice is set.
630	CurrencyCode string `protobuf:"bytes,2,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
631	// Optional. Original price of the product. If provided, this will override
632	// the original price in Catalog for this product.
633	OriginalPrice float32 `protobuf:"fixed32,3,opt,name=original_price,json=originalPrice,proto3" json:"original_price,omitempty"`
634	// Optional. Display price of the product (e.g. discounted price). If
635	// provided, this will override the display price in Catalog for this product.
636	DisplayPrice float32 `protobuf:"fixed32,4,opt,name=display_price,json=displayPrice,proto3" json:"display_price,omitempty"`
637	// Optional. Item stock state. If provided, this overrides the stock state
638	// in Catalog for items in this event.
639	StockState ProductCatalogItem_StockState `protobuf:"varint,5,opt,name=stock_state,json=stockState,proto3,enum=google.cloud.recommendationengine.v1beta1.ProductCatalogItem_StockState" json:"stock_state,omitempty"`
640	// Optional. Quantity of the product associated with the user event. For
641	// example, this field will be 2 if two products are added to the shopping
642	// cart for `add-to-cart` event. Required for `add-to-cart`, `add-to-list`,
643	// `remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event
644	// types.
645	Quantity int32 `protobuf:"varint,6,opt,name=quantity,proto3" json:"quantity,omitempty"`
646	// Optional. Quantity of the products in stock when a user event happens.
647	// Optional. If provided, this overrides the available quantity in Catalog for
648	// this event. and can only be set if `stock_status` is set to `IN_STOCK`.
649	//
650	// Note that if an item is out of stock, you must set the `stock_state` field
651	// to be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not
652	// sufficient to mark the item out of stock.
653	AvailableQuantity int32 `protobuf:"varint,7,opt,name=available_quantity,json=availableQuantity,proto3" json:"available_quantity,omitempty"`
654	// Optional. Extra features associated with a product in the user event.
655	ItemAttributes       *FeatureMap `protobuf:"bytes,8,opt,name=item_attributes,json=itemAttributes,proto3" json:"item_attributes,omitempty"`
656	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
657	XXX_unrecognized     []byte      `json:"-"`
658	XXX_sizecache        int32       `json:"-"`
659}
660
661func (m *ProductDetail) Reset()         { *m = ProductDetail{} }
662func (m *ProductDetail) String() string { return proto.CompactTextString(m) }
663func (*ProductDetail) ProtoMessage()    {}
664func (*ProductDetail) Descriptor() ([]byte, []int) {
665	return fileDescriptor_f86607756c01e62b, []int{5}
666}
667
668func (m *ProductDetail) XXX_Unmarshal(b []byte) error {
669	return xxx_messageInfo_ProductDetail.Unmarshal(m, b)
670}
671func (m *ProductDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
672	return xxx_messageInfo_ProductDetail.Marshal(b, m, deterministic)
673}
674func (m *ProductDetail) XXX_Merge(src proto.Message) {
675	xxx_messageInfo_ProductDetail.Merge(m, src)
676}
677func (m *ProductDetail) XXX_Size() int {
678	return xxx_messageInfo_ProductDetail.Size(m)
679}
680func (m *ProductDetail) XXX_DiscardUnknown() {
681	xxx_messageInfo_ProductDetail.DiscardUnknown(m)
682}
683
684var xxx_messageInfo_ProductDetail proto.InternalMessageInfo
685
686func (m *ProductDetail) GetId() string {
687	if m != nil {
688		return m.Id
689	}
690	return ""
691}
692
693func (m *ProductDetail) GetCurrencyCode() string {
694	if m != nil {
695		return m.CurrencyCode
696	}
697	return ""
698}
699
700func (m *ProductDetail) GetOriginalPrice() float32 {
701	if m != nil {
702		return m.OriginalPrice
703	}
704	return 0
705}
706
707func (m *ProductDetail) GetDisplayPrice() float32 {
708	if m != nil {
709		return m.DisplayPrice
710	}
711	return 0
712}
713
714func (m *ProductDetail) GetStockState() ProductCatalogItem_StockState {
715	if m != nil {
716		return m.StockState
717	}
718	return ProductCatalogItem_STOCK_STATE_UNSPECIFIED
719}
720
721func (m *ProductDetail) GetQuantity() int32 {
722	if m != nil {
723		return m.Quantity
724	}
725	return 0
726}
727
728func (m *ProductDetail) GetAvailableQuantity() int32 {
729	if m != nil {
730		return m.AvailableQuantity
731	}
732	return 0
733}
734
735func (m *ProductDetail) GetItemAttributes() *FeatureMap {
736	if m != nil {
737		return m.ItemAttributes
738	}
739	return nil
740}
741
742func init() {
743	proto.RegisterEnum("google.cloud.recommendationengine.v1beta1.UserEvent_EventSource", UserEvent_EventSource_name, UserEvent_EventSource_value)
744	proto.RegisterType((*UserEvent)(nil), "google.cloud.recommendationengine.v1beta1.UserEvent")
745	proto.RegisterType((*UserInfo)(nil), "google.cloud.recommendationengine.v1beta1.UserInfo")
746	proto.RegisterType((*EventDetail)(nil), "google.cloud.recommendationengine.v1beta1.EventDetail")
747	proto.RegisterType((*ProductEventDetail)(nil), "google.cloud.recommendationengine.v1beta1.ProductEventDetail")
748	proto.RegisterType((*PurchaseTransaction)(nil), "google.cloud.recommendationengine.v1beta1.PurchaseTransaction")
749	proto.RegisterMapType((map[string]float32)(nil), "google.cloud.recommendationengine.v1beta1.PurchaseTransaction.CostsEntry")
750	proto.RegisterMapType((map[string]float32)(nil), "google.cloud.recommendationengine.v1beta1.PurchaseTransaction.TaxesEntry")
751	proto.RegisterType((*ProductDetail)(nil), "google.cloud.recommendationengine.v1beta1.ProductDetail")
752}
753
754func init() {
755	proto.RegisterFile("google/cloud/recommendationengine/v1beta1/user_event.proto", fileDescriptor_f86607756c01e62b)
756}
757
758var fileDescriptor_f86607756c01e62b = []byte{
759	// 1194 bytes of a gzipped FileDescriptorProto
760	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5f, 0x6f, 0x1b, 0x45,
761	0x10, 0xc7, 0xe7, 0xc4, 0x89, 0xd7, 0x8e, 0xe3, 0x6e, 0x82, 0xb0, 0xa2, 0xa2, 0x06, 0x4b, 0xa0,
762	0x14, 0x81, 0xad, 0xba, 0xa2, 0x54, 0x46, 0x54, 0x38, 0xee, 0x95, 0x5a, 0x6a, 0x9a, 0xf4, 0x62,
763	0x47, 0x08, 0x15, 0x4e, 0xeb, 0xbb, 0xc9, 0x65, 0xd5, 0xbb, 0xdb, 0xcb, 0xee, 0x9e, 0x5b, 0x7f,
764	0x1a, 0x24, 0x1e, 0x79, 0xe5, 0x15, 0xf1, 0x0e, 0x0f, 0x7c, 0x86, 0x3e, 0xf3, 0x29, 0xd0, 0xee,
765	0xde, 0xf9, 0x4f, 0x93, 0x87, 0x58, 0xe5, 0xcd, 0x3b, 0xbf, 0xdf, 0xfc, 0x66, 0x76, 0x66, 0x76,
766	0x7c, 0xa8, 0x1b, 0x30, 0x16, 0x84, 0xd0, 0xf6, 0x42, 0x96, 0xfa, 0x6d, 0x0e, 0x1e, 0x8b, 0x22,
767	0x88, 0x7d, 0x22, 0x29, 0x8b, 0x21, 0x0e, 0x68, 0x0c, 0xed, 0xc9, 0xbd, 0x31, 0x48, 0x72, 0xaf,
768	0x9d, 0x0a, 0xe0, 0x2e, 0x4c, 0x20, 0x96, 0xad, 0x84, 0x33, 0xc9, 0xf0, 0x5d, 0xe3, 0xdb, 0xd2,
769	0xbe, 0xad, 0xeb, 0x7c, 0x5b, 0x99, 0xef, 0xde, 0x9d, 0x2c, 0x0c, 0x49, 0x68, 0xfb, 0x9c, 0x42,
770	0xe8, 0xbb, 0x63, 0xb8, 0x20, 0x13, 0xca, 0xb8, 0xd1, 0xda, 0xfb, 0xfa, 0xe6, 0x79, 0x78, 0x44,
771	0x92, 0x90, 0x05, 0x99, 0xe3, 0x83, 0x15, 0x1c, 0x59, 0x14, 0xb1, 0x38, 0xf3, 0xcb, 0x33, 0xd2,
772	0xa7, 0x71, 0x7a, 0xde, 0x96, 0x34, 0x02, 0x21, 0x49, 0x94, 0x64, 0x84, 0xdb, 0x0b, 0x29, 0x93,
773	0x38, 0x66, 0x52, 0x4b, 0x0a, 0x83, 0x36, 0xdf, 0xae, 0xa1, 0xf2, 0x48, 0x00, 0xb7, 0x55, 0x3d,
774	0x70, 0x13, 0x21, 0x5d, 0x18, 0x57, 0x4e, 0x13, 0x68, 0x14, 0xf6, 0x0b, 0x07, 0xe5, 0xc3, 0xe2,
775	0xdb, 0x9e, 0xe5, 0x94, 0xb5, 0x79, 0x38, 0x4d, 0x00, 0x8f, 0x50, 0x59, 0x57, 0x90, 0xc6, 0xe7,
776	0xac, 0x61, 0xed, 0x17, 0x0e, 0x2a, 0x9d, 0xfb, 0xad, 0x1b, 0x57, 0xb0, 0xa5, 0x82, 0x0d, 0xe2,
777	0x73, 0x66, 0x74, 0x37, 0xd3, 0xec, 0x88, 0x7f, 0x46, 0x55, 0x13, 0xda, 0x07, 0x49, 0x68, 0xd8,
778	0x28, 0x6a, 0xe5, 0x07, 0x2b, 0x28, 0xeb, 0x2b, 0x3c, 0xd6, 0xde, 0x4a, 0xbc, 0xe0, 0x54, 0x60,
779	0x6e, 0xc1, 0x12, 0xed, 0x26, 0x9c, 0xf9, 0xa9, 0x27, 0xdd, 0xa5, 0x38, 0x6b, 0x3a, 0xce, 0xb7,
780	0x2b, 0xc4, 0x39, 0x31, 0x32, 0x57, 0xc2, 0xe1, 0xe4, 0x0a, 0x80, 0x1f, 0xcd, 0x0a, 0x4a, 0x23,
781	0x68, 0xac, 0xeb, 0x58, 0x7b, 0x79, 0xac, 0xbc, 0x65, 0xad, 0x61, 0xde, 0x32, 0x23, 0x94, 0x15,
782	0x9b, 0x46, 0x80, 0x2f, 0xf2, 0xaa, 0x08, 0x96, 0x72, 0x0f, 0x1a, 0xa5, 0xfd, 0xc2, 0x41, 0xad,
783	0xf3, 0xdd, 0x8a, 0xf5, 0xd6, 0x19, 0x99, 0xfa, 0x9c, 0x6a, 0x9d, 0xc5, 0xfa, 0x18, 0x4b, 0xf3,
784	0x07, 0x54, 0x59, 0x20, 0xe0, 0xdb, 0xa8, 0x61, 0x9f, 0xd9, 0xcf, 0x87, 0xee, 0xe9, 0xf1, 0xc8,
785	0xe9, 0xdb, 0xee, 0xe8, 0xf9, 0xe9, 0x89, 0xdd, 0x1f, 0x3c, 0x19, 0xd8, 0x8f, 0xeb, 0x1f, 0x60,
786	0x84, 0x4a, 0xbd, 0xd1, 0xf0, 0xf8, 0xe8, 0x59, 0xbd, 0x80, 0xb7, 0x50, 0xd9, 0xee, 0x1f, 0x1f,
787	0x1d, 0xd9, 0x4e, 0xdf, 0xae, 0x5b, 0xb8, 0x8e, 0xaa, 0x87, 0xbd, 0x61, 0xff, 0xa9, 0x3b, 0x3a,
788	0x79, 0x76, 0xdc, 0x7b, 0x5c, 0x2f, 0x36, 0xff, 0x2a, 0xa0, 0xcd, 0xbc, 0xeb, 0x6a, 0xc2, 0x26,
789	0x54, 0x50, 0xc9, 0xb8, 0x4b, 0xfd, 0xa5, 0x09, 0xcb, 0xcc, 0x03, 0x1f, 0xdf, 0x46, 0x1b, 0x66,
790	0xc2, 0x7c, 0x3d, 0x5f, 0x65, 0x93, 0x6d, 0x49, 0x8f, 0x8a, 0xaf, 0x14, 0x68, 0xe2, 0x12, 0xdf,
791	0xe7, 0x20, 0x84, 0x1e, 0x93, 0x8c, 0x50, 0xa6, 0x49, 0xcf, 0x58, 0x15, 0x47, 0x2b, 0x90, 0x00,
792	0x62, 0xa9, 0x5b, 0x9c, 0x73, 0x94, 0xb9, 0xa7, 0xac, 0xf8, 0x3e, 0xda, 0xf1, 0x29, 0x07, 0x4f,
793	0xba, 0x9a, 0xca, 0xe1, 0x32, 0x05, 0x21, 0x75, 0x8f, 0x36, 0x0d, 0xf9, 0x96, 0xc1, 0x55, 0xee,
794	0x8e, 0x41, 0x9b, 0x7f, 0x5a, 0x59, 0x99, 0xb2, 0xfe, 0x7e, 0x88, 0x8a, 0x29, 0xa7, 0xf3, 0x7b,
795	0x14, 0x1c, 0x75, 0xc6, 0x9f, 0xa1, 0x2a, 0x87, 0x73, 0xe0, 0x1c, 0xb8, 0xab, 0xf0, 0xd2, 0x1c,
796	0xaf, 0xe4, 0xc0, 0x88, 0x53, 0xfc, 0x29, 0xaa, 0x26, 0x24, 0x00, 0x77, 0x42, 0xe1, 0xf5, 0x3b,
797	0xd7, 0x45, 0x0a, 0x38, 0xa3, 0xf0, 0x7a, 0xe0, 0xe3, 0xcf, 0x51, 0x0d, 0xde, 0x24, 0xc0, 0x69,
798	0xa4, 0x46, 0x81, 0xfa, 0xea, 0xda, 0xc5, 0x9c, 0xb8, 0x35, 0x87, 0x06, 0xbe, 0xc0, 0x0f, 0xd0,
799	0xee, 0xf2, 0x3c, 0xb8, 0x92, 0xbd, 0x82, 0x78, 0xb1, 0x08, 0x3b, 0xcb, 0x84, 0xa1, 0xc2, 0x31,
800	0xa0, 0xba, 0x99, 0x34, 0x22, 0x25, 0xa7, 0xe3, 0x54, 0x82, 0xc8, 0xe6, 0xf5, 0xab, 0x15, 0xa6,
801	0xed, 0x09, 0x10, 0x99, 0x72, 0x38, 0x22, 0xd9, 0x28, 0x6f, 0x6b, 0xcd, 0xde, 0x4c, 0xb2, 0xf9,
802	0x47, 0x11, 0xe1, 0xab, 0x0f, 0x08, 0x7f, 0x82, 0xaa, 0x02, 0x08, 0xf7, 0x2e, 0xdc, 0xcb, 0x14,
803	0xf8, 0xd4, 0x14, 0xd4, 0xa9, 0x18, 0xdb, 0x0b, 0x65, 0xc2, 0x97, 0x68, 0x5b, 0xd7, 0xca, 0x23,
804	0x12, 0x02, 0xc6, 0x29, 0x88, 0x86, 0xb5, 0x5f, 0x3c, 0xa8, 0x74, 0x9e, 0xae, 0x90, 0x5f, 0xdf,
805	0xec, 0xdc, 0x81, 0x84, 0x48, 0xfd, 0x56, 0x42, 0xd3, 0xa7, 0x14, 0xb8, 0x0a, 0x33, 0x75, 0x6a,
806	0x2a, 0x40, 0x7f, 0xa6, 0x8f, 0x09, 0xda, 0xce, 0x77, 0x86, 0xd9, 0x16, 0xa6, 0xf0, 0x95, 0xce,
807	0xc3, 0xd5, 0xd7, 0x85, 0xb9, 0xa8, 0x53, 0x4b, 0x16, 0x8f, 0x02, 0x7f, 0x84, 0x36, 0x42, 0x2a,
808	0x54, 0x53, 0x4d, 0x87, 0x9c, 0x92, 0x3a, 0x9a, 0x47, 0xe0, 0x11, 0xae, 0x81, 0xf5, 0x85, 0x47,
809	0xa0, 0x6c, 0x03, 0x1f, 0x4f, 0xd0, 0x6e, 0x92, 0x72, 0xef, 0x82, 0x08, 0x70, 0x25, 0x27, 0xb1,
810	0x20, 0x9e, 0x0a, 0xad, 0x07, 0xad, 0xd2, 0x79, 0xb4, 0x4a, 0x7a, 0x99, 0xcc, 0x70, 0xae, 0x92,
811	0x4d, 0x49, 0x72, 0x15, 0x69, 0xfe, 0x5e, 0x44, 0x3b, 0xd7, 0x78, 0xe0, 0x1d, 0x64, 0x2d, 0x3e,
812	0xe7, 0x82, 0x63, 0x51, 0x1f, 0x7f, 0x8c, 0x36, 0xb8, 0xea, 0x7f, 0x0a, 0x7a, 0xb0, 0x2d, 0xf3,
813	0xd0, 0x73, 0x1b, 0xf6, 0xd1, 0xba, 0x24, 0x6f, 0x20, 0xaf, 0xe9, 0xe0, 0xfd, 0x92, 0x6e, 0x0d,
814	0x95, 0x96, 0x1d, 0x4b, 0x3e, 0x35, 0x19, 0x18, 0x71, 0x15, 0xc5, 0x63, 0x42, 0x8a, 0xc6, 0xda,
815	0xff, 0x12, 0xa5, 0xaf, 0xb4, 0x16, 0xa3, 0x68, 0x71, 0x7c, 0x80, 0xb6, 0xbc, 0x94, 0x73, 0x88,
816	0xbd, 0xa9, 0xeb, 0x31, 0x1f, 0xe6, 0x2f, 0xde, 0x72, 0xaa, 0x39, 0xd2, 0x67, 0x3e, 0xec, 0x3d,
817	0x44, 0x68, 0x9e, 0x29, 0xae, 0xa3, 0xe2, 0x2b, 0xc8, 0xc7, 0x5d, 0xfd, 0xc4, 0xbb, 0x68, 0x7d,
818	0x42, 0xc2, 0xbc, 0x64, 0x8e, 0x39, 0x74, 0xad, 0x87, 0x05, 0xe5, 0x39, 0x8f, 0xbe, 0x8a, 0x67,
819	0xf3, 0x9f, 0x22, 0xda, 0x5a, 0x1a, 0xc3, 0x77, 0xfb, 0x65, 0xe9, 0x7e, 0x5d, 0xb9, 0xc4, 0xc2,
820	0x3a, 0x5a, 0xba, 0x84, 0x5a, 0x48, 0x8c, 0xd3, 0x80, 0xc6, 0x24, 0x74, 0x13, 0x4e, 0x3d, 0xd0,
821	0x7b, 0xd8, 0xca, 0x16, 0x52, 0x0e, 0x9d, 0x28, 0x44, 0xa9, 0xfa, 0x54, 0x24, 0x21, 0x99, 0x66,
822	0xd4, 0xb5, 0x39, 0xb5, 0x9a, 0x21, 0x86, 0x19, 0xa3, 0x8a, 0x90, 0xcc, 0x7b, 0xe5, 0x0a, 0x49,
823	0xa4, 0xf9, 0xb7, 0xac, 0xad, 0xf4, 0xba, 0xb3, 0x3b, 0x2e, 0x3e, 0xf2, 0x53, 0x25, 0x78, 0xaa,
824	0xf4, 0xb2, 0xb5, 0x2a, 0x66, 0x06, 0x7c, 0x07, 0x6d, 0x5e, 0xa6, 0x24, 0x96, 0x54, 0x4e, 0x75,
825	0xbf, 0xd6, 0x0d, 0x65, 0x66, 0xc4, 0x1d, 0x84, 0xc9, 0x84, 0xd0, 0x90, 0x8c, 0x43, 0x70, 0x67,
826	0xd4, 0x8d, 0x39, 0xf5, 0xd6, 0x0c, 0x7e, 0x91, 0xfb, 0x78, 0x68, 0x9b, 0x4a, 0x88, 0x16, 0xd7,
827	0xe8, 0xe6, 0x7b, 0xaf, 0xd1, 0x9a, 0x92, 0x9c, 0x6f, 0xd1, 0xc3, 0x5f, 0x2c, 0xf4, 0xa5, 0xc7,
828	0xa2, 0x9b, 0x2b, 0x9e, 0x14, 0x7e, 0xfc, 0x29, 0x23, 0x07, 0x2c, 0x24, 0x71, 0xd0, 0x62, 0x3c,
829	0x68, 0x07, 0x10, 0xeb, 0x6f, 0x90, 0xb6, 0x81, 0x48, 0x42, 0xc5, 0x0d, 0xbe, 0x3f, 0xbf, 0xb9,
830	0x0e, 0xfc, 0xd5, 0x5a, 0x77, 0xec, 0x7e, 0x6f, 0xf0, 0x9b, 0x75, 0xf7, 0x7b, 0x13, 0xa7, 0xaf,
831	0x93, 0x72, 0x96, 0xb8, 0xb6, 0x49, 0xea, 0xec, 0xde, 0xa1, 0x12, 0xfa, 0x3b, 0xe7, 0xbe, 0xd4,
832	0xdc, 0x97, 0xd7, 0x71, 0x5f, 0x9e, 0x99, 0xa0, 0xff, 0x5a, 0x5f, 0x18, 0x6e, 0xb7, 0xab, 0xc9,
833	0xdd, 0xee, 0x75, 0xec, 0x6e, 0x37, 0xa3, 0x8f, 0x4b, 0xfa, 0x62, 0xf7, 0xff, 0x0b, 0x00, 0x00,
834	0xff, 0xff, 0x47, 0x3f, 0x66, 0xd8, 0x18, 0x0c, 0x00, 0x00,
835}
836