...

Source file src/google.golang.org/api/recommendationengine/v1beta1/recommendationengine-gen.go

Documentation: google.golang.org/api/recommendationengine/v1beta1

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

View as plain text