1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package recommendationengine provides access to the Recommendations AI (Beta).
8//
9// For product documentation, see: https://cloud.google.com/recommendations-ai/docs
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/recommendationengine/v1beta1"
16//   ...
17//   ctx := context.Background()
18//   recommendationengineService, err := recommendationengine.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   recommendationengineService, err := recommendationengine.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   recommendationengineService, err := recommendationengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package recommendationengine // import "google.golang.org/api/recommendationengine/v1beta1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "recommendationengine:v1beta1"
75const apiName = "recommendationengine"
76const apiVersion = "v1beta1"
77const basePath = "https://recommendationengine.googleapis.com/"
78const mtlsBasePath = "https://recommendationengine.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// See, edit, configure, and delete your Google Cloud data and see the
83	// email address for your Google Account.
84	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
85)
86
87// NewService creates a new Service.
88func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
89	scopesOption := option.WithScopes(
90		"https://www.googleapis.com/auth/cloud-platform",
91	)
92	// NOTE: prepend, so we don't override user-specified scopes.
93	opts = append([]option.ClientOption{scopesOption}, opts...)
94	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
95	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
96	client, endpoint, err := htransport.NewClient(ctx, opts...)
97	if err != nil {
98		return nil, err
99	}
100	s, err := New(client)
101	if err != nil {
102		return nil, err
103	}
104	if endpoint != "" {
105		s.BasePath = endpoint
106	}
107	return s, nil
108}
109
110// New creates a new Service. It uses the provided http.Client for requests.
111//
112// Deprecated: please use NewService instead.
113// To provide a custom HTTP client, use option.WithHTTPClient.
114// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
115func New(client *http.Client) (*Service, error) {
116	if client == nil {
117		return nil, errors.New("client is nil")
118	}
119	s := &Service{client: client, BasePath: basePath}
120	s.Projects = NewProjectsService(s)
121	return s, nil
122}
123
124type Service struct {
125	client    *http.Client
126	BasePath  string // API endpoint base URL
127	UserAgent string // optional additional User-Agent fragment
128
129	Projects *ProjectsService
130}
131
132func (s *Service) userAgent() string {
133	if s.UserAgent == "" {
134		return googleapi.UserAgent
135	}
136	return googleapi.UserAgent + " " + s.UserAgent
137}
138
139func NewProjectsService(s *Service) *ProjectsService {
140	rs := &ProjectsService{s: s}
141	rs.Locations = NewProjectsLocationsService(s)
142	return rs
143}
144
145type ProjectsService struct {
146	s *Service
147
148	Locations *ProjectsLocationsService
149}
150
151func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
152	rs := &ProjectsLocationsService{s: s}
153	rs.Catalogs = NewProjectsLocationsCatalogsService(s)
154	return rs
155}
156
157type ProjectsLocationsService struct {
158	s *Service
159
160	Catalogs *ProjectsLocationsCatalogsService
161}
162
163func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsService {
164	rs := &ProjectsLocationsCatalogsService{s: s}
165	rs.CatalogItems = NewProjectsLocationsCatalogsCatalogItemsService(s)
166	rs.EventStores = NewProjectsLocationsCatalogsEventStoresService(s)
167	rs.Operations = NewProjectsLocationsCatalogsOperationsService(s)
168	return rs
169}
170
171type ProjectsLocationsCatalogsService struct {
172	s *Service
173
174	CatalogItems *ProjectsLocationsCatalogsCatalogItemsService
175
176	EventStores *ProjectsLocationsCatalogsEventStoresService
177
178	Operations *ProjectsLocationsCatalogsOperationsService
179}
180
181func NewProjectsLocationsCatalogsCatalogItemsService(s *Service) *ProjectsLocationsCatalogsCatalogItemsService {
182	rs := &ProjectsLocationsCatalogsCatalogItemsService{s: s}
183	return rs
184}
185
186type ProjectsLocationsCatalogsCatalogItemsService struct {
187	s *Service
188}
189
190func NewProjectsLocationsCatalogsEventStoresService(s *Service) *ProjectsLocationsCatalogsEventStoresService {
191	rs := &ProjectsLocationsCatalogsEventStoresService{s: s}
192	rs.Operations = NewProjectsLocationsCatalogsEventStoresOperationsService(s)
193	rs.Placements = NewProjectsLocationsCatalogsEventStoresPlacementsService(s)
194	rs.PredictionApiKeyRegistrations = NewProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService(s)
195	rs.UserEvents = NewProjectsLocationsCatalogsEventStoresUserEventsService(s)
196	return rs
197}
198
199type ProjectsLocationsCatalogsEventStoresService struct {
200	s *Service
201
202	Operations *ProjectsLocationsCatalogsEventStoresOperationsService
203
204	Placements *ProjectsLocationsCatalogsEventStoresPlacementsService
205
206	PredictionApiKeyRegistrations *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService
207
208	UserEvents *ProjectsLocationsCatalogsEventStoresUserEventsService
209}
210
211func NewProjectsLocationsCatalogsEventStoresOperationsService(s *Service) *ProjectsLocationsCatalogsEventStoresOperationsService {
212	rs := &ProjectsLocationsCatalogsEventStoresOperationsService{s: s}
213	return rs
214}
215
216type ProjectsLocationsCatalogsEventStoresOperationsService struct {
217	s *Service
218}
219
220func NewProjectsLocationsCatalogsEventStoresPlacementsService(s *Service) *ProjectsLocationsCatalogsEventStoresPlacementsService {
221	rs := &ProjectsLocationsCatalogsEventStoresPlacementsService{s: s}
222	return rs
223}
224
225type ProjectsLocationsCatalogsEventStoresPlacementsService struct {
226	s *Service
227}
228
229func NewProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService(s *Service) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService {
230	rs := &ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService{s: s}
231	return rs
232}
233
234type ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService struct {
235	s *Service
236}
237
238func NewProjectsLocationsCatalogsEventStoresUserEventsService(s *Service) *ProjectsLocationsCatalogsEventStoresUserEventsService {
239	rs := &ProjectsLocationsCatalogsEventStoresUserEventsService{s: s}
240	return rs
241}
242
243type ProjectsLocationsCatalogsEventStoresUserEventsService struct {
244	s *Service
245}
246
247func NewProjectsLocationsCatalogsOperationsService(s *Service) *ProjectsLocationsCatalogsOperationsService {
248	rs := &ProjectsLocationsCatalogsOperationsService{s: s}
249	return rs
250}
251
252type ProjectsLocationsCatalogsOperationsService struct {
253	s *Service
254}
255
256// GoogleApiHttpBody: Message that represents an arbitrary HTTP body. It
257// should only be used for payload formats that can't be represented as
258// JSON, such as raw binary or an HTML page. This message can be used
259// both in streaming and non-streaming API methods in the request as
260// well as the response. It can be used as a top-level request field,
261// which is convenient if one wants to extract parameters from either
262// the URL or HTTP template into the request fields and also want access
263// to the raw HTTP body. Example: message GetResourceRequest { // A
264// unique request id. string request_id = 1; // The raw HTTP body is
265// bound to this field. google.api.HttpBody http_body = 2; } service
266// ResourceService { rpc GetResource(GetResourceRequest) returns
267// (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody)
268// returns (google.protobuf.Empty); } Example with streaming methods:
269// service CaldavService { rpc GetCalendar(stream google.api.HttpBody)
270// returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
271// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of
272// this type only changes how the request and response bodies are
273// handled, all other features will continue to work unchanged.
274type GoogleApiHttpBody struct {
275	// ContentType: The HTTP Content-Type header value specifying the
276	// content type of the body.
277	ContentType string `json:"contentType,omitempty"`
278
279	// Data: The HTTP request/response body as raw binary.
280	Data string `json:"data,omitempty"`
281
282	// Extensions: Application specific response metadata. Must be set in
283	// the first response for streaming APIs.
284	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
285
286	// ServerResponse contains the HTTP response code and headers from the
287	// server.
288	googleapi.ServerResponse `json:"-"`
289
290	// ForceSendFields is a list of field names (e.g. "ContentType") to
291	// unconditionally include in API requests. By default, fields with
292	// empty or default values are omitted from API requests. However, any
293	// non-pointer, non-interface field appearing in ForceSendFields will be
294	// sent to the server regardless of whether the field is empty or not.
295	// This may be used to include empty fields in Patch requests.
296	ForceSendFields []string `json:"-"`
297
298	// NullFields is a list of field names (e.g. "ContentType") to include
299	// in API requests with the JSON null value. By default, fields with
300	// empty values are omitted from API requests. However, any field with
301	// an empty value appearing in NullFields will be sent to the server as
302	// null. It is an error if a field in this list has a non-empty value.
303	// This may be used to include null fields in Patch requests.
304	NullFields []string `json:"-"`
305}
306
307func (s *GoogleApiHttpBody) MarshalJSON() ([]byte, error) {
308	type NoMethod GoogleApiHttpBody
309	raw := NoMethod(*s)
310	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
311}
312
313// GoogleCloudRecommendationengineV1alphaRejoinCatalogMetadata: Metadata
314// for TriggerCatalogRejoin method.
315type GoogleCloudRecommendationengineV1alphaRejoinCatalogMetadata struct {
316}
317
318// GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse: Response
319// message for TriggerCatalogRejoin method.
320type GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse struct {
321	// RejoinedUserEventsCount: Number of user events that were joined with
322	// latest catalog items.
323	RejoinedUserEventsCount int64 `json:"rejoinedUserEventsCount,omitempty,string"`
324
325	// ForceSendFields is a list of field names (e.g.
326	// "RejoinedUserEventsCount") to unconditionally include in API
327	// requests. By default, fields with empty or default values are omitted
328	// from API requests. However, any non-pointer, non-interface field
329	// appearing in ForceSendFields will be sent to the server regardless of
330	// whether the field is empty or not. This may be used to include empty
331	// fields in Patch requests.
332	ForceSendFields []string `json:"-"`
333
334	// NullFields is a list of field names (e.g. "RejoinedUserEventsCount")
335	// to include in API requests with the JSON null value. By default,
336	// fields with empty values are omitted from API requests. However, any
337	// field with an empty value appearing in NullFields will be sent to the
338	// server as null. It is an error if a field in this list has a
339	// non-empty value. This may be used to include null fields in Patch
340	// requests.
341	NullFields []string `json:"-"`
342}
343
344func (s *GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse) MarshalJSON() ([]byte, error) {
345	type NoMethod GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse
346	raw := NoMethod(*s)
347	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
348}
349
350// GoogleCloudRecommendationengineV1alphaTuningMetadata: Metadata
351// associated with a tune operation.
352type GoogleCloudRecommendationengineV1alphaTuningMetadata struct {
353	// RecommendationModel: The resource name of the recommendation model
354	// that this tune applies to. Format:
355	// projects/{project_number}/locations/{location_id}/catalogs/{catalog_id
356	// }/eventStores/{event_store_id}/recommendationModels/{recommendation_mo
357	// del_id}
358	RecommendationModel string `json:"recommendationModel,omitempty"`
359
360	// ForceSendFields is a list of field names (e.g. "RecommendationModel")
361	// to unconditionally include in API requests. By default, fields with
362	// empty or default values are omitted from API requests. However, any
363	// non-pointer, non-interface field appearing in ForceSendFields will be
364	// sent to the server regardless of whether the field is empty or not.
365	// This may be used to include empty fields in Patch requests.
366	ForceSendFields []string `json:"-"`
367
368	// NullFields is a list of field names (e.g. "RecommendationModel") to
369	// include in API requests with the JSON null value. By default, fields
370	// with empty values are omitted from API requests. However, any field
371	// with an empty value appearing in NullFields will be sent to the
372	// server as null. It is an error if a field in this list has a
373	// non-empty value. This may be used to include null fields in Patch
374	// requests.
375	NullFields []string `json:"-"`
376}
377
378func (s *GoogleCloudRecommendationengineV1alphaTuningMetadata) MarshalJSON() ([]byte, error) {
379	type NoMethod GoogleCloudRecommendationengineV1alphaTuningMetadata
380	raw := NoMethod(*s)
381	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
382}
383
384// GoogleCloudRecommendationengineV1alphaTuningResponse: Response
385// associated with a tune operation.
386type GoogleCloudRecommendationengineV1alphaTuningResponse struct {
387}
388
389// GoogleCloudRecommendationengineV1beta1BigQuerySource: BigQuery source
390// import data from.
391type GoogleCloudRecommendationengineV1beta1BigQuerySource struct {
392	// DataSchema: Optional. The schema to use when parsing the data from
393	// the source. Supported values for catalog imports: 1:
394	// "catalog_recommendations_ai" using
395	// https://cloud.google.com/recommendations-ai/docs/upload-catalog#json
396	// (Default for catalogItems.import) 2: "catalog_merchant_center" using
397	// https://cloud.google.com/recommendations-ai/docs/upload-catalog#mc
398	// Supported values for user event imports: 1:
399	// "user_events_recommendations_ai" using
400	// https://cloud.google.com/recommendations-ai/docs/manage-user-events#import
401	// (Default for userEvents.import) 2. "user_events_ga360" using
402	// https://support.google.com/analytics/answer/3437719?hl=en
403	DataSchema string `json:"dataSchema,omitempty"`
404
405	// DatasetId: Required. The BigQuery data set to copy the data from.
406	DatasetId string `json:"datasetId,omitempty"`
407
408	// GcsStagingDir: Optional. Intermediate Cloud Storage directory used
409	// for the import. Can be specified if one wants to have the BigQuery
410	// export to a specific Cloud Storage directory.
411	GcsStagingDir string `json:"gcsStagingDir,omitempty"`
412
413	// ProjectId: Optional. The project id (can be project # or id) that the
414	// BigQuery source is in. If not specified, inherits the project id from
415	// the parent request.
416	ProjectId string `json:"projectId,omitempty"`
417
418	// TableId: Required. The BigQuery table to copy the data from.
419	TableId string `json:"tableId,omitempty"`
420
421	// ForceSendFields is a list of field names (e.g. "DataSchema") to
422	// unconditionally include in API requests. By default, fields with
423	// empty or default values are omitted from API requests. However, any
424	// non-pointer, non-interface field appearing in ForceSendFields will be
425	// sent to the server regardless of whether the field is empty or not.
426	// This may be used to include empty fields in Patch requests.
427	ForceSendFields []string `json:"-"`
428
429	// NullFields is a list of field names (e.g. "DataSchema") to include in
430	// API requests with the JSON null value. By default, fields with empty
431	// values are omitted from API requests. However, any field with an
432	// empty value appearing in NullFields will be sent to the server as
433	// null. It is an error if a field in this list has a non-empty value.
434	// This may be used to include null fields in Patch requests.
435	NullFields []string `json:"-"`
436}
437
438func (s *GoogleCloudRecommendationengineV1beta1BigQuerySource) MarshalJSON() ([]byte, error) {
439	type NoMethod GoogleCloudRecommendationengineV1beta1BigQuerySource
440	raw := NoMethod(*s)
441	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
442}
443
444// GoogleCloudRecommendationengineV1beta1Catalog: The catalog
445// configuration. Next ID: 5.
446type GoogleCloudRecommendationengineV1beta1Catalog struct {
447	// CatalogItemLevelConfig: Required. The catalog item level
448	// configuration.
449	CatalogItemLevelConfig *GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig `json:"catalogItemLevelConfig,omitempty"`
450
451	// DefaultEventStoreId: Required. The ID of the default event store.
452	DefaultEventStoreId string `json:"defaultEventStoreId,omitempty"`
453
454	// DisplayName: Required. The catalog display name.
455	DisplayName string `json:"displayName,omitempty"`
456
457	// Name: The fully qualified resource name of the catalog.
458	Name string `json:"name,omitempty"`
459
460	// ServerResponse contains the HTTP response code and headers from the
461	// server.
462	googleapi.ServerResponse `json:"-"`
463
464	// ForceSendFields is a list of field names (e.g.
465	// "CatalogItemLevelConfig") to unconditionally include in API requests.
466	// By default, fields with empty or default values are omitted from API
467	// requests. However, any non-pointer, non-interface field appearing in
468	// ForceSendFields will be sent to the server regardless of whether the
469	// field is empty or not. This may be used to include empty fields in
470	// Patch requests.
471	ForceSendFields []string `json:"-"`
472
473	// NullFields is a list of field names (e.g. "CatalogItemLevelConfig")
474	// to include in API requests with the JSON null value. By default,
475	// fields with empty values are omitted from API requests. However, any
476	// field with an empty value appearing in NullFields will be sent to the
477	// server as null. It is an error if a field in this list has a
478	// non-empty value. This may be used to include null fields in Patch
479	// requests.
480	NullFields []string `json:"-"`
481}
482
483func (s *GoogleCloudRecommendationengineV1beta1Catalog) MarshalJSON() ([]byte, error) {
484	type NoMethod GoogleCloudRecommendationengineV1beta1Catalog
485	raw := NoMethod(*s)
486	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
487}
488
489// GoogleCloudRecommendationengineV1beta1CatalogInlineSource: The inline
490// source for the input config for ImportCatalogItems method.
491type GoogleCloudRecommendationengineV1beta1CatalogInlineSource struct {
492	// CatalogItems: Optional. A list of catalog items to update/create.
493	// Recommended max of 10k items.
494	CatalogItems []*GoogleCloudRecommendationengineV1beta1CatalogItem `json:"catalogItems,omitempty"`
495
496	// ForceSendFields is a list of field names (e.g. "CatalogItems") to
497	// unconditionally include in API requests. By default, fields with
498	// empty or default values are omitted from API requests. However, any
499	// non-pointer, non-interface field appearing in ForceSendFields will be
500	// sent to the server regardless of whether the field is empty or not.
501	// This may be used to include empty fields in Patch requests.
502	ForceSendFields []string `json:"-"`
503
504	// NullFields is a list of field names (e.g. "CatalogItems") to include
505	// in API requests with the JSON null value. By default, fields with
506	// empty values are omitted from API requests. However, any field with
507	// an empty value appearing in NullFields will be sent to the server as
508	// null. It is an error if a field in this list has a non-empty value.
509	// This may be used to include null fields in Patch requests.
510	NullFields []string `json:"-"`
511}
512
513func (s *GoogleCloudRecommendationengineV1beta1CatalogInlineSource) MarshalJSON() ([]byte, error) {
514	type NoMethod GoogleCloudRecommendationengineV1beta1CatalogInlineSource
515	raw := NoMethod(*s)
516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
517}
518
519// GoogleCloudRecommendationengineV1beta1CatalogItem: CatalogItem
520// captures all metadata information of items to be recommended.
521type GoogleCloudRecommendationengineV1beta1CatalogItem struct {
522	// CategoryHierarchies: Required. Catalog item categories. This field is
523	// repeated for supporting one catalog item belonging to several
524	// parallel category hierarchies. For example, if a shoes product
525	// belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports &
526	// Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented
527	// as: "categoryHierarchies": [ { "categories": ["Shoes & Accessories",
528	// "Shoes"]}, { "categories": ["Sports & Fitness", "Athletic Clothing",
529	// "Shoes"] } ]
530	CategoryHierarchies []*GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy `json:"categoryHierarchies,omitempty"`
531
532	// Description: Optional. Catalog item description. UTF-8 encoded string
533	// with a length limit of 5 KiB.
534	Description string `json:"description,omitempty"`
535
536	// Id: Required. Catalog item identifier. UTF-8 encoded string with a
537	// length limit of 128 bytes. This id must be unique among all catalog
538	// items within the same catalog. It should also be used when logging
539	// user events in order for the user events to be joined with the
540	// Catalog.
541	Id string `json:"id,omitempty"`
542
543	// ItemAttributes: Optional. Highly encouraged. Extra catalog item
544	// attributes to be included in the recommendation model. For example,
545	// for retail products, this could include the store name, vendor,
546	// style, color, etc. These are very strong signals for recommendation
547	// model, thus we highly recommend providing the item attributes here.
548	ItemAttributes *GoogleCloudRecommendationengineV1beta1FeatureMap `json:"itemAttributes,omitempty"`
549
550	// ItemGroupId: Optional. Variant group identifier for prediction
551	// results. UTF-8 encoded string with a length limit of 128 bytes. This
552	// field must be enabled before it can be used. Learn more
553	// (/recommendations-ai/docs/catalog#item-group-id).
554	ItemGroupId string `json:"itemGroupId,omitempty"`
555
556	// LanguageCode: Optional. Deprecated. The model automatically detects
557	// the text language. Your catalog can include text in different
558	// languages, but duplicating catalog items to provide text in multiple
559	// languages can result in degraded model performance.
560	LanguageCode string `json:"languageCode,omitempty"`
561
562	// ProductMetadata: Optional. Metadata specific to retail products.
563	ProductMetadata *GoogleCloudRecommendationengineV1beta1ProductCatalogItem `json:"productMetadata,omitempty"`
564
565	// Tags: Optional. Filtering tags associated with the catalog item. Each
566	// tag should be a UTF-8 encoded string with a length limit of 1 KiB.
567	// This tag can be used for filtering recommendation results by passing
568	// the tag as part of the predict request filter.
569	Tags []string `json:"tags,omitempty"`
570
571	// Title: Required. Catalog item title. UTF-8 encoded string with a
572	// length limit of 1 KiB.
573	Title string `json:"title,omitempty"`
574
575	// ServerResponse contains the HTTP response code and headers from the
576	// server.
577	googleapi.ServerResponse `json:"-"`
578
579	// ForceSendFields is a list of field names (e.g. "CategoryHierarchies")
580	// to unconditionally include in API requests. By default, fields with
581	// empty or default values are omitted from API requests. However, any
582	// non-pointer, non-interface field appearing in ForceSendFields will be
583	// sent to the server regardless of whether the field is empty or not.
584	// This may be used to include empty fields in Patch requests.
585	ForceSendFields []string `json:"-"`
586
587	// NullFields is a list of field names (e.g. "CategoryHierarchies") to
588	// include in API requests with the JSON null value. By default, fields
589	// with empty values are omitted from API requests. However, any field
590	// with an empty value appearing in NullFields will be sent to the
591	// server as null. It is an error if a field in this list has a
592	// non-empty value. This may be used to include null fields in Patch
593	// requests.
594	NullFields []string `json:"-"`
595}
596
597func (s *GoogleCloudRecommendationengineV1beta1CatalogItem) MarshalJSON() ([]byte, error) {
598	type NoMethod GoogleCloudRecommendationengineV1beta1CatalogItem
599	raw := NoMethod(*s)
600	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
601}
602
603// GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy:
604// Category represents catalog item category hierarchy.
605type GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy struct {
606	// Categories: Required. Catalog item categories. Each category should
607	// be a UTF-8 encoded string with a length limit of 2 KiB. Note that the
608	// order in the list denotes the specificity (from least to most
609	// specific).
610	Categories []string `json:"categories,omitempty"`
611
612	// ForceSendFields is a list of field names (e.g. "Categories") to
613	// unconditionally include in API requests. By default, fields with
614	// empty or default values are omitted from API requests. However, any
615	// non-pointer, non-interface field appearing in ForceSendFields will be
616	// sent to the server regardless of whether the field is empty or not.
617	// This may be used to include empty fields in Patch requests.
618	ForceSendFields []string `json:"-"`
619
620	// NullFields is a list of field names (e.g. "Categories") to include in
621	// API requests with the JSON null value. By default, fields with empty
622	// values are omitted from API requests. However, any field with an
623	// empty value appearing in NullFields will be sent to the server as
624	// null. It is an error if a field in this list has a non-empty value.
625	// This may be used to include null fields in Patch requests.
626	NullFields []string `json:"-"`
627}
628
629func (s *GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy) MarshalJSON() ([]byte, error) {
630	type NoMethod GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy
631	raw := NoMethod(*s)
632	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
633}
634
635// GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig:
636// Configures the catalog level that users send events to, and the level
637// at which predictions are made.
638type GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig struct {
639	// EventItemLevel: Optional. Level of the catalog at which events are
640	// uploaded. See
641	// https://cloud.google.com/recommendations-ai/docs/catalog#catalog-levels
642	// for more details.
643	//
644	// Possible values:
645	//   "CATALOG_ITEM_LEVEL_UNSPECIFIED" - Unknown value - should never be
646	// used.
647	//   "VARIANT" - Catalog items are at variant level.
648	//   "MASTER" - Catalog items are at master level.
649	EventItemLevel string `json:"eventItemLevel,omitempty"`
650
651	// PredictItemLevel: Optional. Level of the catalog at which predictions
652	// are made. See
653	// https://cloud.google.com/recommendations-ai/docs/catalog#catalog-levels
654	// for more details.
655	//
656	// Possible values:
657	//   "CATALOG_ITEM_LEVEL_UNSPECIFIED" - Unknown value - should never be
658	// used.
659	//   "VARIANT" - Catalog items are at variant level.
660	//   "MASTER" - Catalog items are at master level.
661	PredictItemLevel string `json:"predictItemLevel,omitempty"`
662
663	// ForceSendFields is a list of field names (e.g. "EventItemLevel") to
664	// unconditionally include in API requests. By default, fields with
665	// empty or default values are omitted from API requests. However, any
666	// non-pointer, non-interface field appearing in ForceSendFields will be
667	// sent to the server regardless of whether the field is empty or not.
668	// This may be used to include empty fields in Patch requests.
669	ForceSendFields []string `json:"-"`
670
671	// NullFields is a list of field names (e.g. "EventItemLevel") to
672	// include in API requests with the JSON null value. By default, fields
673	// with empty values are omitted from API requests. However, any field
674	// with an empty value appearing in NullFields will be sent to the
675	// server as null. It is an error if a field in this list has a
676	// non-empty value. This may be used to include null fields in Patch
677	// requests.
678	NullFields []string `json:"-"`
679}
680
681func (s *GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig) MarshalJSON() ([]byte, error) {
682	type NoMethod GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig
683	raw := NoMethod(*s)
684	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
685}
686
687// GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrati
688// onRequest: Request message for the
689// `CreatePredictionApiKeyRegistration` method.
690type GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest struct {
691	// PredictionApiKeyRegistration: Required. The prediction API key
692	// registration.
693	PredictionApiKeyRegistration *GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration `json:"predictionApiKeyRegistration,omitempty"`
694
695	// ForceSendFields is a list of field names (e.g.
696	// "PredictionApiKeyRegistration") to unconditionally include in API
697	// requests. By default, fields with empty or default values are omitted
698	// from API requests. However, any non-pointer, non-interface field
699	// appearing in ForceSendFields will be sent to the server regardless of
700	// whether the field is empty or not. This may be used to include empty
701	// fields in Patch requests.
702	ForceSendFields []string `json:"-"`
703
704	// NullFields is a list of field names (e.g.
705	// "PredictionApiKeyRegistration") to include in API requests with the
706	// JSON null value. By default, fields with empty values are omitted
707	// from API requests. However, any field with an empty value appearing
708	// in NullFields will be sent to the server as null. It is an error if a
709	// field in this list has a non-empty value. This may be used to include
710	// null fields in Patch requests.
711	NullFields []string `json:"-"`
712}
713
714func (s *GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest) MarshalJSON() ([]byte, error) {
715	type NoMethod GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest
716	raw := NoMethod(*s)
717	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
718}
719
720// GoogleCloudRecommendationengineV1beta1EventDetail: User event details
721// shared by all recommendation types.
722type GoogleCloudRecommendationengineV1beta1EventDetail struct {
723	// EventAttributes: Optional. Extra user event features to include in
724	// the recommendation model. For product recommendation, an example of
725	// extra user information is traffic_channel, i.e. how user arrives at
726	// the site. Users can arrive at the site by coming to the site
727	// directly, or coming through Google search, and etc.
728	EventAttributes *GoogleCloudRecommendationengineV1beta1FeatureMap `json:"eventAttributes,omitempty"`
729
730	// ExperimentIds: Optional. A list of identifiers for the independent
731	// experiment groups this user event belongs to. This is used to
732	// distinguish between user events associated with different experiment
733	// setups (e.g. using Recommendation Engine system, using different
734	// recommendation models).
735	ExperimentIds []string `json:"experimentIds,omitempty"`
736
737	// PageViewId: Optional. A unique id of a web page view. This should be
738	// kept the same for all user events triggered from the same pageview.
739	// For example, an item detail page view could trigger multiple events
740	// as the user is browsing the page. The `pageViewId` property should be
741	// kept the same for all these events so that they can be grouped
742	// together properly. This `pageViewId` will be automatically generated
743	// if using the JavaScript pixel.
744	PageViewId string `json:"pageViewId,omitempty"`
745
746	// RecommendationToken: Optional. Recommendation token included in the
747	// recommendation prediction response. This field enables accurate
748	// attribution of recommendation model performance. This token enables
749	// us to accurately attribute page view or purchase back to the event
750	// and the particular predict response containing this clicked/purchased
751	// item. If user clicks on product K in the recommendation results, pass
752	// the `PredictResponse.recommendationToken` property as a url parameter
753	// to product K's page. When recording events on product K's page, log
754	// the PredictResponse.recommendation_token to this field. Optional, but
755	// highly encouraged for user events that are the result of a
756	// recommendation prediction query.
757	RecommendationToken string `json:"recommendationToken,omitempty"`
758
759	// ReferrerUri: Optional. The referrer url of the current page. When
760	// using the JavaScript pixel, this value is filled in automatically.
761	ReferrerUri string `json:"referrerUri,omitempty"`
762
763	// Uri: Optional. Complete url (window.location.href) of the user's
764	// current page. When using the JavaScript pixel, this value is filled
765	// in automatically. Maximum length 5KB.
766	Uri string `json:"uri,omitempty"`
767
768	// ForceSendFields is a list of field names (e.g. "EventAttributes") to
769	// unconditionally include in API requests. By default, fields with
770	// empty or default values are omitted from API requests. However, any
771	// non-pointer, non-interface field appearing in ForceSendFields will be
772	// sent to the server regardless of whether the field is empty or not.
773	// This may be used to include empty fields in Patch requests.
774	ForceSendFields []string `json:"-"`
775
776	// NullFields is a list of field names (e.g. "EventAttributes") to
777	// include in API requests with the JSON null value. By default, fields
778	// with empty values are omitted from API requests. However, any field
779	// with an empty value appearing in NullFields will be sent to the
780	// server as null. It is an error if a field in this list has a
781	// non-empty value. This may be used to include null fields in Patch
782	// requests.
783	NullFields []string `json:"-"`
784}
785
786func (s *GoogleCloudRecommendationengineV1beta1EventDetail) MarshalJSON() ([]byte, error) {
787	type NoMethod GoogleCloudRecommendationengineV1beta1EventDetail
788	raw := NoMethod(*s)
789	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
790}
791
792// GoogleCloudRecommendationengineV1beta1FeatureMap: FeatureMap
793// represents extra features that customers want to include in the
794// recommendation model for catalogs/user events as
795// categorical/numerical features.
796type GoogleCloudRecommendationengineV1beta1FeatureMap struct {
797	// CategoricalFeatures: Categorical features that can take on one of a
798	// limited number of possible values. Some examples would be the
799	// brand/maker of a product, or country of a customer. Feature names and
800	// values must be UTF-8 encoded strings. For example: `{ "colors":
801	// {"value": ["yellow", "green"]}, "sizes": {"value":["S", "M"]}`
802	CategoricalFeatures map[string]GoogleCloudRecommendationengineV1beta1FeatureMapStringList `json:"categoricalFeatures,omitempty"`
803
804	// NumericalFeatures: Numerical features. Some examples would be the
805	// height/weight of a product, or age of a customer. Feature names must
806	// be UTF-8 encoded strings. For example: `{ "lengths_cm":
807	// {"value":[2.3, 15.4]}, "heights_cm": {"value":[8.1, 6.4]} }`
808	NumericalFeatures map[string]GoogleCloudRecommendationengineV1beta1FeatureMapFloatList `json:"numericalFeatures,omitempty"`
809
810	// ForceSendFields is a list of field names (e.g. "CategoricalFeatures")
811	// to unconditionally include in API requests. By default, fields with
812	// empty or default values are omitted from API requests. However, any
813	// non-pointer, non-interface field appearing in ForceSendFields will be
814	// sent to the server regardless of whether the field is empty or not.
815	// This may be used to include empty fields in Patch requests.
816	ForceSendFields []string `json:"-"`
817
818	// NullFields is a list of field names (e.g. "CategoricalFeatures") to
819	// include in API requests with the JSON null value. By default, fields
820	// with empty values are omitted from API requests. However, any field
821	// with an empty value appearing in NullFields will be sent to the
822	// server as null. It is an error if a field in this list has a
823	// non-empty value. This may be used to include null fields in Patch
824	// requests.
825	NullFields []string `json:"-"`
826}
827
828func (s *GoogleCloudRecommendationengineV1beta1FeatureMap) MarshalJSON() ([]byte, error) {
829	type NoMethod GoogleCloudRecommendationengineV1beta1FeatureMap
830	raw := NoMethod(*s)
831	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
832}
833
834// GoogleCloudRecommendationengineV1beta1FeatureMapFloatList: A list of
835// float features.
836type GoogleCloudRecommendationengineV1beta1FeatureMapFloatList struct {
837	// Value: Float feature value.
838	Value []float64 `json:"value,omitempty"`
839
840	// ForceSendFields is a list of field names (e.g. "Value") to
841	// unconditionally include in API requests. By default, fields with
842	// empty or default values are omitted from API requests. However, any
843	// non-pointer, non-interface field appearing in ForceSendFields will be
844	// sent to the server regardless of whether the field is empty or not.
845	// This may be used to include empty fields in Patch requests.
846	ForceSendFields []string `json:"-"`
847
848	// NullFields is a list of field names (e.g. "Value") to include in API
849	// requests with the JSON null value. By default, fields with empty
850	// values are omitted from API requests. However, any field with an
851	// empty value appearing in NullFields will be sent to the server as
852	// null. It is an error if a field in this list has a non-empty value.
853	// This may be used to include null fields in Patch requests.
854	NullFields []string `json:"-"`
855}
856
857func (s *GoogleCloudRecommendationengineV1beta1FeatureMapFloatList) MarshalJSON() ([]byte, error) {
858	type NoMethod GoogleCloudRecommendationengineV1beta1FeatureMapFloatList
859	raw := NoMethod(*s)
860	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
861}
862
863// GoogleCloudRecommendationengineV1beta1FeatureMapStringList: A list of
864// string features.
865type GoogleCloudRecommendationengineV1beta1FeatureMapStringList struct {
866	// Value: String feature value with a length limit of 128 bytes.
867	Value []string `json:"value,omitempty"`
868
869	// ForceSendFields is a list of field names (e.g. "Value") to
870	// unconditionally include in API requests. By default, fields with
871	// empty or default values are omitted from API requests. However, any
872	// non-pointer, non-interface field appearing in ForceSendFields will be
873	// sent to the server regardless of whether the field is empty or not.
874	// This may be used to include empty fields in Patch requests.
875	ForceSendFields []string `json:"-"`
876
877	// NullFields is a list of field names (e.g. "Value") to include in API
878	// requests with the JSON null value. By default, fields with empty
879	// values are omitted from API requests. However, any field with an
880	// empty value appearing in NullFields will be sent to the server as
881	// null. It is an error if a field in this list has a non-empty value.
882	// This may be used to include null fields in Patch requests.
883	NullFields []string `json:"-"`
884}
885
886func (s *GoogleCloudRecommendationengineV1beta1FeatureMapStringList) MarshalJSON() ([]byte, error) {
887	type NoMethod GoogleCloudRecommendationengineV1beta1FeatureMapStringList
888	raw := NoMethod(*s)
889	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
890}
891
892// GoogleCloudRecommendationengineV1beta1GcsSource: Google Cloud Storage
893// location for input content. format.
894type GoogleCloudRecommendationengineV1beta1GcsSource struct {
895	// InputUris: Required. Google Cloud Storage URIs to input files. URI
896	// can be up to 2000 characters long. URIs can match the full object
897	// path (for example, `gs://bucket/directory/object.json`) or a pattern
898	// matching one or more files, such as `gs://bucket/directory/*.json`. A
899	// request can contain at most 100 files, and each file can be up to 2
900	// GB. See Importing catalog information
901	// (/recommendations-ai/docs/upload-catalog) for the expected file
902	// format and setup instructions.
903	InputUris []string `json:"inputUris,omitempty"`
904
905	// JsonSchema: Optional. The schema to use when parsing the data from
906	// the source. Supported values for catalog imports: 1:
907	// "catalog_recommendations_ai" using
908	// https://cloud.google.com/recommendations-ai/docs/upload-catalog#json
909	// (Default for catalogItems.import) 2: "catalog_merchant_center" using
910	// https://cloud.google.com/recommendations-ai/docs/upload-catalog#mc
911	// Supported values for user events imports: 1:
912	// "user_events_recommendations_ai" using
913	// https://cloud.google.com/recommendations-ai/docs/manage-user-events#import
914	// (Default for userEvents.import) 2. "user_events_ga360" using
915	// https://support.google.com/analytics/answer/3437719?hl=en
916	JsonSchema string `json:"jsonSchema,omitempty"`
917
918	// ForceSendFields is a list of field names (e.g. "InputUris") to
919	// unconditionally include in API requests. By default, fields with
920	// empty or default values are omitted from API requests. However, any
921	// non-pointer, non-interface field appearing in ForceSendFields will be
922	// sent to the server regardless of whether the field is empty or not.
923	// This may be used to include empty fields in Patch requests.
924	ForceSendFields []string `json:"-"`
925
926	// NullFields is a list of field names (e.g. "InputUris") to include in
927	// API requests with the JSON null value. By default, fields with empty
928	// values are omitted from API requests. However, any field with an
929	// empty value appearing in NullFields will be sent to the server as
930	// null. It is an error if a field in this list has a non-empty value.
931	// This may be used to include null fields in Patch requests.
932	NullFields []string `json:"-"`
933}
934
935func (s *GoogleCloudRecommendationengineV1beta1GcsSource) MarshalJSON() ([]byte, error) {
936	type NoMethod GoogleCloudRecommendationengineV1beta1GcsSource
937	raw := NoMethod(*s)
938	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
939}
940
941// GoogleCloudRecommendationengineV1beta1Image: Catalog item
942// thumbnail/detail image.
943type GoogleCloudRecommendationengineV1beta1Image struct {
944	// Height: Optional. Height of the image in number of pixels.
945	Height int64 `json:"height,omitempty"`
946
947	// Uri: Required. URL of the image with a length limit of 5 KiB.
948	Uri string `json:"uri,omitempty"`
949
950	// Width: Optional. Width of the image in number of pixels.
951	Width int64 `json:"width,omitempty"`
952
953	// ForceSendFields is a list of field names (e.g. "Height") to
954	// unconditionally include in API requests. By default, fields with
955	// empty or default values are omitted from API requests. However, any
956	// non-pointer, non-interface field appearing in ForceSendFields will be
957	// sent to the server regardless of whether the field is empty or not.
958	// This may be used to include empty fields in Patch requests.
959	ForceSendFields []string `json:"-"`
960
961	// NullFields is a list of field names (e.g. "Height") to include in API
962	// requests with the JSON null value. By default, fields with empty
963	// values are omitted from API requests. However, any field with an
964	// empty value appearing in NullFields will be sent to the server as
965	// null. It is an error if a field in this list has a non-empty value.
966	// This may be used to include null fields in Patch requests.
967	NullFields []string `json:"-"`
968}
969
970func (s *GoogleCloudRecommendationengineV1beta1Image) MarshalJSON() ([]byte, error) {
971	type NoMethod GoogleCloudRecommendationengineV1beta1Image
972	raw := NoMethod(*s)
973	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
974}
975
976// GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest:
977// Request message for Import methods.
978type GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest struct {
979	// ErrorsConfig: Optional. The desired location of errors incurred
980	// during the Import.
981	ErrorsConfig *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig `json:"errorsConfig,omitempty"`
982
983	// InputConfig: Required. The desired input location of the data.
984	InputConfig *GoogleCloudRecommendationengineV1beta1InputConfig `json:"inputConfig,omitempty"`
985
986	// RequestId: Optional. Unique identifier provided by client, within the
987	// ancestor dataset scope. Ensures idempotency and used for request
988	// deduplication. Server-generated if unspecified. Up to 128 characters
989	// long. This is returned as google.longrunning.Operation.name in the
990	// response.
991	RequestId string `json:"requestId,omitempty"`
992
993	// UpdateMask: Optional. Indicates which fields in the provided imported
994	// 'items' to update. If not set, will by default update all fields.
995	UpdateMask string `json:"updateMask,omitempty"`
996
997	// ForceSendFields is a list of field names (e.g. "ErrorsConfig") to
998	// unconditionally include in API requests. By default, fields with
999	// empty or default values are omitted from API requests. However, any
1000	// non-pointer, non-interface field appearing in ForceSendFields will be
1001	// sent to the server regardless of whether the field is empty or not.
1002	// This may be used to include empty fields in Patch requests.
1003	ForceSendFields []string `json:"-"`
1004
1005	// NullFields is a list of field names (e.g. "ErrorsConfig") to include
1006	// in API requests with the JSON null value. By default, fields with
1007	// empty values are omitted from API requests. However, any field with
1008	// an empty value appearing in NullFields will be sent to the server as
1009	// null. It is an error if a field in this list has a non-empty value.
1010	// This may be used to include null fields in Patch requests.
1011	NullFields []string `json:"-"`
1012}
1013
1014func (s *GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest) MarshalJSON() ([]byte, error) {
1015	type NoMethod GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest
1016	raw := NoMethod(*s)
1017	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1018}
1019
1020// GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse:
1021// Response of the ImportCatalogItemsRequest. If the long running
1022// operation is done, then this message is returned by the
1023// google.longrunning.Operations.response field if the operation was
1024// successful.
1025type GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse struct {
1026	// ErrorSamples: A sample of errors encountered while processing the
1027	// request.
1028	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
1029
1030	// ErrorsConfig: Echoes the destination for the complete errors in the
1031	// request if set.
1032	ErrorsConfig *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig `json:"errorsConfig,omitempty"`
1033
1034	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
1035	// unconditionally include in API requests. By default, fields with
1036	// empty or default values are omitted from API requests. However, any
1037	// non-pointer, non-interface field appearing in ForceSendFields will be
1038	// sent to the server regardless of whether the field is empty or not.
1039	// This may be used to include empty fields in Patch requests.
1040	ForceSendFields []string `json:"-"`
1041
1042	// NullFields is a list of field names (e.g. "ErrorSamples") to include
1043	// in API requests with the JSON null value. By default, fields with
1044	// empty values are omitted from API requests. However, any field with
1045	// an empty value appearing in NullFields will be sent to the server as
1046	// null. It is an error if a field in this list has a non-empty value.
1047	// This may be used to include null fields in Patch requests.
1048	NullFields []string `json:"-"`
1049}
1050
1051func (s *GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse) MarshalJSON() ([]byte, error) {
1052	type NoMethod GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse
1053	raw := NoMethod(*s)
1054	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1055}
1056
1057// GoogleCloudRecommendationengineV1beta1ImportErrorsConfig:
1058// Configuration of destination for Import related errors.
1059type GoogleCloudRecommendationengineV1beta1ImportErrorsConfig struct {
1060	// GcsPrefix: Google Cloud Storage path for import errors. This must be
1061	// an empty, existing Cloud Storage bucket. Import errors will be
1062	// written to a file in this bucket, one per line, as a JSON-encoded
1063	// `google.rpc.Status` message.
1064	GcsPrefix string `json:"gcsPrefix,omitempty"`
1065
1066	// ForceSendFields is a list of field names (e.g. "GcsPrefix") to
1067	// unconditionally include in API requests. By default, fields with
1068	// empty or default values are omitted from API requests. However, any
1069	// non-pointer, non-interface field appearing in ForceSendFields will be
1070	// sent to the server regardless of whether the field is empty or not.
1071	// This may be used to include empty fields in Patch requests.
1072	ForceSendFields []string `json:"-"`
1073
1074	// NullFields is a list of field names (e.g. "GcsPrefix") to include in
1075	// API requests with the JSON null value. By default, fields with empty
1076	// values are omitted from API requests. However, any field with an
1077	// empty value appearing in NullFields will be sent to the server as
1078	// null. It is an error if a field in this list has a non-empty value.
1079	// This may be used to include null fields in Patch requests.
1080	NullFields []string `json:"-"`
1081}
1082
1083func (s *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig) MarshalJSON() ([]byte, error) {
1084	type NoMethod GoogleCloudRecommendationengineV1beta1ImportErrorsConfig
1085	raw := NoMethod(*s)
1086	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1087}
1088
1089// GoogleCloudRecommendationengineV1beta1ImportMetadata: Metadata
1090// related to the progress of the Import operation. This will be
1091// returned by the google.longrunning.Operation.metadata field.
1092type GoogleCloudRecommendationengineV1beta1ImportMetadata struct {
1093	// CreateTime: Operation create time.
1094	CreateTime string `json:"createTime,omitempty"`
1095
1096	// FailureCount: Count of entries that encountered errors while
1097	// processing.
1098	FailureCount int64 `json:"failureCount,omitempty,string"`
1099
1100	// OperationName: Name of the operation.
1101	OperationName string `json:"operationName,omitempty"`
1102
1103	// RequestId: Id of the request / operation. This is parroting back the
1104	// requestId that was passed in the request.
1105	RequestId string `json:"requestId,omitempty"`
1106
1107	// SuccessCount: Count of entries that were processed successfully.
1108	SuccessCount int64 `json:"successCount,omitempty,string"`
1109
1110	// UpdateTime: Operation last update time. If the operation is done,
1111	// this is also the finish time.
1112	UpdateTime string `json:"updateTime,omitempty"`
1113
1114	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1115	// unconditionally include in API requests. By default, fields with
1116	// empty or default values are omitted from API requests. However, any
1117	// non-pointer, non-interface field appearing in ForceSendFields will be
1118	// sent to the server regardless of whether the field is empty or not.
1119	// This may be used to include empty fields in Patch requests.
1120	ForceSendFields []string `json:"-"`
1121
1122	// NullFields is a list of field names (e.g. "CreateTime") to include in
1123	// API requests with the JSON null value. By default, fields with empty
1124	// values are omitted from API requests. However, any field with an
1125	// empty value appearing in NullFields will be sent to the server as
1126	// null. It is an error if a field in this list has a non-empty value.
1127	// This may be used to include null fields in Patch requests.
1128	NullFields []string `json:"-"`
1129}
1130
1131func (s *GoogleCloudRecommendationengineV1beta1ImportMetadata) MarshalJSON() ([]byte, error) {
1132	type NoMethod GoogleCloudRecommendationengineV1beta1ImportMetadata
1133	raw := NoMethod(*s)
1134	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1135}
1136
1137// GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest:
1138// Request message for the ImportUserEvents request.
1139type GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest struct {
1140	// ErrorsConfig: Optional. The desired location of errors incurred
1141	// during the Import.
1142	ErrorsConfig *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig `json:"errorsConfig,omitempty"`
1143
1144	// InputConfig: Required. The desired input location of the data.
1145	InputConfig *GoogleCloudRecommendationengineV1beta1InputConfig `json:"inputConfig,omitempty"`
1146
1147	// RequestId: Optional. Unique identifier provided by client, within the
1148	// ancestor dataset scope. Ensures idempotency for expensive long
1149	// running operations. Server-generated if unspecified. Up to 128
1150	// characters long. This is returned as
1151	// google.longrunning.Operation.name in the response. Note that this
1152	// field must not be set if the desired input config is
1153	// catalog_inline_source.
1154	RequestId string `json:"requestId,omitempty"`
1155
1156	// ForceSendFields is a list of field names (e.g. "ErrorsConfig") to
1157	// unconditionally include in API requests. By default, fields with
1158	// empty or default values are omitted from API requests. However, any
1159	// non-pointer, non-interface field appearing in ForceSendFields will be
1160	// sent to the server regardless of whether the field is empty or not.
1161	// This may be used to include empty fields in Patch requests.
1162	ForceSendFields []string `json:"-"`
1163
1164	// NullFields is a list of field names (e.g. "ErrorsConfig") to include
1165	// in API requests with the JSON null value. By default, fields with
1166	// empty values are omitted from API requests. However, any field with
1167	// an empty value appearing in NullFields will be sent to the server as
1168	// null. It is an error if a field in this list has a non-empty value.
1169	// This may be used to include null fields in Patch requests.
1170	NullFields []string `json:"-"`
1171}
1172
1173func (s *GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest) MarshalJSON() ([]byte, error) {
1174	type NoMethod GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest
1175	raw := NoMethod(*s)
1176	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1177}
1178
1179// GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse:
1180// Response of the ImportUserEventsRequest. If the long running
1181// operation was successful, then this message is returned by the
1182// google.longrunning.Operations.response field if the operation was
1183// successful.
1184type GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse struct {
1185	// ErrorSamples: A sample of errors encountered while processing the
1186	// request.
1187	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
1188
1189	// ErrorsConfig: Echoes the destination for the complete errors if this
1190	// field was set in the request.
1191	ErrorsConfig *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig `json:"errorsConfig,omitempty"`
1192
1193	// ImportSummary: Aggregated statistics of user event import status.
1194	ImportSummary *GoogleCloudRecommendationengineV1beta1UserEventImportSummary `json:"importSummary,omitempty"`
1195
1196	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
1197	// unconditionally include in API requests. By default, fields with
1198	// empty or default values are omitted from API requests. However, any
1199	// non-pointer, non-interface field appearing in ForceSendFields will be
1200	// sent to the server regardless of whether the field is empty or not.
1201	// This may be used to include empty fields in Patch requests.
1202	ForceSendFields []string `json:"-"`
1203
1204	// NullFields is a list of field names (e.g. "ErrorSamples") to include
1205	// in API requests with the JSON null value. By default, fields with
1206	// empty values are omitted from API requests. However, any field with
1207	// an empty value appearing in NullFields will be sent to the server as
1208	// null. It is an error if a field in this list has a non-empty value.
1209	// This may be used to include null fields in Patch requests.
1210	NullFields []string `json:"-"`
1211}
1212
1213func (s *GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse) MarshalJSON() ([]byte, error) {
1214	type NoMethod GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse
1215	raw := NoMethod(*s)
1216	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1217}
1218
1219// GoogleCloudRecommendationengineV1beta1InputConfig: The input config
1220// source.
1221type GoogleCloudRecommendationengineV1beta1InputConfig struct {
1222	// BigQuerySource: BigQuery input source.
1223	BigQuerySource *GoogleCloudRecommendationengineV1beta1BigQuerySource `json:"bigQuerySource,omitempty"`
1224
1225	// CatalogInlineSource: The Inline source for the input content for
1226	// Catalog items.
1227	CatalogInlineSource *GoogleCloudRecommendationengineV1beta1CatalogInlineSource `json:"catalogInlineSource,omitempty"`
1228
1229	// GcsSource: Google Cloud Storage location for the input content.
1230	GcsSource *GoogleCloudRecommendationengineV1beta1GcsSource `json:"gcsSource,omitempty"`
1231
1232	// UserEventInlineSource: The Inline source for the input content for
1233	// UserEvents.
1234	UserEventInlineSource *GoogleCloudRecommendationengineV1beta1UserEventInlineSource `json:"userEventInlineSource,omitempty"`
1235
1236	// ForceSendFields is a list of field names (e.g. "BigQuerySource") to
1237	// unconditionally include in API requests. By default, fields with
1238	// empty or default values are omitted from API requests. However, any
1239	// non-pointer, non-interface field appearing in ForceSendFields will be
1240	// sent to the server regardless of whether the field is empty or not.
1241	// This may be used to include empty fields in Patch requests.
1242	ForceSendFields []string `json:"-"`
1243
1244	// NullFields is a list of field names (e.g. "BigQuerySource") to
1245	// include in API requests with the JSON null value. By default, fields
1246	// with empty values are omitted from API requests. However, any field
1247	// with an empty value appearing in NullFields will be sent to the
1248	// server as null. It is an error if a field in this list has a
1249	// non-empty value. This may be used to include null fields in Patch
1250	// requests.
1251	NullFields []string `json:"-"`
1252}
1253
1254func (s *GoogleCloudRecommendationengineV1beta1InputConfig) MarshalJSON() ([]byte, error) {
1255	type NoMethod GoogleCloudRecommendationengineV1beta1InputConfig
1256	raw := NoMethod(*s)
1257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1258}
1259
1260// GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse:
1261// Response message for ListCatalogItems method.
1262type GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse struct {
1263	// CatalogItems: The catalog items.
1264	CatalogItems []*GoogleCloudRecommendationengineV1beta1CatalogItem `json:"catalogItems,omitempty"`
1265
1266	// NextPageToken: If empty, the list is complete. If nonempty, the token
1267	// to pass to the next request's ListCatalogItemRequest.page_token.
1268	NextPageToken string `json:"nextPageToken,omitempty"`
1269
1270	// ServerResponse contains the HTTP response code and headers from the
1271	// server.
1272	googleapi.ServerResponse `json:"-"`
1273
1274	// ForceSendFields is a list of field names (e.g. "CatalogItems") to
1275	// unconditionally include in API requests. By default, fields with
1276	// empty or default values are omitted from API requests. However, any
1277	// non-pointer, non-interface field appearing in ForceSendFields will be
1278	// sent to the server regardless of whether the field is empty or not.
1279	// This may be used to include empty fields in Patch requests.
1280	ForceSendFields []string `json:"-"`
1281
1282	// NullFields is a list of field names (e.g. "CatalogItems") to include
1283	// in API requests with the JSON null value. By default, fields with
1284	// empty values are omitted from API requests. However, any field with
1285	// an empty value appearing in NullFields will be sent to the server as
1286	// null. It is an error if a field in this list has a non-empty value.
1287	// This may be used to include null fields in Patch requests.
1288	NullFields []string `json:"-"`
1289}
1290
1291func (s *GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse) MarshalJSON() ([]byte, error) {
1292	type NoMethod GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse
1293	raw := NoMethod(*s)
1294	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1295}
1296
1297// GoogleCloudRecommendationengineV1beta1ListCatalogsResponse: Response
1298// for ListCatalogs method.
1299type GoogleCloudRecommendationengineV1beta1ListCatalogsResponse struct {
1300	// Catalogs: Output only. All the customer's catalogs.
1301	Catalogs []*GoogleCloudRecommendationengineV1beta1Catalog `json:"catalogs,omitempty"`
1302
1303	// NextPageToken: Pagination token, if not returned indicates the last
1304	// page.
1305	NextPageToken string `json:"nextPageToken,omitempty"`
1306
1307	// ServerResponse contains the HTTP response code and headers from the
1308	// server.
1309	googleapi.ServerResponse `json:"-"`
1310
1311	// ForceSendFields is a list of field names (e.g. "Catalogs") to
1312	// unconditionally include in API requests. By default, fields with
1313	// empty or default values are omitted from API requests. However, any
1314	// non-pointer, non-interface field appearing in ForceSendFields will be
1315	// sent to the server regardless of whether the field is empty or not.
1316	// This may be used to include empty fields in Patch requests.
1317	ForceSendFields []string `json:"-"`
1318
1319	// NullFields is a list of field names (e.g. "Catalogs") to include in
1320	// API requests with the JSON null value. By default, fields with empty
1321	// values are omitted from API requests. However, any field with an
1322	// empty value appearing in NullFields will be sent to the server as
1323	// null. It is an error if a field in this list has a non-empty value.
1324	// This may be used to include null fields in Patch requests.
1325	NullFields []string `json:"-"`
1326}
1327
1328func (s *GoogleCloudRecommendationengineV1beta1ListCatalogsResponse) MarshalJSON() ([]byte, error) {
1329	type NoMethod GoogleCloudRecommendationengineV1beta1ListCatalogsResponse
1330	raw := NoMethod(*s)
1331	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1332}
1333
1334// GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistration
1335// sResponse: Response message for the
1336// `ListPredictionApiKeyRegistrations`.
1337type GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse struct {
1338	// NextPageToken: If empty, the list is complete. If nonempty, pass the
1339	// token to the next request's
1340	// `ListPredictionApiKeysRegistrationsRequest.pageToken`.
1341	NextPageToken string `json:"nextPageToken,omitempty"`
1342
1343	// PredictionApiKeyRegistrations: The list of registered API keys.
1344	PredictionApiKeyRegistrations []*GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration `json:"predictionApiKeyRegistrations,omitempty"`
1345
1346	// ServerResponse contains the HTTP response code and headers from the
1347	// server.
1348	googleapi.ServerResponse `json:"-"`
1349
1350	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1351	// unconditionally include in API requests. By default, fields with
1352	// empty or default values are omitted from API requests. However, any
1353	// non-pointer, non-interface field appearing in ForceSendFields will be
1354	// sent to the server regardless of whether the field is empty or not.
1355	// This may be used to include empty fields in Patch requests.
1356	ForceSendFields []string `json:"-"`
1357
1358	// NullFields is a list of field names (e.g. "NextPageToken") to include
1359	// in API requests with the JSON null value. By default, fields with
1360	// empty values are omitted from API requests. However, any field with
1361	// an empty value appearing in NullFields will be sent to the server as
1362	// null. It is an error if a field in this list has a non-empty value.
1363	// This may be used to include null fields in Patch requests.
1364	NullFields []string `json:"-"`
1365}
1366
1367func (s *GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse) MarshalJSON() ([]byte, error) {
1368	type NoMethod GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse
1369	raw := NoMethod(*s)
1370	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1371}
1372
1373// GoogleCloudRecommendationengineV1beta1ListUserEventsResponse:
1374// Response message for ListUserEvents method.
1375type GoogleCloudRecommendationengineV1beta1ListUserEventsResponse struct {
1376	// NextPageToken: If empty, the list is complete. If nonempty, the token
1377	// to pass to the next request's ListUserEvents.page_token.
1378	NextPageToken string `json:"nextPageToken,omitempty"`
1379
1380	// UserEvents: The user events.
1381	UserEvents []*GoogleCloudRecommendationengineV1beta1UserEvent `json:"userEvents,omitempty"`
1382
1383	// ServerResponse contains the HTTP response code and headers from the
1384	// server.
1385	googleapi.ServerResponse `json:"-"`
1386
1387	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1388	// unconditionally include in API requests. By default, fields with
1389	// empty or default values are omitted from API requests. However, any
1390	// non-pointer, non-interface field appearing in ForceSendFields will be
1391	// sent to the server regardless of whether the field is empty or not.
1392	// This may be used to include empty fields in Patch requests.
1393	ForceSendFields []string `json:"-"`
1394
1395	// NullFields is a list of field names (e.g. "NextPageToken") to include
1396	// in API requests with the JSON null value. By default, fields with
1397	// empty values are omitted from API requests. However, any field with
1398	// an empty value appearing in NullFields will be sent to the server as
1399	// null. It is an error if a field in this list has a non-empty value.
1400	// This may be used to include null fields in Patch requests.
1401	NullFields []string `json:"-"`
1402}
1403
1404func (s *GoogleCloudRecommendationengineV1beta1ListUserEventsResponse) MarshalJSON() ([]byte, error) {
1405	type NoMethod GoogleCloudRecommendationengineV1beta1ListUserEventsResponse
1406	raw := NoMethod(*s)
1407	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1408}
1409
1410// GoogleCloudRecommendationengineV1beta1PredictRequest: Request message
1411// for Predict method.
1412type GoogleCloudRecommendationengineV1beta1PredictRequest struct {
1413	// DryRun: Optional. Use dryRun mode for this prediction query. If set
1414	// to true, a fake model will be used that returns arbitrary catalog
1415	// items. Note that the dryRun mode should only be used for testing the
1416	// API, or if the model is not ready.
1417	DryRun bool `json:"dryRun,omitempty"`
1418
1419	// Filter: Optional. Filter for restricting prediction results. Accepts
1420	// values for tags and the `filterOutOfStockItems` flag. * Tag
1421	// expressions. Restricts predictions to items that match all of the
1422	// specified tags. Boolean operators `OR` and `NOT` are supported if the
1423	// expression is enclosed in parentheses, and must be separated from the
1424	// tag values by a space. `-"tagA" is also supported and is equivalent
1425	// to `NOT "tagA". Tag values must be double quoted UTF-8 encoded
1426	// strings with a size limit of 1 KiB. * filterOutOfStockItems.
1427	// Restricts predictions to items that do not have a stockState value of
1428	// OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival"
1429	// tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional")
1430	// * filterOutOfStockItems If your filter blocks all prediction results,
1431	// nothing will be returned. If you want generic (unfiltered) popular
1432	// items to be returned instead, set `strictFiltering` to false in
1433	// `PredictRequest.params`.
1434	Filter string `json:"filter,omitempty"`
1435
1436	// Labels: Optional. The labels for the predict request. * Label keys
1437	// can contain lowercase letters, digits and hyphens, must start with a
1438	// letter, and must end with a letter or digit. * Non-zero label values
1439	// can contain lowercase letters, digits and hyphens, must start with a
1440	// letter, and must end with a letter or digit. * No more than 64 labels
1441	// can be associated with a given request. See https://goo.gl/xmQnxf for
1442	// more information on and examples of labels.
1443	Labels map[string]string `json:"labels,omitempty"`
1444
1445	// PageSize: Optional. Maximum number of results to return per page. Set
1446	// this property to the number of prediction results required. If zero,
1447	// the service will choose a reasonable default.
1448	PageSize int64 `json:"pageSize,omitempty"`
1449
1450	// PageToken: Optional. The previous PredictResponse.next_page_token.
1451	PageToken string `json:"pageToken,omitempty"`
1452
1453	// Params: Optional. Additional domain specific parameters for the
1454	// predictions. Allowed values: * `returnCatalogItem`: Boolean. If set
1455	// to true, the associated catalogItem object will be returned in the
1456	// `PredictResponse.PredictionResult.itemMetadata` object in the method
1457	// response. * `returnItemScore`: Boolean. If set to true, the
1458	// prediction 'score' corresponding to each returned item will be set in
1459	// the `metadata` field in the prediction response. The given 'score'
1460	// indicates the probability of an item being clicked/purchased given
1461	// the user's context and history. * `strictFiltering`: Boolean. True by
1462	// default. If set to false, the service will return generic
1463	// (unfiltered) popular items instead of empty if your filter blocks all
1464	// prediction results. * `priceRerankLevel`: String. Default empty. If
1465	// set to be non-empty, then it needs to be one of
1466	// {'no-price-reranking', 'low-price-reranking',
1467	// 'medium-price-reranking', 'high-price-reranking'}. This gives request
1468	// level control and adjust prediction results based on product price. *
1469	// `diversityLevel`: String. Default empty. If set to be non-empty, then
1470	// it needs to be one of {'no-diversity', 'low-diversity',
1471	// 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives
1472	// request level control and adjust prediction results based on product
1473	// category.
1474	Params googleapi.RawMessage `json:"params,omitempty"`
1475
1476	// UserEvent: Required. Context about the user, what they are looking at
1477	// and what action they took to trigger the predict request. Note that
1478	// this user event detail won't be ingested to userEvent logs. Thus, a
1479	// separate userEvent write request is required for event logging.
1480	UserEvent *GoogleCloudRecommendationengineV1beta1UserEvent `json:"userEvent,omitempty"`
1481
1482	// ForceSendFields is a list of field names (e.g. "DryRun") to
1483	// unconditionally include in API requests. By default, fields with
1484	// empty or default values are omitted from API requests. However, any
1485	// non-pointer, non-interface field appearing in ForceSendFields will be
1486	// sent to the server regardless of whether the field is empty or not.
1487	// This may be used to include empty fields in Patch requests.
1488	ForceSendFields []string `json:"-"`
1489
1490	// NullFields is a list of field names (e.g. "DryRun") to include in API
1491	// requests with the JSON null value. By default, fields with empty
1492	// values are omitted from API requests. However, any field with an
1493	// empty value appearing in NullFields will be sent to the server as
1494	// null. It is an error if a field in this list has a non-empty value.
1495	// This may be used to include null fields in Patch requests.
1496	NullFields []string `json:"-"`
1497}
1498
1499func (s *GoogleCloudRecommendationengineV1beta1PredictRequest) MarshalJSON() ([]byte, error) {
1500	type NoMethod GoogleCloudRecommendationengineV1beta1PredictRequest
1501	raw := NoMethod(*s)
1502	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1503}
1504
1505// GoogleCloudRecommendationengineV1beta1PredictResponse: Response
1506// message for predict method.
1507type GoogleCloudRecommendationengineV1beta1PredictResponse struct {
1508	// DryRun: True if the dryRun property was set in the request.
1509	DryRun bool `json:"dryRun,omitempty"`
1510
1511	// ItemsMissingInCatalog: IDs of items in the request that were missing
1512	// from the catalog.
1513	ItemsMissingInCatalog []string `json:"itemsMissingInCatalog,omitempty"`
1514
1515	// Metadata: Additional domain specific prediction response metadata.
1516	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1517
1518	// NextPageToken: If empty, the list is complete. If nonempty, the token
1519	// to pass to the next request's PredictRequest.page_token.
1520	NextPageToken string `json:"nextPageToken,omitempty"`
1521
1522	// RecommendationToken: A unique recommendation token. This should be
1523	// included in the user event logs resulting from this recommendation,
1524	// which enables accurate attribution of recommendation model
1525	// performance.
1526	RecommendationToken string `json:"recommendationToken,omitempty"`
1527
1528	// Results: A list of recommended items. The order represents the
1529	// ranking (from the most relevant item to the least).
1530	Results []*GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult `json:"results,omitempty"`
1531
1532	// ServerResponse contains the HTTP response code and headers from the
1533	// server.
1534	googleapi.ServerResponse `json:"-"`
1535
1536	// ForceSendFields is a list of field names (e.g. "DryRun") to
1537	// unconditionally include in API requests. By default, fields with
1538	// empty or default values are omitted from API requests. However, any
1539	// non-pointer, non-interface field appearing in ForceSendFields will be
1540	// sent to the server regardless of whether the field is empty or not.
1541	// This may be used to include empty fields in Patch requests.
1542	ForceSendFields []string `json:"-"`
1543
1544	// NullFields is a list of field names (e.g. "DryRun") to include in API
1545	// requests with the JSON null value. By default, fields with empty
1546	// values are omitted from API requests. However, any field with an
1547	// empty value appearing in NullFields will be sent to the server as
1548	// null. It is an error if a field in this list has a non-empty value.
1549	// This may be used to include null fields in Patch requests.
1550	NullFields []string `json:"-"`
1551}
1552
1553func (s *GoogleCloudRecommendationengineV1beta1PredictResponse) MarshalJSON() ([]byte, error) {
1554	type NoMethod GoogleCloudRecommendationengineV1beta1PredictResponse
1555	raw := NoMethod(*s)
1556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1557}
1558
1559// GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult:
1560//  PredictionResult represents the recommendation prediction results.
1561type GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult struct {
1562	// Id: ID of the recommended catalog item
1563	Id string `json:"id,omitempty"`
1564
1565	// ItemMetadata: Additional item metadata / annotations. Possible
1566	// values: * `catalogItem`: JSON representation of the catalogItem. Will
1567	// be set if `returnCatalogItem` is set to true in
1568	// `PredictRequest.params`. * `score`: Prediction score in double value.
1569	// Will be set if `returnItemScore` is set to true in
1570	// `PredictRequest.params`.
1571	ItemMetadata googleapi.RawMessage `json:"itemMetadata,omitempty"`
1572
1573	// ForceSendFields is a list of field names (e.g. "Id") to
1574	// unconditionally include in API requests. By default, fields with
1575	// empty or default values are omitted from API requests. However, any
1576	// non-pointer, non-interface field appearing in ForceSendFields will be
1577	// sent to the server regardless of whether the field is empty or not.
1578	// This may be used to include empty fields in Patch requests.
1579	ForceSendFields []string `json:"-"`
1580
1581	// NullFields is a list of field names (e.g. "Id") to include in API
1582	// requests with the JSON null value. By default, fields with empty
1583	// values are omitted from API requests. However, any field with an
1584	// empty value appearing in NullFields will be sent to the server as
1585	// null. It is an error if a field in this list has a non-empty value.
1586	// This may be used to include null fields in Patch requests.
1587	NullFields []string `json:"-"`
1588}
1589
1590func (s *GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult) MarshalJSON() ([]byte, error) {
1591	type NoMethod GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult
1592	raw := NoMethod(*s)
1593	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1594}
1595
1596// GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration:
1597// Registered Api Key.
1598type GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration struct {
1599	// ApiKey: The API key.
1600	ApiKey string `json:"apiKey,omitempty"`
1601
1602	// ServerResponse contains the HTTP response code and headers from the
1603	// server.
1604	googleapi.ServerResponse `json:"-"`
1605
1606	// ForceSendFields is a list of field names (e.g. "ApiKey") to
1607	// unconditionally include in API requests. By default, fields with
1608	// empty or default values are omitted from API requests. However, any
1609	// non-pointer, non-interface field appearing in ForceSendFields will be
1610	// sent to the server regardless of whether the field is empty or not.
1611	// This may be used to include empty fields in Patch requests.
1612	ForceSendFields []string `json:"-"`
1613
1614	// NullFields is a list of field names (e.g. "ApiKey") to include in API
1615	// requests with the JSON null value. By default, fields with empty
1616	// values are omitted from API requests. However, any field with an
1617	// empty value appearing in NullFields will be sent to the server as
1618	// null. It is an error if a field in this list has a non-empty value.
1619	// This may be used to include null fields in Patch requests.
1620	NullFields []string `json:"-"`
1621}
1622
1623func (s *GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration) MarshalJSON() ([]byte, error) {
1624	type NoMethod GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration
1625	raw := NoMethod(*s)
1626	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1627}
1628
1629// GoogleCloudRecommendationengineV1beta1ProductCatalogItem:
1630// ProductCatalogItem captures item metadata specific to retail
1631// products.
1632type GoogleCloudRecommendationengineV1beta1ProductCatalogItem struct {
1633	// AvailableQuantity: Optional. The available quantity of the item.
1634	AvailableQuantity int64 `json:"availableQuantity,omitempty,string"`
1635
1636	// CanonicalProductUri: Optional. Canonical URL directly linking to the
1637	// item detail page with a length limit of 5 KiB..
1638	CanonicalProductUri string `json:"canonicalProductUri,omitempty"`
1639
1640	// Costs: Optional. A map to pass the costs associated with the product.
1641	// For example: {"manufacturing": 45.5} The profit of selling this item
1642	// is computed like so: * If 'exactPrice' is provided, profit =
1643	// displayPrice - sum(costs) * If 'priceRange' is provided, profit =
1644	// minPrice - sum(costs)
1645	Costs map[string]float64 `json:"costs,omitempty"`
1646
1647	// CurrencyCode: Optional. Only required if the price is set. Currency
1648	// code for price/costs. Use three-character ISO-4217 code.
1649	CurrencyCode string `json:"currencyCode,omitempty"`
1650
1651	// ExactPrice: Optional. The exact product price.
1652	ExactPrice *GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice `json:"exactPrice,omitempty"`
1653
1654	// Images: Optional. Product images for the catalog item.
1655	Images []*GoogleCloudRecommendationengineV1beta1Image `json:"images,omitempty"`
1656
1657	// PriceRange: Optional. The product price range.
1658	PriceRange *GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange `json:"priceRange,omitempty"`
1659
1660	// StockState: Optional. Online stock state of the catalog item. Default
1661	// is `IN_STOCK`.
1662	//
1663	// Possible values:
1664	//   "STOCK_STATE_UNSPECIFIED" - Default item stock status. Should never
1665	// be used.
1666	//   "IN_STOCK" - Item in stock.
1667	//   "OUT_OF_STOCK" - Item out of stock.
1668	//   "PREORDER" - Item that is in pre-order state.
1669	//   "BACKORDER" - Item that is back-ordered (i.e. temporarily out of
1670	// stock).
1671	StockState string `json:"stockState,omitempty"`
1672
1673	// ForceSendFields is a list of field names (e.g. "AvailableQuantity")
1674	// to unconditionally include in API requests. By default, fields with
1675	// empty or default values are omitted from API requests. However, any
1676	// non-pointer, non-interface field appearing in ForceSendFields will be
1677	// sent to the server regardless of whether the field is empty or not.
1678	// This may be used to include empty fields in Patch requests.
1679	ForceSendFields []string `json:"-"`
1680
1681	// NullFields is a list of field names (e.g. "AvailableQuantity") to
1682	// include in API requests with the JSON null value. By default, fields
1683	// with empty values are omitted from API requests. However, any field
1684	// with an empty value appearing in NullFields will be sent to the
1685	// server as null. It is an error if a field in this list has a
1686	// non-empty value. This may be used to include null fields in Patch
1687	// requests.
1688	NullFields []string `json:"-"`
1689}
1690
1691func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItem) MarshalJSON() ([]byte, error) {
1692	type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItem
1693	raw := NoMethod(*s)
1694	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1695}
1696
1697// GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice:
1698// Exact product price.
1699type GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice struct {
1700	// DisplayPrice: Optional. Display price of the product.
1701	DisplayPrice float64 `json:"displayPrice,omitempty"`
1702
1703	// OriginalPrice: Optional. Price of the product without any discount.
1704	// If zero, by default set to be the 'displayPrice'.
1705	OriginalPrice float64 `json:"originalPrice,omitempty"`
1706
1707	// ForceSendFields is a list of field names (e.g. "DisplayPrice") to
1708	// unconditionally include in API requests. By default, fields with
1709	// empty or default values are omitted from API requests. However, any
1710	// non-pointer, non-interface field appearing in ForceSendFields will be
1711	// sent to the server regardless of whether the field is empty or not.
1712	// This may be used to include empty fields in Patch requests.
1713	ForceSendFields []string `json:"-"`
1714
1715	// NullFields is a list of field names (e.g. "DisplayPrice") to include
1716	// in API requests with the JSON null value. By default, fields with
1717	// empty values are omitted from API requests. However, any field with
1718	// an empty value appearing in NullFields will be sent to the server as
1719	// null. It is an error if a field in this list has a non-empty value.
1720	// This may be used to include null fields in Patch requests.
1721	NullFields []string `json:"-"`
1722}
1723
1724func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice) MarshalJSON() ([]byte, error) {
1725	type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice
1726	raw := NoMethod(*s)
1727	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1728}
1729
1730func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice) UnmarshalJSON(data []byte) error {
1731	type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice
1732	var s1 struct {
1733		DisplayPrice  gensupport.JSONFloat64 `json:"displayPrice"`
1734		OriginalPrice gensupport.JSONFloat64 `json:"originalPrice"`
1735		*NoMethod
1736	}
1737	s1.NoMethod = (*NoMethod)(s)
1738	if err := json.Unmarshal(data, &s1); err != nil {
1739		return err
1740	}
1741	s.DisplayPrice = float64(s1.DisplayPrice)
1742	s.OriginalPrice = float64(s1.OriginalPrice)
1743	return nil
1744}
1745
1746// GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange:
1747// Product price range when there are a range of prices for different
1748// variations of the same product.
1749type GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange struct {
1750	// Max: Required. The maximum product price.
1751	Max float64 `json:"max,omitempty"`
1752
1753	// Min: Required. The minimum product price.
1754	Min float64 `json:"min,omitempty"`
1755
1756	// ForceSendFields is a list of field names (e.g. "Max") to
1757	// unconditionally include in API requests. By default, fields with
1758	// empty or default values are omitted from API requests. However, any
1759	// non-pointer, non-interface field appearing in ForceSendFields will be
1760	// sent to the server regardless of whether the field is empty or not.
1761	// This may be used to include empty fields in Patch requests.
1762	ForceSendFields []string `json:"-"`
1763
1764	// NullFields is a list of field names (e.g. "Max") to include in API
1765	// requests with the JSON null value. By default, fields with empty
1766	// values are omitted from API requests. However, any field with an
1767	// empty value appearing in NullFields will be sent to the server as
1768	// null. It is an error if a field in this list has a non-empty value.
1769	// This may be used to include null fields in Patch requests.
1770	NullFields []string `json:"-"`
1771}
1772
1773func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange) MarshalJSON() ([]byte, error) {
1774	type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange
1775	raw := NoMethod(*s)
1776	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1777}
1778
1779func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange) UnmarshalJSON(data []byte) error {
1780	type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange
1781	var s1 struct {
1782		Max gensupport.JSONFloat64 `json:"max"`
1783		Min gensupport.JSONFloat64 `json:"min"`
1784		*NoMethod
1785	}
1786	s1.NoMethod = (*NoMethod)(s)
1787	if err := json.Unmarshal(data, &s1); err != nil {
1788		return err
1789	}
1790	s.Max = float64(s1.Max)
1791	s.Min = float64(s1.Min)
1792	return nil
1793}
1794
1795// GoogleCloudRecommendationengineV1beta1ProductDetail: Detailed product
1796// information associated with a user event.
1797type GoogleCloudRecommendationengineV1beta1ProductDetail struct {
1798	// AvailableQuantity: Optional. Quantity of the products in stock when a
1799	// user event happens. Optional. If provided, this overrides the
1800	// available quantity in Catalog for this event. and can only be set if
1801	// `stock_status` is set to `IN_STOCK`. Note that if an item is out of
1802	// stock, you must set the `stock_state` field to be `OUT_OF_STOCK`.
1803	// Leaving this field unspecified / as zero is not sufficient to mark
1804	// the item out of stock.
1805	AvailableQuantity int64 `json:"availableQuantity,omitempty"`
1806
1807	// CurrencyCode: Optional. Currency code for price/costs. Use
1808	// three-character ISO-4217 code. Required only if originalPrice or
1809	// displayPrice is set.
1810	CurrencyCode string `json:"currencyCode,omitempty"`
1811
1812	// DisplayPrice: Optional. Display price of the product (e.g. discounted
1813	// price). If provided, this will override the display price in Catalog
1814	// for this product.
1815	DisplayPrice float64 `json:"displayPrice,omitempty"`
1816
1817	// Id: Required. Catalog item ID. UTF-8 encoded string with a length
1818	// limit of 128 characters.
1819	Id string `json:"id,omitempty"`
1820
1821	// ItemAttributes: Optional. Extra features associated with a product in
1822	// the user event.
1823	ItemAttributes *GoogleCloudRecommendationengineV1beta1FeatureMap `json:"itemAttributes,omitempty"`
1824
1825	// OriginalPrice: Optional. Original price of the product. If provided,
1826	// this will override the original price in Catalog for this product.
1827	OriginalPrice float64 `json:"originalPrice,omitempty"`
1828
1829	// Quantity: Optional. Quantity of the product associated with the user
1830	// event. For example, this field will be 2 if two products are added to
1831	// the shopping cart for `add-to-cart` event. Required for
1832	// `add-to-cart`, `add-to-list`, `remove-from-cart`, `checkout-start`,
1833	// `purchase-complete`, `refund` event types.
1834	Quantity int64 `json:"quantity,omitempty"`
1835
1836	// StockState: Optional. Item stock state. If provided, this overrides
1837	// the stock state in Catalog for items in this event.
1838	//
1839	// Possible values:
1840	//   "STOCK_STATE_UNSPECIFIED" - Default item stock status. Should never
1841	// be used.
1842	//   "IN_STOCK" - Item in stock.
1843	//   "OUT_OF_STOCK" - Item out of stock.
1844	//   "PREORDER" - Item that is in pre-order state.
1845	//   "BACKORDER" - Item that is back-ordered (i.e. temporarily out of
1846	// stock).
1847	StockState string `json:"stockState,omitempty"`
1848
1849	// ForceSendFields is a list of field names (e.g. "AvailableQuantity")
1850	// to unconditionally include in API requests. By default, fields with
1851	// empty or default values are omitted from API requests. However, any
1852	// non-pointer, non-interface field appearing in ForceSendFields will be
1853	// sent to the server regardless of whether the field is empty or not.
1854	// This may be used to include empty fields in Patch requests.
1855	ForceSendFields []string `json:"-"`
1856
1857	// NullFields is a list of field names (e.g. "AvailableQuantity") to
1858	// include in API requests with the JSON null value. By default, fields
1859	// with empty values are omitted from API requests. However, any field
1860	// with an empty value appearing in NullFields will be sent to the
1861	// server as null. It is an error if a field in this list has a
1862	// non-empty value. This may be used to include null fields in Patch
1863	// requests.
1864	NullFields []string `json:"-"`
1865}
1866
1867func (s *GoogleCloudRecommendationengineV1beta1ProductDetail) MarshalJSON() ([]byte, error) {
1868	type NoMethod GoogleCloudRecommendationengineV1beta1ProductDetail
1869	raw := NoMethod(*s)
1870	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1871}
1872
1873func (s *GoogleCloudRecommendationengineV1beta1ProductDetail) UnmarshalJSON(data []byte) error {
1874	type NoMethod GoogleCloudRecommendationengineV1beta1ProductDetail
1875	var s1 struct {
1876		DisplayPrice  gensupport.JSONFloat64 `json:"displayPrice"`
1877		OriginalPrice gensupport.JSONFloat64 `json:"originalPrice"`
1878		*NoMethod
1879	}
1880	s1.NoMethod = (*NoMethod)(s)
1881	if err := json.Unmarshal(data, &s1); err != nil {
1882		return err
1883	}
1884	s.DisplayPrice = float64(s1.DisplayPrice)
1885	s.OriginalPrice = float64(s1.OriginalPrice)
1886	return nil
1887}
1888
1889// GoogleCloudRecommendationengineV1beta1ProductEventDetail:
1890// ProductEventDetail captures user event information specific to retail
1891// products.
1892type GoogleCloudRecommendationengineV1beta1ProductEventDetail struct {
1893	// CartId: Optional. The id or name of the associated shopping cart.
1894	// This id is used to associate multiple items added or present in the
1895	// cart before purchase. This can only be set for `add-to-cart`,
1896	// `remove-from-cart`, `checkout-start`, `purchase-complete`, or
1897	// `shopping-cart-page-view` events.
1898	CartId string `json:"cartId,omitempty"`
1899
1900	// ListId: Required for `add-to-list` and `remove-from-list` events. The
1901	// id or name of the list that the item is being added to or removed
1902	// from. Other event types should not set this field.
1903	ListId string `json:"listId,omitempty"`
1904
1905	// PageCategories: Required for `category-page-view` events. At least
1906	// one of search_query or page_categories is required for `search`
1907	// events. Other event types should not set this field. The categories
1908	// associated with a category page. Category pages include special pages
1909	// such as sales or promotions. For instance, a special sale page may
1910	// have the category hierarchy: categories : ["Sales", "2017 Black
1911	// Friday Deals"].
1912	PageCategories []*GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy `json:"pageCategories,omitempty"`
1913
1914	// ProductDetails: The main product details related to the event. This
1915	// field is required for the following event types: * `add-to-cart` *
1916	// `add-to-list` * `checkout-start` * `detail-page-view` *
1917	// `purchase-complete` * `refund` * `remove-from-cart` *
1918	// `remove-from-list` This field is optional for the following event
1919	// types: * `page-visit` * `shopping-cart-page-view` - note that
1920	// 'product_details' should be set for this unless the shopping cart is
1921	// empty. * `search` (highly encouraged) In a `search` event, this field
1922	// represents the products returned to the end user on the current page
1923	// (the end user may have not finished broswing the whole page yet).
1924	// When a new page is returned to the end user, after
1925	// pagination/filtering/ordering even for the same query, a new SEARCH
1926	// event with different product_details is desired. The end user may
1927	// have not finished broswing the whole page yet. This field is not
1928	// allowed for the following event types: * `category-page-view` *
1929	// `home-page-view`
1930	ProductDetails []*GoogleCloudRecommendationengineV1beta1ProductDetail `json:"productDetails,omitempty"`
1931
1932	// PurchaseTransaction: Optional. A transaction represents the entire
1933	// purchase transaction. Required for `purchase-complete` events.
1934	// Optional for `checkout-start` events. Other event types should not
1935	// set this field.
1936	PurchaseTransaction *GoogleCloudRecommendationengineV1beta1PurchaseTransaction `json:"purchaseTransaction,omitempty"`
1937
1938	// SearchQuery: At least one of search_query or page_categories is
1939	// required for `search` events. Other event types should not set this
1940	// field. The user's search query as UTF-8 encoded text with a length
1941	// limit of 5 KiB.
1942	SearchQuery string `json:"searchQuery,omitempty"`
1943
1944	// ForceSendFields is a list of field names (e.g. "CartId") to
1945	// unconditionally include in API requests. By default, fields with
1946	// empty or default values are omitted from API requests. However, any
1947	// non-pointer, non-interface field appearing in ForceSendFields will be
1948	// sent to the server regardless of whether the field is empty or not.
1949	// This may be used to include empty fields in Patch requests.
1950	ForceSendFields []string `json:"-"`
1951
1952	// NullFields is a list of field names (e.g. "CartId") to include in API
1953	// requests with the JSON null value. By default, fields with empty
1954	// values are omitted from API requests. However, any field with an
1955	// empty value appearing in NullFields will be sent to the server as
1956	// null. It is an error if a field in this list has a non-empty value.
1957	// This may be used to include null fields in Patch requests.
1958	NullFields []string `json:"-"`
1959}
1960
1961func (s *GoogleCloudRecommendationengineV1beta1ProductEventDetail) MarshalJSON() ([]byte, error) {
1962	type NoMethod GoogleCloudRecommendationengineV1beta1ProductEventDetail
1963	raw := NoMethod(*s)
1964	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1965}
1966
1967// GoogleCloudRecommendationengineV1beta1PurchaseTransaction: A
1968// transaction represents the entire purchase transaction.
1969type GoogleCloudRecommendationengineV1beta1PurchaseTransaction struct {
1970	// Costs: Optional. All the costs associated with the product. These can
1971	// be manufacturing costs, shipping expenses not borne by the end user,
1972	// or any other costs. Total product cost such that profit = revenue -
1973	// (sum(taxes) + sum(costs)) If product_cost is not set, then profit =
1974	// revenue - tax - shipping - sum(CatalogItem.costs). If
1975	// CatalogItem.cost is not specified for one of the items,
1976	// CatalogItem.cost based profit *cannot* be calculated for this
1977	// Transaction.
1978	Costs map[string]float64 `json:"costs,omitempty"`
1979
1980	// CurrencyCode: Required. Currency code. Use three-character ISO-4217
1981	// code. This field is not required if the event type is `refund`.
1982	CurrencyCode string `json:"currencyCode,omitempty"`
1983
1984	// Id: Optional. The transaction ID with a length limit of 128 bytes.
1985	Id string `json:"id,omitempty"`
1986
1987	// Revenue: Required. Total revenue or grand total associated with the
1988	// transaction. This value include shipping, tax, or other adjustments
1989	// to total revenue that you want to include as part of your revenue
1990	// calculations. This field is not required if the event type is
1991	// `refund`.
1992	Revenue float64 `json:"revenue,omitempty"`
1993
1994	// Taxes: Optional. All the taxes associated with the transaction.
1995	Taxes map[string]float64 `json:"taxes,omitempty"`
1996
1997	// ForceSendFields is a list of field names (e.g. "Costs") to
1998	// unconditionally include in API requests. By default, fields with
1999	// empty or default values are omitted from API requests. However, any
2000	// non-pointer, non-interface field appearing in ForceSendFields will be
2001	// sent to the server regardless of whether the field is empty or not.
2002	// This may be used to include empty fields in Patch requests.
2003	ForceSendFields []string `json:"-"`
2004
2005	// NullFields is a list of field names (e.g. "Costs") to include in API
2006	// requests with the JSON null value. By default, fields with empty
2007	// values are omitted from API requests. However, any field with an
2008	// empty value appearing in NullFields will be sent to the server as
2009	// null. It is an error if a field in this list has a non-empty value.
2010	// This may be used to include null fields in Patch requests.
2011	NullFields []string `json:"-"`
2012}
2013
2014func (s *GoogleCloudRecommendationengineV1beta1PurchaseTransaction) MarshalJSON() ([]byte, error) {
2015	type NoMethod GoogleCloudRecommendationengineV1beta1PurchaseTransaction
2016	raw := NoMethod(*s)
2017	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2018}
2019
2020func (s *GoogleCloudRecommendationengineV1beta1PurchaseTransaction) UnmarshalJSON(data []byte) error {
2021	type NoMethod GoogleCloudRecommendationengineV1beta1PurchaseTransaction
2022	var s1 struct {
2023		Revenue gensupport.JSONFloat64 `json:"revenue"`
2024		*NoMethod
2025	}
2026	s1.NoMethod = (*NoMethod)(s)
2027	if err := json.Unmarshal(data, &s1); err != nil {
2028		return err
2029	}
2030	s.Revenue = float64(s1.Revenue)
2031	return nil
2032}
2033
2034// GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata:
2035// Metadata related to the progress of the PurgeUserEvents operation.
2036// This will be returned by the google.longrunning.Operation.metadata
2037// field.
2038type GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata struct {
2039	// CreateTime: Operation create time.
2040	CreateTime string `json:"createTime,omitempty"`
2041
2042	// OperationName: The ID of the request / operation.
2043	OperationName string `json:"operationName,omitempty"`
2044
2045	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2046	// unconditionally include in API requests. By default, fields with
2047	// empty or default values are omitted from API requests. However, any
2048	// non-pointer, non-interface field appearing in ForceSendFields will be
2049	// sent to the server regardless of whether the field is empty or not.
2050	// This may be used to include empty fields in Patch requests.
2051	ForceSendFields []string `json:"-"`
2052
2053	// NullFields is a list of field names (e.g. "CreateTime") to include in
2054	// API requests with the JSON null value. By default, fields with empty
2055	// values are omitted from API requests. However, any field with an
2056	// empty value appearing in NullFields will be sent to the server as
2057	// null. It is an error if a field in this list has a non-empty value.
2058	// This may be used to include null fields in Patch requests.
2059	NullFields []string `json:"-"`
2060}
2061
2062func (s *GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata) MarshalJSON() ([]byte, error) {
2063	type NoMethod GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata
2064	raw := NoMethod(*s)
2065	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2066}
2067
2068// GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest: Request
2069// message for PurgeUserEvents method.
2070type GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest struct {
2071	// Filter: Required. The filter string to specify the events to be
2072	// deleted. Empty string filter is not allowed. The eligible fields for
2073	// filtering are: * `eventType`: UserEvent.eventType field of type
2074	// string. * `eventTime`: in ISO 8601 "zulu" format. * `visitorId`:
2075	// field of type string. Specifying this will delete all events
2076	// associated with a visitor. * `userId`: field of type string.
2077	// Specifying this will delete all events associated with a user.
2078	// Examples: * Deleting all events in a time range: `eventTime >
2079	// "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" *
2080	// Deleting specific eventType in time range: `eventTime >
2081	// "2012-04-23T18:25:43.511Z" eventType = "detail-page-view" * Deleting
2082	// all events for a specific visitor: `visitorId = "visitor1024" The
2083	// filtering fields are assumed to have an implicit AND.
2084	Filter string `json:"filter,omitempty"`
2085
2086	// Force: Optional. The default value is false. Override this flag to
2087	// true to actually perform the purge. If the field is not set to true,
2088	// a sampling of events to be deleted will be returned.
2089	Force bool `json:"force,omitempty"`
2090
2091	// ForceSendFields is a list of field names (e.g. "Filter") to
2092	// unconditionally include in API requests. By default, fields with
2093	// empty or default values are omitted from API requests. However, any
2094	// non-pointer, non-interface field appearing in ForceSendFields will be
2095	// sent to the server regardless of whether the field is empty or not.
2096	// This may be used to include empty fields in Patch requests.
2097	ForceSendFields []string `json:"-"`
2098
2099	// NullFields is a list of field names (e.g. "Filter") to include in API
2100	// requests with the JSON null value. By default, fields with empty
2101	// values are omitted from API requests. However, any field with an
2102	// empty value appearing in NullFields will be sent to the server as
2103	// null. It is an error if a field in this list has a non-empty value.
2104	// This may be used to include null fields in Patch requests.
2105	NullFields []string `json:"-"`
2106}
2107
2108func (s *GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest) MarshalJSON() ([]byte, error) {
2109	type NoMethod GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest
2110	raw := NoMethod(*s)
2111	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2112}
2113
2114// GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse:
2115// Response of the PurgeUserEventsRequest. If the long running operation
2116// is successfully done, then this message is returned by the
2117// google.longrunning.Operations.response field.
2118type GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse struct {
2119	// PurgedEventsCount: The total count of events purged as a result of
2120	// the operation.
2121	PurgedEventsCount int64 `json:"purgedEventsCount,omitempty,string"`
2122
2123	// UserEventsSample: A sampling of events deleted (or will be deleted)
2124	// depending on the `force` property in the request. Max of 500 items
2125	// will be returned.
2126	UserEventsSample []*GoogleCloudRecommendationengineV1beta1UserEvent `json:"userEventsSample,omitempty"`
2127
2128	// ForceSendFields is a list of field names (e.g. "PurgedEventsCount")
2129	// to unconditionally include in API requests. By default, fields with
2130	// empty or default values are omitted from API requests. However, any
2131	// non-pointer, non-interface field appearing in ForceSendFields will be
2132	// sent to the server regardless of whether the field is empty or not.
2133	// This may be used to include empty fields in Patch requests.
2134	ForceSendFields []string `json:"-"`
2135
2136	// NullFields is a list of field names (e.g. "PurgedEventsCount") to
2137	// include in API requests with the JSON null value. By default, fields
2138	// with empty values are omitted from API requests. However, any field
2139	// with an empty value appearing in NullFields will be sent to the
2140	// server as null. It is an error if a field in this list has a
2141	// non-empty value. This may be used to include null fields in Patch
2142	// requests.
2143	NullFields []string `json:"-"`
2144}
2145
2146func (s *GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse) MarshalJSON() ([]byte, error) {
2147	type NoMethod GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse
2148	raw := NoMethod(*s)
2149	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2150}
2151
2152// GoogleCloudRecommendationengineV1beta1RejoinUserEventsMetadata:
2153// Metadata for RejoinUserEvents method.
2154type GoogleCloudRecommendationengineV1beta1RejoinUserEventsMetadata struct {
2155}
2156
2157// GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest:
2158// Request message for CatalogRejoin method.
2159type GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest struct {
2160	// UserEventRejoinScope: Required. The type of the catalog rejoin to
2161	// define the scope and range of the user events to be rejoined with
2162	// catalog items.
2163	//
2164	// Possible values:
2165	//   "USER_EVENT_REJOIN_SCOPE_UNSPECIFIED" - Rejoin catalogs with all
2166	// events including both joined events and unjoined events.
2167	//   "JOINED_EVENTS" - Only rejoin catalogs with joined events.
2168	//   "UNJOINED_EVENTS" - Only rejoin catalogs with unjoined events.
2169	UserEventRejoinScope string `json:"userEventRejoinScope,omitempty"`
2170
2171	// ForceSendFields is a list of field names (e.g.
2172	// "UserEventRejoinScope") to unconditionally include in API requests.
2173	// By default, fields with empty or default values are omitted from API
2174	// requests. However, any non-pointer, non-interface field appearing in
2175	// ForceSendFields will be sent to the server regardless of whether the
2176	// field is empty or not. This may be used to include empty fields in
2177	// Patch requests.
2178	ForceSendFields []string `json:"-"`
2179
2180	// NullFields is a list of field names (e.g. "UserEventRejoinScope") to
2181	// include in API requests with the JSON null value. By default, fields
2182	// with empty values are omitted from API requests. However, any field
2183	// with an empty value appearing in NullFields will be sent to the
2184	// server as null. It is an error if a field in this list has a
2185	// non-empty value. This may be used to include null fields in Patch
2186	// requests.
2187	NullFields []string `json:"-"`
2188}
2189
2190func (s *GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest) MarshalJSON() ([]byte, error) {
2191	type NoMethod GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest
2192	raw := NoMethod(*s)
2193	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2194}
2195
2196// GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse:
2197// Response message for RejoinUserEvents method.
2198type GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse struct {
2199	// RejoinedUserEventsCount: Number of user events that were joined with
2200	// latest catalog items.
2201	RejoinedUserEventsCount int64 `json:"rejoinedUserEventsCount,omitempty,string"`
2202
2203	// ForceSendFields is a list of field names (e.g.
2204	// "RejoinedUserEventsCount") to unconditionally include in API
2205	// requests. By default, fields with empty or default values are omitted
2206	// from API requests. However, any non-pointer, non-interface field
2207	// appearing in ForceSendFields will be sent to the server regardless of
2208	// whether the field is empty or not. This may be used to include empty
2209	// fields in Patch requests.
2210	ForceSendFields []string `json:"-"`
2211
2212	// NullFields is a list of field names (e.g. "RejoinedUserEventsCount")
2213	// to include in API requests with the JSON null value. By default,
2214	// fields with empty values are omitted from API requests. However, any
2215	// field with an empty value appearing in NullFields will be sent to the
2216	// server as null. It is an error if a field in this list has a
2217	// non-empty value. This may be used to include null fields in Patch
2218	// requests.
2219	NullFields []string `json:"-"`
2220}
2221
2222func (s *GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse) MarshalJSON() ([]byte, error) {
2223	type NoMethod GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse
2224	raw := NoMethod(*s)
2225	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2226}
2227
2228// GoogleCloudRecommendationengineV1beta1UserEvent: UserEvent captures
2229// all metadata information recommendation engine needs to know about
2230// how end users interact with customers' website.
2231type GoogleCloudRecommendationengineV1beta1UserEvent struct {
2232	// EventDetail: Optional. User event detailed information common across
2233	// different recommendation types.
2234	EventDetail *GoogleCloudRecommendationengineV1beta1EventDetail `json:"eventDetail,omitempty"`
2235
2236	// EventSource: Optional. This field should *not* be set when using
2237	// JavaScript pixel or the Recommendations AI Tag. Defaults to
2238	// `EVENT_SOURCE_UNSPECIFIED`.
2239	//
2240	// Possible values:
2241	//   "EVENT_SOURCE_UNSPECIFIED" - Unspecified event source.
2242	//   "AUTOML" - The event is ingested via a javascript pixel or
2243	// Recommendations AI Tag through automl datalayer or JS Macros.
2244	//   "ECOMMERCE" - The event is ingested via Recommendations AI Tag
2245	// through Enhanced Ecommerce datalayer.
2246	//   "BATCH_UPLOAD" - The event is ingested via Import user events API.
2247	EventSource string `json:"eventSource,omitempty"`
2248
2249	// EventTime: Optional. Only required for ImportUserEvents method.
2250	// Timestamp of user event created.
2251	EventTime string `json:"eventTime,omitempty"`
2252
2253	// EventType: Required. User event type. Allowed values are: *
2254	// `add-to-cart` Products being added to cart. * `add-to-list` Items
2255	// being added to a list (shopping list, favorites etc). *
2256	// `category-page-view` Special pages such as sale or promotion pages
2257	// viewed. * `checkout-start` User starting a checkout process. *
2258	// `detail-page-view` Products detail page viewed. * `home-page-view`
2259	// Homepage viewed. * `page-visit` Generic page visits not included in
2260	// the event types above. * `purchase-complete` User finishing a
2261	// purchase. * `refund` Purchased items being refunded or returned. *
2262	// `remove-from-cart` Products being removed from cart. *
2263	// `remove-from-list` Items being removed from a list. * `search`
2264	// Product search. * `shopping-cart-page-view` User viewing a shopping
2265	// cart. * `impression` List of items displayed. Used by Google Tag
2266	// Manager.
2267	EventType string `json:"eventType,omitempty"`
2268
2269	// ProductEventDetail: Optional. Retail product specific user event
2270	// metadata. This field is required for the following event types: *
2271	// `add-to-cart` * `add-to-list` * `category-page-view` *
2272	// `checkout-start` * `detail-page-view` * `purchase-complete` *
2273	// `refund` * `remove-from-cart` * `remove-from-list` * `search` This
2274	// field is optional for the following event types: * `page-visit` *
2275	// `shopping-cart-page-view` - note that 'product_event_detail' should
2276	// be set for this unless the shopping cart is empty. This field is not
2277	// allowed for the following event types: * `home-page-view`
2278	ProductEventDetail *GoogleCloudRecommendationengineV1beta1ProductEventDetail `json:"productEventDetail,omitempty"`
2279
2280	// UserInfo: Required. User information.
2281	UserInfo *GoogleCloudRecommendationengineV1beta1UserInfo `json:"userInfo,omitempty"`
2282
2283	// ServerResponse contains the HTTP response code and headers from the
2284	// server.
2285	googleapi.ServerResponse `json:"-"`
2286
2287	// ForceSendFields is a list of field names (e.g. "EventDetail") to
2288	// unconditionally include in API requests. By default, fields with
2289	// empty or default values are omitted from API requests. However, any
2290	// non-pointer, non-interface field appearing in ForceSendFields will be
2291	// sent to the server regardless of whether the field is empty or not.
2292	// This may be used to include empty fields in Patch requests.
2293	ForceSendFields []string `json:"-"`
2294
2295	// NullFields is a list of field names (e.g. "EventDetail") to include
2296	// in API requests with the JSON null value. By default, fields with
2297	// empty values are omitted from API requests. However, any field with
2298	// an empty value appearing in NullFields will be sent to the server as
2299	// null. It is an error if a field in this list has a non-empty value.
2300	// This may be used to include null fields in Patch requests.
2301	NullFields []string `json:"-"`
2302}
2303
2304func (s *GoogleCloudRecommendationengineV1beta1UserEvent) MarshalJSON() ([]byte, error) {
2305	type NoMethod GoogleCloudRecommendationengineV1beta1UserEvent
2306	raw := NoMethod(*s)
2307	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2308}
2309
2310// GoogleCloudRecommendationengineV1beta1UserEventImportSummary: A
2311// summary of import result. The UserEventImportSummary summarizes the
2312// import status for user events.
2313type GoogleCloudRecommendationengineV1beta1UserEventImportSummary struct {
2314	// JoinedEventsCount: Count of user events imported with complete
2315	// existing catalog information.
2316	JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"`
2317
2318	// UnjoinedEventsCount: Count of user events imported, but with catalog
2319	// information not found in the imported catalog.
2320	UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"`
2321
2322	// ForceSendFields is a list of field names (e.g. "JoinedEventsCount")
2323	// to unconditionally include in API requests. By default, fields with
2324	// empty or default values are omitted from API requests. However, any
2325	// non-pointer, non-interface field appearing in ForceSendFields will be
2326	// sent to the server regardless of whether the field is empty or not.
2327	// This may be used to include empty fields in Patch requests.
2328	ForceSendFields []string `json:"-"`
2329
2330	// NullFields is a list of field names (e.g. "JoinedEventsCount") to
2331	// include in API requests with the JSON null value. By default, fields
2332	// with empty values are omitted from API requests. However, any field
2333	// with an empty value appearing in NullFields will be sent to the
2334	// server as null. It is an error if a field in this list has a
2335	// non-empty value. This may be used to include null fields in Patch
2336	// requests.
2337	NullFields []string `json:"-"`
2338}
2339
2340func (s *GoogleCloudRecommendationengineV1beta1UserEventImportSummary) MarshalJSON() ([]byte, error) {
2341	type NoMethod GoogleCloudRecommendationengineV1beta1UserEventImportSummary
2342	raw := NoMethod(*s)
2343	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2344}
2345
2346// GoogleCloudRecommendationengineV1beta1UserEventInlineSource: The
2347// inline source for the input config for ImportUserEvents method.
2348type GoogleCloudRecommendationengineV1beta1UserEventInlineSource struct {
2349	// UserEvents: Optional. A list of user events to import. Recommended
2350	// max of 10k items.
2351	UserEvents []*GoogleCloudRecommendationengineV1beta1UserEvent `json:"userEvents,omitempty"`
2352
2353	// ForceSendFields is a list of field names (e.g. "UserEvents") to
2354	// unconditionally include in API requests. By default, fields with
2355	// empty or default values are omitted from API requests. However, any
2356	// non-pointer, non-interface field appearing in ForceSendFields will be
2357	// sent to the server regardless of whether the field is empty or not.
2358	// This may be used to include empty fields in Patch requests.
2359	ForceSendFields []string `json:"-"`
2360
2361	// NullFields is a list of field names (e.g. "UserEvents") to include in
2362	// API requests with the JSON null value. By default, fields with empty
2363	// values are omitted from API requests. However, any field with an
2364	// empty value appearing in NullFields will be sent to the server as
2365	// null. It is an error if a field in this list has a non-empty value.
2366	// This may be used to include null fields in Patch requests.
2367	NullFields []string `json:"-"`
2368}
2369
2370func (s *GoogleCloudRecommendationengineV1beta1UserEventInlineSource) MarshalJSON() ([]byte, error) {
2371	type NoMethod GoogleCloudRecommendationengineV1beta1UserEventInlineSource
2372	raw := NoMethod(*s)
2373	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2374}
2375
2376// GoogleCloudRecommendationengineV1beta1UserInfo: Information of end
2377// users.
2378type GoogleCloudRecommendationengineV1beta1UserInfo struct {
2379	// DirectUserRequest: Optional. Indicates if the request is made
2380	// directly from the end user in which case the user_agent and
2381	// ip_address fields can be populated from the HTTP request. This should
2382	// *not* be set when using the javascript pixel. This flag should be set
2383	// only if the API request is made directly from the end user such as a
2384	// mobile app (and not if a gateway or a server is processing and
2385	// pushing the user events).
2386	DirectUserRequest bool `json:"directUserRequest,omitempty"`
2387
2388	// IpAddress: Optional. IP address of the user. This could be either
2389	// IPv4 (e.g. 104.133.9.80) or IPv6 (e.g.
2390	// 2001:0db8:85a3:0000:0000:8a2e:0370:7334). This should *not* be set
2391	// when using the javascript pixel or if `direct_user_request` is set.
2392	// Used to extract location information for personalization.
2393	IpAddress string `json:"ipAddress,omitempty"`
2394
2395	// UserAgent: Optional. User agent as included in the HTTP header. UTF-8
2396	// encoded string with a length limit of 1 KiB. This should *not* be set
2397	// when using the JavaScript pixel or if `directUserRequest` is set.
2398	UserAgent string `json:"userAgent,omitempty"`
2399
2400	// UserId: Optional. Unique identifier for logged-in user with a length
2401	// limit of 128 bytes. Required only for logged-in users.
2402	UserId string `json:"userId,omitempty"`
2403
2404	// VisitorId: Required. A unique identifier for tracking visitors with a
2405	// length limit of 128 bytes. For example, this could be implemented
2406	// with an HTTP cookie, which should be able to uniquely identify a
2407	// visitor on a single device. This unique identifier should not change
2408	// if the visitor logs in or out of the website. Maximum length 128
2409	// bytes. Cannot be empty.
2410	VisitorId string `json:"visitorId,omitempty"`
2411
2412	// ForceSendFields is a list of field names (e.g. "DirectUserRequest")
2413	// to unconditionally include in API requests. By default, fields with
2414	// empty or default values are omitted from API requests. However, any
2415	// non-pointer, non-interface field appearing in ForceSendFields will be
2416	// sent to the server regardless of whether the field is empty or not.
2417	// This may be used to include empty fields in Patch requests.
2418	ForceSendFields []string `json:"-"`
2419
2420	// NullFields is a list of field names (e.g. "DirectUserRequest") to
2421	// include in API requests with the JSON null value. By default, fields
2422	// with empty values are omitted from API requests. However, any field
2423	// with an empty value appearing in NullFields will be sent to the
2424	// server as null. It is an error if a field in this list has a
2425	// non-empty value. This may be used to include null fields in Patch
2426	// requests.
2427	NullFields []string `json:"-"`
2428}
2429
2430func (s *GoogleCloudRecommendationengineV1beta1UserInfo) MarshalJSON() ([]byte, error) {
2431	type NoMethod GoogleCloudRecommendationengineV1beta1UserInfo
2432	raw := NoMethod(*s)
2433	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2434}
2435
2436// GoogleLongrunningListOperationsResponse: The response message for
2437// Operations.ListOperations.
2438type GoogleLongrunningListOperationsResponse struct {
2439	// NextPageToken: The standard List next-page token.
2440	NextPageToken string `json:"nextPageToken,omitempty"`
2441
2442	// Operations: A list of operations that matches the specified filter in
2443	// the request.
2444	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
2445
2446	// ServerResponse contains the HTTP response code and headers from the
2447	// server.
2448	googleapi.ServerResponse `json:"-"`
2449
2450	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2451	// unconditionally include in API requests. By default, fields with
2452	// empty or default values are omitted from API requests. However, any
2453	// non-pointer, non-interface field appearing in ForceSendFields will be
2454	// sent to the server regardless of whether the field is empty or not.
2455	// This may be used to include empty fields in Patch requests.
2456	ForceSendFields []string `json:"-"`
2457
2458	// NullFields is a list of field names (e.g. "NextPageToken") to include
2459	// in API requests with the JSON null value. By default, fields with
2460	// empty values are omitted from API requests. However, any field with
2461	// an empty value appearing in NullFields will be sent to the server as
2462	// null. It is an error if a field in this list has a non-empty value.
2463	// This may be used to include null fields in Patch requests.
2464	NullFields []string `json:"-"`
2465}
2466
2467func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
2468	type NoMethod GoogleLongrunningListOperationsResponse
2469	raw := NoMethod(*s)
2470	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2471}
2472
2473// GoogleLongrunningOperation: This resource represents a long-running
2474// operation that is the result of a network API call.
2475type GoogleLongrunningOperation struct {
2476	// Done: If the value is `false`, it means the operation is still in
2477	// progress. If `true`, the operation is completed, and either `error`
2478	// or `response` is available.
2479	Done bool `json:"done,omitempty"`
2480
2481	// Error: The error result of the operation in case of failure or
2482	// cancellation.
2483	Error *GoogleRpcStatus `json:"error,omitempty"`
2484
2485	// Metadata: Service-specific metadata associated with the operation. It
2486	// typically contains progress information and common metadata such as
2487	// create time. Some services might not provide such metadata. Any
2488	// method that returns a long-running operation should document the
2489	// metadata type, if any.
2490	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2491
2492	// Name: The server-assigned name, which is only unique within the same
2493	// service that originally returns it. If you use the default HTTP
2494	// mapping, the `name` should be a resource name ending with
2495	// `operations/{unique_id}`.
2496	Name string `json:"name,omitempty"`
2497
2498	// Response: The normal response of the operation in case of success. If
2499	// the original method returns no data on success, such as `Delete`, the
2500	// response is `google.protobuf.Empty`. If the original method is
2501	// standard `Get`/`Create`/`Update`, the response should be the
2502	// resource. For other methods, the response should have the type
2503	// `XxxResponse`, where `Xxx` is the original method name. For example,
2504	// if the original method name is `TakeSnapshot()`, the inferred
2505	// response type is `TakeSnapshotResponse`.
2506	Response googleapi.RawMessage `json:"response,omitempty"`
2507
2508	// ServerResponse contains the HTTP response code and headers from the
2509	// server.
2510	googleapi.ServerResponse `json:"-"`
2511
2512	// ForceSendFields is a list of field names (e.g. "Done") to
2513	// unconditionally include in API requests. By default, fields with
2514	// empty or default values are omitted from API requests. However, any
2515	// non-pointer, non-interface field appearing in ForceSendFields will be
2516	// sent to the server regardless of whether the field is empty or not.
2517	// This may be used to include empty fields in Patch requests.
2518	ForceSendFields []string `json:"-"`
2519
2520	// NullFields is a list of field names (e.g. "Done") to include in API
2521	// requests with the JSON null value. By default, fields with empty
2522	// values are omitted from API requests. However, any field with an
2523	// empty value appearing in NullFields will be sent to the server as
2524	// null. It is an error if a field in this list has a non-empty value.
2525	// This may be used to include null fields in Patch requests.
2526	NullFields []string `json:"-"`
2527}
2528
2529func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
2530	type NoMethod GoogleLongrunningOperation
2531	raw := NoMethod(*s)
2532	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2533}
2534
2535// GoogleProtobufEmpty: A generic empty message that you can re-use to
2536// avoid defining duplicated empty messages in your APIs. A typical
2537// example is to use it as the request or the response type of an API
2538// method. For instance: service Foo { rpc Bar(google.protobuf.Empty)
2539// returns (google.protobuf.Empty); } The JSON representation for
2540// `Empty` is empty JSON object `{}`.
2541type GoogleProtobufEmpty struct {
2542	// ServerResponse contains the HTTP response code and headers from the
2543	// server.
2544	googleapi.ServerResponse `json:"-"`
2545}
2546
2547// GoogleRpcStatus: The `Status` type defines a logical error model that
2548// is suitable for different programming environments, including REST
2549// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
2550// `Status` message contains three pieces of data: error code, error
2551// message, and error details. You can find out more about this error
2552// model and how to work with it in the API Design Guide
2553// (https://cloud.google.com/apis/design/errors).
2554type GoogleRpcStatus struct {
2555	// Code: The status code, which should be an enum value of
2556	// google.rpc.Code.
2557	Code int64 `json:"code,omitempty"`
2558
2559	// Details: A list of messages that carry the error details. There is a
2560	// common set of message types for APIs to use.
2561	Details []googleapi.RawMessage `json:"details,omitempty"`
2562
2563	// Message: A developer-facing error message, which should be in
2564	// English. Any user-facing error message should be localized and sent
2565	// in the google.rpc.Status.details field, or localized by the client.
2566	Message string `json:"message,omitempty"`
2567
2568	// ForceSendFields is a list of field names (e.g. "Code") to
2569	// unconditionally include in API requests. By default, fields with
2570	// empty or default values are omitted from API requests. However, any
2571	// non-pointer, non-interface field appearing in ForceSendFields will be
2572	// sent to the server regardless of whether the field is empty or not.
2573	// This may be used to include empty fields in Patch requests.
2574	ForceSendFields []string `json:"-"`
2575
2576	// NullFields is a list of field names (e.g. "Code") to include in API
2577	// requests with the JSON null value. By default, fields with empty
2578	// values are omitted from API requests. However, any field with an
2579	// empty value appearing in NullFields will be sent to the server as
2580	// null. It is an error if a field in this list has a non-empty value.
2581	// This may be used to include null fields in Patch requests.
2582	NullFields []string `json:"-"`
2583}
2584
2585func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
2586	type NoMethod GoogleRpcStatus
2587	raw := NoMethod(*s)
2588	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2589}
2590
2591// method id "recommendationengine.projects.locations.catalogs.list":
2592
2593type ProjectsLocationsCatalogsListCall struct {
2594	s            *Service
2595	parent       string
2596	urlParams_   gensupport.URLParams
2597	ifNoneMatch_ string
2598	ctx_         context.Context
2599	header_      http.Header
2600}
2601
2602// List: Lists all the catalog configurations associated with the
2603// project.
2604//
2605// - parent: The account resource name with an associated location.
2606func (r *ProjectsLocationsCatalogsService) List(parent string) *ProjectsLocationsCatalogsListCall {
2607	c := &ProjectsLocationsCatalogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2608	c.parent = parent
2609	return c
2610}
2611
2612// PageSize sets the optional parameter "pageSize": Maximum number of
2613// results to return. If unspecified, defaults to 50. Max allowed value
2614// is 1000.
2615func (c *ProjectsLocationsCatalogsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsListCall {
2616	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2617	return c
2618}
2619
2620// PageToken sets the optional parameter "pageToken": A page token,
2621// received from a previous `ListCatalogs` call. Provide this to
2622// retrieve the subsequent page.
2623func (c *ProjectsLocationsCatalogsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsListCall {
2624	c.urlParams_.Set("pageToken", pageToken)
2625	return c
2626}
2627
2628// Fields allows partial responses to be retrieved. See
2629// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2630// for more information.
2631func (c *ProjectsLocationsCatalogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsListCall {
2632	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2633	return c
2634}
2635
2636// IfNoneMatch sets the optional parameter which makes the operation
2637// fail if the object's ETag matches the given value. This is useful for
2638// getting updates only after the object has changed since the last
2639// request. Use googleapi.IsNotModified to check whether the response
2640// error from Do is the result of In-None-Match.
2641func (c *ProjectsLocationsCatalogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsListCall {
2642	c.ifNoneMatch_ = entityTag
2643	return c
2644}
2645
2646// Context sets the context to be used in this call's Do method. Any
2647// pending HTTP request will be aborted if the provided context is
2648// canceled.
2649func (c *ProjectsLocationsCatalogsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsListCall {
2650	c.ctx_ = ctx
2651	return c
2652}
2653
2654// Header returns an http.Header that can be modified by the caller to
2655// add HTTP headers to the request.
2656func (c *ProjectsLocationsCatalogsListCall) Header() http.Header {
2657	if c.header_ == nil {
2658		c.header_ = make(http.Header)
2659	}
2660	return c.header_
2661}
2662
2663func (c *ProjectsLocationsCatalogsListCall) doRequest(alt string) (*http.Response, error) {
2664	reqHeaders := make(http.Header)
2665	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2666	for k, v := range c.header_ {
2667		reqHeaders[k] = v
2668	}
2669	reqHeaders.Set("User-Agent", c.s.userAgent())
2670	if c.ifNoneMatch_ != "" {
2671		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2672	}
2673	var body io.Reader = nil
2674	c.urlParams_.Set("alt", alt)
2675	c.urlParams_.Set("prettyPrint", "false")
2676	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/catalogs")
2677	urls += "?" + c.urlParams_.Encode()
2678	req, err := http.NewRequest("GET", urls, body)
2679	if err != nil {
2680		return nil, err
2681	}
2682	req.Header = reqHeaders
2683	googleapi.Expand(req.URL, map[string]string{
2684		"parent": c.parent,
2685	})
2686	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2687}
2688
2689// Do executes the "recommendationengine.projects.locations.catalogs.list" call.
2690// Exactly one of
2691// *GoogleCloudRecommendationengineV1beta1ListCatalogsResponse or error
2692// will be non-nil. Any non-2xx status code is an error. Response
2693// headers are in either
2694// *GoogleCloudRecommendationengineV1beta1ListCatalogsResponse.ServerResp
2695// onse.Header or (if a response was returned at all) in
2696// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2697// whether the returned error was because http.StatusNotModified was
2698// returned.
2699func (c *ProjectsLocationsCatalogsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1ListCatalogsResponse, error) {
2700	gensupport.SetOptions(c.urlParams_, opts...)
2701	res, err := c.doRequest("json")
2702	if res != nil && res.StatusCode == http.StatusNotModified {
2703		if res.Body != nil {
2704			res.Body.Close()
2705		}
2706		return nil, &googleapi.Error{
2707			Code:   res.StatusCode,
2708			Header: res.Header,
2709		}
2710	}
2711	if err != nil {
2712		return nil, err
2713	}
2714	defer googleapi.CloseBody(res)
2715	if err := googleapi.CheckResponse(res); err != nil {
2716		return nil, err
2717	}
2718	ret := &GoogleCloudRecommendationengineV1beta1ListCatalogsResponse{
2719		ServerResponse: googleapi.ServerResponse{
2720			Header:         res.Header,
2721			HTTPStatusCode: res.StatusCode,
2722		},
2723	}
2724	target := &ret
2725	if err := gensupport.DecodeResponse(target, res); err != nil {
2726		return nil, err
2727	}
2728	return ret, nil
2729	// {
2730	//   "description": "Lists all the catalog configurations associated with the project.",
2731	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs",
2732	//   "httpMethod": "GET",
2733	//   "id": "recommendationengine.projects.locations.catalogs.list",
2734	//   "parameterOrder": [
2735	//     "parent"
2736	//   ],
2737	//   "parameters": {
2738	//     "pageSize": {
2739	//       "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.",
2740	//       "format": "int32",
2741	//       "location": "query",
2742	//       "type": "integer"
2743	//     },
2744	//     "pageToken": {
2745	//       "description": "Optional. A page token, received from a previous `ListCatalogs` call. Provide this to retrieve the subsequent page.",
2746	//       "location": "query",
2747	//       "type": "string"
2748	//     },
2749	//     "parent": {
2750	//       "description": "Required. The account resource name with an associated location.",
2751	//       "location": "path",
2752	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2753	//       "required": true,
2754	//       "type": "string"
2755	//     }
2756	//   },
2757	//   "path": "v1beta1/{+parent}/catalogs",
2758	//   "response": {
2759	//     "$ref": "GoogleCloudRecommendationengineV1beta1ListCatalogsResponse"
2760	//   },
2761	//   "scopes": [
2762	//     "https://www.googleapis.com/auth/cloud-platform"
2763	//   ]
2764	// }
2765
2766}
2767
2768// Pages invokes f for each page of results.
2769// A non-nil error returned from f will halt the iteration.
2770// The provided context supersedes any context provided to the Context method.
2771func (c *ProjectsLocationsCatalogsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1ListCatalogsResponse) error) error {
2772	c.ctx_ = ctx
2773	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2774	for {
2775		x, err := c.Do()
2776		if err != nil {
2777			return err
2778		}
2779		if err := f(x); err != nil {
2780			return err
2781		}
2782		if x.NextPageToken == "" {
2783			return nil
2784		}
2785		c.PageToken(x.NextPageToken)
2786	}
2787}
2788
2789// method id "recommendationengine.projects.locations.catalogs.patch":
2790
2791type ProjectsLocationsCatalogsPatchCall struct {
2792	s                                             *Service
2793	name                                          string
2794	googlecloudrecommendationenginev1beta1catalog *GoogleCloudRecommendationengineV1beta1Catalog
2795	urlParams_                                    gensupport.URLParams
2796	ctx_                                          context.Context
2797	header_                                       http.Header
2798}
2799
2800// Patch: Updates the catalog configuration.
2801//
2802// - name: The fully qualified resource name of the catalog.
2803func (r *ProjectsLocationsCatalogsService) Patch(name string, googlecloudrecommendationenginev1beta1catalog *GoogleCloudRecommendationengineV1beta1Catalog) *ProjectsLocationsCatalogsPatchCall {
2804	c := &ProjectsLocationsCatalogsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2805	c.name = name
2806	c.googlecloudrecommendationenginev1beta1catalog = googlecloudrecommendationenginev1beta1catalog
2807	return c
2808}
2809
2810// UpdateMask sets the optional parameter "updateMask": Indicates which
2811// fields in the provided 'catalog' to update. If not set, will only
2812// update the catalog_item_level_config field. Currently only fields
2813// that can be updated are catalog_item_level_config.
2814func (c *ProjectsLocationsCatalogsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsPatchCall {
2815	c.urlParams_.Set("updateMask", updateMask)
2816	return c
2817}
2818
2819// Fields allows partial responses to be retrieved. See
2820// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2821// for more information.
2822func (c *ProjectsLocationsCatalogsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsPatchCall {
2823	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2824	return c
2825}
2826
2827// Context sets the context to be used in this call's Do method. Any
2828// pending HTTP request will be aborted if the provided context is
2829// canceled.
2830func (c *ProjectsLocationsCatalogsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsPatchCall {
2831	c.ctx_ = ctx
2832	return c
2833}
2834
2835// Header returns an http.Header that can be modified by the caller to
2836// add HTTP headers to the request.
2837func (c *ProjectsLocationsCatalogsPatchCall) Header() http.Header {
2838	if c.header_ == nil {
2839		c.header_ = make(http.Header)
2840	}
2841	return c.header_
2842}
2843
2844func (c *ProjectsLocationsCatalogsPatchCall) doRequest(alt string) (*http.Response, error) {
2845	reqHeaders := make(http.Header)
2846	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2847	for k, v := range c.header_ {
2848		reqHeaders[k] = v
2849	}
2850	reqHeaders.Set("User-Agent", c.s.userAgent())
2851	var body io.Reader = nil
2852	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1catalog)
2853	if err != nil {
2854		return nil, err
2855	}
2856	reqHeaders.Set("Content-Type", "application/json")
2857	c.urlParams_.Set("alt", alt)
2858	c.urlParams_.Set("prettyPrint", "false")
2859	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2860	urls += "?" + c.urlParams_.Encode()
2861	req, err := http.NewRequest("PATCH", urls, body)
2862	if err != nil {
2863		return nil, err
2864	}
2865	req.Header = reqHeaders
2866	googleapi.Expand(req.URL, map[string]string{
2867		"name": c.name,
2868	})
2869	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2870}
2871
2872// Do executes the "recommendationengine.projects.locations.catalogs.patch" call.
2873// Exactly one of *GoogleCloudRecommendationengineV1beta1Catalog or
2874// error will be non-nil. Any non-2xx status code is an error. Response
2875// headers are in either
2876// *GoogleCloudRecommendationengineV1beta1Catalog.ServerResponse.Header
2877// or (if a response was returned at all) in
2878// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2879// whether the returned error was because http.StatusNotModified was
2880// returned.
2881func (c *ProjectsLocationsCatalogsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1Catalog, error) {
2882	gensupport.SetOptions(c.urlParams_, opts...)
2883	res, err := c.doRequest("json")
2884	if res != nil && res.StatusCode == http.StatusNotModified {
2885		if res.Body != nil {
2886			res.Body.Close()
2887		}
2888		return nil, &googleapi.Error{
2889			Code:   res.StatusCode,
2890			Header: res.Header,
2891		}
2892	}
2893	if err != nil {
2894		return nil, err
2895	}
2896	defer googleapi.CloseBody(res)
2897	if err := googleapi.CheckResponse(res); err != nil {
2898		return nil, err
2899	}
2900	ret := &GoogleCloudRecommendationengineV1beta1Catalog{
2901		ServerResponse: googleapi.ServerResponse{
2902			Header:         res.Header,
2903			HTTPStatusCode: res.StatusCode,
2904		},
2905	}
2906	target := &ret
2907	if err := gensupport.DecodeResponse(target, res); err != nil {
2908		return nil, err
2909	}
2910	return ret, nil
2911	// {
2912	//   "description": "Updates the catalog configuration.",
2913	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}",
2914	//   "httpMethod": "PATCH",
2915	//   "id": "recommendationengine.projects.locations.catalogs.patch",
2916	//   "parameterOrder": [
2917	//     "name"
2918	//   ],
2919	//   "parameters": {
2920	//     "name": {
2921	//       "description": "The fully qualified resource name of the catalog.",
2922	//       "location": "path",
2923	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$",
2924	//       "required": true,
2925	//       "type": "string"
2926	//     },
2927	//     "updateMask": {
2928	//       "description": "Optional. Indicates which fields in the provided 'catalog' to update. If not set, will only update the catalog_item_level_config field. Currently only fields that can be updated are catalog_item_level_config.",
2929	//       "format": "google-fieldmask",
2930	//       "location": "query",
2931	//       "type": "string"
2932	//     }
2933	//   },
2934	//   "path": "v1beta1/{+name}",
2935	//   "request": {
2936	//     "$ref": "GoogleCloudRecommendationengineV1beta1Catalog"
2937	//   },
2938	//   "response": {
2939	//     "$ref": "GoogleCloudRecommendationengineV1beta1Catalog"
2940	//   },
2941	//   "scopes": [
2942	//     "https://www.googleapis.com/auth/cloud-platform"
2943	//   ]
2944	// }
2945
2946}
2947
2948// method id "recommendationengine.projects.locations.catalogs.catalogItems.create":
2949
2950type ProjectsLocationsCatalogsCatalogItemsCreateCall struct {
2951	s                                                 *Service
2952	parent                                            string
2953	googlecloudrecommendationenginev1beta1catalogitem *GoogleCloudRecommendationengineV1beta1CatalogItem
2954	urlParams_                                        gensupport.URLParams
2955	ctx_                                              context.Context
2956	header_                                           http.Header
2957}
2958
2959// Create: Creates a catalog item.
2960//
2961// - parent: The parent catalog resource name, such as
2962//   `projects/*/locations/global/catalogs/default_catalog`.
2963func (r *ProjectsLocationsCatalogsCatalogItemsService) Create(parent string, googlecloudrecommendationenginev1beta1catalogitem *GoogleCloudRecommendationengineV1beta1CatalogItem) *ProjectsLocationsCatalogsCatalogItemsCreateCall {
2964	c := &ProjectsLocationsCatalogsCatalogItemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2965	c.parent = parent
2966	c.googlecloudrecommendationenginev1beta1catalogitem = googlecloudrecommendationenginev1beta1catalogitem
2967	return c
2968}
2969
2970// Fields allows partial responses to be retrieved. See
2971// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2972// for more information.
2973func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsCreateCall {
2974	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2975	return c
2976}
2977
2978// Context sets the context to be used in this call's Do method. Any
2979// pending HTTP request will be aborted if the provided context is
2980// canceled.
2981func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsCreateCall {
2982	c.ctx_ = ctx
2983	return c
2984}
2985
2986// Header returns an http.Header that can be modified by the caller to
2987// add HTTP headers to the request.
2988func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) Header() http.Header {
2989	if c.header_ == nil {
2990		c.header_ = make(http.Header)
2991	}
2992	return c.header_
2993}
2994
2995func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) doRequest(alt string) (*http.Response, error) {
2996	reqHeaders := make(http.Header)
2997	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2998	for k, v := range c.header_ {
2999		reqHeaders[k] = v
3000	}
3001	reqHeaders.Set("User-Agent", c.s.userAgent())
3002	var body io.Reader = nil
3003	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1catalogitem)
3004	if err != nil {
3005		return nil, err
3006	}
3007	reqHeaders.Set("Content-Type", "application/json")
3008	c.urlParams_.Set("alt", alt)
3009	c.urlParams_.Set("prettyPrint", "false")
3010	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/catalogItems")
3011	urls += "?" + c.urlParams_.Encode()
3012	req, err := http.NewRequest("POST", urls, body)
3013	if err != nil {
3014		return nil, err
3015	}
3016	req.Header = reqHeaders
3017	googleapi.Expand(req.URL, map[string]string{
3018		"parent": c.parent,
3019	})
3020	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3021}
3022
3023// Do executes the "recommendationengine.projects.locations.catalogs.catalogItems.create" call.
3024// Exactly one of *GoogleCloudRecommendationengineV1beta1CatalogItem or
3025// error will be non-nil. Any non-2xx status code is an error. Response
3026// headers are in either
3027// *GoogleCloudRecommendationengineV1beta1CatalogItem.ServerResponse.Head
3028// er or (if a response was returned at all) in
3029// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3030// whether the returned error was because http.StatusNotModified was
3031// returned.
3032func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1CatalogItem, error) {
3033	gensupport.SetOptions(c.urlParams_, opts...)
3034	res, err := c.doRequest("json")
3035	if res != nil && res.StatusCode == http.StatusNotModified {
3036		if res.Body != nil {
3037			res.Body.Close()
3038		}
3039		return nil, &googleapi.Error{
3040			Code:   res.StatusCode,
3041			Header: res.Header,
3042		}
3043	}
3044	if err != nil {
3045		return nil, err
3046	}
3047	defer googleapi.CloseBody(res)
3048	if err := googleapi.CheckResponse(res); err != nil {
3049		return nil, err
3050	}
3051	ret := &GoogleCloudRecommendationengineV1beta1CatalogItem{
3052		ServerResponse: googleapi.ServerResponse{
3053			Header:         res.Header,
3054			HTTPStatusCode: res.StatusCode,
3055		},
3056	}
3057	target := &ret
3058	if err := gensupport.DecodeResponse(target, res); err != nil {
3059		return nil, err
3060	}
3061	return ret, nil
3062	// {
3063	//   "description": "Creates a catalog item.",
3064	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems",
3065	//   "httpMethod": "POST",
3066	//   "id": "recommendationengine.projects.locations.catalogs.catalogItems.create",
3067	//   "parameterOrder": [
3068	//     "parent"
3069	//   ],
3070	//   "parameters": {
3071	//     "parent": {
3072	//       "description": "Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.",
3073	//       "location": "path",
3074	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$",
3075	//       "required": true,
3076	//       "type": "string"
3077	//     }
3078	//   },
3079	//   "path": "v1beta1/{+parent}/catalogItems",
3080	//   "request": {
3081	//     "$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem"
3082	//   },
3083	//   "response": {
3084	//     "$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem"
3085	//   },
3086	//   "scopes": [
3087	//     "https://www.googleapis.com/auth/cloud-platform"
3088	//   ]
3089	// }
3090
3091}
3092
3093// method id "recommendationengine.projects.locations.catalogs.catalogItems.delete":
3094
3095type ProjectsLocationsCatalogsCatalogItemsDeleteCall struct {
3096	s          *Service
3097	name       string
3098	urlParams_ gensupport.URLParams
3099	ctx_       context.Context
3100	header_    http.Header
3101}
3102
3103// Delete: Deletes a catalog item.
3104//
3105// - name: Full resource name of catalog item, such as
3106//   `projects/*/locations/global/catalogs/default_catalog/catalogItems/s
3107//   ome_catalog_item_id`.
3108func (r *ProjectsLocationsCatalogsCatalogItemsService) Delete(name string) *ProjectsLocationsCatalogsCatalogItemsDeleteCall {
3109	c := &ProjectsLocationsCatalogsCatalogItemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3110	c.name = name
3111	return c
3112}
3113
3114// Fields allows partial responses to be retrieved. See
3115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3116// for more information.
3117func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsDeleteCall {
3118	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3119	return c
3120}
3121
3122// Context sets the context to be used in this call's Do method. Any
3123// pending HTTP request will be aborted if the provided context is
3124// canceled.
3125func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsDeleteCall {
3126	c.ctx_ = ctx
3127	return c
3128}
3129
3130// Header returns an http.Header that can be modified by the caller to
3131// add HTTP headers to the request.
3132func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) Header() http.Header {
3133	if c.header_ == nil {
3134		c.header_ = make(http.Header)
3135	}
3136	return c.header_
3137}
3138
3139func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
3140	reqHeaders := make(http.Header)
3141	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3142	for k, v := range c.header_ {
3143		reqHeaders[k] = v
3144	}
3145	reqHeaders.Set("User-Agent", c.s.userAgent())
3146	var body io.Reader = nil
3147	c.urlParams_.Set("alt", alt)
3148	c.urlParams_.Set("prettyPrint", "false")
3149	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3150	urls += "?" + c.urlParams_.Encode()
3151	req, err := http.NewRequest("DELETE", urls, body)
3152	if err != nil {
3153		return nil, err
3154	}
3155	req.Header = reqHeaders
3156	googleapi.Expand(req.URL, map[string]string{
3157		"name": c.name,
3158	})
3159	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3160}
3161
3162// Do executes the "recommendationengine.projects.locations.catalogs.catalogItems.delete" call.
3163// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
3164// non-2xx status code is an error. Response headers are in either
3165// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
3166// returned at all) in error.(*googleapi.Error).Header. Use
3167// googleapi.IsNotModified to check whether the returned error was
3168// because http.StatusNotModified was returned.
3169func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
3170	gensupport.SetOptions(c.urlParams_, opts...)
3171	res, err := c.doRequest("json")
3172	if res != nil && res.StatusCode == http.StatusNotModified {
3173		if res.Body != nil {
3174			res.Body.Close()
3175		}
3176		return nil, &googleapi.Error{
3177			Code:   res.StatusCode,
3178			Header: res.Header,
3179		}
3180	}
3181	if err != nil {
3182		return nil, err
3183	}
3184	defer googleapi.CloseBody(res)
3185	if err := googleapi.CheckResponse(res); err != nil {
3186		return nil, err
3187	}
3188	ret := &GoogleProtobufEmpty{
3189		ServerResponse: googleapi.ServerResponse{
3190			Header:         res.Header,
3191			HTTPStatusCode: res.StatusCode,
3192		},
3193	}
3194	target := &ret
3195	if err := gensupport.DecodeResponse(target, res); err != nil {
3196		return nil, err
3197	}
3198	return ret, nil
3199	// {
3200	//   "description": "Deletes a catalog item.",
3201	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems/{catalogItemsId}",
3202	//   "httpMethod": "DELETE",
3203	//   "id": "recommendationengine.projects.locations.catalogs.catalogItems.delete",
3204	//   "parameterOrder": [
3205	//     "name"
3206	//   ],
3207	//   "parameters": {
3208	//     "name": {
3209	//       "description": "Required. Full resource name of catalog item, such as `projects/*/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id`.",
3210	//       "location": "path",
3211	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/catalogItems/.*$",
3212	//       "required": true,
3213	//       "type": "string"
3214	//     }
3215	//   },
3216	//   "path": "v1beta1/{+name}",
3217	//   "response": {
3218	//     "$ref": "GoogleProtobufEmpty"
3219	//   },
3220	//   "scopes": [
3221	//     "https://www.googleapis.com/auth/cloud-platform"
3222	//   ]
3223	// }
3224
3225}
3226
3227// method id "recommendationengine.projects.locations.catalogs.catalogItems.get":
3228
3229type ProjectsLocationsCatalogsCatalogItemsGetCall struct {
3230	s            *Service
3231	name         string
3232	urlParams_   gensupport.URLParams
3233	ifNoneMatch_ string
3234	ctx_         context.Context
3235	header_      http.Header
3236}
3237
3238// Get: Gets a specific catalog item.
3239//
3240// - name: Full resource name of catalog item, such as
3241//   `projects/*/locations/global/catalogs/default_catalog/catalogitems/s
3242//   ome_catalog_item_id`.
3243func (r *ProjectsLocationsCatalogsCatalogItemsService) Get(name string) *ProjectsLocationsCatalogsCatalogItemsGetCall {
3244	c := &ProjectsLocationsCatalogsCatalogItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3245	c.name = name
3246	return c
3247}
3248
3249// Fields allows partial responses to be retrieved. See
3250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3251// for more information.
3252func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsGetCall {
3253	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3254	return c
3255}
3256
3257// IfNoneMatch sets the optional parameter which makes the operation
3258// fail if the object's ETag matches the given value. This is useful for
3259// getting updates only after the object has changed since the last
3260// request. Use googleapi.IsNotModified to check whether the response
3261// error from Do is the result of In-None-Match.
3262func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsCatalogItemsGetCall {
3263	c.ifNoneMatch_ = entityTag
3264	return c
3265}
3266
3267// Context sets the context to be used in this call's Do method. Any
3268// pending HTTP request will be aborted if the provided context is
3269// canceled.
3270func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsGetCall {
3271	c.ctx_ = ctx
3272	return c
3273}
3274
3275// Header returns an http.Header that can be modified by the caller to
3276// add HTTP headers to the request.
3277func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) Header() http.Header {
3278	if c.header_ == nil {
3279		c.header_ = make(http.Header)
3280	}
3281	return c.header_
3282}
3283
3284func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) doRequest(alt string) (*http.Response, error) {
3285	reqHeaders := make(http.Header)
3286	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3287	for k, v := range c.header_ {
3288		reqHeaders[k] = v
3289	}
3290	reqHeaders.Set("User-Agent", c.s.userAgent())
3291	if c.ifNoneMatch_ != "" {
3292		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3293	}
3294	var body io.Reader = nil
3295	c.urlParams_.Set("alt", alt)
3296	c.urlParams_.Set("prettyPrint", "false")
3297	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3298	urls += "?" + c.urlParams_.Encode()
3299	req, err := http.NewRequest("GET", urls, body)
3300	if err != nil {
3301		return nil, err
3302	}
3303	req.Header = reqHeaders
3304	googleapi.Expand(req.URL, map[string]string{
3305		"name": c.name,
3306	})
3307	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3308}
3309
3310// Do executes the "recommendationengine.projects.locations.catalogs.catalogItems.get" call.
3311// Exactly one of *GoogleCloudRecommendationengineV1beta1CatalogItem or
3312// error will be non-nil. Any non-2xx status code is an error. Response
3313// headers are in either
3314// *GoogleCloudRecommendationengineV1beta1CatalogItem.ServerResponse.Head
3315// er or (if a response was returned at all) in
3316// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3317// whether the returned error was because http.StatusNotModified was
3318// returned.
3319func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1CatalogItem, error) {
3320	gensupport.SetOptions(c.urlParams_, opts...)
3321	res, err := c.doRequest("json")
3322	if res != nil && res.StatusCode == http.StatusNotModified {
3323		if res.Body != nil {
3324			res.Body.Close()
3325		}
3326		return nil, &googleapi.Error{
3327			Code:   res.StatusCode,
3328			Header: res.Header,
3329		}
3330	}
3331	if err != nil {
3332		return nil, err
3333	}
3334	defer googleapi.CloseBody(res)
3335	if err := googleapi.CheckResponse(res); err != nil {
3336		return nil, err
3337	}
3338	ret := &GoogleCloudRecommendationengineV1beta1CatalogItem{
3339		ServerResponse: googleapi.ServerResponse{
3340			Header:         res.Header,
3341			HTTPStatusCode: res.StatusCode,
3342		},
3343	}
3344	target := &ret
3345	if err := gensupport.DecodeResponse(target, res); err != nil {
3346		return nil, err
3347	}
3348	return ret, nil
3349	// {
3350	//   "description": "Gets a specific catalog item.",
3351	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems/{catalogItemsId}",
3352	//   "httpMethod": "GET",
3353	//   "id": "recommendationengine.projects.locations.catalogs.catalogItems.get",
3354	//   "parameterOrder": [
3355	//     "name"
3356	//   ],
3357	//   "parameters": {
3358	//     "name": {
3359	//       "description": "Required. Full resource name of catalog item, such as `projects/*/locations/global/catalogs/default_catalog/catalogitems/some_catalog_item_id`.",
3360	//       "location": "path",
3361	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/catalogItems/.*$",
3362	//       "required": true,
3363	//       "type": "string"
3364	//     }
3365	//   },
3366	//   "path": "v1beta1/{+name}",
3367	//   "response": {
3368	//     "$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem"
3369	//   },
3370	//   "scopes": [
3371	//     "https://www.googleapis.com/auth/cloud-platform"
3372	//   ]
3373	// }
3374
3375}
3376
3377// method id "recommendationengine.projects.locations.catalogs.catalogItems.import":
3378
3379type ProjectsLocationsCatalogsCatalogItemsImportCall struct {
3380	s                                                               *Service
3381	parent                                                          string
3382	googlecloudrecommendationenginev1beta1importcatalogitemsrequest *GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest
3383	urlParams_                                                      gensupport.URLParams
3384	ctx_                                                            context.Context
3385	header_                                                         http.Header
3386}
3387
3388// Import: Bulk import of multiple catalog items. Request processing may
3389// be synchronous. No partial updating supported. Non-existing items
3390// will be created. Operation.response is of type ImportResponse. Note
3391// that it is possible for a subset of the items to be successfully
3392// updated.
3393//
3394// - parent: `projects/1234/locations/global/catalogs/default_catalog`
3395//   If no updateMask is specified, requires catalogItems.create
3396//   permission. If updateMask is specified, requires
3397//   catalogItems.update permission.
3398func (r *ProjectsLocationsCatalogsCatalogItemsService) Import(parent string, googlecloudrecommendationenginev1beta1importcatalogitemsrequest *GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest) *ProjectsLocationsCatalogsCatalogItemsImportCall {
3399	c := &ProjectsLocationsCatalogsCatalogItemsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3400	c.parent = parent
3401	c.googlecloudrecommendationenginev1beta1importcatalogitemsrequest = googlecloudrecommendationenginev1beta1importcatalogitemsrequest
3402	return c
3403}
3404
3405// Fields allows partial responses to be retrieved. See
3406// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3407// for more information.
3408func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsImportCall {
3409	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3410	return c
3411}
3412
3413// Context sets the context to be used in this call's Do method. Any
3414// pending HTTP request will be aborted if the provided context is
3415// canceled.
3416func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsImportCall {
3417	c.ctx_ = ctx
3418	return c
3419}
3420
3421// Header returns an http.Header that can be modified by the caller to
3422// add HTTP headers to the request.
3423func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) Header() http.Header {
3424	if c.header_ == nil {
3425		c.header_ = make(http.Header)
3426	}
3427	return c.header_
3428}
3429
3430func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) doRequest(alt string) (*http.Response, error) {
3431	reqHeaders := make(http.Header)
3432	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3433	for k, v := range c.header_ {
3434		reqHeaders[k] = v
3435	}
3436	reqHeaders.Set("User-Agent", c.s.userAgent())
3437	var body io.Reader = nil
3438	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1importcatalogitemsrequest)
3439	if err != nil {
3440		return nil, err
3441	}
3442	reqHeaders.Set("Content-Type", "application/json")
3443	c.urlParams_.Set("alt", alt)
3444	c.urlParams_.Set("prettyPrint", "false")
3445	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/catalogItems:import")
3446	urls += "?" + c.urlParams_.Encode()
3447	req, err := http.NewRequest("POST", urls, body)
3448	if err != nil {
3449		return nil, err
3450	}
3451	req.Header = reqHeaders
3452	googleapi.Expand(req.URL, map[string]string{
3453		"parent": c.parent,
3454	})
3455	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3456}
3457
3458// Do executes the "recommendationengine.projects.locations.catalogs.catalogItems.import" call.
3459// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
3460// Any non-2xx status code is an error. Response headers are in either
3461// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
3462// was returned at all) in error.(*googleapi.Error).Header. Use
3463// googleapi.IsNotModified to check whether the returned error was
3464// because http.StatusNotModified was returned.
3465func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3466	gensupport.SetOptions(c.urlParams_, opts...)
3467	res, err := c.doRequest("json")
3468	if res != nil && res.StatusCode == http.StatusNotModified {
3469		if res.Body != nil {
3470			res.Body.Close()
3471		}
3472		return nil, &googleapi.Error{
3473			Code:   res.StatusCode,
3474			Header: res.Header,
3475		}
3476	}
3477	if err != nil {
3478		return nil, err
3479	}
3480	defer googleapi.CloseBody(res)
3481	if err := googleapi.CheckResponse(res); err != nil {
3482		return nil, err
3483	}
3484	ret := &GoogleLongrunningOperation{
3485		ServerResponse: googleapi.ServerResponse{
3486			Header:         res.Header,
3487			HTTPStatusCode: res.StatusCode,
3488		},
3489	}
3490	target := &ret
3491	if err := gensupport.DecodeResponse(target, res); err != nil {
3492		return nil, err
3493	}
3494	return ret, nil
3495	// {
3496	//   "description": "Bulk import of multiple catalog items. Request processing may be synchronous. No partial updating supported. Non-existing items will be created. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully updated.",
3497	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems:import",
3498	//   "httpMethod": "POST",
3499	//   "id": "recommendationengine.projects.locations.catalogs.catalogItems.import",
3500	//   "parameterOrder": [
3501	//     "parent"
3502	//   ],
3503	//   "parameters": {
3504	//     "parent": {
3505	//       "description": "Required. `projects/1234/locations/global/catalogs/default_catalog` If no updateMask is specified, requires catalogItems.create permission. If updateMask is specified, requires catalogItems.update permission.",
3506	//       "location": "path",
3507	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$",
3508	//       "required": true,
3509	//       "type": "string"
3510	//     }
3511	//   },
3512	//   "path": "v1beta1/{+parent}/catalogItems:import",
3513	//   "request": {
3514	//     "$ref": "GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest"
3515	//   },
3516	//   "response": {
3517	//     "$ref": "GoogleLongrunningOperation"
3518	//   },
3519	//   "scopes": [
3520	//     "https://www.googleapis.com/auth/cloud-platform"
3521	//   ]
3522	// }
3523
3524}
3525
3526// method id "recommendationengine.projects.locations.catalogs.catalogItems.list":
3527
3528type ProjectsLocationsCatalogsCatalogItemsListCall struct {
3529	s            *Service
3530	parent       string
3531	urlParams_   gensupport.URLParams
3532	ifNoneMatch_ string
3533	ctx_         context.Context
3534	header_      http.Header
3535}
3536
3537// List: Gets a list of catalog items.
3538//
3539// - parent: The parent catalog resource name, such as
3540//   `projects/*/locations/global/catalogs/default_catalog`.
3541func (r *ProjectsLocationsCatalogsCatalogItemsService) List(parent string) *ProjectsLocationsCatalogsCatalogItemsListCall {
3542	c := &ProjectsLocationsCatalogsCatalogItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3543	c.parent = parent
3544	return c
3545}
3546
3547// Filter sets the optional parameter "filter": A filter to apply on the
3548// list results.
3549func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Filter(filter string) *ProjectsLocationsCatalogsCatalogItemsListCall {
3550	c.urlParams_.Set("filter", filter)
3551	return c
3552}
3553
3554// PageSize sets the optional parameter "pageSize": Maximum number of
3555// results to return per page. If zero, the service will choose a
3556// reasonable default.
3557func (c *ProjectsLocationsCatalogsCatalogItemsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsCatalogItemsListCall {
3558	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3559	return c
3560}
3561
3562// PageToken sets the optional parameter "pageToken": The previous
3563// ListCatalogItemsResponse.next_page_token.
3564func (c *ProjectsLocationsCatalogsCatalogItemsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsCatalogItemsListCall {
3565	c.urlParams_.Set("pageToken", pageToken)
3566	return c
3567}
3568
3569// Fields allows partial responses to be retrieved. See
3570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3571// for more information.
3572func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsListCall {
3573	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3574	return c
3575}
3576
3577// IfNoneMatch sets the optional parameter which makes the operation
3578// fail if the object's ETag matches the given value. This is useful for
3579// getting updates only after the object has changed since the last
3580// request. Use googleapi.IsNotModified to check whether the response
3581// error from Do is the result of In-None-Match.
3582func (c *ProjectsLocationsCatalogsCatalogItemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsCatalogItemsListCall {
3583	c.ifNoneMatch_ = entityTag
3584	return c
3585}
3586
3587// Context sets the context to be used in this call's Do method. Any
3588// pending HTTP request will be aborted if the provided context is
3589// canceled.
3590func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsListCall {
3591	c.ctx_ = ctx
3592	return c
3593}
3594
3595// Header returns an http.Header that can be modified by the caller to
3596// add HTTP headers to the request.
3597func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Header() http.Header {
3598	if c.header_ == nil {
3599		c.header_ = make(http.Header)
3600	}
3601	return c.header_
3602}
3603
3604func (c *ProjectsLocationsCatalogsCatalogItemsListCall) doRequest(alt string) (*http.Response, error) {
3605	reqHeaders := make(http.Header)
3606	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3607	for k, v := range c.header_ {
3608		reqHeaders[k] = v
3609	}
3610	reqHeaders.Set("User-Agent", c.s.userAgent())
3611	if c.ifNoneMatch_ != "" {
3612		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3613	}
3614	var body io.Reader = nil
3615	c.urlParams_.Set("alt", alt)
3616	c.urlParams_.Set("prettyPrint", "false")
3617	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/catalogItems")
3618	urls += "?" + c.urlParams_.Encode()
3619	req, err := http.NewRequest("GET", urls, body)
3620	if err != nil {
3621		return nil, err
3622	}
3623	req.Header = reqHeaders
3624	googleapi.Expand(req.URL, map[string]string{
3625		"parent": c.parent,
3626	})
3627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3628}
3629
3630// Do executes the "recommendationengine.projects.locations.catalogs.catalogItems.list" call.
3631// Exactly one of
3632// *GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse or
3633// error will be non-nil. Any non-2xx status code is an error. Response
3634// headers are in either
3635// *GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse.Server
3636// Response.Header or (if a response was returned at all) in
3637// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3638// whether the returned error was because http.StatusNotModified was
3639// returned.
3640func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse, error) {
3641	gensupport.SetOptions(c.urlParams_, opts...)
3642	res, err := c.doRequest("json")
3643	if res != nil && res.StatusCode == http.StatusNotModified {
3644		if res.Body != nil {
3645			res.Body.Close()
3646		}
3647		return nil, &googleapi.Error{
3648			Code:   res.StatusCode,
3649			Header: res.Header,
3650		}
3651	}
3652	if err != nil {
3653		return nil, err
3654	}
3655	defer googleapi.CloseBody(res)
3656	if err := googleapi.CheckResponse(res); err != nil {
3657		return nil, err
3658	}
3659	ret := &GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse{
3660		ServerResponse: googleapi.ServerResponse{
3661			Header:         res.Header,
3662			HTTPStatusCode: res.StatusCode,
3663		},
3664	}
3665	target := &ret
3666	if err := gensupport.DecodeResponse(target, res); err != nil {
3667		return nil, err
3668	}
3669	return ret, nil
3670	// {
3671	//   "description": "Gets a list of catalog items.",
3672	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems",
3673	//   "httpMethod": "GET",
3674	//   "id": "recommendationengine.projects.locations.catalogs.catalogItems.list",
3675	//   "parameterOrder": [
3676	//     "parent"
3677	//   ],
3678	//   "parameters": {
3679	//     "filter": {
3680	//       "description": "Optional. A filter to apply on the list results.",
3681	//       "location": "query",
3682	//       "type": "string"
3683	//     },
3684	//     "pageSize": {
3685	//       "description": "Optional. Maximum number of results to return per page. If zero, the service will choose a reasonable default.",
3686	//       "format": "int32",
3687	//       "location": "query",
3688	//       "type": "integer"
3689	//     },
3690	//     "pageToken": {
3691	//       "description": "Optional. The previous ListCatalogItemsResponse.next_page_token.",
3692	//       "location": "query",
3693	//       "type": "string"
3694	//     },
3695	//     "parent": {
3696	//       "description": "Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.",
3697	//       "location": "path",
3698	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$",
3699	//       "required": true,
3700	//       "type": "string"
3701	//     }
3702	//   },
3703	//   "path": "v1beta1/{+parent}/catalogItems",
3704	//   "response": {
3705	//     "$ref": "GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse"
3706	//   },
3707	//   "scopes": [
3708	//     "https://www.googleapis.com/auth/cloud-platform"
3709	//   ]
3710	// }
3711
3712}
3713
3714// Pages invokes f for each page of results.
3715// A non-nil error returned from f will halt the iteration.
3716// The provided context supersedes any context provided to the Context method.
3717func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse) error) error {
3718	c.ctx_ = ctx
3719	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3720	for {
3721		x, err := c.Do()
3722		if err != nil {
3723			return err
3724		}
3725		if err := f(x); err != nil {
3726			return err
3727		}
3728		if x.NextPageToken == "" {
3729			return nil
3730		}
3731		c.PageToken(x.NextPageToken)
3732	}
3733}
3734
3735// method id "recommendationengine.projects.locations.catalogs.catalogItems.patch":
3736
3737type ProjectsLocationsCatalogsCatalogItemsPatchCall struct {
3738	s                                                 *Service
3739	name                                              string
3740	googlecloudrecommendationenginev1beta1catalogitem *GoogleCloudRecommendationengineV1beta1CatalogItem
3741	urlParams_                                        gensupport.URLParams
3742	ctx_                                              context.Context
3743	header_                                           http.Header
3744}
3745
3746// Patch: Updates a catalog item. Partial updating is supported.
3747// Non-existing items will be created.
3748//
3749// - name: Full resource name of catalog item, such as
3750//   `projects/*/locations/global/catalogs/default_catalog/catalogItems/s
3751//   ome_catalog_item_id`.
3752func (r *ProjectsLocationsCatalogsCatalogItemsService) Patch(name string, googlecloudrecommendationenginev1beta1catalogitem *GoogleCloudRecommendationengineV1beta1CatalogItem) *ProjectsLocationsCatalogsCatalogItemsPatchCall {
3753	c := &ProjectsLocationsCatalogsCatalogItemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3754	c.name = name
3755	c.googlecloudrecommendationenginev1beta1catalogitem = googlecloudrecommendationenginev1beta1catalogitem
3756	return c
3757}
3758
3759// UpdateMask sets the optional parameter "updateMask": Indicates which
3760// fields in the provided 'item' to update. If not set, will by default
3761// update all fields.
3762func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsCatalogItemsPatchCall {
3763	c.urlParams_.Set("updateMask", updateMask)
3764	return c
3765}
3766
3767// Fields allows partial responses to be retrieved. See
3768// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3769// for more information.
3770func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsPatchCall {
3771	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3772	return c
3773}
3774
3775// Context sets the context to be used in this call's Do method. Any
3776// pending HTTP request will be aborted if the provided context is
3777// canceled.
3778func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsPatchCall {
3779	c.ctx_ = ctx
3780	return c
3781}
3782
3783// Header returns an http.Header that can be modified by the caller to
3784// add HTTP headers to the request.
3785func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) Header() http.Header {
3786	if c.header_ == nil {
3787		c.header_ = make(http.Header)
3788	}
3789	return c.header_
3790}
3791
3792func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) doRequest(alt string) (*http.Response, error) {
3793	reqHeaders := make(http.Header)
3794	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3795	for k, v := range c.header_ {
3796		reqHeaders[k] = v
3797	}
3798	reqHeaders.Set("User-Agent", c.s.userAgent())
3799	var body io.Reader = nil
3800	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1catalogitem)
3801	if err != nil {
3802		return nil, err
3803	}
3804	reqHeaders.Set("Content-Type", "application/json")
3805	c.urlParams_.Set("alt", alt)
3806	c.urlParams_.Set("prettyPrint", "false")
3807	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3808	urls += "?" + c.urlParams_.Encode()
3809	req, err := http.NewRequest("PATCH", urls, body)
3810	if err != nil {
3811		return nil, err
3812	}
3813	req.Header = reqHeaders
3814	googleapi.Expand(req.URL, map[string]string{
3815		"name": c.name,
3816	})
3817	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3818}
3819
3820// Do executes the "recommendationengine.projects.locations.catalogs.catalogItems.patch" call.
3821// Exactly one of *GoogleCloudRecommendationengineV1beta1CatalogItem or
3822// error will be non-nil. Any non-2xx status code is an error. Response
3823// headers are in either
3824// *GoogleCloudRecommendationengineV1beta1CatalogItem.ServerResponse.Head
3825// er or (if a response was returned at all) in
3826// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3827// whether the returned error was because http.StatusNotModified was
3828// returned.
3829func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1CatalogItem, error) {
3830	gensupport.SetOptions(c.urlParams_, opts...)
3831	res, err := c.doRequest("json")
3832	if res != nil && res.StatusCode == http.StatusNotModified {
3833		if res.Body != nil {
3834			res.Body.Close()
3835		}
3836		return nil, &googleapi.Error{
3837			Code:   res.StatusCode,
3838			Header: res.Header,
3839		}
3840	}
3841	if err != nil {
3842		return nil, err
3843	}
3844	defer googleapi.CloseBody(res)
3845	if err := googleapi.CheckResponse(res); err != nil {
3846		return nil, err
3847	}
3848	ret := &GoogleCloudRecommendationengineV1beta1CatalogItem{
3849		ServerResponse: googleapi.ServerResponse{
3850			Header:         res.Header,
3851			HTTPStatusCode: res.StatusCode,
3852		},
3853	}
3854	target := &ret
3855	if err := gensupport.DecodeResponse(target, res); err != nil {
3856		return nil, err
3857	}
3858	return ret, nil
3859	// {
3860	//   "description": "Updates a catalog item. Partial updating is supported. Non-existing items will be created.",
3861	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems/{catalogItemsId}",
3862	//   "httpMethod": "PATCH",
3863	//   "id": "recommendationengine.projects.locations.catalogs.catalogItems.patch",
3864	//   "parameterOrder": [
3865	//     "name"
3866	//   ],
3867	//   "parameters": {
3868	//     "name": {
3869	//       "description": "Required. Full resource name of catalog item, such as `projects/*/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id`.",
3870	//       "location": "path",
3871	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/catalogItems/.*$",
3872	//       "required": true,
3873	//       "type": "string"
3874	//     },
3875	//     "updateMask": {
3876	//       "description": "Optional. Indicates which fields in the provided 'item' to update. If not set, will by default update all fields.",
3877	//       "format": "google-fieldmask",
3878	//       "location": "query",
3879	//       "type": "string"
3880	//     }
3881	//   },
3882	//   "path": "v1beta1/{+name}",
3883	//   "request": {
3884	//     "$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem"
3885	//   },
3886	//   "response": {
3887	//     "$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem"
3888	//   },
3889	//   "scopes": [
3890	//     "https://www.googleapis.com/auth/cloud-platform"
3891	//   ]
3892	// }
3893
3894}
3895
3896// method id "recommendationengine.projects.locations.catalogs.eventStores.operations.get":
3897
3898type ProjectsLocationsCatalogsEventStoresOperationsGetCall struct {
3899	s            *Service
3900	name         string
3901	urlParams_   gensupport.URLParams
3902	ifNoneMatch_ string
3903	ctx_         context.Context
3904	header_      http.Header
3905}
3906
3907// Get: Gets the latest state of a long-running operation. Clients can
3908// use this method to poll the operation result at intervals as
3909// recommended by the API service.
3910//
3911// - name: The name of the operation resource.
3912func (r *ProjectsLocationsCatalogsEventStoresOperationsService) Get(name string) *ProjectsLocationsCatalogsEventStoresOperationsGetCall {
3913	c := &ProjectsLocationsCatalogsEventStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3914	c.name = name
3915	return c
3916}
3917
3918// Fields allows partial responses to be retrieved. See
3919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3920// for more information.
3921func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresOperationsGetCall {
3922	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3923	return c
3924}
3925
3926// IfNoneMatch sets the optional parameter which makes the operation
3927// fail if the object's ETag matches the given value. This is useful for
3928// getting updates only after the object has changed since the last
3929// request. Use googleapi.IsNotModified to check whether the response
3930// error from Do is the result of In-None-Match.
3931func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresOperationsGetCall {
3932	c.ifNoneMatch_ = entityTag
3933	return c
3934}
3935
3936// Context sets the context to be used in this call's Do method. Any
3937// pending HTTP request will be aborted if the provided context is
3938// canceled.
3939func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresOperationsGetCall {
3940	c.ctx_ = ctx
3941	return c
3942}
3943
3944// Header returns an http.Header that can be modified by the caller to
3945// add HTTP headers to the request.
3946func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) Header() http.Header {
3947	if c.header_ == nil {
3948		c.header_ = make(http.Header)
3949	}
3950	return c.header_
3951}
3952
3953func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) {
3954	reqHeaders := make(http.Header)
3955	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3956	for k, v := range c.header_ {
3957		reqHeaders[k] = v
3958	}
3959	reqHeaders.Set("User-Agent", c.s.userAgent())
3960	if c.ifNoneMatch_ != "" {
3961		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3962	}
3963	var body io.Reader = nil
3964	c.urlParams_.Set("alt", alt)
3965	c.urlParams_.Set("prettyPrint", "false")
3966	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3967	urls += "?" + c.urlParams_.Encode()
3968	req, err := http.NewRequest("GET", urls, body)
3969	if err != nil {
3970		return nil, err
3971	}
3972	req.Header = reqHeaders
3973	googleapi.Expand(req.URL, map[string]string{
3974		"name": c.name,
3975	})
3976	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3977}
3978
3979// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.operations.get" call.
3980// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
3981// Any non-2xx status code is an error. Response headers are in either
3982// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
3983// was returned at all) in error.(*googleapi.Error).Header. Use
3984// googleapi.IsNotModified to check whether the returned error was
3985// because http.StatusNotModified was returned.
3986func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3987	gensupport.SetOptions(c.urlParams_, opts...)
3988	res, err := c.doRequest("json")
3989	if res != nil && res.StatusCode == http.StatusNotModified {
3990		if res.Body != nil {
3991			res.Body.Close()
3992		}
3993		return nil, &googleapi.Error{
3994			Code:   res.StatusCode,
3995			Header: res.Header,
3996		}
3997	}
3998	if err != nil {
3999		return nil, err
4000	}
4001	defer googleapi.CloseBody(res)
4002	if err := googleapi.CheckResponse(res); err != nil {
4003		return nil, err
4004	}
4005	ret := &GoogleLongrunningOperation{
4006		ServerResponse: googleapi.ServerResponse{
4007			Header:         res.Header,
4008			HTTPStatusCode: res.StatusCode,
4009		},
4010	}
4011	target := &ret
4012	if err := gensupport.DecodeResponse(target, res); err != nil {
4013		return nil, err
4014	}
4015	return ret, nil
4016	// {
4017	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
4018	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/operations/{operationsId}",
4019	//   "httpMethod": "GET",
4020	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.operations.get",
4021	//   "parameterOrder": [
4022	//     "name"
4023	//   ],
4024	//   "parameters": {
4025	//     "name": {
4026	//       "description": "The name of the operation resource.",
4027	//       "location": "path",
4028	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+/operations/[^/]+$",
4029	//       "required": true,
4030	//       "type": "string"
4031	//     }
4032	//   },
4033	//   "path": "v1beta1/{+name}",
4034	//   "response": {
4035	//     "$ref": "GoogleLongrunningOperation"
4036	//   },
4037	//   "scopes": [
4038	//     "https://www.googleapis.com/auth/cloud-platform"
4039	//   ]
4040	// }
4041
4042}
4043
4044// method id "recommendationengine.projects.locations.catalogs.eventStores.operations.list":
4045
4046type ProjectsLocationsCatalogsEventStoresOperationsListCall struct {
4047	s            *Service
4048	name         string
4049	urlParams_   gensupport.URLParams
4050	ifNoneMatch_ string
4051	ctx_         context.Context
4052	header_      http.Header
4053}
4054
4055// List: Lists operations that match the specified filter in the
4056// request. If the server doesn't support this method, it returns
4057// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
4058// override the binding to use different resource name schemes, such as
4059// `users/*/operations`. To override the binding, API services can add a
4060// binding such as "/v1/{name=users/*}/operations" to their service
4061// configuration. For backwards compatibility, the default name includes
4062// the operations collection id, however overriding users must ensure
4063// the name binding is the parent resource, without the operations
4064// collection id.
4065//
4066// - name: The name of the operation's parent resource.
4067func (r *ProjectsLocationsCatalogsEventStoresOperationsService) List(name string) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
4068	c := &ProjectsLocationsCatalogsEventStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4069	c.name = name
4070	return c
4071}
4072
4073// Filter sets the optional parameter "filter": The standard list
4074// filter.
4075func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
4076	c.urlParams_.Set("filter", filter)
4077	return c
4078}
4079
4080// PageSize sets the optional parameter "pageSize": The standard list
4081// page size.
4082func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
4083	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4084	return c
4085}
4086
4087// PageToken sets the optional parameter "pageToken": The standard list
4088// page token.
4089func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
4090	c.urlParams_.Set("pageToken", pageToken)
4091	return c
4092}
4093
4094// Fields allows partial responses to be retrieved. See
4095// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4096// for more information.
4097func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
4098	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4099	return c
4100}
4101
4102// IfNoneMatch sets the optional parameter which makes the operation
4103// fail if the object's ETag matches the given value. This is useful for
4104// getting updates only after the object has changed since the last
4105// request. Use googleapi.IsNotModified to check whether the response
4106// error from Do is the result of In-None-Match.
4107func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
4108	c.ifNoneMatch_ = entityTag
4109	return c
4110}
4111
4112// Context sets the context to be used in this call's Do method. Any
4113// pending HTTP request will be aborted if the provided context is
4114// canceled.
4115func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
4116	c.ctx_ = ctx
4117	return c
4118}
4119
4120// Header returns an http.Header that can be modified by the caller to
4121// add HTTP headers to the request.
4122func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Header() http.Header {
4123	if c.header_ == nil {
4124		c.header_ = make(http.Header)
4125	}
4126	return c.header_
4127}
4128
4129func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) doRequest(alt string) (*http.Response, error) {
4130	reqHeaders := make(http.Header)
4131	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4132	for k, v := range c.header_ {
4133		reqHeaders[k] = v
4134	}
4135	reqHeaders.Set("User-Agent", c.s.userAgent())
4136	if c.ifNoneMatch_ != "" {
4137		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4138	}
4139	var body io.Reader = nil
4140	c.urlParams_.Set("alt", alt)
4141	c.urlParams_.Set("prettyPrint", "false")
4142	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
4143	urls += "?" + c.urlParams_.Encode()
4144	req, err := http.NewRequest("GET", urls, body)
4145	if err != nil {
4146		return nil, err
4147	}
4148	req.Header = reqHeaders
4149	googleapi.Expand(req.URL, map[string]string{
4150		"name": c.name,
4151	})
4152	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4153}
4154
4155// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.operations.list" call.
4156// Exactly one of *GoogleLongrunningListOperationsResponse or error will
4157// be non-nil. Any non-2xx status code is an error. Response headers are
4158// in either
4159// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
4160// a response was returned at all) in error.(*googleapi.Error).Header.
4161// Use googleapi.IsNotModified to check whether the returned error was
4162// because http.StatusNotModified was returned.
4163func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
4164	gensupport.SetOptions(c.urlParams_, opts...)
4165	res, err := c.doRequest("json")
4166	if res != nil && res.StatusCode == http.StatusNotModified {
4167		if res.Body != nil {
4168			res.Body.Close()
4169		}
4170		return nil, &googleapi.Error{
4171			Code:   res.StatusCode,
4172			Header: res.Header,
4173		}
4174	}
4175	if err != nil {
4176		return nil, err
4177	}
4178	defer googleapi.CloseBody(res)
4179	if err := googleapi.CheckResponse(res); err != nil {
4180		return nil, err
4181	}
4182	ret := &GoogleLongrunningListOperationsResponse{
4183		ServerResponse: googleapi.ServerResponse{
4184			Header:         res.Header,
4185			HTTPStatusCode: res.StatusCode,
4186		},
4187	}
4188	target := &ret
4189	if err := gensupport.DecodeResponse(target, res); err != nil {
4190		return nil, err
4191	}
4192	return ret, nil
4193	// {
4194	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
4195	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/operations",
4196	//   "httpMethod": "GET",
4197	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.operations.list",
4198	//   "parameterOrder": [
4199	//     "name"
4200	//   ],
4201	//   "parameters": {
4202	//     "filter": {
4203	//       "description": "The standard list filter.",
4204	//       "location": "query",
4205	//       "type": "string"
4206	//     },
4207	//     "name": {
4208	//       "description": "The name of the operation's parent resource.",
4209	//       "location": "path",
4210	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$",
4211	//       "required": true,
4212	//       "type": "string"
4213	//     },
4214	//     "pageSize": {
4215	//       "description": "The standard list page size.",
4216	//       "format": "int32",
4217	//       "location": "query",
4218	//       "type": "integer"
4219	//     },
4220	//     "pageToken": {
4221	//       "description": "The standard list page token.",
4222	//       "location": "query",
4223	//       "type": "string"
4224	//     }
4225	//   },
4226	//   "path": "v1beta1/{+name}/operations",
4227	//   "response": {
4228	//     "$ref": "GoogleLongrunningListOperationsResponse"
4229	//   },
4230	//   "scopes": [
4231	//     "https://www.googleapis.com/auth/cloud-platform"
4232	//   ]
4233	// }
4234
4235}
4236
4237// Pages invokes f for each page of results.
4238// A non-nil error returned from f will halt the iteration.
4239// The provided context supersedes any context provided to the Context method.
4240func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
4241	c.ctx_ = ctx
4242	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4243	for {
4244		x, err := c.Do()
4245		if err != nil {
4246			return err
4247		}
4248		if err := f(x); err != nil {
4249			return err
4250		}
4251		if x.NextPageToken == "" {
4252			return nil
4253		}
4254		c.PageToken(x.NextPageToken)
4255	}
4256}
4257
4258// method id "recommendationengine.projects.locations.catalogs.eventStores.placements.predict":
4259
4260type ProjectsLocationsCatalogsEventStoresPlacementsPredictCall struct {
4261	s                                                    *Service
4262	name                                                 string
4263	googlecloudrecommendationenginev1beta1predictrequest *GoogleCloudRecommendationengineV1beta1PredictRequest
4264	urlParams_                                           gensupport.URLParams
4265	ctx_                                                 context.Context
4266	header_                                              http.Header
4267}
4268
4269// Predict: Makes a recommendation prediction. If using API Key based
4270// authentication, the API Key must be registered using the
4271// PredictionApiKeyRegistry service. Learn more
4272// (https://cloud.google.com/recommendations-ai/docs/setting-up#register-key).
4273//
4274// - name: Full resource name of the format:
4275//   `{name=projects/*/locations/global/catalogs/default_catalog/eventSto
4276//   res/default_event_store/placements/*}` The id of the recommendation
4277//   engine placement. This id is used to identify the set of models
4278//   that will be used to make the prediction. We currently support
4279//   three placements with the following IDs by default: *
4280//   `shopping_cart`: Predicts items frequently bought together with one
4281//   or more catalog items in the same shopping session. Commonly
4282//   displayed after `add-to-cart` events, on product detail pages, or
4283//   on the shopping cart page. * `home_page`: Predicts the next product
4284//   that a user will most likely engage with or purchase based on the
4285//   shopping or viewing history of the specified `userId` or
4286//   `visitorId`. For example - Recommendations for you. *
4287//   `product_detail`: Predicts the next product that a user will most
4288//   likely engage with or purchase. The prediction is based on the
4289//   shopping or viewing history of the specified `userId` or
4290//   `visitorId` and its relevance to a specified `CatalogItem`.
4291//   Typically used on product detail pages. For example - More items
4292//   like this. * `recently_viewed_default`: Returns up to 75 items
4293//   recently viewed by the specified `userId` or `visitorId`, most
4294//   recent ones first. Returns nothing if neither of them has viewed
4295//   any items yet. For example - Recently viewed. The full list of
4296//   available placements can be seen at
4297//   https://console.cloud.google.com/recommendation/datafeeds/default_catalog/dashboard.
4298func (r *ProjectsLocationsCatalogsEventStoresPlacementsService) Predict(name string, googlecloudrecommendationenginev1beta1predictrequest *GoogleCloudRecommendationengineV1beta1PredictRequest) *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall {
4299	c := &ProjectsLocationsCatalogsEventStoresPlacementsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4300	c.name = name
4301	c.googlecloudrecommendationenginev1beta1predictrequest = googlecloudrecommendationenginev1beta1predictrequest
4302	return c
4303}
4304
4305// Fields allows partial responses to be retrieved. See
4306// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4307// for more information.
4308func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall {
4309	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4310	return c
4311}
4312
4313// Context sets the context to be used in this call's Do method. Any
4314// pending HTTP request will be aborted if the provided context is
4315// canceled.
4316func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall {
4317	c.ctx_ = ctx
4318	return c
4319}
4320
4321// Header returns an http.Header that can be modified by the caller to
4322// add HTTP headers to the request.
4323func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Header() http.Header {
4324	if c.header_ == nil {
4325		c.header_ = make(http.Header)
4326	}
4327	return c.header_
4328}
4329
4330func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) doRequest(alt string) (*http.Response, error) {
4331	reqHeaders := make(http.Header)
4332	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4333	for k, v := range c.header_ {
4334		reqHeaders[k] = v
4335	}
4336	reqHeaders.Set("User-Agent", c.s.userAgent())
4337	var body io.Reader = nil
4338	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1predictrequest)
4339	if err != nil {
4340		return nil, err
4341	}
4342	reqHeaders.Set("Content-Type", "application/json")
4343	c.urlParams_.Set("alt", alt)
4344	c.urlParams_.Set("prettyPrint", "false")
4345	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:predict")
4346	urls += "?" + c.urlParams_.Encode()
4347	req, err := http.NewRequest("POST", urls, body)
4348	if err != nil {
4349		return nil, err
4350	}
4351	req.Header = reqHeaders
4352	googleapi.Expand(req.URL, map[string]string{
4353		"name": c.name,
4354	})
4355	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4356}
4357
4358// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.placements.predict" call.
4359// Exactly one of *GoogleCloudRecommendationengineV1beta1PredictResponse
4360// or error will be non-nil. Any non-2xx status code is an error.
4361// Response headers are in either
4362// *GoogleCloudRecommendationengineV1beta1PredictResponse.ServerResponse.
4363// Header or (if a response was returned at all) in
4364// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4365// whether the returned error was because http.StatusNotModified was
4366// returned.
4367func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1PredictResponse, error) {
4368	gensupport.SetOptions(c.urlParams_, opts...)
4369	res, err := c.doRequest("json")
4370	if res != nil && res.StatusCode == http.StatusNotModified {
4371		if res.Body != nil {
4372			res.Body.Close()
4373		}
4374		return nil, &googleapi.Error{
4375			Code:   res.StatusCode,
4376			Header: res.Header,
4377		}
4378	}
4379	if err != nil {
4380		return nil, err
4381	}
4382	defer googleapi.CloseBody(res)
4383	if err := googleapi.CheckResponse(res); err != nil {
4384		return nil, err
4385	}
4386	ret := &GoogleCloudRecommendationengineV1beta1PredictResponse{
4387		ServerResponse: googleapi.ServerResponse{
4388			Header:         res.Header,
4389			HTTPStatusCode: res.StatusCode,
4390		},
4391	}
4392	target := &ret
4393	if err := gensupport.DecodeResponse(target, res); err != nil {
4394		return nil, err
4395	}
4396	return ret, nil
4397	// {
4398	//   "description": "Makes a recommendation prediction. If using API Key based authentication, the API Key must be registered using the PredictionApiKeyRegistry service. [Learn more](https://cloud.google.com/recommendations-ai/docs/setting-up#register-key).",
4399	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/placements/{placementsId}:predict",
4400	//   "httpMethod": "POST",
4401	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.placements.predict",
4402	//   "parameterOrder": [
4403	//     "name"
4404	//   ],
4405	//   "parameters": {
4406	//     "name": {
4407	//       "description": "Required. Full resource name of the format: `{name=projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/placements/*}` The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts items frequently bought together with one or more catalog items in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More items like this. * `recently_viewed_default`: Returns up to 75 items recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any items yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/datafeeds/default_catalog/dashboard",
4408	//       "location": "path",
4409	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+/placements/[^/]+$",
4410	//       "required": true,
4411	//       "type": "string"
4412	//     }
4413	//   },
4414	//   "path": "v1beta1/{+name}:predict",
4415	//   "request": {
4416	//     "$ref": "GoogleCloudRecommendationengineV1beta1PredictRequest"
4417	//   },
4418	//   "response": {
4419	//     "$ref": "GoogleCloudRecommendationengineV1beta1PredictResponse"
4420	//   },
4421	//   "scopes": [
4422	//     "https://www.googleapis.com/auth/cloud-platform"
4423	//   ]
4424	// }
4425
4426}
4427
4428// Pages invokes f for each page of results.
4429// A non-nil error returned from f will halt the iteration.
4430// The provided context supersedes any context provided to the Context method.
4431func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1PredictResponse) error) error {
4432	c.ctx_ = ctx
4433	defer func(pt string) { c.googlecloudrecommendationenginev1beta1predictrequest.PageToken = pt }(c.googlecloudrecommendationenginev1beta1predictrequest.PageToken) // reset paging to original point
4434	for {
4435		x, err := c.Do()
4436		if err != nil {
4437			return err
4438		}
4439		if err := f(x); err != nil {
4440			return err
4441		}
4442		if x.NextPageToken == "" {
4443			return nil
4444		}
4445		c.googlecloudrecommendationenginev1beta1predictrequest.PageToken = x.NextPageToken
4446	}
4447}
4448
4449// method id "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.create":
4450
4451type ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall struct {
4452	s                                                                               *Service
4453	parent                                                                          string
4454	googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest *GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest
4455	urlParams_                                                                      gensupport.URLParams
4456	ctx_                                                                            context.Context
4457	header_                                                                         http.Header
4458}
4459
4460// Create: Register an API key for use with predict method.
4461//
4462// - parent: The parent resource path.
4463//   `projects/*/locations/global/catalogs/default_catalog/eventStores/de
4464//   fault_event_store`.
4465func (r *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService) Create(parent string, googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest *GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall {
4466	c := &ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4467	c.parent = parent
4468	c.googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest = googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest
4469	return c
4470}
4471
4472// Fields allows partial responses to be retrieved. See
4473// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4474// for more information.
4475func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall {
4476	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4477	return c
4478}
4479
4480// Context sets the context to be used in this call's Do method. Any
4481// pending HTTP request will be aborted if the provided context is
4482// canceled.
4483func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall {
4484	c.ctx_ = ctx
4485	return c
4486}
4487
4488// Header returns an http.Header that can be modified by the caller to
4489// add HTTP headers to the request.
4490func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) Header() http.Header {
4491	if c.header_ == nil {
4492		c.header_ = make(http.Header)
4493	}
4494	return c.header_
4495}
4496
4497func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) doRequest(alt string) (*http.Response, error) {
4498	reqHeaders := make(http.Header)
4499	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4500	for k, v := range c.header_ {
4501		reqHeaders[k] = v
4502	}
4503	reqHeaders.Set("User-Agent", c.s.userAgent())
4504	var body io.Reader = nil
4505	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest)
4506	if err != nil {
4507		return nil, err
4508	}
4509	reqHeaders.Set("Content-Type", "application/json")
4510	c.urlParams_.Set("alt", alt)
4511	c.urlParams_.Set("prettyPrint", "false")
4512	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/predictionApiKeyRegistrations")
4513	urls += "?" + c.urlParams_.Encode()
4514	req, err := http.NewRequest("POST", urls, body)
4515	if err != nil {
4516		return nil, err
4517	}
4518	req.Header = reqHeaders
4519	googleapi.Expand(req.URL, map[string]string{
4520		"parent": c.parent,
4521	})
4522	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4523}
4524
4525// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.create" call.
4526// Exactly one of
4527// *GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration
4528// or error will be non-nil. Any non-2xx status code is an error.
4529// Response headers are in either
4530// *GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration.Se
4531// rverResponse.Header or (if a response was returned at all) in
4532// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4533// whether the returned error was because http.StatusNotModified was
4534// returned.
4535func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration, error) {
4536	gensupport.SetOptions(c.urlParams_, opts...)
4537	res, err := c.doRequest("json")
4538	if res != nil && res.StatusCode == http.StatusNotModified {
4539		if res.Body != nil {
4540			res.Body.Close()
4541		}
4542		return nil, &googleapi.Error{
4543			Code:   res.StatusCode,
4544			Header: res.Header,
4545		}
4546	}
4547	if err != nil {
4548		return nil, err
4549	}
4550	defer googleapi.CloseBody(res)
4551	if err := googleapi.CheckResponse(res); err != nil {
4552		return nil, err
4553	}
4554	ret := &GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration{
4555		ServerResponse: googleapi.ServerResponse{
4556			Header:         res.Header,
4557			HTTPStatusCode: res.StatusCode,
4558		},
4559	}
4560	target := &ret
4561	if err := gensupport.DecodeResponse(target, res); err != nil {
4562		return nil, err
4563	}
4564	return ret, nil
4565	// {
4566	//   "description": "Register an API key for use with predict method.",
4567	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/predictionApiKeyRegistrations",
4568	//   "httpMethod": "POST",
4569	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.create",
4570	//   "parameterOrder": [
4571	//     "parent"
4572	//   ],
4573	//   "parameters": {
4574	//     "parent": {
4575	//       "description": "Required. The parent resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store`.",
4576	//       "location": "path",
4577	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$",
4578	//       "required": true,
4579	//       "type": "string"
4580	//     }
4581	//   },
4582	//   "path": "v1beta1/{+parent}/predictionApiKeyRegistrations",
4583	//   "request": {
4584	//     "$ref": "GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest"
4585	//   },
4586	//   "response": {
4587	//     "$ref": "GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration"
4588	//   },
4589	//   "scopes": [
4590	//     "https://www.googleapis.com/auth/cloud-platform"
4591	//   ]
4592	// }
4593
4594}
4595
4596// method id "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.delete":
4597
4598type ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall struct {
4599	s          *Service
4600	name       string
4601	urlParams_ gensupport.URLParams
4602	ctx_       context.Context
4603	header_    http.Header
4604}
4605
4606// Delete: Unregister an apiKey from using for predict method.
4607//
4608// - name: The API key to unregister including full resource path.
4609//   `projects/*/locations/global/catalogs/default_catalog/eventStores/de
4610//   fault_event_store/predictionApiKeyRegistrations/`.
4611func (r *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService) Delete(name string) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall {
4612	c := &ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4613	c.name = name
4614	return c
4615}
4616
4617// Fields allows partial responses to be retrieved. See
4618// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4619// for more information.
4620func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall {
4621	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4622	return c
4623}
4624
4625// Context sets the context to be used in this call's Do method. Any
4626// pending HTTP request will be aborted if the provided context is
4627// canceled.
4628func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall {
4629	c.ctx_ = ctx
4630	return c
4631}
4632
4633// Header returns an http.Header that can be modified by the caller to
4634// add HTTP headers to the request.
4635func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) Header() http.Header {
4636	if c.header_ == nil {
4637		c.header_ = make(http.Header)
4638	}
4639	return c.header_
4640}
4641
4642func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) doRequest(alt string) (*http.Response, error) {
4643	reqHeaders := make(http.Header)
4644	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4645	for k, v := range c.header_ {
4646		reqHeaders[k] = v
4647	}
4648	reqHeaders.Set("User-Agent", c.s.userAgent())
4649	var body io.Reader = nil
4650	c.urlParams_.Set("alt", alt)
4651	c.urlParams_.Set("prettyPrint", "false")
4652	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4653	urls += "?" + c.urlParams_.Encode()
4654	req, err := http.NewRequest("DELETE", urls, body)
4655	if err != nil {
4656		return nil, err
4657	}
4658	req.Header = reqHeaders
4659	googleapi.Expand(req.URL, map[string]string{
4660		"name": c.name,
4661	})
4662	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4663}
4664
4665// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.delete" call.
4666// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
4667// non-2xx status code is an error. Response headers are in either
4668// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
4669// returned at all) in error.(*googleapi.Error).Header. Use
4670// googleapi.IsNotModified to check whether the returned error was
4671// because http.StatusNotModified was returned.
4672func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
4673	gensupport.SetOptions(c.urlParams_, opts...)
4674	res, err := c.doRequest("json")
4675	if res != nil && res.StatusCode == http.StatusNotModified {
4676		if res.Body != nil {
4677			res.Body.Close()
4678		}
4679		return nil, &googleapi.Error{
4680			Code:   res.StatusCode,
4681			Header: res.Header,
4682		}
4683	}
4684	if err != nil {
4685		return nil, err
4686	}
4687	defer googleapi.CloseBody(res)
4688	if err := googleapi.CheckResponse(res); err != nil {
4689		return nil, err
4690	}
4691	ret := &GoogleProtobufEmpty{
4692		ServerResponse: googleapi.ServerResponse{
4693			Header:         res.Header,
4694			HTTPStatusCode: res.StatusCode,
4695		},
4696	}
4697	target := &ret
4698	if err := gensupport.DecodeResponse(target, res); err != nil {
4699		return nil, err
4700	}
4701	return ret, nil
4702	// {
4703	//   "description": "Unregister an apiKey from using for predict method.",
4704	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/predictionApiKeyRegistrations/{predictionApiKeyRegistrationsId}",
4705	//   "httpMethod": "DELETE",
4706	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.delete",
4707	//   "parameterOrder": [
4708	//     "name"
4709	//   ],
4710	//   "parameters": {
4711	//     "name": {
4712	//       "description": "Required. The API key to unregister including full resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/`",
4713	//       "location": "path",
4714	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+/predictionApiKeyRegistrations/[^/]+$",
4715	//       "required": true,
4716	//       "type": "string"
4717	//     }
4718	//   },
4719	//   "path": "v1beta1/{+name}",
4720	//   "response": {
4721	//     "$ref": "GoogleProtobufEmpty"
4722	//   },
4723	//   "scopes": [
4724	//     "https://www.googleapis.com/auth/cloud-platform"
4725	//   ]
4726	// }
4727
4728}
4729
4730// method id "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.list":
4731
4732type ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall struct {
4733	s            *Service
4734	parent       string
4735	urlParams_   gensupport.URLParams
4736	ifNoneMatch_ string
4737	ctx_         context.Context
4738	header_      http.Header
4739}
4740
4741// List: List the registered apiKeys for use with predict method.
4742//
4743// - parent: The parent placement resource name such as
4744//   `projects/1234/locations/global/catalogs/default_catalog/eventStores
4745//   /default_event_store`.
4746func (r *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService) List(parent string) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
4747	c := &ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4748	c.parent = parent
4749	return c
4750}
4751
4752// PageSize sets the optional parameter "pageSize": Maximum number of
4753// results to return per page. If unset, the service will choose a
4754// reasonable default.
4755func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
4756	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4757	return c
4758}
4759
4760// PageToken sets the optional parameter "pageToken": The previous
4761// `ListPredictionApiKeyRegistration.nextPageToken`.
4762func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
4763	c.urlParams_.Set("pageToken", pageToken)
4764	return c
4765}
4766
4767// Fields allows partial responses to be retrieved. See
4768// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4769// for more information.
4770func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
4771	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4772	return c
4773}
4774
4775// IfNoneMatch sets the optional parameter which makes the operation
4776// fail if the object's ETag matches the given value. This is useful for
4777// getting updates only after the object has changed since the last
4778// request. Use googleapi.IsNotModified to check whether the response
4779// error from Do is the result of In-None-Match.
4780func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
4781	c.ifNoneMatch_ = entityTag
4782	return c
4783}
4784
4785// Context sets the context to be used in this call's Do method. Any
4786// pending HTTP request will be aborted if the provided context is
4787// canceled.
4788func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
4789	c.ctx_ = ctx
4790	return c
4791}
4792
4793// Header returns an http.Header that can be modified by the caller to
4794// add HTTP headers to the request.
4795func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Header() http.Header {
4796	if c.header_ == nil {
4797		c.header_ = make(http.Header)
4798	}
4799	return c.header_
4800}
4801
4802func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) doRequest(alt string) (*http.Response, error) {
4803	reqHeaders := make(http.Header)
4804	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4805	for k, v := range c.header_ {
4806		reqHeaders[k] = v
4807	}
4808	reqHeaders.Set("User-Agent", c.s.userAgent())
4809	if c.ifNoneMatch_ != "" {
4810		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4811	}
4812	var body io.Reader = nil
4813	c.urlParams_.Set("alt", alt)
4814	c.urlParams_.Set("prettyPrint", "false")
4815	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/predictionApiKeyRegistrations")
4816	urls += "?" + c.urlParams_.Encode()
4817	req, err := http.NewRequest("GET", urls, body)
4818	if err != nil {
4819		return nil, err
4820	}
4821	req.Header = reqHeaders
4822	googleapi.Expand(req.URL, map[string]string{
4823		"parent": c.parent,
4824	})
4825	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4826}
4827
4828// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.list" call.
4829// Exactly one of
4830// *GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistratio
4831// nsResponse or error will be non-nil. Any non-2xx status code is an
4832// error. Response headers are in either
4833// *GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistratio
4834// nsResponse.ServerResponse.Header or (if a response was returned at
4835// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4836// to check whether the returned error was because
4837// http.StatusNotModified was returned.
4838func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse, error) {
4839	gensupport.SetOptions(c.urlParams_, opts...)
4840	res, err := c.doRequest("json")
4841	if res != nil && res.StatusCode == http.StatusNotModified {
4842		if res.Body != nil {
4843			res.Body.Close()
4844		}
4845		return nil, &googleapi.Error{
4846			Code:   res.StatusCode,
4847			Header: res.Header,
4848		}
4849	}
4850	if err != nil {
4851		return nil, err
4852	}
4853	defer googleapi.CloseBody(res)
4854	if err := googleapi.CheckResponse(res); err != nil {
4855		return nil, err
4856	}
4857	ret := &GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse{
4858		ServerResponse: googleapi.ServerResponse{
4859			Header:         res.Header,
4860			HTTPStatusCode: res.StatusCode,
4861		},
4862	}
4863	target := &ret
4864	if err := gensupport.DecodeResponse(target, res); err != nil {
4865		return nil, err
4866	}
4867	return ret, nil
4868	// {
4869	//   "description": "List the registered apiKeys for use with predict method.",
4870	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/predictionApiKeyRegistrations",
4871	//   "httpMethod": "GET",
4872	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.list",
4873	//   "parameterOrder": [
4874	//     "parent"
4875	//   ],
4876	//   "parameters": {
4877	//     "pageSize": {
4878	//       "description": "Optional. Maximum number of results to return per page. If unset, the service will choose a reasonable default.",
4879	//       "format": "int32",
4880	//       "location": "query",
4881	//       "type": "integer"
4882	//     },
4883	//     "pageToken": {
4884	//       "description": "Optional. The previous `ListPredictionApiKeyRegistration.nextPageToken`.",
4885	//       "location": "query",
4886	//       "type": "string"
4887	//     },
4888	//     "parent": {
4889	//       "description": "Required. The parent placement resource name such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`",
4890	//       "location": "path",
4891	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$",
4892	//       "required": true,
4893	//       "type": "string"
4894	//     }
4895	//   },
4896	//   "path": "v1beta1/{+parent}/predictionApiKeyRegistrations",
4897	//   "response": {
4898	//     "$ref": "GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse"
4899	//   },
4900	//   "scopes": [
4901	//     "https://www.googleapis.com/auth/cloud-platform"
4902	//   ]
4903	// }
4904
4905}
4906
4907// Pages invokes f for each page of results.
4908// A non-nil error returned from f will halt the iteration.
4909// The provided context supersedes any context provided to the Context method.
4910func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse) error) error {
4911	c.ctx_ = ctx
4912	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4913	for {
4914		x, err := c.Do()
4915		if err != nil {
4916			return err
4917		}
4918		if err := f(x); err != nil {
4919			return err
4920		}
4921		if x.NextPageToken == "" {
4922			return nil
4923		}
4924		c.PageToken(x.NextPageToken)
4925	}
4926}
4927
4928// method id "recommendationengine.projects.locations.catalogs.eventStores.userEvents.collect":
4929
4930type ProjectsLocationsCatalogsEventStoresUserEventsCollectCall struct {
4931	s            *Service
4932	parent       string
4933	urlParams_   gensupport.URLParams
4934	ifNoneMatch_ string
4935	ctx_         context.Context
4936	header_      http.Header
4937}
4938
4939// Collect: Writes a single user event from the browser. This uses a GET
4940// request to due to browser restriction of POST-ing to a 3rd party
4941// domain. This method is used only by the Recommendations AI JavaScript
4942// pixel. Users should not call this method directly.
4943//
4944// - parent: The parent eventStore name, such as
4945//   `projects/1234/locations/global/catalogs/default_catalog/eventStores
4946//   /default_event_store`.
4947func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Collect(parent string) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
4948	c := &ProjectsLocationsCatalogsEventStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4949	c.parent = parent
4950	return c
4951}
4952
4953// Ets sets the optional parameter "ets": The event timestamp in
4954// milliseconds. This prevents browser caching of otherwise identical
4955// get requests. The name is abbreviated to reduce the payload bytes.
4956func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
4957	c.urlParams_.Set("ets", fmt.Sprint(ets))
4958	return c
4959}
4960
4961// Uri sets the optional parameter "uri": The url including
4962// cgi-parameters but excluding the hash fragment. The URL must be
4963// truncated to 1.5K bytes to conservatively be under the 2K bytes. This
4964// is often more useful than the referer url, because many browsers only
4965// send the domain for 3rd party requests.
4966func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
4967	c.urlParams_.Set("uri", uri)
4968	return c
4969}
4970
4971// UserEvent sets the optional parameter "userEvent": Required. URL
4972// encoded UserEvent proto.
4973func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
4974	c.urlParams_.Set("userEvent", userEvent)
4975	return c
4976}
4977
4978// Fields allows partial responses to be retrieved. See
4979// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4980// for more information.
4981func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
4982	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4983	return c
4984}
4985
4986// IfNoneMatch sets the optional parameter which makes the operation
4987// fail if the object's ETag matches the given value. This is useful for
4988// getting updates only after the object has changed since the last
4989// request. Use googleapi.IsNotModified to check whether the response
4990// error from Do is the result of In-None-Match.
4991func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
4992	c.ifNoneMatch_ = entityTag
4993	return c
4994}
4995
4996// Context sets the context to be used in this call's Do method. Any
4997// pending HTTP request will be aborted if the provided context is
4998// canceled.
4999func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
5000	c.ctx_ = ctx
5001	return c
5002}
5003
5004// Header returns an http.Header that can be modified by the caller to
5005// add HTTP headers to the request.
5006func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Header() http.Header {
5007	if c.header_ == nil {
5008		c.header_ = make(http.Header)
5009	}
5010	return c.header_
5011}
5012
5013func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) {
5014	reqHeaders := make(http.Header)
5015	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5016	for k, v := range c.header_ {
5017		reqHeaders[k] = v
5018	}
5019	reqHeaders.Set("User-Agent", c.s.userAgent())
5020	if c.ifNoneMatch_ != "" {
5021		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5022	}
5023	var body io.Reader = nil
5024	c.urlParams_.Set("alt", alt)
5025	c.urlParams_.Set("prettyPrint", "false")
5026	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:collect")
5027	urls += "?" + c.urlParams_.Encode()
5028	req, err := http.NewRequest("GET", urls, body)
5029	if err != nil {
5030		return nil, err
5031	}
5032	req.Header = reqHeaders
5033	googleapi.Expand(req.URL, map[string]string{
5034		"parent": c.parent,
5035	})
5036	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5037}
5038
5039// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.userEvents.collect" call.
5040// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any
5041// non-2xx status code is an error. Response headers are in either
5042// *GoogleApiHttpBody.ServerResponse.Header or (if a response was
5043// returned at all) in error.(*googleapi.Error).Header. Use
5044// googleapi.IsNotModified to check whether the returned error was
5045// because http.StatusNotModified was returned.
5046func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) {
5047	gensupport.SetOptions(c.urlParams_, opts...)
5048	res, err := c.doRequest("json")
5049	if res != nil && res.StatusCode == http.StatusNotModified {
5050		if res.Body != nil {
5051			res.Body.Close()
5052		}
5053		return nil, &googleapi.Error{
5054			Code:   res.StatusCode,
5055			Header: res.Header,
5056		}
5057	}
5058	if err != nil {
5059		return nil, err
5060	}
5061	defer googleapi.CloseBody(res)
5062	if err := googleapi.CheckResponse(res); err != nil {
5063		return nil, err
5064	}
5065	ret := &GoogleApiHttpBody{
5066		ServerResponse: googleapi.ServerResponse{
5067			Header:         res.Header,
5068			HTTPStatusCode: res.StatusCode,
5069		},
5070	}
5071	target := &ret
5072	if err := gensupport.DecodeResponse(target, res); err != nil {
5073		return nil, err
5074	}
5075	return ret, nil
5076	// {
5077	//   "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Recommendations AI JavaScript pixel. Users should not call this method directly.",
5078	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:collect",
5079	//   "httpMethod": "GET",
5080	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.collect",
5081	//   "parameterOrder": [
5082	//     "parent"
5083	//   ],
5084	//   "parameters": {
5085	//     "ets": {
5086	//       "description": "Optional. The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.",
5087	//       "format": "int64",
5088	//       "location": "query",
5089	//       "type": "string"
5090	//     },
5091	//     "parent": {
5092	//       "description": "Required. The parent eventStore name, such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.",
5093	//       "location": "path",
5094	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$",
5095	//       "required": true,
5096	//       "type": "string"
5097	//     },
5098	//     "uri": {
5099	//       "description": "Optional. The url including cgi-parameters but excluding the hash fragment. The URL must be truncated to 1.5K bytes to conservatively be under the 2K bytes. This is often more useful than the referer url, because many browsers only send the domain for 3rd party requests.",
5100	//       "location": "query",
5101	//       "type": "string"
5102	//     },
5103	//     "userEvent": {
5104	//       "description": "Required. URL encoded UserEvent proto.",
5105	//       "location": "query",
5106	//       "type": "string"
5107	//     }
5108	//   },
5109	//   "path": "v1beta1/{+parent}/userEvents:collect",
5110	//   "response": {
5111	//     "$ref": "GoogleApiHttpBody"
5112	//   },
5113	//   "scopes": [
5114	//     "https://www.googleapis.com/auth/cloud-platform"
5115	//   ]
5116	// }
5117
5118}
5119
5120// method id "recommendationengine.projects.locations.catalogs.eventStores.userEvents.import":
5121
5122type ProjectsLocationsCatalogsEventStoresUserEventsImportCall struct {
5123	s                                                             *Service
5124	parent                                                        string
5125	googlecloudrecommendationenginev1beta1importusereventsrequest *GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest
5126	urlParams_                                                    gensupport.URLParams
5127	ctx_                                                          context.Context
5128	header_                                                       http.Header
5129}
5130
5131// Import: Bulk import of User events. Request processing might be
5132// synchronous. Events that already exist are skipped. Use this method
5133// for backfilling historical user events. Operation.response is of type
5134// ImportResponse. Note that it is possible for a subset of the items to
5135// be successfully inserted. Operation.metadata is of type
5136// ImportMetadata.
5137//
5138// - parent:
5139//   `projects/1234/locations/global/catalogs/default_catalog/eventStores
5140//   /default_event_store`.
5141func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Import(parent string, googlecloudrecommendationenginev1beta1importusereventsrequest *GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest) *ProjectsLocationsCatalogsEventStoresUserEventsImportCall {
5142	c := &ProjectsLocationsCatalogsEventStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5143	c.parent = parent
5144	c.googlecloudrecommendationenginev1beta1importusereventsrequest = googlecloudrecommendationenginev1beta1importusereventsrequest
5145	return c
5146}
5147
5148// Fields allows partial responses to be retrieved. See
5149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5150// for more information.
5151func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsImportCall {
5152	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5153	return c
5154}
5155
5156// Context sets the context to be used in this call's Do method. Any
5157// pending HTTP request will be aborted if the provided context is
5158// canceled.
5159func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsImportCall {
5160	c.ctx_ = ctx
5161	return c
5162}
5163
5164// Header returns an http.Header that can be modified by the caller to
5165// add HTTP headers to the request.
5166func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) Header() http.Header {
5167	if c.header_ == nil {
5168		c.header_ = make(http.Header)
5169	}
5170	return c.header_
5171}
5172
5173func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) {
5174	reqHeaders := make(http.Header)
5175	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5176	for k, v := range c.header_ {
5177		reqHeaders[k] = v
5178	}
5179	reqHeaders.Set("User-Agent", c.s.userAgent())
5180	var body io.Reader = nil
5181	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1importusereventsrequest)
5182	if err != nil {
5183		return nil, err
5184	}
5185	reqHeaders.Set("Content-Type", "application/json")
5186	c.urlParams_.Set("alt", alt)
5187	c.urlParams_.Set("prettyPrint", "false")
5188	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:import")
5189	urls += "?" + c.urlParams_.Encode()
5190	req, err := http.NewRequest("POST", urls, body)
5191	if err != nil {
5192		return nil, err
5193	}
5194	req.Header = reqHeaders
5195	googleapi.Expand(req.URL, map[string]string{
5196		"parent": c.parent,
5197	})
5198	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5199}
5200
5201// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.userEvents.import" call.
5202// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
5203// Any non-2xx status code is an error. Response headers are in either
5204// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
5205// was returned at all) in error.(*googleapi.Error).Header. Use
5206// googleapi.IsNotModified to check whether the returned error was
5207// because http.StatusNotModified was returned.
5208func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
5209	gensupport.SetOptions(c.urlParams_, opts...)
5210	res, err := c.doRequest("json")
5211	if res != nil && res.StatusCode == http.StatusNotModified {
5212		if res.Body != nil {
5213			res.Body.Close()
5214		}
5215		return nil, &googleapi.Error{
5216			Code:   res.StatusCode,
5217			Header: res.Header,
5218		}
5219	}
5220	if err != nil {
5221		return nil, err
5222	}
5223	defer googleapi.CloseBody(res)
5224	if err := googleapi.CheckResponse(res); err != nil {
5225		return nil, err
5226	}
5227	ret := &GoogleLongrunningOperation{
5228		ServerResponse: googleapi.ServerResponse{
5229			Header:         res.Header,
5230			HTTPStatusCode: res.StatusCode,
5231		},
5232	}
5233	target := &ret
5234	if err := gensupport.DecodeResponse(target, res); err != nil {
5235		return nil, err
5236	}
5237	return ret, nil
5238	// {
5239	//   "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.",
5240	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:import",
5241	//   "httpMethod": "POST",
5242	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.import",
5243	//   "parameterOrder": [
5244	//     "parent"
5245	//   ],
5246	//   "parameters": {
5247	//     "parent": {
5248	//       "description": "Required. `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`",
5249	//       "location": "path",
5250	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$",
5251	//       "required": true,
5252	//       "type": "string"
5253	//     }
5254	//   },
5255	//   "path": "v1beta1/{+parent}/userEvents:import",
5256	//   "request": {
5257	//     "$ref": "GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest"
5258	//   },
5259	//   "response": {
5260	//     "$ref": "GoogleLongrunningOperation"
5261	//   },
5262	//   "scopes": [
5263	//     "https://www.googleapis.com/auth/cloud-platform"
5264	//   ]
5265	// }
5266
5267}
5268
5269// method id "recommendationengine.projects.locations.catalogs.eventStores.userEvents.list":
5270
5271type ProjectsLocationsCatalogsEventStoresUserEventsListCall struct {
5272	s            *Service
5273	parent       string
5274	urlParams_   gensupport.URLParams
5275	ifNoneMatch_ string
5276	ctx_         context.Context
5277	header_      http.Header
5278}
5279
5280// List: Gets a list of user events within a time range, with potential
5281// filtering. The method does not list unjoined user events. Unjoined
5282// user event definition: when a user event is ingested from
5283// Recommendations AI User Event APIs, the catalog item included in the
5284// user event is connected with the current catalog. If a catalog item
5285// of the ingested event is not in the current catalog, it could lead to
5286// degraded model quality. This is called an unjoined event.
5287//
5288// - parent: The parent eventStore resource name, such as
5289//   `projects/*/locations/*/catalogs/default_catalog/eventStores/default
5290//   _event_store`.
5291func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) List(parent string) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
5292	c := &ProjectsLocationsCatalogsEventStoresUserEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5293	c.parent = parent
5294	return c
5295}
5296
5297// Filter sets the optional parameter "filter": Filtering expression to
5298// specify restrictions over returned events. This is a sequence of
5299// terms, where each term applies some kind of a restriction to the
5300// returned user events. Use this expression to restrict results to a
5301// specific time range, or filter events by eventType. eg: eventTime >
5302// "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems
5303// eventTime<"2012-04-23T18:25:43.511Z" eventType=search We expect only
5304// 3 types of fields: * eventTime: this can be specified a maximum of 2
5305// times, once with a less than operator and once with a greater than
5306// operator. The eventTime restrict should result in one contiguous
5307// valid eventTime range. * eventType: only 1 eventType restriction can
5308// be specified. * eventsMissingCatalogItems: specififying this will
5309// restrict results to events for which catalog items were not found in
5310// the catalog. The default behavior is to return only those events for
5311// which catalog items were found. Some examples of valid filters
5312// expressions: * Example 1: eventTime > "2012-04-23T18:25:43.511Z"
5313// eventTime < "2012-04-23T18:30:43.511Z" * Example 2: eventTime >
5314// "2012-04-23T18:25:43.511Z" eventType = detail-page-view * Example 3:
5315// eventsMissingCatalogItems eventType = search eventTime <
5316// "2018-04-23T18:30:43.511Z" * Example 4: eventTime >
5317// "2012-04-23T18:25:43.511Z" * Example 5: eventType = search * Example
5318// 6: eventsMissingCatalogItems
5319func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Filter(filter string) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
5320	c.urlParams_.Set("filter", filter)
5321	return c
5322}
5323
5324// PageSize sets the optional parameter "pageSize": Maximum number of
5325// results to return per page. If zero, the service will choose a
5326// reasonable default.
5327func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
5328	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5329	return c
5330}
5331
5332// PageToken sets the optional parameter "pageToken": The previous
5333// ListUserEventsResponse.next_page_token.
5334func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
5335	c.urlParams_.Set("pageToken", pageToken)
5336	return c
5337}
5338
5339// Fields allows partial responses to be retrieved. See
5340// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5341// for more information.
5342func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
5343	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5344	return c
5345}
5346
5347// IfNoneMatch sets the optional parameter which makes the operation
5348// fail if the object's ETag matches the given value. This is useful for
5349// getting updates only after the object has changed since the last
5350// request. Use googleapi.IsNotModified to check whether the response
5351// error from Do is the result of In-None-Match.
5352func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
5353	c.ifNoneMatch_ = entityTag
5354	return c
5355}
5356
5357// Context sets the context to be used in this call's Do method. Any
5358// pending HTTP request will be aborted if the provided context is
5359// canceled.
5360func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
5361	c.ctx_ = ctx
5362	return c
5363}
5364
5365// Header returns an http.Header that can be modified by the caller to
5366// add HTTP headers to the request.
5367func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Header() http.Header {
5368	if c.header_ == nil {
5369		c.header_ = make(http.Header)
5370	}
5371	return c.header_
5372}
5373
5374func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) doRequest(alt string) (*http.Response, error) {
5375	reqHeaders := make(http.Header)
5376	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5377	for k, v := range c.header_ {
5378		reqHeaders[k] = v
5379	}
5380	reqHeaders.Set("User-Agent", c.s.userAgent())
5381	if c.ifNoneMatch_ != "" {
5382		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5383	}
5384	var body io.Reader = nil
5385	c.urlParams_.Set("alt", alt)
5386	c.urlParams_.Set("prettyPrint", "false")
5387	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents")
5388	urls += "?" + c.urlParams_.Encode()
5389	req, err := http.NewRequest("GET", urls, body)
5390	if err != nil {
5391		return nil, err
5392	}
5393	req.Header = reqHeaders
5394	googleapi.Expand(req.URL, map[string]string{
5395		"parent": c.parent,
5396	})
5397	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5398}
5399
5400// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.userEvents.list" call.
5401// Exactly one of
5402// *GoogleCloudRecommendationengineV1beta1ListUserEventsResponse or
5403// error will be non-nil. Any non-2xx status code is an error. Response
5404// headers are in either
5405// *GoogleCloudRecommendationengineV1beta1ListUserEventsResponse.ServerRe
5406// sponse.Header or (if a response was returned at all) in
5407// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5408// whether the returned error was because http.StatusNotModified was
5409// returned.
5410func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1ListUserEventsResponse, error) {
5411	gensupport.SetOptions(c.urlParams_, opts...)
5412	res, err := c.doRequest("json")
5413	if res != nil && res.StatusCode == http.StatusNotModified {
5414		if res.Body != nil {
5415			res.Body.Close()
5416		}
5417		return nil, &googleapi.Error{
5418			Code:   res.StatusCode,
5419			Header: res.Header,
5420		}
5421	}
5422	if err != nil {
5423		return nil, err
5424	}
5425	defer googleapi.CloseBody(res)
5426	if err := googleapi.CheckResponse(res); err != nil {
5427		return nil, err
5428	}
5429	ret := &GoogleCloudRecommendationengineV1beta1ListUserEventsResponse{
5430		ServerResponse: googleapi.ServerResponse{
5431			Header:         res.Header,
5432			HTTPStatusCode: res.StatusCode,
5433		},
5434	}
5435	target := &ret
5436	if err := gensupport.DecodeResponse(target, res); err != nil {
5437		return nil, err
5438	}
5439	return ret, nil
5440	// {
5441	//   "description": "Gets a list of user events within a time range, with potential filtering. The method does not list unjoined user events. Unjoined user event definition: when a user event is ingested from Recommendations AI User Event APIs, the catalog item included in the user event is connected with the current catalog. If a catalog item of the ingested event is not in the current catalog, it could lead to degraded model quality. This is called an unjoined event.",
5442	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents",
5443	//   "httpMethod": "GET",
5444	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.list",
5445	//   "parameterOrder": [
5446	//     "parent"
5447	//   ],
5448	//   "parameters": {
5449	//     "filter": {
5450	//       "description": "Optional. Filtering expression to specify restrictions over returned events. This is a sequence of terms, where each term applies some kind of a restriction to the returned user events. Use this expression to restrict results to a specific time range, or filter events by eventType. eg: eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventsMissingCatalogItems eventTime\u003c\"2012-04-23T18:25:43.511Z\" eventType=search We expect only 3 types of fields: * eventTime: this can be specified a maximum of 2 times, once with a less than operator and once with a greater than operator. The eventTime restrict should result in one contiguous valid eventTime range. * eventType: only 1 eventType restriction can be specified. * eventsMissingCatalogItems: specififying this will restrict results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventTime \u003c \"2012-04-23T18:30:43.511Z\" * Example 2: eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventType = detail-page-view * Example 3: eventsMissingCatalogItems eventType = search eventTime \u003c \"2018-04-23T18:30:43.511Z\" * Example 4: eventTime \u003e \"2012-04-23T18:25:43.511Z\" * Example 5: eventType = search * Example 6: eventsMissingCatalogItems",
5451	//       "location": "query",
5452	//       "type": "string"
5453	//     },
5454	//     "pageSize": {
5455	//       "description": "Optional. Maximum number of results to return per page. If zero, the service will choose a reasonable default.",
5456	//       "format": "int32",
5457	//       "location": "query",
5458	//       "type": "integer"
5459	//     },
5460	//     "pageToken": {
5461	//       "description": "Optional. The previous ListUserEventsResponse.next_page_token.",
5462	//       "location": "query",
5463	//       "type": "string"
5464	//     },
5465	//     "parent": {
5466	//       "description": "Required. The parent eventStore resource name, such as `projects/*/locations/*/catalogs/default_catalog/eventStores/default_event_store`.",
5467	//       "location": "path",
5468	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$",
5469	//       "required": true,
5470	//       "type": "string"
5471	//     }
5472	//   },
5473	//   "path": "v1beta1/{+parent}/userEvents",
5474	//   "response": {
5475	//     "$ref": "GoogleCloudRecommendationengineV1beta1ListUserEventsResponse"
5476	//   },
5477	//   "scopes": [
5478	//     "https://www.googleapis.com/auth/cloud-platform"
5479	//   ]
5480	// }
5481
5482}
5483
5484// Pages invokes f for each page of results.
5485// A non-nil error returned from f will halt the iteration.
5486// The provided context supersedes any context provided to the Context method.
5487func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1ListUserEventsResponse) error) error {
5488	c.ctx_ = ctx
5489	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5490	for {
5491		x, err := c.Do()
5492		if err != nil {
5493			return err
5494		}
5495		if err := f(x); err != nil {
5496			return err
5497		}
5498		if x.NextPageToken == "" {
5499			return nil
5500		}
5501		c.PageToken(x.NextPageToken)
5502	}
5503}
5504
5505// method id "recommendationengine.projects.locations.catalogs.eventStores.userEvents.purge":
5506
5507type ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall struct {
5508	s                                                            *Service
5509	parent                                                       string
5510	googlecloudrecommendationenginev1beta1purgeusereventsrequest *GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest
5511	urlParams_                                                   gensupport.URLParams
5512	ctx_                                                         context.Context
5513	header_                                                      http.Header
5514}
5515
5516// Purge: Deletes permanently all user events specified by the filter
5517// provided. Depending on the number of events specified by the filter,
5518// this operation could take hours or days to complete. To test a
5519// filter, use the list command first.
5520//
5521// - parent: The resource name of the event_store under which the events
5522//   are created. The format is
5523//   `projects/${projectId}/locations/global/catalogs/${catalogId}/eventS
5524//   tores/${eventStoreId}`.
5525func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Purge(parent string, googlecloudrecommendationenginev1beta1purgeusereventsrequest *GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest) *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall {
5526	c := &ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5527	c.parent = parent
5528	c.googlecloudrecommendationenginev1beta1purgeusereventsrequest = googlecloudrecommendationenginev1beta1purgeusereventsrequest
5529	return c
5530}
5531
5532// Fields allows partial responses to be retrieved. See
5533// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5534// for more information.
5535func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall {
5536	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5537	return c
5538}
5539
5540// Context sets the context to be used in this call's Do method. Any
5541// pending HTTP request will be aborted if the provided context is
5542// canceled.
5543func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall {
5544	c.ctx_ = ctx
5545	return c
5546}
5547
5548// Header returns an http.Header that can be modified by the caller to
5549// add HTTP headers to the request.
5550func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) Header() http.Header {
5551	if c.header_ == nil {
5552		c.header_ = make(http.Header)
5553	}
5554	return c.header_
5555}
5556
5557func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) {
5558	reqHeaders := make(http.Header)
5559	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5560	for k, v := range c.header_ {
5561		reqHeaders[k] = v
5562	}
5563	reqHeaders.Set("User-Agent", c.s.userAgent())
5564	var body io.Reader = nil
5565	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1purgeusereventsrequest)
5566	if err != nil {
5567		return nil, err
5568	}
5569	reqHeaders.Set("Content-Type", "application/json")
5570	c.urlParams_.Set("alt", alt)
5571	c.urlParams_.Set("prettyPrint", "false")
5572	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:purge")
5573	urls += "?" + c.urlParams_.Encode()
5574	req, err := http.NewRequest("POST", urls, body)
5575	if err != nil {
5576		return nil, err
5577	}
5578	req.Header = reqHeaders
5579	googleapi.Expand(req.URL, map[string]string{
5580		"parent": c.parent,
5581	})
5582	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5583}
5584
5585// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.userEvents.purge" call.
5586// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
5587// Any non-2xx status code is an error. Response headers are in either
5588// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
5589// was returned at all) in error.(*googleapi.Error).Header. Use
5590// googleapi.IsNotModified to check whether the returned error was
5591// because http.StatusNotModified was returned.
5592func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
5593	gensupport.SetOptions(c.urlParams_, opts...)
5594	res, err := c.doRequest("json")
5595	if res != nil && res.StatusCode == http.StatusNotModified {
5596		if res.Body != nil {
5597			res.Body.Close()
5598		}
5599		return nil, &googleapi.Error{
5600			Code:   res.StatusCode,
5601			Header: res.Header,
5602		}
5603	}
5604	if err != nil {
5605		return nil, err
5606	}
5607	defer googleapi.CloseBody(res)
5608	if err := googleapi.CheckResponse(res); err != nil {
5609		return nil, err
5610	}
5611	ret := &GoogleLongrunningOperation{
5612		ServerResponse: googleapi.ServerResponse{
5613			Header:         res.Header,
5614			HTTPStatusCode: res.StatusCode,
5615		},
5616	}
5617	target := &ret
5618	if err := gensupport.DecodeResponse(target, res); err != nil {
5619		return nil, err
5620	}
5621	return ret, nil
5622	// {
5623	//   "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.",
5624	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:purge",
5625	//   "httpMethod": "POST",
5626	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.purge",
5627	//   "parameterOrder": [
5628	//     "parent"
5629	//   ],
5630	//   "parameters": {
5631	//     "parent": {
5632	//       "description": "Required. The resource name of the event_store under which the events are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}`",
5633	//       "location": "path",
5634	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$",
5635	//       "required": true,
5636	//       "type": "string"
5637	//     }
5638	//   },
5639	//   "path": "v1beta1/{+parent}/userEvents:purge",
5640	//   "request": {
5641	//     "$ref": "GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest"
5642	//   },
5643	//   "response": {
5644	//     "$ref": "GoogleLongrunningOperation"
5645	//   },
5646	//   "scopes": [
5647	//     "https://www.googleapis.com/auth/cloud-platform"
5648	//   ]
5649	// }
5650
5651}
5652
5653// method id "recommendationengine.projects.locations.catalogs.eventStores.userEvents.rejoin":
5654
5655type ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall struct {
5656	s                                                             *Service
5657	parent                                                        string
5658	googlecloudrecommendationenginev1beta1rejoinusereventsrequest *GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest
5659	urlParams_                                                    gensupport.URLParams
5660	ctx_                                                          context.Context
5661	header_                                                       http.Header
5662}
5663
5664// Rejoin: Triggers a user event rejoin operation with latest catalog
5665// data. Events will not be annotated with detailed catalog information
5666// if catalog item is missing at the time the user event is ingested,
5667// and these events are stored as unjoined events with a limited usage
5668// on training and serving. This API can be used to trigger a 'join'
5669// operation on specified events with latest version of catalog items.
5670// It can also be used to correct events joined with wrong catalog
5671// items.
5672//
5673// - parent: Full resource name of user event, such as
5674//   `projects/*/locations/*/catalogs/default_catalog/eventStores/default
5675//   _event_store`.
5676func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Rejoin(parent string, googlecloudrecommendationenginev1beta1rejoinusereventsrequest *GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest) *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall {
5677	c := &ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5678	c.parent = parent
5679	c.googlecloudrecommendationenginev1beta1rejoinusereventsrequest = googlecloudrecommendationenginev1beta1rejoinusereventsrequest
5680	return c
5681}
5682
5683// Fields allows partial responses to be retrieved. See
5684// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5685// for more information.
5686func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall {
5687	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5688	return c
5689}
5690
5691// Context sets the context to be used in this call's Do method. Any
5692// pending HTTP request will be aborted if the provided context is
5693// canceled.
5694func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall {
5695	c.ctx_ = ctx
5696	return c
5697}
5698
5699// Header returns an http.Header that can be modified by the caller to
5700// add HTTP headers to the request.
5701func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) Header() http.Header {
5702	if c.header_ == nil {
5703		c.header_ = make(http.Header)
5704	}
5705	return c.header_
5706}
5707
5708func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) doRequest(alt string) (*http.Response, error) {
5709	reqHeaders := make(http.Header)
5710	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5711	for k, v := range c.header_ {
5712		reqHeaders[k] = v
5713	}
5714	reqHeaders.Set("User-Agent", c.s.userAgent())
5715	var body io.Reader = nil
5716	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1rejoinusereventsrequest)
5717	if err != nil {
5718		return nil, err
5719	}
5720	reqHeaders.Set("Content-Type", "application/json")
5721	c.urlParams_.Set("alt", alt)
5722	c.urlParams_.Set("prettyPrint", "false")
5723	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:rejoin")
5724	urls += "?" + c.urlParams_.Encode()
5725	req, err := http.NewRequest("POST", urls, body)
5726	if err != nil {
5727		return nil, err
5728	}
5729	req.Header = reqHeaders
5730	googleapi.Expand(req.URL, map[string]string{
5731		"parent": c.parent,
5732	})
5733	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5734}
5735
5736// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.userEvents.rejoin" call.
5737// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
5738// Any non-2xx status code is an error. Response headers are in either
5739// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
5740// was returned at all) in error.(*googleapi.Error).Header. Use
5741// googleapi.IsNotModified to check whether the returned error was
5742// because http.StatusNotModified was returned.
5743func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
5744	gensupport.SetOptions(c.urlParams_, opts...)
5745	res, err := c.doRequest("json")
5746	if res != nil && res.StatusCode == http.StatusNotModified {
5747		if res.Body != nil {
5748			res.Body.Close()
5749		}
5750		return nil, &googleapi.Error{
5751			Code:   res.StatusCode,
5752			Header: res.Header,
5753		}
5754	}
5755	if err != nil {
5756		return nil, err
5757	}
5758	defer googleapi.CloseBody(res)
5759	if err := googleapi.CheckResponse(res); err != nil {
5760		return nil, err
5761	}
5762	ret := &GoogleLongrunningOperation{
5763		ServerResponse: googleapi.ServerResponse{
5764			Header:         res.Header,
5765			HTTPStatusCode: res.StatusCode,
5766		},
5767	}
5768	target := &ret
5769	if err := gensupport.DecodeResponse(target, res); err != nil {
5770		return nil, err
5771	}
5772	return ret, nil
5773	// {
5774	//   "description": "Triggers a user event rejoin operation with latest catalog data. Events will not be annotated with detailed catalog information if catalog item is missing at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of catalog items. It can also be used to correct events joined with wrong catalog items.",
5775	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:rejoin",
5776	//   "httpMethod": "POST",
5777	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.rejoin",
5778	//   "parameterOrder": [
5779	//     "parent"
5780	//   ],
5781	//   "parameters": {
5782	//     "parent": {
5783	//       "description": "Required. Full resource name of user event, such as `projects/*/locations/*/catalogs/default_catalog/eventStores/default_event_store`.",
5784	//       "location": "path",
5785	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$",
5786	//       "required": true,
5787	//       "type": "string"
5788	//     }
5789	//   },
5790	//   "path": "v1beta1/{+parent}/userEvents:rejoin",
5791	//   "request": {
5792	//     "$ref": "GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest"
5793	//   },
5794	//   "response": {
5795	//     "$ref": "GoogleLongrunningOperation"
5796	//   },
5797	//   "scopes": [
5798	//     "https://www.googleapis.com/auth/cloud-platform"
5799	//   ]
5800	// }
5801
5802}
5803
5804// method id "recommendationengine.projects.locations.catalogs.eventStores.userEvents.write":
5805
5806type ProjectsLocationsCatalogsEventStoresUserEventsWriteCall struct {
5807	s                                               *Service
5808	parent                                          string
5809	googlecloudrecommendationenginev1beta1userevent *GoogleCloudRecommendationengineV1beta1UserEvent
5810	urlParams_                                      gensupport.URLParams
5811	ctx_                                            context.Context
5812	header_                                         http.Header
5813}
5814
5815// Write: Writes a single user event.
5816//
5817// - parent: The parent eventStore resource name, such as
5818//   "projects/1234/locations/global/catalogs/default_catalog/eventStores
5819//   /default_event_store".
5820func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Write(parent string, googlecloudrecommendationenginev1beta1userevent *GoogleCloudRecommendationengineV1beta1UserEvent) *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall {
5821	c := &ProjectsLocationsCatalogsEventStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5822	c.parent = parent
5823	c.googlecloudrecommendationenginev1beta1userevent = googlecloudrecommendationenginev1beta1userevent
5824	return c
5825}
5826
5827// Fields allows partial responses to be retrieved. See
5828// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5829// for more information.
5830func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall {
5831	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5832	return c
5833}
5834
5835// Context sets the context to be used in this call's Do method. Any
5836// pending HTTP request will be aborted if the provided context is
5837// canceled.
5838func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall {
5839	c.ctx_ = ctx
5840	return c
5841}
5842
5843// Header returns an http.Header that can be modified by the caller to
5844// add HTTP headers to the request.
5845func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) Header() http.Header {
5846	if c.header_ == nil {
5847		c.header_ = make(http.Header)
5848	}
5849	return c.header_
5850}
5851
5852func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) {
5853	reqHeaders := make(http.Header)
5854	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5855	for k, v := range c.header_ {
5856		reqHeaders[k] = v
5857	}
5858	reqHeaders.Set("User-Agent", c.s.userAgent())
5859	var body io.Reader = nil
5860	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1userevent)
5861	if err != nil {
5862		return nil, err
5863	}
5864	reqHeaders.Set("Content-Type", "application/json")
5865	c.urlParams_.Set("alt", alt)
5866	c.urlParams_.Set("prettyPrint", "false")
5867	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:write")
5868	urls += "?" + c.urlParams_.Encode()
5869	req, err := http.NewRequest("POST", urls, body)
5870	if err != nil {
5871		return nil, err
5872	}
5873	req.Header = reqHeaders
5874	googleapi.Expand(req.URL, map[string]string{
5875		"parent": c.parent,
5876	})
5877	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5878}
5879
5880// Do executes the "recommendationengine.projects.locations.catalogs.eventStores.userEvents.write" call.
5881// Exactly one of *GoogleCloudRecommendationengineV1beta1UserEvent or
5882// error will be non-nil. Any non-2xx status code is an error. Response
5883// headers are in either
5884// *GoogleCloudRecommendationengineV1beta1UserEvent.ServerResponse.Header
5885//  or (if a response was returned at all) in
5886// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5887// whether the returned error was because http.StatusNotModified was
5888// returned.
5889func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1UserEvent, error) {
5890	gensupport.SetOptions(c.urlParams_, opts...)
5891	res, err := c.doRequest("json")
5892	if res != nil && res.StatusCode == http.StatusNotModified {
5893		if res.Body != nil {
5894			res.Body.Close()
5895		}
5896		return nil, &googleapi.Error{
5897			Code:   res.StatusCode,
5898			Header: res.Header,
5899		}
5900	}
5901	if err != nil {
5902		return nil, err
5903	}
5904	defer googleapi.CloseBody(res)
5905	if err := googleapi.CheckResponse(res); err != nil {
5906		return nil, err
5907	}
5908	ret := &GoogleCloudRecommendationengineV1beta1UserEvent{
5909		ServerResponse: googleapi.ServerResponse{
5910			Header:         res.Header,
5911			HTTPStatusCode: res.StatusCode,
5912		},
5913	}
5914	target := &ret
5915	if err := gensupport.DecodeResponse(target, res); err != nil {
5916		return nil, err
5917	}
5918	return ret, nil
5919	// {
5920	//   "description": "Writes a single user event.",
5921	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:write",
5922	//   "httpMethod": "POST",
5923	//   "id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.write",
5924	//   "parameterOrder": [
5925	//     "parent"
5926	//   ],
5927	//   "parameters": {
5928	//     "parent": {
5929	//       "description": "Required. The parent eventStore resource name, such as \"projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store\".",
5930	//       "location": "path",
5931	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$",
5932	//       "required": true,
5933	//       "type": "string"
5934	//     }
5935	//   },
5936	//   "path": "v1beta1/{+parent}/userEvents:write",
5937	//   "request": {
5938	//     "$ref": "GoogleCloudRecommendationengineV1beta1UserEvent"
5939	//   },
5940	//   "response": {
5941	//     "$ref": "GoogleCloudRecommendationengineV1beta1UserEvent"
5942	//   },
5943	//   "scopes": [
5944	//     "https://www.googleapis.com/auth/cloud-platform"
5945	//   ]
5946	// }
5947
5948}
5949
5950// method id "recommendationengine.projects.locations.catalogs.operations.get":
5951
5952type ProjectsLocationsCatalogsOperationsGetCall struct {
5953	s            *Service
5954	name         string
5955	urlParams_   gensupport.URLParams
5956	ifNoneMatch_ string
5957	ctx_         context.Context
5958	header_      http.Header
5959}
5960
5961// Get: Gets the latest state of a long-running operation. Clients can
5962// use this method to poll the operation result at intervals as
5963// recommended by the API service.
5964//
5965// - name: The name of the operation resource.
5966func (r *ProjectsLocationsCatalogsOperationsService) Get(name string) *ProjectsLocationsCatalogsOperationsGetCall {
5967	c := &ProjectsLocationsCatalogsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5968	c.name = name
5969	return c
5970}
5971
5972// Fields allows partial responses to be retrieved. See
5973// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5974// for more information.
5975func (c *ProjectsLocationsCatalogsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsOperationsGetCall {
5976	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5977	return c
5978}
5979
5980// IfNoneMatch sets the optional parameter which makes the operation
5981// fail if the object's ETag matches the given value. This is useful for
5982// getting updates only after the object has changed since the last
5983// request. Use googleapi.IsNotModified to check whether the response
5984// error from Do is the result of In-None-Match.
5985func (c *ProjectsLocationsCatalogsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsOperationsGetCall {
5986	c.ifNoneMatch_ = entityTag
5987	return c
5988}
5989
5990// Context sets the context to be used in this call's Do method. Any
5991// pending HTTP request will be aborted if the provided context is
5992// canceled.
5993func (c *ProjectsLocationsCatalogsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsOperationsGetCall {
5994	c.ctx_ = ctx
5995	return c
5996}
5997
5998// Header returns an http.Header that can be modified by the caller to
5999// add HTTP headers to the request.
6000func (c *ProjectsLocationsCatalogsOperationsGetCall) Header() http.Header {
6001	if c.header_ == nil {
6002		c.header_ = make(http.Header)
6003	}
6004	return c.header_
6005}
6006
6007func (c *ProjectsLocationsCatalogsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
6008	reqHeaders := make(http.Header)
6009	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6010	for k, v := range c.header_ {
6011		reqHeaders[k] = v
6012	}
6013	reqHeaders.Set("User-Agent", c.s.userAgent())
6014	if c.ifNoneMatch_ != "" {
6015		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6016	}
6017	var body io.Reader = nil
6018	c.urlParams_.Set("alt", alt)
6019	c.urlParams_.Set("prettyPrint", "false")
6020	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6021	urls += "?" + c.urlParams_.Encode()
6022	req, err := http.NewRequest("GET", urls, body)
6023	if err != nil {
6024		return nil, err
6025	}
6026	req.Header = reqHeaders
6027	googleapi.Expand(req.URL, map[string]string{
6028		"name": c.name,
6029	})
6030	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6031}
6032
6033// Do executes the "recommendationengine.projects.locations.catalogs.operations.get" call.
6034// Exactly one of *GoogleLongrunningOperation or error will be non-nil.
6035// Any non-2xx status code is an error. Response headers are in either
6036// *GoogleLongrunningOperation.ServerResponse.Header or (if a response
6037// was returned at all) in error.(*googleapi.Error).Header. Use
6038// googleapi.IsNotModified to check whether the returned error was
6039// because http.StatusNotModified was returned.
6040func (c *ProjectsLocationsCatalogsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
6041	gensupport.SetOptions(c.urlParams_, opts...)
6042	res, err := c.doRequest("json")
6043	if res != nil && res.StatusCode == http.StatusNotModified {
6044		if res.Body != nil {
6045			res.Body.Close()
6046		}
6047		return nil, &googleapi.Error{
6048			Code:   res.StatusCode,
6049			Header: res.Header,
6050		}
6051	}
6052	if err != nil {
6053		return nil, err
6054	}
6055	defer googleapi.CloseBody(res)
6056	if err := googleapi.CheckResponse(res); err != nil {
6057		return nil, err
6058	}
6059	ret := &GoogleLongrunningOperation{
6060		ServerResponse: googleapi.ServerResponse{
6061			Header:         res.Header,
6062			HTTPStatusCode: res.StatusCode,
6063		},
6064	}
6065	target := &ret
6066	if err := gensupport.DecodeResponse(target, res); err != nil {
6067		return nil, err
6068	}
6069	return ret, nil
6070	// {
6071	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
6072	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations/{operationsId}",
6073	//   "httpMethod": "GET",
6074	//   "id": "recommendationengine.projects.locations.catalogs.operations.get",
6075	//   "parameterOrder": [
6076	//     "name"
6077	//   ],
6078	//   "parameters": {
6079	//     "name": {
6080	//       "description": "The name of the operation resource.",
6081	//       "location": "path",
6082	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/operations/[^/]+$",
6083	//       "required": true,
6084	//       "type": "string"
6085	//     }
6086	//   },
6087	//   "path": "v1beta1/{+name}",
6088	//   "response": {
6089	//     "$ref": "GoogleLongrunningOperation"
6090	//   },
6091	//   "scopes": [
6092	//     "https://www.googleapis.com/auth/cloud-platform"
6093	//   ]
6094	// }
6095
6096}
6097
6098// method id "recommendationengine.projects.locations.catalogs.operations.list":
6099
6100type ProjectsLocationsCatalogsOperationsListCall struct {
6101	s            *Service
6102	name         string
6103	urlParams_   gensupport.URLParams
6104	ifNoneMatch_ string
6105	ctx_         context.Context
6106	header_      http.Header
6107}
6108
6109// List: Lists operations that match the specified filter in the
6110// request. If the server doesn't support this method, it returns
6111// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
6112// override the binding to use different resource name schemes, such as
6113// `users/*/operations`. To override the binding, API services can add a
6114// binding such as "/v1/{name=users/*}/operations" to their service
6115// configuration. For backwards compatibility, the default name includes
6116// the operations collection id, however overriding users must ensure
6117// the name binding is the parent resource, without the operations
6118// collection id.
6119//
6120// - name: The name of the operation's parent resource.
6121func (r *ProjectsLocationsCatalogsOperationsService) List(name string) *ProjectsLocationsCatalogsOperationsListCall {
6122	c := &ProjectsLocationsCatalogsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6123	c.name = name
6124	return c
6125}
6126
6127// Filter sets the optional parameter "filter": The standard list
6128// filter.
6129func (c *ProjectsLocationsCatalogsOperationsListCall) Filter(filter string) *ProjectsLocationsCatalogsOperationsListCall {
6130	c.urlParams_.Set("filter", filter)
6131	return c
6132}
6133
6134// PageSize sets the optional parameter "pageSize": The standard list
6135// page size.
6136func (c *ProjectsLocationsCatalogsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsOperationsListCall {
6137	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6138	return c
6139}
6140
6141// PageToken sets the optional parameter "pageToken": The standard list
6142// page token.
6143func (c *ProjectsLocationsCatalogsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsOperationsListCall {
6144	c.urlParams_.Set("pageToken", pageToken)
6145	return c
6146}
6147
6148// Fields allows partial responses to be retrieved. See
6149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6150// for more information.
6151func (c *ProjectsLocationsCatalogsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsOperationsListCall {
6152	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6153	return c
6154}
6155
6156// IfNoneMatch sets the optional parameter which makes the operation
6157// fail if the object's ETag matches the given value. This is useful for
6158// getting updates only after the object has changed since the last
6159// request. Use googleapi.IsNotModified to check whether the response
6160// error from Do is the result of In-None-Match.
6161func (c *ProjectsLocationsCatalogsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsOperationsListCall {
6162	c.ifNoneMatch_ = entityTag
6163	return c
6164}
6165
6166// Context sets the context to be used in this call's Do method. Any
6167// pending HTTP request will be aborted if the provided context is
6168// canceled.
6169func (c *ProjectsLocationsCatalogsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsOperationsListCall {
6170	c.ctx_ = ctx
6171	return c
6172}
6173
6174// Header returns an http.Header that can be modified by the caller to
6175// add HTTP headers to the request.
6176func (c *ProjectsLocationsCatalogsOperationsListCall) Header() http.Header {
6177	if c.header_ == nil {
6178		c.header_ = make(http.Header)
6179	}
6180	return c.header_
6181}
6182
6183func (c *ProjectsLocationsCatalogsOperationsListCall) doRequest(alt string) (*http.Response, error) {
6184	reqHeaders := make(http.Header)
6185	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6186	for k, v := range c.header_ {
6187		reqHeaders[k] = v
6188	}
6189	reqHeaders.Set("User-Agent", c.s.userAgent())
6190	if c.ifNoneMatch_ != "" {
6191		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6192	}
6193	var body io.Reader = nil
6194	c.urlParams_.Set("alt", alt)
6195	c.urlParams_.Set("prettyPrint", "false")
6196	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
6197	urls += "?" + c.urlParams_.Encode()
6198	req, err := http.NewRequest("GET", urls, body)
6199	if err != nil {
6200		return nil, err
6201	}
6202	req.Header = reqHeaders
6203	googleapi.Expand(req.URL, map[string]string{
6204		"name": c.name,
6205	})
6206	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6207}
6208
6209// Do executes the "recommendationengine.projects.locations.catalogs.operations.list" call.
6210// Exactly one of *GoogleLongrunningListOperationsResponse or error will
6211// be non-nil. Any non-2xx status code is an error. Response headers are
6212// in either
6213// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
6214// a response was returned at all) in error.(*googleapi.Error).Header.
6215// Use googleapi.IsNotModified to check whether the returned error was
6216// because http.StatusNotModified was returned.
6217func (c *ProjectsLocationsCatalogsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
6218	gensupport.SetOptions(c.urlParams_, opts...)
6219	res, err := c.doRequest("json")
6220	if res != nil && res.StatusCode == http.StatusNotModified {
6221		if res.Body != nil {
6222			res.Body.Close()
6223		}
6224		return nil, &googleapi.Error{
6225			Code:   res.StatusCode,
6226			Header: res.Header,
6227		}
6228	}
6229	if err != nil {
6230		return nil, err
6231	}
6232	defer googleapi.CloseBody(res)
6233	if err := googleapi.CheckResponse(res); err != nil {
6234		return nil, err
6235	}
6236	ret := &GoogleLongrunningListOperationsResponse{
6237		ServerResponse: googleapi.ServerResponse{
6238			Header:         res.Header,
6239			HTTPStatusCode: res.StatusCode,
6240		},
6241	}
6242	target := &ret
6243	if err := gensupport.DecodeResponse(target, res); err != nil {
6244		return nil, err
6245	}
6246	return ret, nil
6247	// {
6248	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
6249	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations",
6250	//   "httpMethod": "GET",
6251	//   "id": "recommendationengine.projects.locations.catalogs.operations.list",
6252	//   "parameterOrder": [
6253	//     "name"
6254	//   ],
6255	//   "parameters": {
6256	//     "filter": {
6257	//       "description": "The standard list filter.",
6258	//       "location": "query",
6259	//       "type": "string"
6260	//     },
6261	//     "name": {
6262	//       "description": "The name of the operation's parent resource.",
6263	//       "location": "path",
6264	//       "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$",
6265	//       "required": true,
6266	//       "type": "string"
6267	//     },
6268	//     "pageSize": {
6269	//       "description": "The standard list page size.",
6270	//       "format": "int32",
6271	//       "location": "query",
6272	//       "type": "integer"
6273	//     },
6274	//     "pageToken": {
6275	//       "description": "The standard list page token.",
6276	//       "location": "query",
6277	//       "type": "string"
6278	//     }
6279	//   },
6280	//   "path": "v1beta1/{+name}/operations",
6281	//   "response": {
6282	//     "$ref": "GoogleLongrunningListOperationsResponse"
6283	//   },
6284	//   "scopes": [
6285	//     "https://www.googleapis.com/auth/cloud-platform"
6286	//   ]
6287	// }
6288
6289}
6290
6291// Pages invokes f for each page of results.
6292// A non-nil error returned from f will halt the iteration.
6293// The provided context supersedes any context provided to the Context method.
6294func (c *ProjectsLocationsCatalogsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
6295	c.ctx_ = ctx
6296	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6297	for {
6298		x, err := c.Do()
6299		if err != nil {
6300			return err
6301		}
6302		if err := f(x); err != nil {
6303			return err
6304		}
6305		if x.NextPageToken == "" {
6306			return nil
6307		}
6308		c.PageToken(x.NextPageToken)
6309	}
6310}
6311