...

Source file src/google.golang.org/api/retail/v2/retail-gen.go

Documentation: google.golang.org/api/retail/v2

     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 retail provides access to the Vertex AI Search for Retail API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/recommendations
    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/retail/v2"
    27  //	...
    28  //	ctx := context.Background()
    29  //	retailService, err := retail.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  //	retailService, err := retail.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  //	retailService, err := retail.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package retail // import "google.golang.org/api/retail/v2"
    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 = "retail:v2"
    90  const apiName = "retail"
    91  const apiVersion = "v2"
    92  const basePath = "https://retail.googleapis.com/"
    93  const basePathTemplate = "https://retail.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://retail.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  	rs.Operations = NewProjectsOperationsService(s)
   161  	return rs
   162  }
   163  
   164  type ProjectsService struct {
   165  	s *Service
   166  
   167  	Locations *ProjectsLocationsService
   168  
   169  	Operations *ProjectsOperationsService
   170  }
   171  
   172  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   173  	rs := &ProjectsLocationsService{s: s}
   174  	rs.Catalogs = NewProjectsLocationsCatalogsService(s)
   175  	rs.Operations = NewProjectsLocationsOperationsService(s)
   176  	return rs
   177  }
   178  
   179  type ProjectsLocationsService struct {
   180  	s *Service
   181  
   182  	Catalogs *ProjectsLocationsCatalogsService
   183  
   184  	Operations *ProjectsLocationsOperationsService
   185  }
   186  
   187  func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsService {
   188  	rs := &ProjectsLocationsCatalogsService{s: s}
   189  	rs.AttributesConfig = NewProjectsLocationsCatalogsAttributesConfigService(s)
   190  	rs.Branches = NewProjectsLocationsCatalogsBranchesService(s)
   191  	rs.CompletionData = NewProjectsLocationsCatalogsCompletionDataService(s)
   192  	rs.Controls = NewProjectsLocationsCatalogsControlsService(s)
   193  	rs.Models = NewProjectsLocationsCatalogsModelsService(s)
   194  	rs.Operations = NewProjectsLocationsCatalogsOperationsService(s)
   195  	rs.Placements = NewProjectsLocationsCatalogsPlacementsService(s)
   196  	rs.ServingConfigs = NewProjectsLocationsCatalogsServingConfigsService(s)
   197  	rs.UserEvents = NewProjectsLocationsCatalogsUserEventsService(s)
   198  	return rs
   199  }
   200  
   201  type ProjectsLocationsCatalogsService struct {
   202  	s *Service
   203  
   204  	AttributesConfig *ProjectsLocationsCatalogsAttributesConfigService
   205  
   206  	Branches *ProjectsLocationsCatalogsBranchesService
   207  
   208  	CompletionData *ProjectsLocationsCatalogsCompletionDataService
   209  
   210  	Controls *ProjectsLocationsCatalogsControlsService
   211  
   212  	Models *ProjectsLocationsCatalogsModelsService
   213  
   214  	Operations *ProjectsLocationsCatalogsOperationsService
   215  
   216  	Placements *ProjectsLocationsCatalogsPlacementsService
   217  
   218  	ServingConfigs *ProjectsLocationsCatalogsServingConfigsService
   219  
   220  	UserEvents *ProjectsLocationsCatalogsUserEventsService
   221  }
   222  
   223  func NewProjectsLocationsCatalogsAttributesConfigService(s *Service) *ProjectsLocationsCatalogsAttributesConfigService {
   224  	rs := &ProjectsLocationsCatalogsAttributesConfigService{s: s}
   225  	return rs
   226  }
   227  
   228  type ProjectsLocationsCatalogsAttributesConfigService struct {
   229  	s *Service
   230  }
   231  
   232  func NewProjectsLocationsCatalogsBranchesService(s *Service) *ProjectsLocationsCatalogsBranchesService {
   233  	rs := &ProjectsLocationsCatalogsBranchesService{s: s}
   234  	rs.Operations = NewProjectsLocationsCatalogsBranchesOperationsService(s)
   235  	rs.Products = NewProjectsLocationsCatalogsBranchesProductsService(s)
   236  	return rs
   237  }
   238  
   239  type ProjectsLocationsCatalogsBranchesService struct {
   240  	s *Service
   241  
   242  	Operations *ProjectsLocationsCatalogsBranchesOperationsService
   243  
   244  	Products *ProjectsLocationsCatalogsBranchesProductsService
   245  }
   246  
   247  func NewProjectsLocationsCatalogsBranchesOperationsService(s *Service) *ProjectsLocationsCatalogsBranchesOperationsService {
   248  	rs := &ProjectsLocationsCatalogsBranchesOperationsService{s: s}
   249  	return rs
   250  }
   251  
   252  type ProjectsLocationsCatalogsBranchesOperationsService struct {
   253  	s *Service
   254  }
   255  
   256  func NewProjectsLocationsCatalogsBranchesProductsService(s *Service) *ProjectsLocationsCatalogsBranchesProductsService {
   257  	rs := &ProjectsLocationsCatalogsBranchesProductsService{s: s}
   258  	return rs
   259  }
   260  
   261  type ProjectsLocationsCatalogsBranchesProductsService struct {
   262  	s *Service
   263  }
   264  
   265  func NewProjectsLocationsCatalogsCompletionDataService(s *Service) *ProjectsLocationsCatalogsCompletionDataService {
   266  	rs := &ProjectsLocationsCatalogsCompletionDataService{s: s}
   267  	return rs
   268  }
   269  
   270  type ProjectsLocationsCatalogsCompletionDataService struct {
   271  	s *Service
   272  }
   273  
   274  func NewProjectsLocationsCatalogsControlsService(s *Service) *ProjectsLocationsCatalogsControlsService {
   275  	rs := &ProjectsLocationsCatalogsControlsService{s: s}
   276  	return rs
   277  }
   278  
   279  type ProjectsLocationsCatalogsControlsService struct {
   280  	s *Service
   281  }
   282  
   283  func NewProjectsLocationsCatalogsModelsService(s *Service) *ProjectsLocationsCatalogsModelsService {
   284  	rs := &ProjectsLocationsCatalogsModelsService{s: s}
   285  	return rs
   286  }
   287  
   288  type ProjectsLocationsCatalogsModelsService struct {
   289  	s *Service
   290  }
   291  
   292  func NewProjectsLocationsCatalogsOperationsService(s *Service) *ProjectsLocationsCatalogsOperationsService {
   293  	rs := &ProjectsLocationsCatalogsOperationsService{s: s}
   294  	return rs
   295  }
   296  
   297  type ProjectsLocationsCatalogsOperationsService struct {
   298  	s *Service
   299  }
   300  
   301  func NewProjectsLocationsCatalogsPlacementsService(s *Service) *ProjectsLocationsCatalogsPlacementsService {
   302  	rs := &ProjectsLocationsCatalogsPlacementsService{s: s}
   303  	return rs
   304  }
   305  
   306  type ProjectsLocationsCatalogsPlacementsService struct {
   307  	s *Service
   308  }
   309  
   310  func NewProjectsLocationsCatalogsServingConfigsService(s *Service) *ProjectsLocationsCatalogsServingConfigsService {
   311  	rs := &ProjectsLocationsCatalogsServingConfigsService{s: s}
   312  	return rs
   313  }
   314  
   315  type ProjectsLocationsCatalogsServingConfigsService struct {
   316  	s *Service
   317  }
   318  
   319  func NewProjectsLocationsCatalogsUserEventsService(s *Service) *ProjectsLocationsCatalogsUserEventsService {
   320  	rs := &ProjectsLocationsCatalogsUserEventsService{s: s}
   321  	return rs
   322  }
   323  
   324  type ProjectsLocationsCatalogsUserEventsService struct {
   325  	s *Service
   326  }
   327  
   328  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   329  	rs := &ProjectsLocationsOperationsService{s: s}
   330  	return rs
   331  }
   332  
   333  type ProjectsLocationsOperationsService struct {
   334  	s *Service
   335  }
   336  
   337  func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
   338  	rs := &ProjectsOperationsService{s: s}
   339  	return rs
   340  }
   341  
   342  type ProjectsOperationsService struct {
   343  	s *Service
   344  }
   345  
   346  // GoogleApiHttpBody: Message that represents an arbitrary HTTP body. It should
   347  // only be used for payload formats that can't be represented as JSON, such as
   348  // raw binary or an HTML page. This message can be used both in streaming and
   349  // non-streaming API methods in the request as well as the response. It can be
   350  // used as a top-level request field, which is convenient if one wants to
   351  // extract parameters from either the URL or HTTP template into the request
   352  // fields and also want access to the raw HTTP body. Example: message
   353  // GetResourceRequest { // A unique request id. string request_id = 1; // The
   354  // raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; }
   355  // service ResourceService { rpc GetResource(GetResourceRequest) returns
   356  // (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns
   357  // (google.protobuf.Empty); } Example with streaming methods: service
   358  // CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream
   359  // google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns
   360  // (stream google.api.HttpBody); } Use of this type only changes how the
   361  // request and response bodies are handled, all other features will continue to
   362  // work unchanged.
   363  type GoogleApiHttpBody struct {
   364  	// ContentType: The HTTP Content-Type header value specifying the content type
   365  	// of the body.
   366  	ContentType string `json:"contentType,omitempty"`
   367  	// Data: The HTTP request/response body as raw binary.
   368  	Data string `json:"data,omitempty"`
   369  	// Extensions: Application specific response metadata. Must be set in the first
   370  	// response for streaming APIs.
   371  	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
   372  
   373  	// ServerResponse contains the HTTP response code and headers from the server.
   374  	googleapi.ServerResponse `json:"-"`
   375  	// ForceSendFields is a list of field names (e.g. "ContentType") to
   376  	// unconditionally include in API requests. By default, fields with empty or
   377  	// default values are omitted from API requests. See
   378  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   379  	// details.
   380  	ForceSendFields []string `json:"-"`
   381  	// NullFields is a list of field names (e.g. "ContentType") to include in API
   382  	// requests with the JSON null value. By default, fields with empty values are
   383  	// omitted from API requests. See
   384  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   385  	NullFields []string `json:"-"`
   386  }
   387  
   388  func (s *GoogleApiHttpBody) MarshalJSON() ([]byte, error) {
   389  	type NoMethod GoogleApiHttpBody
   390  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   391  }
   392  
   393  // GoogleCloudRetailLoggingErrorContext: A description of the context in which
   394  // an error occurred.
   395  type GoogleCloudRetailLoggingErrorContext struct {
   396  	// HttpRequest: The HTTP request which was processed when the error was
   397  	// triggered.
   398  	HttpRequest *GoogleCloudRetailLoggingHttpRequestContext `json:"httpRequest,omitempty"`
   399  	// ReportLocation: The location in the source code where the decision was made
   400  	// to report the error, usually the place where it was logged.
   401  	ReportLocation *GoogleCloudRetailLoggingSourceLocation `json:"reportLocation,omitempty"`
   402  	// ForceSendFields is a list of field names (e.g. "HttpRequest") to
   403  	// unconditionally include in API requests. By default, fields with empty or
   404  	// default values are omitted from API requests. See
   405  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   406  	// details.
   407  	ForceSendFields []string `json:"-"`
   408  	// NullFields is a list of field names (e.g. "HttpRequest") to include in API
   409  	// requests with the JSON null value. By default, fields with empty values are
   410  	// omitted from API requests. See
   411  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   412  	NullFields []string `json:"-"`
   413  }
   414  
   415  func (s *GoogleCloudRetailLoggingErrorContext) MarshalJSON() ([]byte, error) {
   416  	type NoMethod GoogleCloudRetailLoggingErrorContext
   417  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   418  }
   419  
   420  // GoogleCloudRetailLoggingErrorLog: An error log which is reported to the
   421  // Error Reporting system. This proto a superset of
   422  // google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent.
   423  type GoogleCloudRetailLoggingErrorLog struct {
   424  	// Context: A description of the context in which the error occurred.
   425  	Context *GoogleCloudRetailLoggingErrorContext `json:"context,omitempty"`
   426  	// ImportPayload: The error payload that is populated on LRO import APIs.
   427  	ImportPayload *GoogleCloudRetailLoggingImportErrorContext `json:"importPayload,omitempty"`
   428  	// Message: A message describing the error.
   429  	Message string `json:"message,omitempty"`
   430  	// RequestPayload: The API request payload, represented as a protocol buffer.
   431  	// Most API request types are supported. For example:
   432  	// "type.googleapis.com/google.cloud.retail.v2.ProductService.CreateProductReque
   433  	// st"
   434  	// "type.googleapis.com/google.cloud.retail.v2.UserEventService.WriteUserEventRe
   435  	// quest"
   436  	RequestPayload googleapi.RawMessage `json:"requestPayload,omitempty"`
   437  	// ResponsePayload: The API response payload, represented as a protocol buffer.
   438  	// This is used to log some "soft errors", where the response is valid but we
   439  	// consider there are some quality issues like unjoined events. The following
   440  	// API responses are supported and no PII is included:
   441  	// "google.cloud.retail.v2.PredictionService.Predict"
   442  	// "google.cloud.retail.v2.UserEventService.WriteUserEvent"
   443  	// "google.cloud.retail.v2.UserEventService.CollectUserEvent"
   444  	ResponsePayload googleapi.RawMessage `json:"responsePayload,omitempty"`
   445  	// ServiceContext: The service context in which this error has occurred.
   446  	ServiceContext *GoogleCloudRetailLoggingServiceContext `json:"serviceContext,omitempty"`
   447  	// Status: The RPC status associated with the error log.
   448  	Status *GoogleRpcStatus `json:"status,omitempty"`
   449  	// ForceSendFields is a list of field names (e.g. "Context") to unconditionally
   450  	// include in API requests. By default, fields with empty or default values are
   451  	// omitted from API requests. See
   452  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   453  	// details.
   454  	ForceSendFields []string `json:"-"`
   455  	// NullFields is a list of field names (e.g. "Context") to include in API
   456  	// requests with the JSON null value. By default, fields with empty values are
   457  	// omitted from API requests. See
   458  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   459  	NullFields []string `json:"-"`
   460  }
   461  
   462  func (s *GoogleCloudRetailLoggingErrorLog) MarshalJSON() ([]byte, error) {
   463  	type NoMethod GoogleCloudRetailLoggingErrorLog
   464  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   465  }
   466  
   467  // GoogleCloudRetailLoggingHttpRequestContext: HTTP request data that is
   468  // related to a reported error.
   469  type GoogleCloudRetailLoggingHttpRequestContext struct {
   470  	// ResponseStatusCode: The HTTP response status code for the request.
   471  	ResponseStatusCode int64 `json:"responseStatusCode,omitempty"`
   472  	// ForceSendFields is a list of field names (e.g. "ResponseStatusCode") to
   473  	// unconditionally include in API requests. By default, fields with empty or
   474  	// default values are omitted from API requests. See
   475  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   476  	// details.
   477  	ForceSendFields []string `json:"-"`
   478  	// NullFields is a list of field names (e.g. "ResponseStatusCode") to include
   479  	// in API requests with the JSON null value. By default, fields with empty
   480  	// values are omitted from API requests. See
   481  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   482  	NullFields []string `json:"-"`
   483  }
   484  
   485  func (s *GoogleCloudRetailLoggingHttpRequestContext) MarshalJSON() ([]byte, error) {
   486  	type NoMethod GoogleCloudRetailLoggingHttpRequestContext
   487  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   488  }
   489  
   490  // GoogleCloudRetailLoggingImportErrorContext: The error payload that is
   491  // populated on LRO import APIs, including
   492  // "google.cloud.retail.v2.ProductService.ImportProducts" and
   493  // "google.cloud.retail.v2.EventService.ImportUserEvents".
   494  type GoogleCloudRetailLoggingImportErrorContext struct {
   495  	// CatalogItem: The detailed content which caused the error on importing a
   496  	// catalog item.
   497  	CatalogItem string `json:"catalogItem,omitempty"`
   498  	// GcsPath: Cloud Storage file path of the import source. Can be set for batch
   499  	// operation error.
   500  	GcsPath string `json:"gcsPath,omitempty"`
   501  	// LineNumber: Line number of the content in file. Should be empty for
   502  	// permission or batch operation error.
   503  	LineNumber string `json:"lineNumber,omitempty"`
   504  	// OperationName: The operation resource name of the LRO.
   505  	OperationName string `json:"operationName,omitempty"`
   506  	// Product: The detailed content which caused the error on importing a product.
   507  	Product string `json:"product,omitempty"`
   508  	// UserEvent: The detailed content which caused the error on importing a user
   509  	// event.
   510  	UserEvent string `json:"userEvent,omitempty"`
   511  	// ForceSendFields is a list of field names (e.g. "CatalogItem") to
   512  	// unconditionally include in API requests. By default, fields with empty or
   513  	// default values are omitted from API requests. See
   514  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   515  	// details.
   516  	ForceSendFields []string `json:"-"`
   517  	// NullFields is a list of field names (e.g. "CatalogItem") to include in API
   518  	// requests with the JSON null value. By default, fields with empty values are
   519  	// omitted from API requests. See
   520  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   521  	NullFields []string `json:"-"`
   522  }
   523  
   524  func (s *GoogleCloudRetailLoggingImportErrorContext) MarshalJSON() ([]byte, error) {
   525  	type NoMethod GoogleCloudRetailLoggingImportErrorContext
   526  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   527  }
   528  
   529  // GoogleCloudRetailLoggingServiceContext: Describes a running service that
   530  // sends errors.
   531  type GoogleCloudRetailLoggingServiceContext struct {
   532  	// Service: An identifier of the service. For example, "retail.googleapis.com".
   533  	Service string `json:"service,omitempty"`
   534  	// ForceSendFields is a list of field names (e.g. "Service") to unconditionally
   535  	// include in API requests. By default, fields with empty or default values are
   536  	// omitted from API requests. See
   537  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   538  	// details.
   539  	ForceSendFields []string `json:"-"`
   540  	// NullFields is a list of field names (e.g. "Service") to include in API
   541  	// requests with the JSON null value. By default, fields with empty values are
   542  	// omitted from API requests. See
   543  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   544  	NullFields []string `json:"-"`
   545  }
   546  
   547  func (s *GoogleCloudRetailLoggingServiceContext) MarshalJSON() ([]byte, error) {
   548  	type NoMethod GoogleCloudRetailLoggingServiceContext
   549  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   550  }
   551  
   552  // GoogleCloudRetailLoggingSourceLocation: Indicates a location in the source
   553  // code of the service for which errors are reported.
   554  type GoogleCloudRetailLoggingSourceLocation struct {
   555  	// FunctionName: Human-readable name of a function or method. For example,
   556  	// "google.cloud.retail.v2.UserEventService.ImportUserEvents".
   557  	FunctionName string `json:"functionName,omitempty"`
   558  	// ForceSendFields is a list of field names (e.g. "FunctionName") to
   559  	// unconditionally include in API requests. By default, fields with empty or
   560  	// default values are omitted from API requests. See
   561  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   562  	// details.
   563  	ForceSendFields []string `json:"-"`
   564  	// NullFields is a list of field names (e.g. "FunctionName") to include in API
   565  	// requests with the JSON null value. By default, fields with empty values are
   566  	// omitted from API requests. See
   567  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   568  	NullFields []string `json:"-"`
   569  }
   570  
   571  func (s *GoogleCloudRetailLoggingSourceLocation) MarshalJSON() ([]byte, error) {
   572  	type NoMethod GoogleCloudRetailLoggingSourceLocation
   573  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   574  }
   575  
   576  // GoogleCloudRetailV2AddCatalogAttributeRequest: Request for
   577  // CatalogService.AddCatalogAttribute method.
   578  type GoogleCloudRetailV2AddCatalogAttributeRequest struct {
   579  	// CatalogAttribute: Required. The CatalogAttribute to add.
   580  	CatalogAttribute *GoogleCloudRetailV2CatalogAttribute `json:"catalogAttribute,omitempty"`
   581  	// ForceSendFields is a list of field names (e.g. "CatalogAttribute") to
   582  	// unconditionally include in API requests. By default, fields with empty or
   583  	// default values are omitted from API requests. See
   584  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   585  	// details.
   586  	ForceSendFields []string `json:"-"`
   587  	// NullFields is a list of field names (e.g. "CatalogAttribute") to include in
   588  	// API requests with the JSON null value. By default, fields with empty values
   589  	// are omitted from API requests. See
   590  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   591  	NullFields []string `json:"-"`
   592  }
   593  
   594  func (s *GoogleCloudRetailV2AddCatalogAttributeRequest) MarshalJSON() ([]byte, error) {
   595  	type NoMethod GoogleCloudRetailV2AddCatalogAttributeRequest
   596  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   597  }
   598  
   599  // GoogleCloudRetailV2AddControlRequest: Request for AddControl method.
   600  type GoogleCloudRetailV2AddControlRequest struct {
   601  	// ControlId: Required. The id of the control to apply. Assumed to be in the
   602  	// same catalog as the serving config - if id is not found a NOT_FOUND error is
   603  	// returned.
   604  	ControlId string `json:"controlId,omitempty"`
   605  	// ForceSendFields is a list of field names (e.g. "ControlId") to
   606  	// unconditionally include in API requests. By default, fields with empty or
   607  	// default values are omitted from API requests. See
   608  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   609  	// details.
   610  	ForceSendFields []string `json:"-"`
   611  	// NullFields is a list of field names (e.g. "ControlId") to include in API
   612  	// requests with the JSON null value. By default, fields with empty values are
   613  	// omitted from API requests. See
   614  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   615  	NullFields []string `json:"-"`
   616  }
   617  
   618  func (s *GoogleCloudRetailV2AddControlRequest) MarshalJSON() ([]byte, error) {
   619  	type NoMethod GoogleCloudRetailV2AddControlRequest
   620  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   621  }
   622  
   623  // GoogleCloudRetailV2AddFulfillmentPlacesMetadata: Metadata related to the
   624  // progress of the AddFulfillmentPlaces operation. Currently empty because
   625  // there is no meaningful metadata populated from the
   626  // ProductService.AddFulfillmentPlaces method.
   627  type GoogleCloudRetailV2AddFulfillmentPlacesMetadata struct {
   628  }
   629  
   630  // GoogleCloudRetailV2AddFulfillmentPlacesRequest: Request message for
   631  // ProductService.AddFulfillmentPlaces method.
   632  type GoogleCloudRetailV2AddFulfillmentPlacesRequest struct {
   633  	// AddTime: The time when the fulfillment updates are issued, used to prevent
   634  	// out-of-order updates on fulfillment information. If not provided, the
   635  	// internal system time will be used.
   636  	AddTime string `json:"addTime,omitempty"`
   637  	// AllowMissing: If set to true, and the Product is not found, the fulfillment
   638  	// information will still be processed and retained for at most 1 day and
   639  	// processed once the Product is created. If set to false, a NOT_FOUND error is
   640  	// returned if the Product is not found.
   641  	AllowMissing bool `json:"allowMissing,omitempty"`
   642  	// PlaceIds: Required. The IDs for this type, such as the store IDs for
   643  	// "pickup-in-store" or the region IDs for "same-day-delivery" to be added for
   644  	// this type. Duplicate IDs will be automatically ignored. At least 1 value is
   645  	// required, and a maximum of 2000 values are allowed. Each value must be a
   646  	// string with a length limit of 10 characters, matching the pattern
   647  	// `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an
   648  	// INVALID_ARGUMENT error is returned. If the total number of place IDs exceeds
   649  	// 2000 for this type after adding, then the update will be rejected.
   650  	PlaceIds []string `json:"placeIds,omitempty"`
   651  	// Type: Required. The fulfillment type, including commonly used types (such as
   652  	// pickup in store and same day delivery), and custom types. Supported values:
   653  	// * "pickup-in-store" * "ship-to-store" * "same-day-delivery" *
   654  	// "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" *
   655  	// "custom-type-4" * "custom-type-5" If this field is set to an invalid value
   656  	// other than these, an INVALID_ARGUMENT error is returned. This field directly
   657  	// corresponds to Product.fulfillment_info.type.
   658  	Type string `json:"type,omitempty"`
   659  	// ForceSendFields is a list of field names (e.g. "AddTime") to unconditionally
   660  	// include in API requests. By default, fields with empty or default values are
   661  	// omitted from API requests. See
   662  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   663  	// details.
   664  	ForceSendFields []string `json:"-"`
   665  	// NullFields is a list of field names (e.g. "AddTime") to include in API
   666  	// requests with the JSON null value. By default, fields with empty values are
   667  	// omitted from API requests. See
   668  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   669  	NullFields []string `json:"-"`
   670  }
   671  
   672  func (s *GoogleCloudRetailV2AddFulfillmentPlacesRequest) MarshalJSON() ([]byte, error) {
   673  	type NoMethod GoogleCloudRetailV2AddFulfillmentPlacesRequest
   674  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   675  }
   676  
   677  // GoogleCloudRetailV2AddFulfillmentPlacesResponse: Response of the
   678  // AddFulfillmentPlacesRequest. Currently empty because there is no meaningful
   679  // response populated from the ProductService.AddFulfillmentPlaces method.
   680  type GoogleCloudRetailV2AddFulfillmentPlacesResponse struct {
   681  }
   682  
   683  // GoogleCloudRetailV2AddLocalInventoriesMetadata: Metadata related to the
   684  // progress of the AddLocalInventories operation. Currently empty because there
   685  // is no meaningful metadata populated from the
   686  // ProductService.AddLocalInventories method.
   687  type GoogleCloudRetailV2AddLocalInventoriesMetadata struct {
   688  }
   689  
   690  // GoogleCloudRetailV2AddLocalInventoriesRequest: Request message for
   691  // ProductService.AddLocalInventories method.
   692  type GoogleCloudRetailV2AddLocalInventoriesRequest struct {
   693  	// AddMask: Indicates which inventory fields in the provided list of
   694  	// LocalInventory to update. The field is updated to the provided value. If a
   695  	// field is set while the place does not have a previous local inventory, the
   696  	// local inventory at that store is created. If a field is set while the value
   697  	// of that field is not provided, the original field value, if it exists, is
   698  	// deleted. If the mask is not set or set with empty paths, all inventory
   699  	// fields will be updated. If an unsupported or unknown field is provided, an
   700  	// INVALID_ARGUMENT error is returned and the entire update will be ignored.
   701  	AddMask string `json:"addMask,omitempty"`
   702  	// AddTime: The time when the inventory updates are issued. Used to prevent
   703  	// out-of-order updates on local inventory fields. If not provided, the
   704  	// internal system time will be used.
   705  	AddTime string `json:"addTime,omitempty"`
   706  	// AllowMissing: If set to true, and the Product is not found, the local
   707  	// inventory will still be processed and retained for at most 1 day and
   708  	// processed once the Product is created. If set to false, a NOT_FOUND error is
   709  	// returned if the Product is not found.
   710  	AllowMissing bool `json:"allowMissing,omitempty"`
   711  	// LocalInventories: Required. A list of inventory information at difference
   712  	// places. Each place is identified by its place ID. At most 3000 inventories
   713  	// are allowed per request.
   714  	LocalInventories []*GoogleCloudRetailV2LocalInventory `json:"localInventories,omitempty"`
   715  	// ForceSendFields is a list of field names (e.g. "AddMask") to unconditionally
   716  	// include in API requests. By default, fields with empty or default values are
   717  	// omitted from API requests. See
   718  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   719  	// details.
   720  	ForceSendFields []string `json:"-"`
   721  	// NullFields is a list of field names (e.g. "AddMask") to include in API
   722  	// requests with the JSON null value. By default, fields with empty values are
   723  	// omitted from API requests. See
   724  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   725  	NullFields []string `json:"-"`
   726  }
   727  
   728  func (s *GoogleCloudRetailV2AddLocalInventoriesRequest) MarshalJSON() ([]byte, error) {
   729  	type NoMethod GoogleCloudRetailV2AddLocalInventoriesRequest
   730  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   731  }
   732  
   733  // GoogleCloudRetailV2AddLocalInventoriesResponse: Response of the
   734  // ProductService.AddLocalInventories API. Currently empty because there is no
   735  // meaningful response populated from the ProductService.AddLocalInventories
   736  // method.
   737  type GoogleCloudRetailV2AddLocalInventoriesResponse struct {
   738  }
   739  
   740  // GoogleCloudRetailV2AttributesConfig: Catalog level attribute config.
   741  type GoogleCloudRetailV2AttributesConfig struct {
   742  	// AttributeConfigLevel: Output only. The AttributeConfigLevel used for this
   743  	// catalog.
   744  	//
   745  	// Possible values:
   746  	//   "ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED" - Value used when unset. In this
   747  	// case, server behavior defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG.
   748  	//   "PRODUCT_LEVEL_ATTRIBUTE_CONFIG" - At this level, we honor the attribute
   749  	// configurations set in Product.attributes.
   750  	//   "CATALOG_LEVEL_ATTRIBUTE_CONFIG" - At this level, we honor the attribute
   751  	// configurations set in CatalogConfig.attribute_configs.
   752  	AttributeConfigLevel string `json:"attributeConfigLevel,omitempty"`
   753  	// CatalogAttributes: Enable attribute(s) config at catalog level. For example,
   754  	// indexable, dynamic_facetable, or searchable for each attribute. The key is
   755  	// catalog attribute's name. For example: `color`, `brands`,
   756  	// `attributes.custom_attribute`, such as `attributes.xyz`. The maximum number
   757  	// of catalog attributes allowed in a request is 1000.
   758  	CatalogAttributes map[string]GoogleCloudRetailV2CatalogAttribute `json:"catalogAttributes,omitempty"`
   759  	// Name: Required. Immutable. The fully qualified resource name of the
   760  	// attribute config. Format:
   761  	// `projects/*/locations/*/catalogs/*/attributesConfig`
   762  	Name string `json:"name,omitempty"`
   763  
   764  	// ServerResponse contains the HTTP response code and headers from the server.
   765  	googleapi.ServerResponse `json:"-"`
   766  	// ForceSendFields is a list of field names (e.g. "AttributeConfigLevel") to
   767  	// unconditionally include in API requests. By default, fields with empty or
   768  	// default values are omitted from API requests. See
   769  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   770  	// details.
   771  	ForceSendFields []string `json:"-"`
   772  	// NullFields is a list of field names (e.g. "AttributeConfigLevel") to include
   773  	// in API requests with the JSON null value. By default, fields with empty
   774  	// values are omitted from API requests. See
   775  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   776  	NullFields []string `json:"-"`
   777  }
   778  
   779  func (s *GoogleCloudRetailV2AttributesConfig) MarshalJSON() ([]byte, error) {
   780  	type NoMethod GoogleCloudRetailV2AttributesConfig
   781  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   782  }
   783  
   784  // GoogleCloudRetailV2Audience: An intended audience of the Product for whom
   785  // it's sold.
   786  type GoogleCloudRetailV2Audience struct {
   787  	// AgeGroups: The age groups of the audience. Strongly encouraged to use the
   788  	// standard values: "newborn" (up to 3 months old), "infant" (3–12 months
   789  	// old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult"
   790  	// (typically teens or older). At most 5 values are allowed. Each value must be
   791  	// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an
   792  	// INVALID_ARGUMENT error is returned. Google Merchant Center property
   793  	// age_group (https://support.google.com/merchants/answer/6324463). Schema.org
   794  	// property Product.audience.suggestedMinAge
   795  	// (https://schema.org/suggestedMinAge) and Product.audience.suggestedMaxAge
   796  	// (https://schema.org/suggestedMaxAge).
   797  	AgeGroups []string `json:"ageGroups,omitempty"`
   798  	// Genders: The genders of the audience. Strongly encouraged to use the
   799  	// standard values: "male", "female", "unisex". At most 5 values are allowed.
   800  	// Each value must be a UTF-8 encoded string with a length limit of 128
   801  	// characters. Otherwise, an INVALID_ARGUMENT error is returned. Google
   802  	// Merchant Center property gender
   803  	// (https://support.google.com/merchants/answer/6324479). Schema.org property
   804  	// Product.audience.suggestedGender (https://schema.org/suggestedGender).
   805  	Genders []string `json:"genders,omitempty"`
   806  	// ForceSendFields is a list of field names (e.g. "AgeGroups") to
   807  	// unconditionally include in API requests. By default, fields with empty or
   808  	// default values are omitted from API requests. See
   809  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   810  	// details.
   811  	ForceSendFields []string `json:"-"`
   812  	// NullFields is a list of field names (e.g. "AgeGroups") to include in API
   813  	// requests with the JSON null value. By default, fields with empty values are
   814  	// omitted from API requests. See
   815  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   816  	NullFields []string `json:"-"`
   817  }
   818  
   819  func (s *GoogleCloudRetailV2Audience) MarshalJSON() ([]byte, error) {
   820  	type NoMethod GoogleCloudRetailV2Audience
   821  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   822  }
   823  
   824  // GoogleCloudRetailV2BigQueryOutputResult: A BigQuery output result.
   825  type GoogleCloudRetailV2BigQueryOutputResult struct {
   826  	// DatasetId: The ID of a BigQuery Dataset.
   827  	DatasetId string `json:"datasetId,omitempty"`
   828  	// TableId: The ID of a BigQuery Table.
   829  	TableId string `json:"tableId,omitempty"`
   830  	// ForceSendFields is a list of field names (e.g. "DatasetId") to
   831  	// unconditionally include in API requests. By default, fields with empty or
   832  	// default values are omitted from API requests. See
   833  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   834  	// details.
   835  	ForceSendFields []string `json:"-"`
   836  	// NullFields is a list of field names (e.g. "DatasetId") to include in API
   837  	// requests with the JSON null value. By default, fields with empty values are
   838  	// omitted from API requests. See
   839  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   840  	NullFields []string `json:"-"`
   841  }
   842  
   843  func (s *GoogleCloudRetailV2BigQueryOutputResult) MarshalJSON() ([]byte, error) {
   844  	type NoMethod GoogleCloudRetailV2BigQueryOutputResult
   845  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   846  }
   847  
   848  // GoogleCloudRetailV2BigQuerySource: BigQuery source import data from.
   849  type GoogleCloudRetailV2BigQuerySource struct {
   850  	// DataSchema: The schema to use when parsing the data from the source.
   851  	// Supported values for product imports: * `product` (default): One JSON
   852  	// Product per line. Each product must have a valid Product.id. *
   853  	// `product_merchant_center`: See Importing catalog data from Merchant Center
   854  	// (https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc).
   855  	// Supported values for user events imports: * `user_event` (default): One JSON
   856  	// UserEvent per line. * `user_event_ga360`: The schema is available here:
   857  	// https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: The
   858  	// schema is available here:
   859  	// https://support.google.com/analytics/answer/7029846. Supported values for
   860  	// autocomplete imports: * `suggestions` (default): One JSON completion
   861  	// suggestion per line. * `denylist`: One JSON deny suggestion per line. *
   862  	// `allowlist`: One JSON allow suggestion per line.
   863  	DataSchema string `json:"dataSchema,omitempty"`
   864  	// DatasetId: Required. The BigQuery data set to copy the data from with a
   865  	// length limit of 1,024 characters.
   866  	DatasetId string `json:"datasetId,omitempty"`
   867  	// GcsStagingDir: Intermediate Cloud Storage directory used for the import with
   868  	// a length limit of 2,000 characters. Can be specified if one wants to have
   869  	// the BigQuery export to a specific Cloud Storage directory.
   870  	GcsStagingDir string `json:"gcsStagingDir,omitempty"`
   871  	// PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in
   872  	// YYYY-MM-DD format. Only supported in ImportProductsRequest.
   873  	PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"`
   874  	// ProjectId: The project ID (can be project # or ID) that the BigQuery source
   875  	// is in with a length limit of 128 characters. If not specified, inherits the
   876  	// project ID from the parent request.
   877  	ProjectId string `json:"projectId,omitempty"`
   878  	// TableId: Required. The BigQuery table to copy the data from with a length
   879  	// limit of 1,024 characters.
   880  	TableId string `json:"tableId,omitempty"`
   881  	// ForceSendFields is a list of field names (e.g. "DataSchema") to
   882  	// unconditionally include in API requests. By default, fields with empty or
   883  	// default values are omitted from API requests. See
   884  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   885  	// details.
   886  	ForceSendFields []string `json:"-"`
   887  	// NullFields is a list of field names (e.g. "DataSchema") to include in API
   888  	// requests with the JSON null value. By default, fields with empty values are
   889  	// omitted from API requests. See
   890  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   891  	NullFields []string `json:"-"`
   892  }
   893  
   894  func (s *GoogleCloudRetailV2BigQuerySource) MarshalJSON() ([]byte, error) {
   895  	type NoMethod GoogleCloudRetailV2BigQuerySource
   896  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   897  }
   898  
   899  // GoogleCloudRetailV2Catalog: The catalog configuration.
   900  type GoogleCloudRetailV2Catalog struct {
   901  	// DisplayName: Required. Immutable. The catalog display name. This field must
   902  	// be a UTF-8 encoded string with a length limit of 128 characters. Otherwise,
   903  	// an INVALID_ARGUMENT error is returned.
   904  	DisplayName string `json:"displayName,omitempty"`
   905  	// Name: Required. Immutable. The fully qualified resource name of the catalog.
   906  	Name string `json:"name,omitempty"`
   907  	// ProductLevelConfig: Required. The product level configuration.
   908  	ProductLevelConfig *GoogleCloudRetailV2ProductLevelConfig `json:"productLevelConfig,omitempty"`
   909  
   910  	// ServerResponse contains the HTTP response code and headers from the server.
   911  	googleapi.ServerResponse `json:"-"`
   912  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   913  	// unconditionally include in API requests. By default, fields with empty or
   914  	// default values are omitted from API requests. See
   915  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   916  	// details.
   917  	ForceSendFields []string `json:"-"`
   918  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   919  	// requests with the JSON null value. By default, fields with empty values are
   920  	// omitted from API requests. See
   921  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   922  	NullFields []string `json:"-"`
   923  }
   924  
   925  func (s *GoogleCloudRetailV2Catalog) MarshalJSON() ([]byte, error) {
   926  	type NoMethod GoogleCloudRetailV2Catalog
   927  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   928  }
   929  
   930  // GoogleCloudRetailV2CatalogAttribute: Catalog level attribute config for an
   931  // attribute. For example, if customers want to enable/disable facet for a
   932  // specific attribute.
   933  type GoogleCloudRetailV2CatalogAttribute struct {
   934  	// DynamicFacetableOption: If DYNAMIC_FACETABLE_ENABLED, attribute values are
   935  	// available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if
   936  	// CatalogAttribute.indexable_option is INDEXABLE_DISABLED. Otherwise, an
   937  	// INVALID_ARGUMENT error is returned. Must be specified, otherwise throws
   938  	// INVALID_FORMAT error.
   939  	//
   940  	// Possible values:
   941  	//   "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED" - Value used when unset.
   942  	//   "DYNAMIC_FACETABLE_ENABLED" - Dynamic facetable option enabled for an
   943  	// attribute.
   944  	//   "DYNAMIC_FACETABLE_DISABLED" - Dynamic facetable option disabled for an
   945  	// attribute.
   946  	DynamicFacetableOption string `json:"dynamicFacetableOption,omitempty"`
   947  	// ExactSearchableOption: If EXACT_SEARCHABLE_ENABLED, attribute values will be
   948  	// exact searchable. This property only applies to textual custom attributes
   949  	// and requires indexable set to enabled to enable exact-searchable. If unset,
   950  	// the server behavior defaults to EXACT_SEARCHABLE_DISABLED.
   951  	//
   952  	// Possible values:
   953  	//   "EXACT_SEARCHABLE_OPTION_UNSPECIFIED" - Value used when unset.
   954  	//   "EXACT_SEARCHABLE_ENABLED" - Exact searchable option enabled for an
   955  	// attribute.
   956  	//   "EXACT_SEARCHABLE_DISABLED" - Exact searchable option disabled for an
   957  	// attribute.
   958  	ExactSearchableOption string `json:"exactSearchableOption,omitempty"`
   959  	// FacetConfig: Contains facet options.
   960  	FacetConfig *GoogleCloudRetailV2CatalogAttributeFacetConfig `json:"facetConfig,omitempty"`
   961  	// InUse: Output only. Indicates whether this attribute has been used by any
   962  	// products. `True` if at least one Product is using this attribute in
   963  	// Product.attributes. Otherwise, this field is `False`. CatalogAttribute can
   964  	// be pre-loaded by using CatalogService.AddCatalogAttribute,
   965  	// CatalogService.ImportCatalogAttributes, or
   966  	// CatalogService.UpdateAttributesConfig APIs. This field is `False` for
   967  	// pre-loaded CatalogAttributes. Only pre-loaded catalog attributes that are
   968  	// neither in use by products nor predefined can be deleted. Catalog attributes
   969  	// that are either in use by products or are predefined attributes cannot be
   970  	// deleted; however, their configuration properties will reset to default
   971  	// values upon removal request. After catalog changes, it takes about 10
   972  	// minutes for this field to update.
   973  	InUse bool `json:"inUse,omitempty"`
   974  	// IndexableOption: When AttributesConfig.attribute_config_level is
   975  	// CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are
   976  	// indexed so that it can be filtered, faceted, or boosted in
   977  	// SearchService.Search. Must be specified when
   978  	// AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG,
   979  	// otherwise throws INVALID_FORMAT error.
   980  	//
   981  	// Possible values:
   982  	//   "INDEXABLE_OPTION_UNSPECIFIED" - Value used when unset.
   983  	//   "INDEXABLE_ENABLED" - Indexable option enabled for an attribute.
   984  	//   "INDEXABLE_DISABLED" - Indexable option disabled for an attribute.
   985  	IndexableOption string `json:"indexableOption,omitempty"`
   986  	// Key: Required. Attribute name. For example: `color`, `brands`,
   987  	// `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable,
   988  	// the attribute name can contain only alpha-numeric characters and
   989  	// underscores. For example, an attribute named `attributes.abc_xyz` can be
   990  	// indexed, but an attribute named `attributes.abc-xyz` cannot be indexed. If
   991  	// the attribute key starts with `attributes.`, then the attribute is a custom
   992  	// attribute. Attributes such as `brands`, `patterns`, and `title` are built-in
   993  	// and called system attributes.
   994  	Key string `json:"key,omitempty"`
   995  	// RetrievableOption: If RETRIEVABLE_ENABLED, attribute values are retrievable
   996  	// in the search results. If unset, the server behavior defaults to
   997  	// RETRIEVABLE_DISABLED.
   998  	//
   999  	// Possible values:
  1000  	//   "RETRIEVABLE_OPTION_UNSPECIFIED" - Value used when unset.
  1001  	//   "RETRIEVABLE_ENABLED" - Retrievable option enabled for an attribute.
  1002  	//   "RETRIEVABLE_DISABLED" - Retrievable option disabled for an attribute.
  1003  	RetrievableOption string `json:"retrievableOption,omitempty"`
  1004  	// SearchableOption: When AttributesConfig.attribute_config_level is
  1005  	// CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are
  1006  	// searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED
  1007  	// but attribute type is numerical, attribute values will not be searchable by
  1008  	// text queries in SearchService.Search, as there are no text values associated
  1009  	// to numerical attributes. Must be specified, when
  1010  	// AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG,
  1011  	// otherwise throws INVALID_FORMAT error.
  1012  	//
  1013  	// Possible values:
  1014  	//   "SEARCHABLE_OPTION_UNSPECIFIED" - Value used when unset.
  1015  	//   "SEARCHABLE_ENABLED" - Searchable option enabled for an attribute.
  1016  	//   "SEARCHABLE_DISABLED" - Searchable option disabled for an attribute.
  1017  	SearchableOption string `json:"searchableOption,omitempty"`
  1018  	// Type: Output only. The type of this attribute. This is derived from the
  1019  	// attribute in Product.attributes.
  1020  	//
  1021  	// Possible values:
  1022  	//   "UNKNOWN" - The type of the attribute is unknown. Used when type cannot be
  1023  	// derived from attribute that is not in_use.
  1024  	//   "TEXTUAL" - Textual attribute.
  1025  	//   "NUMERICAL" - Numerical attribute.
  1026  	Type string `json:"type,omitempty"`
  1027  	// ForceSendFields is a list of field names (e.g. "DynamicFacetableOption") to
  1028  	// unconditionally include in API requests. By default, fields with empty or
  1029  	// default values are omitted from API requests. See
  1030  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1031  	// details.
  1032  	ForceSendFields []string `json:"-"`
  1033  	// NullFields is a list of field names (e.g. "DynamicFacetableOption") to
  1034  	// include in API requests with the JSON null value. By default, fields with
  1035  	// empty values are omitted from API requests. See
  1036  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1037  	NullFields []string `json:"-"`
  1038  }
  1039  
  1040  func (s *GoogleCloudRetailV2CatalogAttribute) MarshalJSON() ([]byte, error) {
  1041  	type NoMethod GoogleCloudRetailV2CatalogAttribute
  1042  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1043  }
  1044  
  1045  // GoogleCloudRetailV2CatalogAttributeFacetConfig: Possible options for the
  1046  // facet that corresponds to the current attribute config.
  1047  type GoogleCloudRetailV2CatalogAttributeFacetConfig struct {
  1048  	// FacetIntervals: If you don't set the facet
  1049  	// SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical
  1050  	// attribute, then we use the computed intervals with rounded bounds obtained
  1051  	// from all its product numerical attribute values. The computed intervals
  1052  	// might not be ideal for some attributes. Therefore, we give you the option to
  1053  	// overwrite them with the facet_intervals field. The maximum of facet
  1054  	// intervals per CatalogAttribute is 40. Each interval must have a lower bound
  1055  	// or an upper bound. If both bounds are provided, then the lower bound must be
  1056  	// smaller or equal than the upper bound.
  1057  	FacetIntervals []*GoogleCloudRetailV2Interval `json:"facetIntervals,omitempty"`
  1058  	// IgnoredFacetValues: Each instance represents a list of attribute values to
  1059  	// ignore as facet values for a specific time range. The maximum number of
  1060  	// instances per CatalogAttribute is 25.
  1061  	IgnoredFacetValues []*GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues `json:"ignoredFacetValues,omitempty"`
  1062  	// MergedFacet: Use this field only if you want to merge a facet key into
  1063  	// another facet key.
  1064  	MergedFacet *GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacet `json:"mergedFacet,omitempty"`
  1065  	// MergedFacetValues: Each instance replaces a list of facet values by a merged
  1066  	// facet value. If a facet value is not in any list, then it will stay the
  1067  	// same. To avoid conflicts, only paths of length 1 are accepted. In other
  1068  	// words, if "dark_blue" merged into "BLUE", then the latter can't merge into
  1069  	// "blues" because this would create a path of length 2. The maximum number of
  1070  	// instances of MergedFacetValue per CatalogAttribute is 100. This feature is
  1071  	// available only for textual custom attributes.
  1072  	MergedFacetValues []*GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue `json:"mergedFacetValues,omitempty"`
  1073  	// RerankConfig: Set this field only if you want to rerank based on facet
  1074  	// values engaged by the user for the current key. This option is only possible
  1075  	// for custom facetable textual keys.
  1076  	RerankConfig *GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig `json:"rerankConfig,omitempty"`
  1077  	// ForceSendFields is a list of field names (e.g. "FacetIntervals") to
  1078  	// unconditionally include in API requests. By default, fields with empty or
  1079  	// default values are omitted from API requests. See
  1080  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1081  	// details.
  1082  	ForceSendFields []string `json:"-"`
  1083  	// NullFields is a list of field names (e.g. "FacetIntervals") to include in
  1084  	// API requests with the JSON null value. By default, fields with empty values
  1085  	// are omitted from API requests. See
  1086  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1087  	NullFields []string `json:"-"`
  1088  }
  1089  
  1090  func (s *GoogleCloudRetailV2CatalogAttributeFacetConfig) MarshalJSON() ([]byte, error) {
  1091  	type NoMethod GoogleCloudRetailV2CatalogAttributeFacetConfig
  1092  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1093  }
  1094  
  1095  // GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues: Facet
  1096  // values to ignore on facets during the specified time range for the given
  1097  // SearchResponse.Facet.key attribute.
  1098  type GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues struct {
  1099  	// EndTime: If start time is empty and end time is not empty, then ignore these
  1100  	// facet values before end time.
  1101  	EndTime string `json:"endTime,omitempty"`
  1102  	// StartTime: Time range for the current list of facet values to ignore. If
  1103  	// multiple time ranges are specified for an facet value for the current
  1104  	// attribute, consider all of them. If both are empty, ignore always. If start
  1105  	// time and end time are set, then start time must be before end time. If start
  1106  	// time is not empty and end time is empty, then will ignore these facet values
  1107  	// after the start time.
  1108  	StartTime string `json:"startTime,omitempty"`
  1109  	// Values: List of facet values to ignore for the following time range. The
  1110  	// facet values are the same as the attribute values. There is a limit of 10
  1111  	// values per instance of IgnoredFacetValues. Each value can have at most 128
  1112  	// characters.
  1113  	Values []string `json:"values,omitempty"`
  1114  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1115  	// include in API requests. By default, fields with empty or default values are
  1116  	// omitted from API requests. See
  1117  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1118  	// details.
  1119  	ForceSendFields []string `json:"-"`
  1120  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1121  	// requests with the JSON null value. By default, fields with empty values are
  1122  	// omitted from API requests. See
  1123  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1124  	NullFields []string `json:"-"`
  1125  }
  1126  
  1127  func (s *GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues) MarshalJSON() ([]byte, error) {
  1128  	type NoMethod GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues
  1129  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1130  }
  1131  
  1132  // GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacet: The current facet
  1133  // key (i.e. attribute config) maps into the merged_facet_key. A facet key can
  1134  // have at most one child. The current facet key and the merged facet key need
  1135  // both to be textual custom attributes or both numerical custom attributes
  1136  // (same type).
  1137  type GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacet struct {
  1138  	// MergedFacetKey: The merged facet key should be a valid facet key that is
  1139  	// different than the facet key of the current catalog attribute. We refer this
  1140  	// is merged facet key as the child of the current catalog attribute. This
  1141  	// merged facet key can't be a parent of another facet key (i.e. no directed
  1142  	// path of length 2). This merged facet key needs to be either a textual custom
  1143  	// attribute or a numerical custom attribute.
  1144  	MergedFacetKey string `json:"mergedFacetKey,omitempty"`
  1145  	// MergedFacetValues: Each instance is a list of facet values that map into the
  1146  	// same (possibly different) merged facet value. For the current attribute
  1147  	// config, each facet value should map to at most one merged facet value.
  1148  	MergedFacetValues []*GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue `json:"mergedFacetValues,omitempty"`
  1149  	// ForceSendFields is a list of field names (e.g. "MergedFacetKey") to
  1150  	// unconditionally include in API requests. By default, fields with empty or
  1151  	// default values are omitted from API requests. See
  1152  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1153  	// details.
  1154  	ForceSendFields []string `json:"-"`
  1155  	// NullFields is a list of field names (e.g. "MergedFacetKey") to include in
  1156  	// API requests with the JSON null value. By default, fields with empty values
  1157  	// are omitted from API requests. See
  1158  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1159  	NullFields []string `json:"-"`
  1160  }
  1161  
  1162  func (s *GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacet) MarshalJSON() ([]byte, error) {
  1163  	type NoMethod GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacet
  1164  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1165  }
  1166  
  1167  // GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue: Replaces a
  1168  // set of textual facet values by the same (possibly different) merged facet
  1169  // value. Each facet value should appear at most once as a value per
  1170  // CatalogAttribute. This feature is available only for textual custom
  1171  // attributes.
  1172  type GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue struct {
  1173  	// MergedValue: All the previous values are replaced by this merged facet
  1174  	// value. This merged_value must be non-empty and can have up to 128
  1175  	// characters.
  1176  	MergedValue string `json:"mergedValue,omitempty"`
  1177  	// Values: All the facet values that are replaces by the same merged_value that
  1178  	// follows. The maximum number of values per MergedFacetValue is 25. Each value
  1179  	// can have up to 128 characters.
  1180  	Values []string `json:"values,omitempty"`
  1181  	// ForceSendFields is a list of field names (e.g. "MergedValue") to
  1182  	// unconditionally include in API requests. By default, fields with empty or
  1183  	// default values are omitted from API requests. See
  1184  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1185  	// details.
  1186  	ForceSendFields []string `json:"-"`
  1187  	// NullFields is a list of field names (e.g. "MergedValue") to include in API
  1188  	// requests with the JSON null value. By default, fields with empty values are
  1189  	// omitted from API requests. See
  1190  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1191  	NullFields []string `json:"-"`
  1192  }
  1193  
  1194  func (s *GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue) MarshalJSON() ([]byte, error) {
  1195  	type NoMethod GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue
  1196  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1197  }
  1198  
  1199  // GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig: Options to
  1200  // rerank based on facet values engaged by the user for the current key. That
  1201  // key needs to be a custom textual key and facetable. To use this control, you
  1202  // also need to pass all the facet keys engaged by the user in the request
  1203  // using the field [SearchRequest.FacetSpec]. In particular, if you don't pass
  1204  // the facet keys engaged that you want to rerank on, this control won't be
  1205  // effective. Moreover, to obtain better results, the facet values that you
  1206  // want to rerank on should be close to English (ideally made of words,
  1207  // underscores, and spaces).
  1208  type GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig struct {
  1209  	// FacetValues: If empty, rerank on all facet values for the current key.
  1210  	// Otherwise, will rerank on the facet values from this list only.
  1211  	FacetValues []string `json:"facetValues,omitempty"`
  1212  	// RerankFacet: If set to true, then we also rerank the dynamic facets based on
  1213  	// the facet values engaged by the user for the current attribute key during
  1214  	// serving.
  1215  	RerankFacet bool `json:"rerankFacet,omitempty"`
  1216  	// ForceSendFields is a list of field names (e.g. "FacetValues") to
  1217  	// unconditionally include in API requests. By default, fields with empty or
  1218  	// default values are omitted from API requests. See
  1219  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1220  	// details.
  1221  	ForceSendFields []string `json:"-"`
  1222  	// NullFields is a list of field names (e.g. "FacetValues") to include in API
  1223  	// requests with the JSON null value. By default, fields with empty values are
  1224  	// omitted from API requests. See
  1225  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1226  	NullFields []string `json:"-"`
  1227  }
  1228  
  1229  func (s *GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig) MarshalJSON() ([]byte, error) {
  1230  	type NoMethod GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig
  1231  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1232  }
  1233  
  1234  // GoogleCloudRetailV2ColorInfo: The color information of a Product.
  1235  type GoogleCloudRetailV2ColorInfo struct {
  1236  	// ColorFamilies: The standard color families. Strongly recommended to use the
  1237  	// following standard color groups: "Red", "Pink", "Orange", "Yellow",
  1238  	// "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and
  1239  	// "Mixed". Normally it is expected to have only 1 color family. May consider
  1240  	// using single "Mixed" instead of multiple values. A maximum of 5 values are
  1241  	// allowed. Each value must be a UTF-8 encoded string with a length limit of
  1242  	// 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google
  1243  	// Merchant Center property color
  1244  	// (https://support.google.com/merchants/answer/6324487). Schema.org property
  1245  	// Product.color (https://schema.org/color).
  1246  	ColorFamilies []string `json:"colorFamilies,omitempty"`
  1247  	// Colors: The color display names, which may be different from standard color
  1248  	// family names, such as the color aliases used in the website frontend.
  1249  	// Normally it is expected to have only 1 color. May consider using single
  1250  	// "Mixed" instead of multiple values. A maximum of 75 colors are allowed. Each
  1251  	// value must be a UTF-8 encoded string with a length limit of 128 characters.
  1252  	// Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center
  1253  	// property color (https://support.google.com/merchants/answer/6324487).
  1254  	// Schema.org property Product.color (https://schema.org/color).
  1255  	Colors []string `json:"colors,omitempty"`
  1256  	// ForceSendFields is a list of field names (e.g. "ColorFamilies") to
  1257  	// unconditionally include in API requests. By default, fields with empty or
  1258  	// default values are omitted from API requests. See
  1259  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1260  	// details.
  1261  	ForceSendFields []string `json:"-"`
  1262  	// NullFields is a list of field names (e.g. "ColorFamilies") to include in API
  1263  	// requests with the JSON null value. By default, fields with empty values are
  1264  	// omitted from API requests. See
  1265  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1266  	NullFields []string `json:"-"`
  1267  }
  1268  
  1269  func (s *GoogleCloudRetailV2ColorInfo) MarshalJSON() ([]byte, error) {
  1270  	type NoMethod GoogleCloudRetailV2ColorInfo
  1271  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1272  }
  1273  
  1274  // GoogleCloudRetailV2CompleteQueryResponse: Response of the autocomplete
  1275  // query.
  1276  type GoogleCloudRetailV2CompleteQueryResponse struct {
  1277  	// AttributionToken: A unique complete token. This should be included in the
  1278  	// UserEvent.completion_detail for search events resulting from this
  1279  	// completion, which enables accurate attribution of complete model
  1280  	// performance.
  1281  	AttributionToken string `json:"attributionToken,omitempty"`
  1282  	// CompletionResults: Results of the matching suggestions. The result list is
  1283  	// ordered and the first result is top suggestion.
  1284  	CompletionResults []*GoogleCloudRetailV2CompleteQueryResponseCompletionResult `json:"completionResults,omitempty"`
  1285  	// RecentSearchResults: Deprecated. Matched recent searches of this user. The
  1286  	// maximum number of recent searches is 10. This field is a restricted feature.
  1287  	// If you want to enable it, contact Retail Search support. This feature is
  1288  	// only available when CompleteQueryRequest.visitor_id field is set and
  1289  	// UserEvent is imported. The recent searches satisfy the follow rules: * They
  1290  	// are ordered from latest to oldest. * They are matched with
  1291  	// CompleteQueryRequest.query case insensitively. * They are transformed to
  1292  	// lower case. * They are UTF-8 safe. Recent searches are deduplicated. More
  1293  	// recent searches will be reserved when duplication happens.
  1294  	RecentSearchResults []*GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult `json:"recentSearchResults,omitempty"`
  1295  
  1296  	// ServerResponse contains the HTTP response code and headers from the server.
  1297  	googleapi.ServerResponse `json:"-"`
  1298  	// ForceSendFields is a list of field names (e.g. "AttributionToken") to
  1299  	// unconditionally include in API requests. By default, fields with empty or
  1300  	// default values are omitted from API requests. See
  1301  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1302  	// details.
  1303  	ForceSendFields []string `json:"-"`
  1304  	// NullFields is a list of field names (e.g. "AttributionToken") to include in
  1305  	// API requests with the JSON null value. By default, fields with empty values
  1306  	// are omitted from API requests. See
  1307  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1308  	NullFields []string `json:"-"`
  1309  }
  1310  
  1311  func (s *GoogleCloudRetailV2CompleteQueryResponse) MarshalJSON() ([]byte, error) {
  1312  	type NoMethod GoogleCloudRetailV2CompleteQueryResponse
  1313  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1314  }
  1315  
  1316  // GoogleCloudRetailV2CompleteQueryResponseCompletionResult: Resource that
  1317  // represents completion results.
  1318  type GoogleCloudRetailV2CompleteQueryResponseCompletionResult struct {
  1319  	// Attributes: Custom attributes for the suggestion term. * For "user-data",
  1320  	// the attributes are additional custom attributes ingested through BigQuery. *
  1321  	// For "cloud-retail", the attributes are product attributes generated by Cloud
  1322  	// Retail. It requires UserEvent.product_details is imported properly.
  1323  	Attributes map[string]GoogleCloudRetailV2CustomAttribute `json:"attributes,omitempty"`
  1324  	// Suggestion: The suggestion for the query.
  1325  	Suggestion string `json:"suggestion,omitempty"`
  1326  	// ForceSendFields is a list of field names (e.g. "Attributes") to
  1327  	// unconditionally include in API requests. By default, fields with empty or
  1328  	// default values are omitted from API requests. See
  1329  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1330  	// details.
  1331  	ForceSendFields []string `json:"-"`
  1332  	// NullFields is a list of field names (e.g. "Attributes") to include in API
  1333  	// requests with the JSON null value. By default, fields with empty values are
  1334  	// omitted from API requests. See
  1335  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1336  	NullFields []string `json:"-"`
  1337  }
  1338  
  1339  func (s *GoogleCloudRetailV2CompleteQueryResponseCompletionResult) MarshalJSON() ([]byte, error) {
  1340  	type NoMethod GoogleCloudRetailV2CompleteQueryResponseCompletionResult
  1341  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1342  }
  1343  
  1344  // GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult: Recent search of
  1345  // this user.
  1346  type GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult struct {
  1347  	// RecentSearch: The recent search query.
  1348  	RecentSearch string `json:"recentSearch,omitempty"`
  1349  	// ForceSendFields is a list of field names (e.g. "RecentSearch") to
  1350  	// unconditionally include in API requests. By default, fields with empty or
  1351  	// default values are omitted from API requests. See
  1352  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1353  	// details.
  1354  	ForceSendFields []string `json:"-"`
  1355  	// NullFields is a list of field names (e.g. "RecentSearch") to include in API
  1356  	// requests with the JSON null value. By default, fields with empty values are
  1357  	// omitted from API requests. See
  1358  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1359  	NullFields []string `json:"-"`
  1360  }
  1361  
  1362  func (s *GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult) MarshalJSON() ([]byte, error) {
  1363  	type NoMethod GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult
  1364  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1365  }
  1366  
  1367  // GoogleCloudRetailV2CompletionConfig: Catalog level autocomplete config for
  1368  // customers to customize autocomplete feature's settings.
  1369  type GoogleCloudRetailV2CompletionConfig struct {
  1370  	// AllowlistInputConfig: Output only. The source data for the latest import of
  1371  	// the autocomplete allowlist phrases.
  1372  	AllowlistInputConfig *GoogleCloudRetailV2CompletionDataInputConfig `json:"allowlistInputConfig,omitempty"`
  1373  	// AutoLearning: If set to true, the auto learning function is enabled. Auto
  1374  	// learning uses user data to generate suggestions using ML techniques. Default
  1375  	// value is false. Only after enabling auto learning can users use
  1376  	// `cloud-retail` data in CompleteQueryRequest.
  1377  	AutoLearning bool `json:"autoLearning,omitempty"`
  1378  	// DenylistInputConfig: Output only. The source data for the latest import of
  1379  	// the autocomplete denylist phrases.
  1380  	DenylistInputConfig *GoogleCloudRetailV2CompletionDataInputConfig `json:"denylistInputConfig,omitempty"`
  1381  	// LastAllowlistImportOperation: Output only. Name of the LRO corresponding to
  1382  	// the latest allowlist import. Can use GetOperation API to retrieve the latest
  1383  	// state of the Long Running Operation.
  1384  	LastAllowlistImportOperation string `json:"lastAllowlistImportOperation,omitempty"`
  1385  	// LastDenylistImportOperation: Output only. Name of the LRO corresponding to
  1386  	// the latest denylist import. Can use GetOperation API to retrieve the latest
  1387  	// state of the Long Running Operation.
  1388  	LastDenylistImportOperation string `json:"lastDenylistImportOperation,omitempty"`
  1389  	// LastSuggestionsImportOperation: Output only. Name of the LRO corresponding
  1390  	// to the latest suggestion terms list import. Can use GetOperation API method
  1391  	// to retrieve the latest state of the Long Running Operation.
  1392  	LastSuggestionsImportOperation string `json:"lastSuggestionsImportOperation,omitempty"`
  1393  	// MatchingOrder: Specifies the matching order for autocomplete suggestions,
  1394  	// e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest
  1395  	// "women's shoes", whereas a query of 'red s' with 'exact-prefix' specified
  1396  	// would suggest "red shoes". Currently supported values: * 'out-of-order' *
  1397  	// 'exact-prefix' Default value: 'exact-prefix'.
  1398  	MatchingOrder string `json:"matchingOrder,omitempty"`
  1399  	// MaxSuggestions: The maximum number of autocomplete suggestions returned per
  1400  	// term. Default value is 20. If left unset or set to 0, then will fallback to
  1401  	// default value. Value range is 1 to 20.
  1402  	MaxSuggestions int64 `json:"maxSuggestions,omitempty"`
  1403  	// MinPrefixLength: The minimum number of characters needed to be typed in
  1404  	// order to get suggestions. Default value is 2. If left unset or set to 0,
  1405  	// then will fallback to default value. Value range is 1 to 20.
  1406  	MinPrefixLength int64 `json:"minPrefixLength,omitempty"`
  1407  	// Name: Required. Immutable. Fully qualified name
  1408  	// `projects/*/locations/*/catalogs/*/completionConfig`
  1409  	Name string `json:"name,omitempty"`
  1410  	// SuggestionsInputConfig: Output only. The source data for the latest import
  1411  	// of the autocomplete suggestion phrases.
  1412  	SuggestionsInputConfig *GoogleCloudRetailV2CompletionDataInputConfig `json:"suggestionsInputConfig,omitempty"`
  1413  
  1414  	// ServerResponse contains the HTTP response code and headers from the server.
  1415  	googleapi.ServerResponse `json:"-"`
  1416  	// ForceSendFields is a list of field names (e.g. "AllowlistInputConfig") to
  1417  	// unconditionally include in API requests. By default, fields with empty or
  1418  	// default values are omitted from API requests. See
  1419  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1420  	// details.
  1421  	ForceSendFields []string `json:"-"`
  1422  	// NullFields is a list of field names (e.g. "AllowlistInputConfig") to include
  1423  	// in API requests with the JSON null value. By default, fields with empty
  1424  	// values are omitted from API requests. See
  1425  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1426  	NullFields []string `json:"-"`
  1427  }
  1428  
  1429  func (s *GoogleCloudRetailV2CompletionConfig) MarshalJSON() ([]byte, error) {
  1430  	type NoMethod GoogleCloudRetailV2CompletionConfig
  1431  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1432  }
  1433  
  1434  // GoogleCloudRetailV2CompletionDataInputConfig: The input config source for
  1435  // completion data.
  1436  type GoogleCloudRetailV2CompletionDataInputConfig struct {
  1437  	// BigQuerySource: Required. BigQuery input source. Add the IAM permission
  1438  	// "BigQuery Data Viewer" for
  1439  	// cloud-retail-customer-data-access@system.gserviceaccount.com before using
  1440  	// this feature otherwise an error is thrown.
  1441  	BigQuerySource *GoogleCloudRetailV2BigQuerySource `json:"bigQuerySource,omitempty"`
  1442  	// ForceSendFields is a list of field names (e.g. "BigQuerySource") to
  1443  	// unconditionally include in API requests. By default, fields with empty or
  1444  	// default values are omitted from API requests. See
  1445  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1446  	// details.
  1447  	ForceSendFields []string `json:"-"`
  1448  	// NullFields is a list of field names (e.g. "BigQuerySource") to include in
  1449  	// API requests with the JSON null value. By default, fields with empty values
  1450  	// are omitted from API requests. See
  1451  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1452  	NullFields []string `json:"-"`
  1453  }
  1454  
  1455  func (s *GoogleCloudRetailV2CompletionDataInputConfig) MarshalJSON() ([]byte, error) {
  1456  	type NoMethod GoogleCloudRetailV2CompletionDataInputConfig
  1457  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1458  }
  1459  
  1460  // GoogleCloudRetailV2CompletionDetail: Detailed completion information
  1461  // including completion attribution token and clicked completion info.
  1462  type GoogleCloudRetailV2CompletionDetail struct {
  1463  	// CompletionAttributionToken: Completion attribution token in
  1464  	// CompleteQueryResponse.attribution_token.
  1465  	CompletionAttributionToken string `json:"completionAttributionToken,omitempty"`
  1466  	// SelectedPosition: End user selected
  1467  	// CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.
  1468  	SelectedPosition int64 `json:"selectedPosition,omitempty"`
  1469  	// SelectedSuggestion: End user selected
  1470  	// CompleteQueryResponse.CompletionResult.suggestion.
  1471  	SelectedSuggestion string `json:"selectedSuggestion,omitempty"`
  1472  	// ForceSendFields is a list of field names (e.g. "CompletionAttributionToken")
  1473  	// to unconditionally include in API requests. By default, fields with empty or
  1474  	// default values are omitted from API requests. See
  1475  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1476  	// details.
  1477  	ForceSendFields []string `json:"-"`
  1478  	// NullFields is a list of field names (e.g. "CompletionAttributionToken") to
  1479  	// include in API requests with the JSON null value. By default, fields with
  1480  	// empty values are omitted from API requests. See
  1481  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1482  	NullFields []string `json:"-"`
  1483  }
  1484  
  1485  func (s *GoogleCloudRetailV2CompletionDetail) MarshalJSON() ([]byte, error) {
  1486  	type NoMethod GoogleCloudRetailV2CompletionDetail
  1487  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1488  }
  1489  
  1490  // GoogleCloudRetailV2Condition: Metadata that is used to define a condition
  1491  // that triggers an action. A valid condition must specify at least one of
  1492  // 'query_terms' or 'products_filter'. If multiple fields are specified, the
  1493  // condition is met if all the fields are satisfied e.g. if a set of query
  1494  // terms and product_filter are set, then only items matching the
  1495  // product_filter for requests with a query matching the query terms wil get
  1496  // boosted.
  1497  type GoogleCloudRetailV2Condition struct {
  1498  	// ActiveTimeRange: Range of time(s) specifying when Condition is active.
  1499  	// Condition true if any time range matches.
  1500  	ActiveTimeRange []*GoogleCloudRetailV2ConditionTimeRange `json:"activeTimeRange,omitempty"`
  1501  	// PageCategories: Used to support browse uses cases. A list (up to 10 entries)
  1502  	// of categories or departments. The format should be the same as
  1503  	// UserEvent.page_categories;
  1504  	PageCategories []string `json:"pageCategories,omitempty"`
  1505  	// QueryTerms: A list (up to 10 entries) of terms to match the query on. If not
  1506  	// specified, match all queries. If many query terms are specified, the
  1507  	// condition is matched if any of the terms is a match (i.e. using the OR
  1508  	// operator).
  1509  	QueryTerms []*GoogleCloudRetailV2ConditionQueryTerm `json:"queryTerms,omitempty"`
  1510  	// ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to
  1511  	// unconditionally include in API requests. By default, fields with empty or
  1512  	// default values are omitted from API requests. See
  1513  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1514  	// details.
  1515  	ForceSendFields []string `json:"-"`
  1516  	// NullFields is a list of field names (e.g. "ActiveTimeRange") to include in
  1517  	// API requests with the JSON null value. By default, fields with empty values
  1518  	// are omitted from API requests. See
  1519  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1520  	NullFields []string `json:"-"`
  1521  }
  1522  
  1523  func (s *GoogleCloudRetailV2Condition) MarshalJSON() ([]byte, error) {
  1524  	type NoMethod GoogleCloudRetailV2Condition
  1525  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1526  }
  1527  
  1528  // GoogleCloudRetailV2ConditionQueryTerm: Query terms that we want to match on.
  1529  type GoogleCloudRetailV2ConditionQueryTerm struct {
  1530  	// FullMatch: Whether this is supposed to be a full or partial match.
  1531  	FullMatch bool `json:"fullMatch,omitempty"`
  1532  	// Value: The value of the term to match on. Value cannot be empty. Value can
  1533  	// have at most 3 terms if specified as a partial match. Each space separated
  1534  	// string is considered as one term. For example, "a b c" is 3 terms and
  1535  	// allowed, but " a b c d" is 4 terms and not allowed for a partial match.
  1536  	Value string `json:"value,omitempty"`
  1537  	// ForceSendFields is a list of field names (e.g. "FullMatch") to
  1538  	// unconditionally include in API requests. By default, fields with empty or
  1539  	// default values are omitted from API requests. See
  1540  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1541  	// details.
  1542  	ForceSendFields []string `json:"-"`
  1543  	// NullFields is a list of field names (e.g. "FullMatch") to include in API
  1544  	// requests with the JSON null value. By default, fields with empty values are
  1545  	// omitted from API requests. See
  1546  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1547  	NullFields []string `json:"-"`
  1548  }
  1549  
  1550  func (s *GoogleCloudRetailV2ConditionQueryTerm) MarshalJSON() ([]byte, error) {
  1551  	type NoMethod GoogleCloudRetailV2ConditionQueryTerm
  1552  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1553  }
  1554  
  1555  // GoogleCloudRetailV2ConditionTimeRange: Used for time-dependent conditions.
  1556  // Example: Want to have rule applied for week long sale.
  1557  type GoogleCloudRetailV2ConditionTimeRange struct {
  1558  	// EndTime: End of time range. Range is inclusive.
  1559  	EndTime string `json:"endTime,omitempty"`
  1560  	// StartTime: Start of time range. Range is inclusive.
  1561  	StartTime string `json:"startTime,omitempty"`
  1562  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1563  	// include in API requests. By default, fields with empty or default values are
  1564  	// omitted from API requests. See
  1565  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1566  	// details.
  1567  	ForceSendFields []string `json:"-"`
  1568  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1569  	// requests with the JSON null value. By default, fields with empty values are
  1570  	// omitted from API requests. See
  1571  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1572  	NullFields []string `json:"-"`
  1573  }
  1574  
  1575  func (s *GoogleCloudRetailV2ConditionTimeRange) MarshalJSON() ([]byte, error) {
  1576  	type NoMethod GoogleCloudRetailV2ConditionTimeRange
  1577  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1578  }
  1579  
  1580  // GoogleCloudRetailV2Control: Configures dynamic metadata that can be linked
  1581  // to a ServingConfig and affect search or recommendation results at serving
  1582  // time.
  1583  type GoogleCloudRetailV2Control struct {
  1584  	// AssociatedServingConfigIds: Output only. List of serving config ids that are
  1585  	// associated with this control in the same Catalog. Note the association is
  1586  	// managed via the ServingConfig, this is an output only denormalized view.
  1587  	AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"`
  1588  	// DisplayName: Required. The human readable control display name. Used in
  1589  	// Retail UI. This field must be a UTF-8 encoded string with a length limit of
  1590  	// 128 characters. Otherwise, an INVALID_ARGUMENT error is thrown.
  1591  	DisplayName string `json:"displayName,omitempty"`
  1592  	// Name: Immutable. Fully qualified name
  1593  	// `projects/*/locations/global/catalogs/*/controls/*`
  1594  	Name string `json:"name,omitempty"`
  1595  	// Rule: A rule control - a condition-action pair. Enacts a set action when the
  1596  	// condition is triggered. For example: Boost "gShoe" when query full matches
  1597  	// "Running Shoes".
  1598  	Rule *GoogleCloudRetailV2Rule `json:"rule,omitempty"`
  1599  	// SearchSolutionUseCase: Specifies the use case for the control. Affects what
  1600  	// condition fields can be set. Only settable by search controls. Will default
  1601  	// to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow
  1602  	// one search_solution_use_case per control.
  1603  	//
  1604  	// Possible values:
  1605  	//   "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED" - The value when it's unspecified.
  1606  	// In this case, server behavior defaults to SEARCH_SOLUTION_USE_CASE_SEARCH.
  1607  	//   "SEARCH_SOLUTION_USE_CASE_SEARCH" - Search use case. Expects the traffic
  1608  	// has a non-empty query.
  1609  	//   "SEARCH_SOLUTION_USE_CASE_BROWSE" - Browse use case. Expects the traffic
  1610  	// has an empty query.
  1611  	SearchSolutionUseCase []string `json:"searchSolutionUseCase,omitempty"`
  1612  	// SolutionTypes: Required. Immutable. The solution types that the control is
  1613  	// used for. Currently we support setting only one type of solution at creation
  1614  	// time. Only `SOLUTION_TYPE_SEARCH` value is supported at the moment. If no
  1615  	// solution type is provided at creation time, will default to
  1616  	// SOLUTION_TYPE_SEARCH.
  1617  	//
  1618  	// Possible values:
  1619  	//   "SOLUTION_TYPE_UNSPECIFIED" - Default value.
  1620  	//   "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI.
  1621  	//   "SOLUTION_TYPE_SEARCH" - Used for Retail Search.
  1622  	SolutionTypes []string `json:"solutionTypes,omitempty"`
  1623  
  1624  	// ServerResponse contains the HTTP response code and headers from the server.
  1625  	googleapi.ServerResponse `json:"-"`
  1626  	// ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds")
  1627  	// to unconditionally include in API requests. By default, fields with empty or
  1628  	// default values are omitted from API requests. See
  1629  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1630  	// details.
  1631  	ForceSendFields []string `json:"-"`
  1632  	// NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to
  1633  	// include in API requests with the JSON null value. By default, fields with
  1634  	// empty values are omitted from API requests. See
  1635  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1636  	NullFields []string `json:"-"`
  1637  }
  1638  
  1639  func (s *GoogleCloudRetailV2Control) MarshalJSON() ([]byte, error) {
  1640  	type NoMethod GoogleCloudRetailV2Control
  1641  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1642  }
  1643  
  1644  // GoogleCloudRetailV2CreateModelMetadata: Metadata associated with a create
  1645  // operation.
  1646  type GoogleCloudRetailV2CreateModelMetadata struct {
  1647  	// Model: The resource name of the model that this create applies to. Format:
  1648  	// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
  1649  	// ls/{model_id}`
  1650  	Model string `json:"model,omitempty"`
  1651  	// ForceSendFields is a list of field names (e.g. "Model") to unconditionally
  1652  	// include in API requests. By default, fields with empty or default values are
  1653  	// omitted from API requests. See
  1654  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1655  	// details.
  1656  	ForceSendFields []string `json:"-"`
  1657  	// NullFields is a list of field names (e.g. "Model") to include in API
  1658  	// requests with the JSON null value. By default, fields with empty values are
  1659  	// omitted from API requests. See
  1660  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1661  	NullFields []string `json:"-"`
  1662  }
  1663  
  1664  func (s *GoogleCloudRetailV2CreateModelMetadata) MarshalJSON() ([]byte, error) {
  1665  	type NoMethod GoogleCloudRetailV2CreateModelMetadata
  1666  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1667  }
  1668  
  1669  // GoogleCloudRetailV2CustomAttribute: A custom attribute that is not
  1670  // explicitly modeled in Product.
  1671  type GoogleCloudRetailV2CustomAttribute struct {
  1672  	// Indexable: This field is normally ignored unless
  1673  	// AttributesConfig.attribute_config_level of the Catalog is set to the
  1674  	// deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
  1675  	// product-level attribute configuration, see Configuration modes
  1676  	// (https://cloud.google.com/retail/docs/attribute-config#config-modes). If
  1677  	// true, custom attribute values are indexed, so that they can be filtered,
  1678  	// faceted or boosted in SearchService.Search. This field is ignored in a
  1679  	// UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and
  1680  	// SearchRequest.boost_spec for more details.
  1681  	Indexable bool `json:"indexable,omitempty"`
  1682  	// Numbers: The numerical values of this custom attribute. For example, `[2.3,
  1683  	// 15.4]` when the key is "lengths_cm". Exactly one of text or numbers should
  1684  	// be set. Otherwise, an INVALID_ARGUMENT error is returned.
  1685  	Numbers []float64 `json:"numbers,omitempty"`
  1686  	// Searchable: This field is normally ignored unless
  1687  	// AttributesConfig.attribute_config_level of the Catalog is set to the
  1688  	// deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
  1689  	// product-level attribute configuration, see Configuration modes
  1690  	// (https://cloud.google.com/retail/docs/attribute-config#config-modes). If
  1691  	// true, custom attribute values are searchable by text queries in
  1692  	// SearchService.Search. This field is ignored in a UserEvent. Only set if type
  1693  	// text is set. Otherwise, a INVALID_ARGUMENT error is returned.
  1694  	Searchable bool `json:"searchable,omitempty"`
  1695  	// Text: The textual values of this custom attribute. For example, `["yellow",
  1696  	// "green"]` when the key is "color". Empty string is not allowed. Otherwise,
  1697  	// an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should
  1698  	// be set. Otherwise, an INVALID_ARGUMENT error is returned.
  1699  	Text []string `json:"text,omitempty"`
  1700  	// ForceSendFields is a list of field names (e.g. "Indexable") to
  1701  	// unconditionally include in API requests. By default, fields with empty or
  1702  	// default values are omitted from API requests. See
  1703  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1704  	// details.
  1705  	ForceSendFields []string `json:"-"`
  1706  	// NullFields is a list of field names (e.g. "Indexable") to include in API
  1707  	// requests with the JSON null value. By default, fields with empty values are
  1708  	// omitted from API requests. See
  1709  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1710  	NullFields []string `json:"-"`
  1711  }
  1712  
  1713  func (s *GoogleCloudRetailV2CustomAttribute) MarshalJSON() ([]byte, error) {
  1714  	type NoMethod GoogleCloudRetailV2CustomAttribute
  1715  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1716  }
  1717  
  1718  func (s *GoogleCloudRetailV2CustomAttribute) UnmarshalJSON(data []byte) error {
  1719  	type NoMethod GoogleCloudRetailV2CustomAttribute
  1720  	var s1 struct {
  1721  		Numbers []gensupport.JSONFloat64 `json:"numbers"`
  1722  		*NoMethod
  1723  	}
  1724  	s1.NoMethod = (*NoMethod)(s)
  1725  	if err := json.Unmarshal(data, &s1); err != nil {
  1726  		return err
  1727  	}
  1728  	s.Numbers = make([]float64, len(s1.Numbers))
  1729  	for i := range s1.Numbers {
  1730  		s.Numbers[i] = float64(s1.Numbers[i])
  1731  	}
  1732  	return nil
  1733  }
  1734  
  1735  // GoogleCloudRetailV2ExperimentInfo: Metadata for active A/B testing
  1736  // Experiment.
  1737  type GoogleCloudRetailV2ExperimentInfo struct {
  1738  	// Experiment: The fully qualified resource name of the experiment that
  1739  	// provides the serving config under test, should an active experiment exist.
  1740  	// For example:
  1741  	// `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_
  1742  	// id`
  1743  	Experiment string `json:"experiment,omitempty"`
  1744  	// ServingConfigExperiment: A/B test between existing Cloud Retail Search
  1745  	// ServingConfigs.
  1746  	ServingConfigExperiment *GoogleCloudRetailV2ExperimentInfoServingConfigExperiment `json:"servingConfigExperiment,omitempty"`
  1747  	// ForceSendFields is a list of field names (e.g. "Experiment") to
  1748  	// unconditionally include in API requests. By default, fields with empty or
  1749  	// default values are omitted from API requests. See
  1750  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1751  	// details.
  1752  	ForceSendFields []string `json:"-"`
  1753  	// NullFields is a list of field names (e.g. "Experiment") to include in API
  1754  	// requests with the JSON null value. By default, fields with empty values are
  1755  	// omitted from API requests. See
  1756  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1757  	NullFields []string `json:"-"`
  1758  }
  1759  
  1760  func (s *GoogleCloudRetailV2ExperimentInfo) MarshalJSON() ([]byte, error) {
  1761  	type NoMethod GoogleCloudRetailV2ExperimentInfo
  1762  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1763  }
  1764  
  1765  // GoogleCloudRetailV2ExperimentInfoServingConfigExperiment: Metadata for
  1766  // active serving config A/B tests.
  1767  type GoogleCloudRetailV2ExperimentInfoServingConfigExperiment struct {
  1768  	// ExperimentServingConfig: The fully qualified resource name of the serving
  1769  	// config Experiment.VariantArm.serving_config_id responsible for generating
  1770  	// the search response. For example:
  1771  	// `projects/*/locations/*/catalogs/*/servingConfigs/*`.
  1772  	ExperimentServingConfig string `json:"experimentServingConfig,omitempty"`
  1773  	// OriginalServingConfig: The fully qualified resource name of the original
  1774  	// SearchRequest.placement in the search request prior to reassignment by
  1775  	// experiment API. For example:
  1776  	// `projects/*/locations/*/catalogs/*/servingConfigs/*`.
  1777  	OriginalServingConfig string `json:"originalServingConfig,omitempty"`
  1778  	// ForceSendFields is a list of field names (e.g. "ExperimentServingConfig") to
  1779  	// unconditionally include in API requests. By default, fields with empty or
  1780  	// default values are omitted from API requests. See
  1781  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1782  	// details.
  1783  	ForceSendFields []string `json:"-"`
  1784  	// NullFields is a list of field names (e.g. "ExperimentServingConfig") to
  1785  	// include in API requests with the JSON null value. By default, fields with
  1786  	// empty values are omitted from API requests. See
  1787  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1788  	NullFields []string `json:"-"`
  1789  }
  1790  
  1791  func (s *GoogleCloudRetailV2ExperimentInfoServingConfigExperiment) MarshalJSON() ([]byte, error) {
  1792  	type NoMethod GoogleCloudRetailV2ExperimentInfoServingConfigExperiment
  1793  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1794  }
  1795  
  1796  // GoogleCloudRetailV2ExportAnalyticsMetricsRequest: Request message for the
  1797  // `ExportAnalyticsMetrics` method.
  1798  type GoogleCloudRetailV2ExportAnalyticsMetricsRequest struct {
  1799  	// Filter: A filtering expression to specify restrictions on returned metrics.
  1800  	// The expression is a sequence of terms. Each term applies a restriction to
  1801  	// the returned metrics. Use this expression to restrict results to a specific
  1802  	// time range. Currently we expect only one types of fields: * `timestamp`:
  1803  	// This can be specified twice, once with a less than operator and once with a
  1804  	// greater than operator. The `timestamp` restriction should result in one,
  1805  	// contiguous, valid, `timestamp` range. Some examples of valid filters
  1806  	// expressions: * Example 1: `timestamp > "2012-04-23T18:25:43.511Z" timestamp
  1807  	// < "2012-04-23T18:30:43.511Z" * Example 2: `timestamp >
  1808  	// "2012-04-23T18:25:43.511Z"
  1809  	Filter string `json:"filter,omitempty"`
  1810  	// OutputConfig: Required. The output location of the data.
  1811  	OutputConfig *GoogleCloudRetailV2OutputConfig `json:"outputConfig,omitempty"`
  1812  	// ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
  1813  	// include in API requests. By default, fields with empty or default values are
  1814  	// omitted from API requests. See
  1815  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1816  	// details.
  1817  	ForceSendFields []string `json:"-"`
  1818  	// NullFields is a list of field names (e.g. "Filter") to include in API
  1819  	// requests with the JSON null value. By default, fields with empty values are
  1820  	// omitted from API requests. See
  1821  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1822  	NullFields []string `json:"-"`
  1823  }
  1824  
  1825  func (s *GoogleCloudRetailV2ExportAnalyticsMetricsRequest) MarshalJSON() ([]byte, error) {
  1826  	type NoMethod GoogleCloudRetailV2ExportAnalyticsMetricsRequest
  1827  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1828  }
  1829  
  1830  // GoogleCloudRetailV2ExportAnalyticsMetricsResponse: Response of the
  1831  // ExportAnalyticsMetricsRequest. If the long running operation was successful,
  1832  // then this message is returned by the google.longrunning.Operations.response
  1833  // field if the operation was successful.
  1834  type GoogleCloudRetailV2ExportAnalyticsMetricsResponse struct {
  1835  	// ErrorSamples: A sample of errors encountered while processing the request.
  1836  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  1837  	// ErrorsConfig: This field is never set.
  1838  	ErrorsConfig *GoogleCloudRetailV2ExportErrorsConfig `json:"errorsConfig,omitempty"`
  1839  	// OutputResult: Output result indicating where the data were exported to.
  1840  	OutputResult *GoogleCloudRetailV2OutputResult `json:"outputResult,omitempty"`
  1841  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  1842  	// unconditionally include in API requests. By default, fields with empty or
  1843  	// default values are omitted from API requests. See
  1844  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1845  	// details.
  1846  	ForceSendFields []string `json:"-"`
  1847  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  1848  	// requests with the JSON null value. By default, fields with empty values are
  1849  	// omitted from API requests. See
  1850  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1851  	NullFields []string `json:"-"`
  1852  }
  1853  
  1854  func (s *GoogleCloudRetailV2ExportAnalyticsMetricsResponse) MarshalJSON() ([]byte, error) {
  1855  	type NoMethod GoogleCloudRetailV2ExportAnalyticsMetricsResponse
  1856  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1857  }
  1858  
  1859  // GoogleCloudRetailV2ExportErrorsConfig: Configuration of destination for
  1860  // Export related errors.
  1861  type GoogleCloudRetailV2ExportErrorsConfig struct {
  1862  	// GcsPrefix: Google Cloud Storage path for import errors. This must be an
  1863  	// empty, existing Cloud Storage bucket. Export errors will be written to a
  1864  	// file in this bucket, one per line, as a JSON-encoded `google.rpc.Status`
  1865  	// message.
  1866  	GcsPrefix string `json:"gcsPrefix,omitempty"`
  1867  	// ForceSendFields is a list of field names (e.g. "GcsPrefix") to
  1868  	// unconditionally include in API requests. By default, fields with empty or
  1869  	// default values are omitted from API requests. See
  1870  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1871  	// details.
  1872  	ForceSendFields []string `json:"-"`
  1873  	// NullFields is a list of field names (e.g. "GcsPrefix") to include in API
  1874  	// requests with the JSON null value. By default, fields with empty values are
  1875  	// omitted from API requests. See
  1876  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1877  	NullFields []string `json:"-"`
  1878  }
  1879  
  1880  func (s *GoogleCloudRetailV2ExportErrorsConfig) MarshalJSON() ([]byte, error) {
  1881  	type NoMethod GoogleCloudRetailV2ExportErrorsConfig
  1882  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1883  }
  1884  
  1885  // GoogleCloudRetailV2ExportMetadata: Metadata related to the progress of the
  1886  // Export operation. This is returned by the
  1887  // google.longrunning.Operation.metadata field.
  1888  type GoogleCloudRetailV2ExportMetadata struct {
  1889  	// CreateTime: Operation create time.
  1890  	CreateTime string `json:"createTime,omitempty"`
  1891  	// UpdateTime: Operation last update time. If the operation is done, this is
  1892  	// also the finish time.
  1893  	UpdateTime string `json:"updateTime,omitempty"`
  1894  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1895  	// unconditionally include in API requests. By default, fields with empty or
  1896  	// default values are omitted from API requests. See
  1897  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1898  	// details.
  1899  	ForceSendFields []string `json:"-"`
  1900  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1901  	// requests with the JSON null value. By default, fields with empty values are
  1902  	// omitted from API requests. See
  1903  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1904  	NullFields []string `json:"-"`
  1905  }
  1906  
  1907  func (s *GoogleCloudRetailV2ExportMetadata) MarshalJSON() ([]byte, error) {
  1908  	type NoMethod GoogleCloudRetailV2ExportMetadata
  1909  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1910  }
  1911  
  1912  // GoogleCloudRetailV2FulfillmentInfo: Fulfillment information, such as the
  1913  // store IDs for in-store pickup or region IDs for different shipping methods.
  1914  type GoogleCloudRetailV2FulfillmentInfo struct {
  1915  	// PlaceIds: The IDs for this type, such as the store IDs for
  1916  	// FulfillmentInfo.type.pickup-in-store or the region IDs for
  1917  	// FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are
  1918  	// allowed. Each value must be a string with a length limit of 30 characters,
  1919  	// matching the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2".
  1920  	// Otherwise, an INVALID_ARGUMENT error is returned.
  1921  	PlaceIds []string `json:"placeIds,omitempty"`
  1922  	// Type: The fulfillment type, including commonly used types (such as pickup in
  1923  	// store and same day delivery), and custom types. Customers have to map custom
  1924  	// types to their display names before rendering UI. Supported values: *
  1925  	// "pickup-in-store" * "ship-to-store" * "same-day-delivery" *
  1926  	// "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" *
  1927  	// "custom-type-4" * "custom-type-5" If this field is set to an invalid value
  1928  	// other than these, an INVALID_ARGUMENT error is returned.
  1929  	Type string `json:"type,omitempty"`
  1930  	// ForceSendFields is a list of field names (e.g. "PlaceIds") to
  1931  	// unconditionally include in API requests. By default, fields with empty or
  1932  	// default values are omitted from API requests. See
  1933  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1934  	// details.
  1935  	ForceSendFields []string `json:"-"`
  1936  	// NullFields is a list of field names (e.g. "PlaceIds") to include in API
  1937  	// requests with the JSON null value. By default, fields with empty values are
  1938  	// omitted from API requests. See
  1939  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1940  	NullFields []string `json:"-"`
  1941  }
  1942  
  1943  func (s *GoogleCloudRetailV2FulfillmentInfo) MarshalJSON() ([]byte, error) {
  1944  	type NoMethod GoogleCloudRetailV2FulfillmentInfo
  1945  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1946  }
  1947  
  1948  // GoogleCloudRetailV2GcsOutputResult: A Gcs output result.
  1949  type GoogleCloudRetailV2GcsOutputResult struct {
  1950  	// OutputUri: The uri of Gcs output
  1951  	OutputUri string `json:"outputUri,omitempty"`
  1952  	// ForceSendFields is a list of field names (e.g. "OutputUri") to
  1953  	// unconditionally include in API requests. By default, fields with empty or
  1954  	// default values are omitted from API requests. See
  1955  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1956  	// details.
  1957  	ForceSendFields []string `json:"-"`
  1958  	// NullFields is a list of field names (e.g. "OutputUri") to include in API
  1959  	// requests with the JSON null value. By default, fields with empty values are
  1960  	// omitted from API requests. See
  1961  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1962  	NullFields []string `json:"-"`
  1963  }
  1964  
  1965  func (s *GoogleCloudRetailV2GcsOutputResult) MarshalJSON() ([]byte, error) {
  1966  	type NoMethod GoogleCloudRetailV2GcsOutputResult
  1967  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1968  }
  1969  
  1970  // GoogleCloudRetailV2GcsSource: Google Cloud Storage location for input
  1971  // content.
  1972  type GoogleCloudRetailV2GcsSource struct {
  1973  	// DataSchema: The schema to use when parsing the data from the source.
  1974  	// Supported values for product imports: * `product` (default): One JSON
  1975  	// Product per line. Each product must have a valid Product.id. *
  1976  	// `product_merchant_center`: See Importing catalog data from Merchant Center
  1977  	// (https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc).
  1978  	// Supported values for user events imports: * `user_event` (default): One JSON
  1979  	// UserEvent per line. * `user_event_ga360`: Using
  1980  	// https://support.google.com/analytics/answer/3437719. Supported values for
  1981  	// control imports: * `control` (default): One JSON Control per line. Supported
  1982  	// values for catalog attribute imports: * `catalog_attribute` (default): One
  1983  	// CSV CatalogAttribute per line.
  1984  	DataSchema string `json:"dataSchema,omitempty"`
  1985  	// InputUris: Required. Google Cloud Storage URIs to input files. URI can be up
  1986  	// to 2000 characters long. URIs can match the full object path (for example,
  1987  	// `gs://bucket/directory/object.json`) or a pattern matching one or more
  1988  	// files, such as `gs://bucket/directory/*.json`. A request can contain at most
  1989  	// 100 files, and each file can be up to 2 GB. See Importing product
  1990  	// information
  1991  	// (https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog) for
  1992  	// the expected file format and setup instructions.
  1993  	InputUris []string `json:"inputUris,omitempty"`
  1994  	// ForceSendFields is a list of field names (e.g. "DataSchema") to
  1995  	// unconditionally include in API requests. By default, fields with empty or
  1996  	// default values are omitted from API requests. See
  1997  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1998  	// details.
  1999  	ForceSendFields []string `json:"-"`
  2000  	// NullFields is a list of field names (e.g. "DataSchema") to include in API
  2001  	// requests with the JSON null value. By default, fields with empty values are
  2002  	// omitted from API requests. See
  2003  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2004  	NullFields []string `json:"-"`
  2005  }
  2006  
  2007  func (s *GoogleCloudRetailV2GcsSource) MarshalJSON() ([]byte, error) {
  2008  	type NoMethod GoogleCloudRetailV2GcsSource
  2009  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2010  }
  2011  
  2012  // GoogleCloudRetailV2GetDefaultBranchResponse: Response message of
  2013  // CatalogService.GetDefaultBranch.
  2014  type GoogleCloudRetailV2GetDefaultBranchResponse struct {
  2015  	// Branch: Full resource name of the branch id currently set as default branch.
  2016  	Branch string `json:"branch,omitempty"`
  2017  	// Note: This corresponds to SetDefaultBranchRequest.note field, when this
  2018  	// branch was set as default.
  2019  	Note string `json:"note,omitempty"`
  2020  	// SetTime: The time when this branch is set to default.
  2021  	SetTime string `json:"setTime,omitempty"`
  2022  
  2023  	// ServerResponse contains the HTTP response code and headers from the server.
  2024  	googleapi.ServerResponse `json:"-"`
  2025  	// ForceSendFields is a list of field names (e.g. "Branch") to unconditionally
  2026  	// include in API requests. By default, fields with empty or default values are
  2027  	// omitted from API requests. See
  2028  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2029  	// details.
  2030  	ForceSendFields []string `json:"-"`
  2031  	// NullFields is a list of field names (e.g. "Branch") to include in API
  2032  	// requests with the JSON null value. By default, fields with empty values are
  2033  	// omitted from API requests. See
  2034  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2035  	NullFields []string `json:"-"`
  2036  }
  2037  
  2038  func (s *GoogleCloudRetailV2GetDefaultBranchResponse) MarshalJSON() ([]byte, error) {
  2039  	type NoMethod GoogleCloudRetailV2GetDefaultBranchResponse
  2040  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2041  }
  2042  
  2043  // GoogleCloudRetailV2Image: Product image. Recommendations AI and Retail
  2044  // Search do not use product images to improve prediction and search results.
  2045  // However, product images can be returned in results, and are shown in
  2046  // prediction or search previews in the console.
  2047  type GoogleCloudRetailV2Image struct {
  2048  	// Height: Height of the image in number of pixels. This field must be
  2049  	// nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
  2050  	Height int64 `json:"height,omitempty"`
  2051  	// Uri: Required. URI of the image. This field must be a valid UTF-8 encoded
  2052  	// URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT
  2053  	// error is returned. Google Merchant Center property image_link
  2054  	// (https://support.google.com/merchants/answer/6324350). Schema.org property
  2055  	// Product.image (https://schema.org/image).
  2056  	Uri string `json:"uri,omitempty"`
  2057  	// Width: Width of the image in number of pixels. This field must be
  2058  	// nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
  2059  	Width int64 `json:"width,omitempty"`
  2060  	// ForceSendFields is a list of field names (e.g. "Height") to unconditionally
  2061  	// include in API requests. By default, fields with empty or default values are
  2062  	// omitted from API requests. See
  2063  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2064  	// details.
  2065  	ForceSendFields []string `json:"-"`
  2066  	// NullFields is a list of field names (e.g. "Height") to include in API
  2067  	// requests with the JSON null value. By default, fields with empty values are
  2068  	// omitted from API requests. See
  2069  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2070  	NullFields []string `json:"-"`
  2071  }
  2072  
  2073  func (s *GoogleCloudRetailV2Image) MarshalJSON() ([]byte, error) {
  2074  	type NoMethod GoogleCloudRetailV2Image
  2075  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2076  }
  2077  
  2078  // GoogleCloudRetailV2ImportCompletionDataRequest: Request message for
  2079  // ImportCompletionData methods.
  2080  type GoogleCloudRetailV2ImportCompletionDataRequest struct {
  2081  	// InputConfig: Required. The desired input location of the data.
  2082  	InputConfig *GoogleCloudRetailV2CompletionDataInputConfig `json:"inputConfig,omitempty"`
  2083  	// NotificationPubsubTopic: Pub/Sub topic for receiving notification. If this
  2084  	// field is set, when the import is finished, a notification is sent to
  2085  	// specified Pub/Sub topic. The message data is JSON string of a Operation.
  2086  	// Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
  2087  	NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"`
  2088  	// ForceSendFields is a list of field names (e.g. "InputConfig") to
  2089  	// unconditionally include in API requests. By default, fields with empty or
  2090  	// default values are omitted from API requests. See
  2091  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2092  	// details.
  2093  	ForceSendFields []string `json:"-"`
  2094  	// NullFields is a list of field names (e.g. "InputConfig") to include in API
  2095  	// requests with the JSON null value. By default, fields with empty values are
  2096  	// omitted from API requests. See
  2097  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2098  	NullFields []string `json:"-"`
  2099  }
  2100  
  2101  func (s *GoogleCloudRetailV2ImportCompletionDataRequest) MarshalJSON() ([]byte, error) {
  2102  	type NoMethod GoogleCloudRetailV2ImportCompletionDataRequest
  2103  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2104  }
  2105  
  2106  // GoogleCloudRetailV2ImportCompletionDataResponse: Response of the
  2107  // ImportCompletionDataRequest. If the long running operation is done, this
  2108  // message is returned by the google.longrunning.Operations.response field if
  2109  // the operation is successful.
  2110  type GoogleCloudRetailV2ImportCompletionDataResponse struct {
  2111  	// ErrorSamples: A sample of errors encountered while processing the request.
  2112  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  2113  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  2114  	// unconditionally include in API requests. By default, fields with empty or
  2115  	// default values are omitted from API requests. See
  2116  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2117  	// details.
  2118  	ForceSendFields []string `json:"-"`
  2119  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  2120  	// requests with the JSON null value. By default, fields with empty values are
  2121  	// omitted from API requests. See
  2122  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2123  	NullFields []string `json:"-"`
  2124  }
  2125  
  2126  func (s *GoogleCloudRetailV2ImportCompletionDataResponse) MarshalJSON() ([]byte, error) {
  2127  	type NoMethod GoogleCloudRetailV2ImportCompletionDataResponse
  2128  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2129  }
  2130  
  2131  // GoogleCloudRetailV2ImportErrorsConfig: Configuration of destination for
  2132  // Import related errors.
  2133  type GoogleCloudRetailV2ImportErrorsConfig struct {
  2134  	// GcsPrefix: Google Cloud Storage prefix for import errors. This must be an
  2135  	// empty, existing Cloud Storage directory. Import errors are written to
  2136  	// sharded files in this directory, one per line, as a JSON-encoded
  2137  	// `google.rpc.Status` message.
  2138  	GcsPrefix string `json:"gcsPrefix,omitempty"`
  2139  	// ForceSendFields is a list of field names (e.g. "GcsPrefix") to
  2140  	// unconditionally include in API requests. By default, fields with empty or
  2141  	// default values are omitted from API requests. See
  2142  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2143  	// details.
  2144  	ForceSendFields []string `json:"-"`
  2145  	// NullFields is a list of field names (e.g. "GcsPrefix") to include in API
  2146  	// requests with the JSON null value. By default, fields with empty values are
  2147  	// omitted from API requests. See
  2148  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2149  	NullFields []string `json:"-"`
  2150  }
  2151  
  2152  func (s *GoogleCloudRetailV2ImportErrorsConfig) MarshalJSON() ([]byte, error) {
  2153  	type NoMethod GoogleCloudRetailV2ImportErrorsConfig
  2154  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2155  }
  2156  
  2157  // GoogleCloudRetailV2ImportMetadata: Metadata related to the progress of the
  2158  // Import operation. This is returned by the
  2159  // google.longrunning.Operation.metadata field.
  2160  type GoogleCloudRetailV2ImportMetadata struct {
  2161  	// CreateTime: Operation create time.
  2162  	CreateTime string `json:"createTime,omitempty"`
  2163  	// FailureCount: Count of entries that encountered errors while processing.
  2164  	FailureCount int64 `json:"failureCount,omitempty,string"`
  2165  	// NotificationPubsubTopic: Pub/Sub topic for receiving notification. If this
  2166  	// field is set, when the import is finished, a notification is sent to
  2167  	// specified Pub/Sub topic. The message data is JSON string of a Operation.
  2168  	// Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
  2169  	NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"`
  2170  	// RequestId: Deprecated. This field is never set.
  2171  	RequestId string `json:"requestId,omitempty"`
  2172  	// SuccessCount: Count of entries that were processed successfully.
  2173  	SuccessCount int64 `json:"successCount,omitempty,string"`
  2174  	// UpdateTime: Operation last update time. If the operation is done, this is
  2175  	// also the finish time.
  2176  	UpdateTime string `json:"updateTime,omitempty"`
  2177  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2178  	// unconditionally include in API requests. By default, fields with empty or
  2179  	// default values are omitted from API requests. See
  2180  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2181  	// details.
  2182  	ForceSendFields []string `json:"-"`
  2183  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2184  	// requests with the JSON null value. By default, fields with empty values are
  2185  	// omitted from API requests. See
  2186  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2187  	NullFields []string `json:"-"`
  2188  }
  2189  
  2190  func (s *GoogleCloudRetailV2ImportMetadata) MarshalJSON() ([]byte, error) {
  2191  	type NoMethod GoogleCloudRetailV2ImportMetadata
  2192  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2193  }
  2194  
  2195  // GoogleCloudRetailV2ImportProductsRequest: Request message for Import
  2196  // methods.
  2197  type GoogleCloudRetailV2ImportProductsRequest struct {
  2198  	// ErrorsConfig: The desired location of errors incurred during the Import.
  2199  	ErrorsConfig *GoogleCloudRetailV2ImportErrorsConfig `json:"errorsConfig,omitempty"`
  2200  	// InputConfig: Required. The desired input location of the data.
  2201  	InputConfig *GoogleCloudRetailV2ProductInputConfig `json:"inputConfig,omitempty"`
  2202  	// NotificationPubsubTopic: Full Pub/Sub topic name for receiving notification.
  2203  	// If this field is set, when the import is finished, a notification is sent to
  2204  	// specified Pub/Sub topic. The message data is JSON string of a Operation.
  2205  	// Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
  2206  	// to be within the same project as ImportProductsRequest.parent. Make sure
  2207  	// that both `cloud-retail-customer-data-access@system.gserviceaccount.com` and
  2208  	// `service-@gcp-sa-retail.iam.gserviceaccount.com` have the
  2209  	// `pubsub.topics.publish` IAM permission on the topic. Only supported when
  2210  	// ImportProductsRequest.reconciliation_mode is set to `FULL`.
  2211  	NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"`
  2212  	// ReconciliationMode: The mode of reconciliation between existing products and
  2213  	// the products to be imported. Defaults to ReconciliationMode.INCREMENTAL.
  2214  	//
  2215  	// Possible values:
  2216  	//   "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to INCREMENTAL.
  2217  	//   "INCREMENTAL" - Inserts new products or updates existing products.
  2218  	//   "FULL" - Calculates diff and replaces the entire product dataset. Existing
  2219  	// products may be deleted if they are not present in the source location.
  2220  	ReconciliationMode string `json:"reconciliationMode,omitempty"`
  2221  	// RequestId: Deprecated. This field has no effect.
  2222  	RequestId string `json:"requestId,omitempty"`
  2223  	// UpdateMask: Indicates which fields in the provided imported `products` to
  2224  	// update. If not set, all fields are updated. If provided, only the existing
  2225  	// product fields are updated. Missing products will not be created.
  2226  	UpdateMask string `json:"updateMask,omitempty"`
  2227  	// ForceSendFields is a list of field names (e.g. "ErrorsConfig") to
  2228  	// unconditionally include in API requests. By default, fields with empty or
  2229  	// default values are omitted from API requests. See
  2230  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2231  	// details.
  2232  	ForceSendFields []string `json:"-"`
  2233  	// NullFields is a list of field names (e.g. "ErrorsConfig") to include in API
  2234  	// requests with the JSON null value. By default, fields with empty values are
  2235  	// omitted from API requests. See
  2236  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2237  	NullFields []string `json:"-"`
  2238  }
  2239  
  2240  func (s *GoogleCloudRetailV2ImportProductsRequest) MarshalJSON() ([]byte, error) {
  2241  	type NoMethod GoogleCloudRetailV2ImportProductsRequest
  2242  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2243  }
  2244  
  2245  // GoogleCloudRetailV2ImportProductsResponse: Response of the
  2246  // ImportProductsRequest. If the long running operation is done, then this
  2247  // message is returned by the google.longrunning.Operations.response field if
  2248  // the operation was successful.
  2249  type GoogleCloudRetailV2ImportProductsResponse struct {
  2250  	// ErrorSamples: A sample of errors encountered while processing the request.
  2251  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  2252  	// ErrorsConfig: Echoes the destination for the complete errors in the request
  2253  	// if set.
  2254  	ErrorsConfig *GoogleCloudRetailV2ImportErrorsConfig `json:"errorsConfig,omitempty"`
  2255  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  2256  	// unconditionally include in API requests. By default, fields with empty or
  2257  	// default values are omitted from API requests. See
  2258  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2259  	// details.
  2260  	ForceSendFields []string `json:"-"`
  2261  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  2262  	// requests with the JSON null value. By default, fields with empty values are
  2263  	// omitted from API requests. See
  2264  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2265  	NullFields []string `json:"-"`
  2266  }
  2267  
  2268  func (s *GoogleCloudRetailV2ImportProductsResponse) MarshalJSON() ([]byte, error) {
  2269  	type NoMethod GoogleCloudRetailV2ImportProductsResponse
  2270  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2271  }
  2272  
  2273  // GoogleCloudRetailV2ImportUserEventsRequest: Request message for the
  2274  // ImportUserEvents request.
  2275  type GoogleCloudRetailV2ImportUserEventsRequest struct {
  2276  	// ErrorsConfig: The desired location of errors incurred during the Import.
  2277  	// Cannot be set for inline user event imports.
  2278  	ErrorsConfig *GoogleCloudRetailV2ImportErrorsConfig `json:"errorsConfig,omitempty"`
  2279  	// InputConfig: Required. The desired input location of the data.
  2280  	InputConfig *GoogleCloudRetailV2UserEventInputConfig `json:"inputConfig,omitempty"`
  2281  	// ForceSendFields is a list of field names (e.g. "ErrorsConfig") to
  2282  	// unconditionally include in API requests. By default, fields with empty or
  2283  	// default values are omitted from API requests. See
  2284  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2285  	// details.
  2286  	ForceSendFields []string `json:"-"`
  2287  	// NullFields is a list of field names (e.g. "ErrorsConfig") to include in API
  2288  	// requests with the JSON null value. By default, fields with empty values are
  2289  	// omitted from API requests. See
  2290  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2291  	NullFields []string `json:"-"`
  2292  }
  2293  
  2294  func (s *GoogleCloudRetailV2ImportUserEventsRequest) MarshalJSON() ([]byte, error) {
  2295  	type NoMethod GoogleCloudRetailV2ImportUserEventsRequest
  2296  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2297  }
  2298  
  2299  // GoogleCloudRetailV2ImportUserEventsResponse: Response of the
  2300  // ImportUserEventsRequest. If the long running operation was successful, then
  2301  // this message is returned by the google.longrunning.Operations.response field
  2302  // if the operation was successful.
  2303  type GoogleCloudRetailV2ImportUserEventsResponse struct {
  2304  	// ErrorSamples: A sample of errors encountered while processing the request.
  2305  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  2306  	// ErrorsConfig: Echoes the destination for the complete errors if this field
  2307  	// was set in the request.
  2308  	ErrorsConfig *GoogleCloudRetailV2ImportErrorsConfig `json:"errorsConfig,omitempty"`
  2309  	// ImportSummary: Aggregated statistics of user event import status.
  2310  	ImportSummary *GoogleCloudRetailV2UserEventImportSummary `json:"importSummary,omitempty"`
  2311  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  2312  	// unconditionally include in API requests. By default, fields with empty or
  2313  	// default values are omitted from API requests. See
  2314  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2315  	// details.
  2316  	ForceSendFields []string `json:"-"`
  2317  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  2318  	// requests with the JSON null value. By default, fields with empty values are
  2319  	// omitted from API requests. See
  2320  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2321  	NullFields []string `json:"-"`
  2322  }
  2323  
  2324  func (s *GoogleCloudRetailV2ImportUserEventsResponse) MarshalJSON() ([]byte, error) {
  2325  	type NoMethod GoogleCloudRetailV2ImportUserEventsResponse
  2326  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2327  }
  2328  
  2329  // GoogleCloudRetailV2Interval: A floating point interval.
  2330  type GoogleCloudRetailV2Interval struct {
  2331  	// ExclusiveMaximum: Exclusive upper bound.
  2332  	ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"`
  2333  	// ExclusiveMinimum: Exclusive lower bound.
  2334  	ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"`
  2335  	// Maximum: Inclusive upper bound.
  2336  	Maximum float64 `json:"maximum,omitempty"`
  2337  	// Minimum: Inclusive lower bound.
  2338  	Minimum float64 `json:"minimum,omitempty"`
  2339  	// ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to
  2340  	// unconditionally include in API requests. By default, fields with empty or
  2341  	// default values are omitted from API requests. See
  2342  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2343  	// details.
  2344  	ForceSendFields []string `json:"-"`
  2345  	// NullFields is a list of field names (e.g. "ExclusiveMaximum") to include in
  2346  	// API requests with the JSON null value. By default, fields with empty values
  2347  	// are omitted from API requests. See
  2348  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2349  	NullFields []string `json:"-"`
  2350  }
  2351  
  2352  func (s *GoogleCloudRetailV2Interval) MarshalJSON() ([]byte, error) {
  2353  	type NoMethod GoogleCloudRetailV2Interval
  2354  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2355  }
  2356  
  2357  func (s *GoogleCloudRetailV2Interval) UnmarshalJSON(data []byte) error {
  2358  	type NoMethod GoogleCloudRetailV2Interval
  2359  	var s1 struct {
  2360  		ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"`
  2361  		ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"`
  2362  		Maximum          gensupport.JSONFloat64 `json:"maximum"`
  2363  		Minimum          gensupport.JSONFloat64 `json:"minimum"`
  2364  		*NoMethod
  2365  	}
  2366  	s1.NoMethod = (*NoMethod)(s)
  2367  	if err := json.Unmarshal(data, &s1); err != nil {
  2368  		return err
  2369  	}
  2370  	s.ExclusiveMaximum = float64(s1.ExclusiveMaximum)
  2371  	s.ExclusiveMinimum = float64(s1.ExclusiveMinimum)
  2372  	s.Maximum = float64(s1.Maximum)
  2373  	s.Minimum = float64(s1.Minimum)
  2374  	return nil
  2375  }
  2376  
  2377  // GoogleCloudRetailV2ListCatalogsResponse: Response for
  2378  // CatalogService.ListCatalogs method.
  2379  type GoogleCloudRetailV2ListCatalogsResponse struct {
  2380  	// Catalogs: All the customer's Catalogs.
  2381  	Catalogs []*GoogleCloudRetailV2Catalog `json:"catalogs,omitempty"`
  2382  	// NextPageToken: A token that can be sent as ListCatalogsRequest.page_token to
  2383  	// retrieve the next page. If this field is omitted, there are no subsequent
  2384  	// pages.
  2385  	NextPageToken string `json:"nextPageToken,omitempty"`
  2386  
  2387  	// ServerResponse contains the HTTP response code and headers from the server.
  2388  	googleapi.ServerResponse `json:"-"`
  2389  	// ForceSendFields is a list of field names (e.g. "Catalogs") to
  2390  	// unconditionally include in API requests. By default, fields with empty or
  2391  	// default values are omitted from API requests. See
  2392  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2393  	// details.
  2394  	ForceSendFields []string `json:"-"`
  2395  	// NullFields is a list of field names (e.g. "Catalogs") to include in API
  2396  	// requests with the JSON null value. By default, fields with empty values are
  2397  	// omitted from API requests. See
  2398  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2399  	NullFields []string `json:"-"`
  2400  }
  2401  
  2402  func (s *GoogleCloudRetailV2ListCatalogsResponse) MarshalJSON() ([]byte, error) {
  2403  	type NoMethod GoogleCloudRetailV2ListCatalogsResponse
  2404  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2405  }
  2406  
  2407  // GoogleCloudRetailV2ListControlsResponse: Response for ListControls method.
  2408  type GoogleCloudRetailV2ListControlsResponse struct {
  2409  	// Controls: All the Controls for a given catalog.
  2410  	Controls []*GoogleCloudRetailV2Control `json:"controls,omitempty"`
  2411  	// NextPageToken: Pagination token, if not returned indicates the last page.
  2412  	NextPageToken string `json:"nextPageToken,omitempty"`
  2413  
  2414  	// ServerResponse contains the HTTP response code and headers from the server.
  2415  	googleapi.ServerResponse `json:"-"`
  2416  	// ForceSendFields is a list of field names (e.g. "Controls") to
  2417  	// unconditionally include in API requests. By default, fields with empty or
  2418  	// default values are omitted from API requests. See
  2419  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2420  	// details.
  2421  	ForceSendFields []string `json:"-"`
  2422  	// NullFields is a list of field names (e.g. "Controls") to include in API
  2423  	// requests with the JSON null value. By default, fields with empty values are
  2424  	// omitted from API requests. See
  2425  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2426  	NullFields []string `json:"-"`
  2427  }
  2428  
  2429  func (s *GoogleCloudRetailV2ListControlsResponse) MarshalJSON() ([]byte, error) {
  2430  	type NoMethod GoogleCloudRetailV2ListControlsResponse
  2431  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2432  }
  2433  
  2434  // GoogleCloudRetailV2ListModelsResponse: Response to a ListModelRequest.
  2435  type GoogleCloudRetailV2ListModelsResponse struct {
  2436  	// Models: List of Models.
  2437  	Models []*GoogleCloudRetailV2Model `json:"models,omitempty"`
  2438  	// NextPageToken: Pagination token, if not returned indicates the last page.
  2439  	NextPageToken string `json:"nextPageToken,omitempty"`
  2440  
  2441  	// ServerResponse contains the HTTP response code and headers from the server.
  2442  	googleapi.ServerResponse `json:"-"`
  2443  	// ForceSendFields is a list of field names (e.g. "Models") to unconditionally
  2444  	// include in API requests. By default, fields with empty or default values are
  2445  	// omitted from API requests. See
  2446  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2447  	// details.
  2448  	ForceSendFields []string `json:"-"`
  2449  	// NullFields is a list of field names (e.g. "Models") to include in API
  2450  	// requests with the JSON null value. By default, fields with empty values are
  2451  	// omitted from API requests. See
  2452  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2453  	NullFields []string `json:"-"`
  2454  }
  2455  
  2456  func (s *GoogleCloudRetailV2ListModelsResponse) MarshalJSON() ([]byte, error) {
  2457  	type NoMethod GoogleCloudRetailV2ListModelsResponse
  2458  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2459  }
  2460  
  2461  // GoogleCloudRetailV2ListProductsResponse: Response message for
  2462  // ProductService.ListProducts method.
  2463  type GoogleCloudRetailV2ListProductsResponse struct {
  2464  	// NextPageToken: A token that can be sent as ListProductsRequest.page_token to
  2465  	// retrieve the next page. If this field is omitted, there are no subsequent
  2466  	// pages.
  2467  	NextPageToken string `json:"nextPageToken,omitempty"`
  2468  	// Products: The Products.
  2469  	Products []*GoogleCloudRetailV2Product `json:"products,omitempty"`
  2470  
  2471  	// ServerResponse contains the HTTP response code and headers from the server.
  2472  	googleapi.ServerResponse `json:"-"`
  2473  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2474  	// unconditionally include in API requests. By default, fields with empty or
  2475  	// default values are omitted from API requests. See
  2476  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2477  	// details.
  2478  	ForceSendFields []string `json:"-"`
  2479  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2480  	// requests with the JSON null value. By default, fields with empty values are
  2481  	// omitted from API requests. See
  2482  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2483  	NullFields []string `json:"-"`
  2484  }
  2485  
  2486  func (s *GoogleCloudRetailV2ListProductsResponse) MarshalJSON() ([]byte, error) {
  2487  	type NoMethod GoogleCloudRetailV2ListProductsResponse
  2488  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2489  }
  2490  
  2491  // GoogleCloudRetailV2ListServingConfigsResponse: Response for
  2492  // ListServingConfigs method.
  2493  type GoogleCloudRetailV2ListServingConfigsResponse struct {
  2494  	// NextPageToken: Pagination token, if not returned indicates the last page.
  2495  	NextPageToken string `json:"nextPageToken,omitempty"`
  2496  	// ServingConfigs: All the ServingConfigs for a given catalog.
  2497  	ServingConfigs []*GoogleCloudRetailV2ServingConfig `json:"servingConfigs,omitempty"`
  2498  
  2499  	// ServerResponse contains the HTTP response code and headers from the server.
  2500  	googleapi.ServerResponse `json:"-"`
  2501  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2502  	// unconditionally include in API requests. By default, fields with empty or
  2503  	// default values are omitted from API requests. See
  2504  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2505  	// details.
  2506  	ForceSendFields []string `json:"-"`
  2507  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2508  	// requests with the JSON null value. By default, fields with empty values are
  2509  	// omitted from API requests. See
  2510  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2511  	NullFields []string `json:"-"`
  2512  }
  2513  
  2514  func (s *GoogleCloudRetailV2ListServingConfigsResponse) MarshalJSON() ([]byte, error) {
  2515  	type NoMethod GoogleCloudRetailV2ListServingConfigsResponse
  2516  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2517  }
  2518  
  2519  // GoogleCloudRetailV2LocalInventory: The inventory information at a place
  2520  // (e.g. a store) identified by a place ID.
  2521  type GoogleCloudRetailV2LocalInventory struct {
  2522  	// Attributes: Additional local inventory attributes, for example, store name,
  2523  	// promotion tags, etc. This field needs to pass all below criteria, otherwise
  2524  	// an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed.
  2525  	// * The key must be a UTF-8 encoded string with a length limit of 32
  2526  	// characters. * The key must match the pattern: `a-zA-Z0-9*`. For example,
  2527  	// key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same
  2528  	// type (text or number). * Only 1 value is allowed for each attribute. * For
  2529  	// text values, the length limit is 256 UTF-8 characters. * The attribute does
  2530  	// not support search. The `searchable` field should be unset or set to false.
  2531  	// * The max summed total bytes of custom attribute keys and values per product
  2532  	// is 5MiB.
  2533  	Attributes map[string]GoogleCloudRetailV2CustomAttribute `json:"attributes,omitempty"`
  2534  	// FulfillmentTypes: Input only. Supported fulfillment types. Valid fulfillment
  2535  	// type values include commonly used types (such as pickup in store and same
  2536  	// day delivery), and custom types. Customers have to map custom types to their
  2537  	// display names before rendering UI. Supported values: * "pickup-in-store" *
  2538  	// "ship-to-store" * "same-day-delivery" * "next-day-delivery" *
  2539  	// "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" *
  2540  	// "custom-type-5" If this field is set to an invalid value other than these,
  2541  	// an INVALID_ARGUMENT error is returned. All the elements must be distinct.
  2542  	// Otherwise, an INVALID_ARGUMENT error is returned.
  2543  	FulfillmentTypes []string `json:"fulfillmentTypes,omitempty"`
  2544  	// PlaceId: The place ID for the current set of inventory information.
  2545  	PlaceId string `json:"placeId,omitempty"`
  2546  	// PriceInfo: Product price and cost information. Google Merchant Center
  2547  	// property price (https://support.google.com/merchants/answer/6324371).
  2548  	PriceInfo *GoogleCloudRetailV2PriceInfo `json:"priceInfo,omitempty"`
  2549  	// ForceSendFields is a list of field names (e.g. "Attributes") to
  2550  	// unconditionally include in API requests. By default, fields with empty or
  2551  	// default values are omitted from API requests. See
  2552  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2553  	// details.
  2554  	ForceSendFields []string `json:"-"`
  2555  	// NullFields is a list of field names (e.g. "Attributes") to include in API
  2556  	// requests with the JSON null value. By default, fields with empty values are
  2557  	// omitted from API requests. See
  2558  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2559  	NullFields []string `json:"-"`
  2560  }
  2561  
  2562  func (s *GoogleCloudRetailV2LocalInventory) MarshalJSON() ([]byte, error) {
  2563  	type NoMethod GoogleCloudRetailV2LocalInventory
  2564  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2565  }
  2566  
  2567  // GoogleCloudRetailV2Model: Metadata that describes the training and serving
  2568  // parameters of a Model. A Model can be associated with a ServingConfig and
  2569  // then queried through the Predict API.
  2570  type GoogleCloudRetailV2Model struct {
  2571  	// CreateTime: Output only. Timestamp the Recommendation Model was created at.
  2572  	CreateTime string `json:"createTime,omitempty"`
  2573  	// DataState: Output only. The state of data requirements for this model:
  2574  	// `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the
  2575  	// data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR`
  2576  	// state even if serving state is `ACTIVE`: models were trained successfully
  2577  	// before, but cannot be refreshed because model no longer has sufficient data
  2578  	// for training.
  2579  	//
  2580  	// Possible values:
  2581  	//   "DATA_STATE_UNSPECIFIED" - Unspecified default value, should never be
  2582  	// explicitly set.
  2583  	//   "DATA_OK" - The model has sufficient training data.
  2584  	//   "DATA_ERROR" - The model does not have sufficient training data. Error
  2585  	// messages can be queried via Stackdriver.
  2586  	DataState string `json:"dataState,omitempty"`
  2587  	// DisplayName: Required. The display name of the model. Should be human
  2588  	// readable, used to display Recommendation Models in the Retail Cloud Console
  2589  	// Dashboard. UTF-8 encoded string with limit of 1024 characters.
  2590  	DisplayName string `json:"displayName,omitempty"`
  2591  	// FilteringOption: Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`,
  2592  	// recommendation filtering by attributes is enabled for the model.
  2593  	//
  2594  	// Possible values:
  2595  	//   "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED" - Value used when unset. In
  2596  	// this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.
  2597  	//   "RECOMMENDATIONS_FILTERING_DISABLED" - Recommendation filtering is
  2598  	// disabled.
  2599  	//   "RECOMMENDATIONS_FILTERING_ENABLED" - Recommendation filtering is enabled.
  2600  	FilteringOption string `json:"filteringOption,omitempty"`
  2601  	// LastTuneTime: Output only. The timestamp when the latest successful tune
  2602  	// finished.
  2603  	LastTuneTime string `json:"lastTuneTime,omitempty"`
  2604  	// ModelFeaturesConfig: Optional. Additional model features config.
  2605  	ModelFeaturesConfig *GoogleCloudRetailV2ModelModelFeaturesConfig `json:"modelFeaturesConfig,omitempty"`
  2606  	// Name: Required. The fully qualified resource name of the model. Format:
  2607  	// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
  2608  	// ls/{model_id}` catalog_id has char limit of 50. recommendation_model_id has
  2609  	// char limit of 40.
  2610  	Name string `json:"name,omitempty"`
  2611  	// OptimizationObjective: Optional. The optimization objective e.g. `cvr`.
  2612  	// Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not
  2613  	// specified, we choose default based on model type. Default depends on type of
  2614  	// recommendation: `recommended-for-you` => `ctr` `others-you-may-like` =>
  2615  	// `ctr` `frequently-bought-together` => `revenue_per_order` This field
  2616  	// together with optimization_objective describe model metadata to use to
  2617  	// control model training and serving. See
  2618  	// https://cloud.google.com/retail/docs/models for more details on what the
  2619  	// model metadata control and which combination of parameters are valid. For
  2620  	// invalid combinations of parameters (e.g. type = `frequently-bought-together`
  2621  	// and optimization_objective = `ctr`), you receive an error 400 if you try to
  2622  	// create/update a recommendation with this set of knobs.
  2623  	OptimizationObjective string `json:"optimizationObjective,omitempty"`
  2624  	// PeriodicTuningState: Optional. The state of periodic tuning. The period we
  2625  	// use is 3 months - to do a one-off tune earlier use the `TuneModel` method.
  2626  	// Default value is `PERIODIC_TUNING_ENABLED`.
  2627  	//
  2628  	// Possible values:
  2629  	//   "PERIODIC_TUNING_STATE_UNSPECIFIED" - Unspecified default value, should
  2630  	// never be explicitly set.
  2631  	//   "PERIODIC_TUNING_DISABLED" - The model has periodic tuning disabled.
  2632  	// Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or
  2633  	// by calling the `TuneModel` method.
  2634  	//   "ALL_TUNING_DISABLED" - The model cannot be tuned with periodic tuning OR
  2635  	// the `TuneModel` method. Hide the options in customer UI and reject any
  2636  	// requests through the backend self serve API.
  2637  	//   "PERIODIC_TUNING_ENABLED" - The model has periodic tuning enabled. Tuning
  2638  	// can be disabled by calling the `DisableModelPeriodicTuning` method.
  2639  	PeriodicTuningState string `json:"periodicTuningState,omitempty"`
  2640  	// ServingConfigLists: Output only. The list of valid serving configs
  2641  	// associated with the PageOptimizationConfig.
  2642  	ServingConfigLists []*GoogleCloudRetailV2ModelServingConfigList `json:"servingConfigLists,omitempty"`
  2643  	// ServingState: Output only. The serving state of the model: `ACTIVE`,
  2644  	// `NOT_ACTIVE`.
  2645  	//
  2646  	// Possible values:
  2647  	//   "SERVING_STATE_UNSPECIFIED" - Unspecified serving state.
  2648  	//   "INACTIVE" - The model is not serving.
  2649  	//   "ACTIVE" - The model is serving and can be queried.
  2650  	//   "TUNED" - The model is trained on tuned hyperparameters and can be
  2651  	// queried.
  2652  	ServingState string `json:"servingState,omitempty"`
  2653  	// TrainingState: Optional. The training state that the model is in (e.g.
  2654  	// `TRAINING` or `PAUSED`). Since part of the cost of running the service is
  2655  	// frequency of training - this can be used to determine when to train model in
  2656  	// order to control cost. If not specified: the default value for `CreateModel`
  2657  	// method is `TRAINING`. The default value for `UpdateModel` method is to keep
  2658  	// the state the same as before.
  2659  	//
  2660  	// Possible values:
  2661  	//   "TRAINING_STATE_UNSPECIFIED" - Unspecified training state.
  2662  	//   "PAUSED" - The model training is paused.
  2663  	//   "TRAINING" - The model is training.
  2664  	TrainingState string `json:"trainingState,omitempty"`
  2665  	// TuningOperation: Output only. The tune operation associated with the model.
  2666  	// Can be used to determine if there is an ongoing tune for this
  2667  	// recommendation. Empty field implies no tune is goig on.
  2668  	TuningOperation string `json:"tuningOperation,omitempty"`
  2669  	// Type: Required. The type of model e.g. `home-page`. Currently supported
  2670  	// values: `recommended-for-you`, `others-you-may-like`,
  2671  	// `frequently-bought-together`, `page-optimization`, `similar-items`,
  2672  	// `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This
  2673  	// field together with optimization_objective describe model metadata to use to
  2674  	// control model training and serving. See
  2675  	// https://cloud.google.com/retail/docs/models for more details on what the
  2676  	// model metadata control and which combination of parameters are valid. For
  2677  	// invalid combinations of parameters (e.g. type = `frequently-bought-together`
  2678  	// and optimization_objective = `ctr`), you receive an error 400 if you try to
  2679  	// create/update a recommendation with this set of knobs.
  2680  	Type string `json:"type,omitempty"`
  2681  	// UpdateTime: Output only. Timestamp the Recommendation Model was last
  2682  	// updated. E.g. if a Recommendation Model was paused - this would be the time
  2683  	// the pause was initiated.
  2684  	UpdateTime string `json:"updateTime,omitempty"`
  2685  
  2686  	// ServerResponse contains the HTTP response code and headers from the server.
  2687  	googleapi.ServerResponse `json:"-"`
  2688  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2689  	// unconditionally include in API requests. By default, fields with empty or
  2690  	// default values are omitted from API requests. See
  2691  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2692  	// details.
  2693  	ForceSendFields []string `json:"-"`
  2694  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2695  	// requests with the JSON null value. By default, fields with empty values are
  2696  	// omitted from API requests. See
  2697  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2698  	NullFields []string `json:"-"`
  2699  }
  2700  
  2701  func (s *GoogleCloudRetailV2Model) MarshalJSON() ([]byte, error) {
  2702  	type NoMethod GoogleCloudRetailV2Model
  2703  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2704  }
  2705  
  2706  // GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig: Additional
  2707  // configs for the frequently-bought-together model type.
  2708  type GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig struct {
  2709  	// ContextProductsType: Optional. Specifies the context of the model when it is
  2710  	// used in predict requests. Can only be set for the
  2711  	// `frequently-bought-together` type. If it isn't specified, it defaults to
  2712  	// MULTIPLE_CONTEXT_PRODUCTS.
  2713  	//
  2714  	// Possible values:
  2715  	//   "CONTEXT_PRODUCTS_TYPE_UNSPECIFIED" - Unspecified default value, should
  2716  	// never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.
  2717  	//   "SINGLE_CONTEXT_PRODUCT" - Use only a single product as context for the
  2718  	// recommendation. Typically used on pages like add-to-cart or product details.
  2719  	//   "MULTIPLE_CONTEXT_PRODUCTS" - Use one or multiple products as context for
  2720  	// the recommendation. Typically used on shopping cart pages.
  2721  	ContextProductsType string `json:"contextProductsType,omitempty"`
  2722  	// ForceSendFields is a list of field names (e.g. "ContextProductsType") to
  2723  	// unconditionally include in API requests. By default, fields with empty or
  2724  	// default values are omitted from API requests. See
  2725  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2726  	// details.
  2727  	ForceSendFields []string `json:"-"`
  2728  	// NullFields is a list of field names (e.g. "ContextProductsType") to include
  2729  	// in API requests with the JSON null value. By default, fields with empty
  2730  	// values are omitted from API requests. See
  2731  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2732  	NullFields []string `json:"-"`
  2733  }
  2734  
  2735  func (s *GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig) MarshalJSON() ([]byte, error) {
  2736  	type NoMethod GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig
  2737  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2738  }
  2739  
  2740  // GoogleCloudRetailV2ModelModelFeaturesConfig: Additional model features
  2741  // config.
  2742  type GoogleCloudRetailV2ModelModelFeaturesConfig struct {
  2743  	// FrequentlyBoughtTogetherConfig: Additional configs for
  2744  	// frequently-bought-together models.
  2745  	FrequentlyBoughtTogetherConfig *GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig `json:"frequentlyBoughtTogetherConfig,omitempty"`
  2746  	// ForceSendFields is a list of field names (e.g.
  2747  	// "FrequentlyBoughtTogetherConfig") to unconditionally include in API
  2748  	// requests. By default, fields with empty or default values are omitted from
  2749  	// API requests. See
  2750  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2751  	// details.
  2752  	ForceSendFields []string `json:"-"`
  2753  	// NullFields is a list of field names (e.g. "FrequentlyBoughtTogetherConfig")
  2754  	// to include in API requests with the JSON null value. By default, fields with
  2755  	// empty values are omitted from API requests. See
  2756  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2757  	NullFields []string `json:"-"`
  2758  }
  2759  
  2760  func (s *GoogleCloudRetailV2ModelModelFeaturesConfig) MarshalJSON() ([]byte, error) {
  2761  	type NoMethod GoogleCloudRetailV2ModelModelFeaturesConfig
  2762  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2763  }
  2764  
  2765  // GoogleCloudRetailV2ModelServingConfigList: Represents an ordered combination
  2766  // of valid serving configs, which can be used for `PAGE_OPTIMIZATION`
  2767  // recommendations.
  2768  type GoogleCloudRetailV2ModelServingConfigList struct {
  2769  	// ServingConfigIds: Optional. A set of valid serving configs that may be used
  2770  	// for `PAGE_OPTIMIZATION`.
  2771  	ServingConfigIds []string `json:"servingConfigIds,omitempty"`
  2772  	// ForceSendFields is a list of field names (e.g. "ServingConfigIds") to
  2773  	// unconditionally include in API requests. By default, fields with empty or
  2774  	// default values are omitted from API requests. See
  2775  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2776  	// details.
  2777  	ForceSendFields []string `json:"-"`
  2778  	// NullFields is a list of field names (e.g. "ServingConfigIds") to include in
  2779  	// API requests with the JSON null value. By default, fields with empty values
  2780  	// are omitted from API requests. See
  2781  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2782  	NullFields []string `json:"-"`
  2783  }
  2784  
  2785  func (s *GoogleCloudRetailV2ModelServingConfigList) MarshalJSON() ([]byte, error) {
  2786  	type NoMethod GoogleCloudRetailV2ModelServingConfigList
  2787  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2788  }
  2789  
  2790  // GoogleCloudRetailV2OutputConfig: The output configuration setting.
  2791  type GoogleCloudRetailV2OutputConfig struct {
  2792  	// BigqueryDestination: The BigQuery location where the output is to be written
  2793  	// to.
  2794  	BigqueryDestination *GoogleCloudRetailV2OutputConfigBigQueryDestination `json:"bigqueryDestination,omitempty"`
  2795  	// GcsDestination: The Google Cloud Storage location where the output is to be
  2796  	// written to.
  2797  	GcsDestination *GoogleCloudRetailV2OutputConfigGcsDestination `json:"gcsDestination,omitempty"`
  2798  	// ForceSendFields is a list of field names (e.g. "BigqueryDestination") to
  2799  	// unconditionally include in API requests. By default, fields with empty or
  2800  	// default values are omitted from API requests. See
  2801  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2802  	// details.
  2803  	ForceSendFields []string `json:"-"`
  2804  	// NullFields is a list of field names (e.g. "BigqueryDestination") to include
  2805  	// in API requests with the JSON null value. By default, fields with empty
  2806  	// values are omitted from API requests. See
  2807  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2808  	NullFields []string `json:"-"`
  2809  }
  2810  
  2811  func (s *GoogleCloudRetailV2OutputConfig) MarshalJSON() ([]byte, error) {
  2812  	type NoMethod GoogleCloudRetailV2OutputConfig
  2813  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2814  }
  2815  
  2816  // GoogleCloudRetailV2OutputConfigBigQueryDestination: The BigQuery output
  2817  // destination configuration.
  2818  type GoogleCloudRetailV2OutputConfigBigQueryDestination struct {
  2819  	// DatasetId: Required. The ID of a BigQuery Dataset.
  2820  	DatasetId string `json:"datasetId,omitempty"`
  2821  	// TableIdPrefix: Required. The prefix of exported BigQuery tables.
  2822  	TableIdPrefix string `json:"tableIdPrefix,omitempty"`
  2823  	// TableType: Required. Describes the table type. The following values are
  2824  	// supported: * `table`: A BigQuery native table. * `view`: A virtual table
  2825  	// defined by a SQL query.
  2826  	TableType string `json:"tableType,omitempty"`
  2827  	// ForceSendFields is a list of field names (e.g. "DatasetId") to
  2828  	// unconditionally include in API requests. By default, fields with empty or
  2829  	// default values are omitted from API requests. See
  2830  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2831  	// details.
  2832  	ForceSendFields []string `json:"-"`
  2833  	// NullFields is a list of field names (e.g. "DatasetId") to include in API
  2834  	// requests with the JSON null value. By default, fields with empty values are
  2835  	// omitted from API requests. See
  2836  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2837  	NullFields []string `json:"-"`
  2838  }
  2839  
  2840  func (s *GoogleCloudRetailV2OutputConfigBigQueryDestination) MarshalJSON() ([]byte, error) {
  2841  	type NoMethod GoogleCloudRetailV2OutputConfigBigQueryDestination
  2842  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2843  }
  2844  
  2845  // GoogleCloudRetailV2OutputConfigGcsDestination: The Google Cloud Storage
  2846  // output destination configuration.
  2847  type GoogleCloudRetailV2OutputConfigGcsDestination struct {
  2848  	// OutputUriPrefix: Required. The output uri prefix for saving output data to
  2849  	// json files. Some mapping examples are as follows: output_uri_prefix sample
  2850  	// output(assuming the object is foo.json) ========================
  2851  	// ============================================= gs://bucket/
  2852  	// gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json
  2853  	// gs://bucket/folder/item_ gs://bucket/folder/item_foo.json
  2854  	OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
  2855  	// ForceSendFields is a list of field names (e.g. "OutputUriPrefix") to
  2856  	// unconditionally include in API requests. By default, fields with empty or
  2857  	// default values are omitted from API requests. See
  2858  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2859  	// details.
  2860  	ForceSendFields []string `json:"-"`
  2861  	// NullFields is a list of field names (e.g. "OutputUriPrefix") to include in
  2862  	// API requests with the JSON null value. By default, fields with empty values
  2863  	// are omitted from API requests. See
  2864  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2865  	NullFields []string `json:"-"`
  2866  }
  2867  
  2868  func (s *GoogleCloudRetailV2OutputConfigGcsDestination) MarshalJSON() ([]byte, error) {
  2869  	type NoMethod GoogleCloudRetailV2OutputConfigGcsDestination
  2870  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2871  }
  2872  
  2873  // GoogleCloudRetailV2OutputResult: Output result that stores the information
  2874  // about where the exported data is stored.
  2875  type GoogleCloudRetailV2OutputResult struct {
  2876  	// BigqueryResult: The BigQuery location where the result is stored.
  2877  	BigqueryResult []*GoogleCloudRetailV2BigQueryOutputResult `json:"bigqueryResult,omitempty"`
  2878  	// GcsResult: The Google Cloud Storage location where the result is stored.
  2879  	GcsResult []*GoogleCloudRetailV2GcsOutputResult `json:"gcsResult,omitempty"`
  2880  	// ForceSendFields is a list of field names (e.g. "BigqueryResult") to
  2881  	// unconditionally include in API requests. By default, fields with empty or
  2882  	// default values are omitted from API requests. See
  2883  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2884  	// details.
  2885  	ForceSendFields []string `json:"-"`
  2886  	// NullFields is a list of field names (e.g. "BigqueryResult") to include in
  2887  	// API requests with the JSON null value. By default, fields with empty values
  2888  	// are omitted from API requests. See
  2889  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2890  	NullFields []string `json:"-"`
  2891  }
  2892  
  2893  func (s *GoogleCloudRetailV2OutputResult) MarshalJSON() ([]byte, error) {
  2894  	type NoMethod GoogleCloudRetailV2OutputResult
  2895  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2896  }
  2897  
  2898  // GoogleCloudRetailV2PauseModelRequest: Request for pausing training of a
  2899  // model.
  2900  type GoogleCloudRetailV2PauseModelRequest struct {
  2901  }
  2902  
  2903  // GoogleCloudRetailV2PredictRequest: Request message for Predict method.
  2904  type GoogleCloudRetailV2PredictRequest struct {
  2905  	// Filter: Filter for restricting prediction results with a length limit of
  2906  	// 5,000 characters. Accepts values for tags and the `filterOutOfStockItems`
  2907  	// flag. * Tag expressions. Restricts predictions to products that match all of
  2908  	// the specified tags. Boolean operators `OR` and `NOT` are supported if the
  2909  	// expression is enclosed in parentheses, and must be separated from the tag
  2910  	// values by a space. `-"tagA" is also supported and is equivalent to `NOT
  2911  	// "tagA". Tag values must be double quoted UTF-8 encoded strings with a size
  2912  	// limit of 1,000 characters. Note: "Recently viewed" models don't support tag
  2913  	// filtering at the moment. * filterOutOfStockItems. Restricts predictions to
  2914  	// products that do not have a stockState value of OUT_OF_STOCK. Examples: *
  2915  	// tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") *
  2916  	// filterOutOfStockItems tag=(-"promotional") * filterOutOfStockItems If your
  2917  	// filter blocks all prediction results, the API will return *no* results. If
  2918  	// instead you want empty result sets to return generic (unfiltered) popular
  2919  	// products, set `strictFiltering` to False in `PredictRequest.params`. Note
  2920  	// that the API will never return items with storageStatus of "EXPIRED" or
  2921  	// "DELETED" regardless of filter choices. If `filterSyntaxV2` is set to true
  2922  	// under the `params` field, then attribute-based expressions are expected
  2923  	// instead of the above described tag-based syntax. Examples: * (colors:
  2924  	// ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) * (availability:
  2925  	// ANY("IN_STOCK")) AND (colors: ANY("Red") OR categories: ANY("Phones")) For
  2926  	// more information, see Filter recommendations
  2927  	// (https://cloud.google.com/retail/docs/filter-recs).
  2928  	Filter string `json:"filter,omitempty"`
  2929  	// Labels: The labels applied to a resource must meet the following
  2930  	// requirements: * Each resource can have multiple labels, up to a maximum of
  2931  	// 64. * Each label must be a key-value pair. * Keys have a minimum length of 1
  2932  	// character and a maximum length of 63 characters and cannot be empty. Values
  2933  	// can be empty and have a maximum length of 63 characters. * Keys and values
  2934  	// can contain only lowercase letters, numeric characters, underscores, and
  2935  	// dashes. All characters must use UTF-8 encoding, and international characters
  2936  	// are allowed. * The key portion of a label must be unique. However, you can
  2937  	// use the same key with multiple resources. * Keys must start with a lowercase
  2938  	// letter or international character. See Google Cloud Document
  2939  	// (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
  2940  	// for more details.
  2941  	Labels map[string]string `json:"labels,omitempty"`
  2942  	// PageSize: Maximum number of results to return. Set this property to the
  2943  	// number of prediction results needed. If zero, the service will choose a
  2944  	// reasonable default. The maximum allowed value is 100. Values above 100 will
  2945  	// be coerced to 100.
  2946  	PageSize int64 `json:"pageSize,omitempty"`
  2947  	// PageToken: This field is not used; leave it unset.
  2948  	PageToken string `json:"pageToken,omitempty"`
  2949  	// Params: Additional domain specific parameters for the predictions. Allowed
  2950  	// values: * `returnProduct`: Boolean. If set to true, the associated product
  2951  	// object will be returned in the `results.metadata` field in the prediction
  2952  	// response. * `returnScore`: Boolean. If set to true, the prediction 'score'
  2953  	// corresponding to each returned product will be set in the `results.metadata`
  2954  	// field in the prediction response. The given 'score' indicates the
  2955  	// probability of a product being clicked/purchased given the user's context
  2956  	// and history. * `strictFiltering`: Boolean. True by default. If set to false,
  2957  	// the service will return generic (unfiltered) popular products instead of
  2958  	// empty if your filter blocks all prediction results. * `priceRerankLevel`:
  2959  	// String. Default empty. If set to be non-empty, then it needs to be one of
  2960  	// {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking',
  2961  	// 'high-price-reranking'}. This gives request-level control and adjusts
  2962  	// prediction results based on product price. * `diversityLevel`: String.
  2963  	// Default empty. If set to be non-empty, then it needs to be one of
  2964  	// {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity',
  2965  	// 'auto-diversity'}. This gives request-level control and adjusts prediction
  2966  	// results based on product category. * `filterSyntaxV2`: Boolean. False by
  2967  	// default. If set to true, the `filter` field is interpreteted according to
  2968  	// the new, attribute-based syntax.
  2969  	Params googleapi.RawMessage `json:"params,omitempty"`
  2970  	// UserEvent: Required. Context about the user, what they are looking at and
  2971  	// what action they took to trigger the predict request. Note that this user
  2972  	// event detail won't be ingested to userEvent logs. Thus, a separate userEvent
  2973  	// write request is required for event logging. Don't set UserEvent.visitor_id
  2974  	// or UserInfo.user_id to the same fixed ID for different users. If you are
  2975  	// trying to receive non-personalized recommendations (not recommended; this
  2976  	// can negatively impact model performance), instead set UserEvent.visitor_id
  2977  	// to a random unique ID and leave UserInfo.user_id unset.
  2978  	UserEvent *GoogleCloudRetailV2UserEvent `json:"userEvent,omitempty"`
  2979  	// ValidateOnly: Use validate only mode for this prediction query. If set to
  2980  	// true, a dummy model will be used that returns arbitrary products. Note that
  2981  	// the validate only mode should only be used for testing the API, or if the
  2982  	// model is not ready.
  2983  	ValidateOnly bool `json:"validateOnly,omitempty"`
  2984  	// ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
  2985  	// include in API requests. By default, fields with empty or default values are
  2986  	// omitted from API requests. See
  2987  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2988  	// details.
  2989  	ForceSendFields []string `json:"-"`
  2990  	// NullFields is a list of field names (e.g. "Filter") to include in API
  2991  	// requests with the JSON null value. By default, fields with empty values are
  2992  	// omitted from API requests. See
  2993  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2994  	NullFields []string `json:"-"`
  2995  }
  2996  
  2997  func (s *GoogleCloudRetailV2PredictRequest) MarshalJSON() ([]byte, error) {
  2998  	type NoMethod GoogleCloudRetailV2PredictRequest
  2999  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3000  }
  3001  
  3002  // GoogleCloudRetailV2PredictResponse: Response message for predict method.
  3003  type GoogleCloudRetailV2PredictResponse struct {
  3004  	// AttributionToken: A unique attribution token. This should be included in the
  3005  	// UserEvent logs resulting from this recommendation, which enables accurate
  3006  	// attribution of recommendation model performance.
  3007  	AttributionToken string `json:"attributionToken,omitempty"`
  3008  	// MissingIds: IDs of products in the request that were missing from the
  3009  	// inventory.
  3010  	MissingIds []string `json:"missingIds,omitempty"`
  3011  	// Results: A list of recommended products. The order represents the ranking
  3012  	// (from the most relevant product to the least).
  3013  	Results []*GoogleCloudRetailV2PredictResponsePredictionResult `json:"results,omitempty"`
  3014  	// ValidateOnly: True if the validateOnly property was set in the request.
  3015  	ValidateOnly bool `json:"validateOnly,omitempty"`
  3016  
  3017  	// ServerResponse contains the HTTP response code and headers from the server.
  3018  	googleapi.ServerResponse `json:"-"`
  3019  	// ForceSendFields is a list of field names (e.g. "AttributionToken") to
  3020  	// unconditionally include in API requests. By default, fields with empty or
  3021  	// default values are omitted from API requests. See
  3022  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3023  	// details.
  3024  	ForceSendFields []string `json:"-"`
  3025  	// NullFields is a list of field names (e.g. "AttributionToken") to include in
  3026  	// API requests with the JSON null value. By default, fields with empty values
  3027  	// are omitted from API requests. See
  3028  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3029  	NullFields []string `json:"-"`
  3030  }
  3031  
  3032  func (s *GoogleCloudRetailV2PredictResponse) MarshalJSON() ([]byte, error) {
  3033  	type NoMethod GoogleCloudRetailV2PredictResponse
  3034  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3035  }
  3036  
  3037  // GoogleCloudRetailV2PredictResponsePredictionResult: PredictionResult
  3038  // represents the recommendation prediction results.
  3039  type GoogleCloudRetailV2PredictResponsePredictionResult struct {
  3040  	// Id: ID of the recommended product
  3041  	Id string `json:"id,omitempty"`
  3042  	// Metadata: Additional product metadata / annotations. Possible values: *
  3043  	// `product`: JSON representation of the product. Is set if `returnProduct` is
  3044  	// set to true in `PredictRequest.params`. * `score`: Prediction score in
  3045  	// double value. Is set if `returnScore` is set to true in
  3046  	// `PredictRequest.params`.
  3047  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  3048  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  3049  	// include in API requests. By default, fields with empty or default values are
  3050  	// omitted from API requests. See
  3051  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3052  	// details.
  3053  	ForceSendFields []string `json:"-"`
  3054  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  3055  	// with the JSON null value. By default, fields with empty values are omitted
  3056  	// from API requests. See
  3057  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3058  	NullFields []string `json:"-"`
  3059  }
  3060  
  3061  func (s *GoogleCloudRetailV2PredictResponsePredictionResult) MarshalJSON() ([]byte, error) {
  3062  	type NoMethod GoogleCloudRetailV2PredictResponsePredictionResult
  3063  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3064  }
  3065  
  3066  // GoogleCloudRetailV2PriceInfo: The price information of a Product.
  3067  type GoogleCloudRetailV2PriceInfo struct {
  3068  	// Cost: The costs associated with the sale of a particular product. Used for
  3069  	// gross profit reporting. * Profit = price - cost Google Merchant Center
  3070  	// property cost_of_goods_sold
  3071  	// (https://support.google.com/merchants/answer/9017895).
  3072  	Cost float64 `json:"cost,omitempty"`
  3073  	// CurrencyCode: The 3-letter currency code defined in ISO 4217
  3074  	// (https://www.iso.org/iso-4217-currency-codes.html). If this field is an
  3075  	// unrecognizable currency code, an INVALID_ARGUMENT error is returned. The
  3076  	// Product.Type.VARIANT Products with the same Product.primary_product_id must
  3077  	// share the same currency_code. Otherwise, a FAILED_PRECONDITION error is
  3078  	// returned.
  3079  	CurrencyCode string `json:"currencyCode,omitempty"`
  3080  	// OriginalPrice: Price of the product without any discount. If zero, by
  3081  	// default set to be the price. If set, original_price should be greater than
  3082  	// or equal to price, otherwise an INVALID_ARGUMENT error is thrown.
  3083  	OriginalPrice float64 `json:"originalPrice,omitempty"`
  3084  	// Price: Price of the product. Google Merchant Center property price
  3085  	// (https://support.google.com/merchants/answer/6324371). Schema.org property
  3086  	// Offer.price (https://schema.org/price).
  3087  	Price float64 `json:"price,omitempty"`
  3088  	// PriceEffectiveTime: The timestamp when the price starts to be effective.
  3089  	// This can be set as a future timestamp, and the price is only used for search
  3090  	// after price_effective_time. If so, the original_price must be set and
  3091  	// original_price is used before price_effective_time. Do not set if price is
  3092  	// always effective because it will cause additional latency during search.
  3093  	PriceEffectiveTime string `json:"priceEffectiveTime,omitempty"`
  3094  	// PriceExpireTime: The timestamp when the price stops to be effective. The
  3095  	// price is used for search before price_expire_time. If this field is set, the
  3096  	// original_price must be set and original_price is used after
  3097  	// price_expire_time. Do not set if price is always effective because it will
  3098  	// cause additional latency during search.
  3099  	PriceExpireTime string `json:"priceExpireTime,omitempty"`
  3100  	// PriceRange: Output only. The price range of all the child
  3101  	// Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY
  3102  	// Product. Only populated for Product.Type.PRIMARY Products. Note: This field
  3103  	// is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API
  3104  	// requests.
  3105  	PriceRange *GoogleCloudRetailV2PriceInfoPriceRange `json:"priceRange,omitempty"`
  3106  	// ForceSendFields is a list of field names (e.g. "Cost") to unconditionally
  3107  	// include in API requests. By default, fields with empty or default values are
  3108  	// omitted from API requests. See
  3109  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3110  	// details.
  3111  	ForceSendFields []string `json:"-"`
  3112  	// NullFields is a list of field names (e.g. "Cost") to include in API requests
  3113  	// with the JSON null value. By default, fields with empty values are omitted
  3114  	// from API requests. See
  3115  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3116  	NullFields []string `json:"-"`
  3117  }
  3118  
  3119  func (s *GoogleCloudRetailV2PriceInfo) MarshalJSON() ([]byte, error) {
  3120  	type NoMethod GoogleCloudRetailV2PriceInfo
  3121  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3122  }
  3123  
  3124  func (s *GoogleCloudRetailV2PriceInfo) UnmarshalJSON(data []byte) error {
  3125  	type NoMethod GoogleCloudRetailV2PriceInfo
  3126  	var s1 struct {
  3127  		Cost          gensupport.JSONFloat64 `json:"cost"`
  3128  		OriginalPrice gensupport.JSONFloat64 `json:"originalPrice"`
  3129  		Price         gensupport.JSONFloat64 `json:"price"`
  3130  		*NoMethod
  3131  	}
  3132  	s1.NoMethod = (*NoMethod)(s)
  3133  	if err := json.Unmarshal(data, &s1); err != nil {
  3134  		return err
  3135  	}
  3136  	s.Cost = float64(s1.Cost)
  3137  	s.OriginalPrice = float64(s1.OriginalPrice)
  3138  	s.Price = float64(s1.Price)
  3139  	return nil
  3140  }
  3141  
  3142  // GoogleCloudRetailV2PriceInfoPriceRange: The price range of all variant
  3143  // Product having the same Product.primary_product_id.
  3144  type GoogleCloudRetailV2PriceInfoPriceRange struct {
  3145  	// OriginalPrice: The inclusive Product.pricing_info.original_price internal of
  3146  	// all variant Product having the same Product.primary_product_id.
  3147  	OriginalPrice *GoogleCloudRetailV2Interval `json:"originalPrice,omitempty"`
  3148  	// Price: The inclusive Product.pricing_info.price interval of all variant
  3149  	// Product having the same Product.primary_product_id.
  3150  	Price *GoogleCloudRetailV2Interval `json:"price,omitempty"`
  3151  	// ForceSendFields is a list of field names (e.g. "OriginalPrice") to
  3152  	// unconditionally include in API requests. By default, fields with empty or
  3153  	// default values are omitted from API requests. See
  3154  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3155  	// details.
  3156  	ForceSendFields []string `json:"-"`
  3157  	// NullFields is a list of field names (e.g. "OriginalPrice") to include in API
  3158  	// requests with the JSON null value. By default, fields with empty values are
  3159  	// omitted from API requests. See
  3160  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3161  	NullFields []string `json:"-"`
  3162  }
  3163  
  3164  func (s *GoogleCloudRetailV2PriceInfoPriceRange) MarshalJSON() ([]byte, error) {
  3165  	type NoMethod GoogleCloudRetailV2PriceInfoPriceRange
  3166  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3167  }
  3168  
  3169  // GoogleCloudRetailV2Product: Product captures all metadata information of
  3170  // items to be recommended or searched.
  3171  type GoogleCloudRetailV2Product struct {
  3172  	// Attributes: Highly encouraged. Extra product attributes to be included. For
  3173  	// example, for products, this could include the store name, vendor, style,
  3174  	// color, etc. These are very strong signals for recommendation model, thus we
  3175  	// highly recommend providing the attributes here. Features that can take on
  3176  	// one of a limited number of possible values. Two types of features can be set
  3177  	// are: Textual features. some examples would be the brand/maker of a product,
  3178  	// or country of a customer. Numerical features. Some examples would be the
  3179  	// height/weight of a product, or age of a customer. For example: `{ "vendor":
  3180  	// {"text": ["vendor123", "vendor456"]}, "lengths_cm": {"numbers":[2.3, 15.4]},
  3181  	// "heights_cm": {"numbers":[8.1, 6.4]} }`. This field needs to pass all below
  3182  	// criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries
  3183  	// count: 200. * The key must be a UTF-8 encoded string with a length limit of
  3184  	// 128 characters. * For indexable attribute, the key must match the pattern:
  3185  	// `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text
  3186  	// attributes, at most 400 values are allowed. Empty values are not allowed.
  3187  	// Each value must be a non-empty UTF-8 encoded string with a length limit of
  3188  	// 256 characters. * For number attributes, at most 400 values are allowed.
  3189  	Attributes map[string]GoogleCloudRetailV2CustomAttribute `json:"attributes,omitempty"`
  3190  	// Audience: The target group associated with a given audience (e.g. male,
  3191  	// veterans, car owners, musicians, etc.) of the product.
  3192  	Audience *GoogleCloudRetailV2Audience `json:"audience,omitempty"`
  3193  	// Availability: The online availability of the Product. Default to
  3194  	// Availability.IN_STOCK. Corresponding properties: Google Merchant Center
  3195  	// property availability (https://support.google.com/merchants/answer/6324448).
  3196  	// Schema.org property Offer.availability (https://schema.org/availability).
  3197  	//
  3198  	// Possible values:
  3199  	//   "AVAILABILITY_UNSPECIFIED" - Default product availability. Default to
  3200  	// Availability.IN_STOCK if unset.
  3201  	//   "IN_STOCK" - Product in stock.
  3202  	//   "OUT_OF_STOCK" - Product out of stock.
  3203  	//   "PREORDER" - Product that is in pre-order state.
  3204  	//   "BACKORDER" - Product that is back-ordered (i.e. temporarily out of
  3205  	// stock).
  3206  	Availability string `json:"availability,omitempty"`
  3207  	// AvailableQuantity: The available quantity of the item.
  3208  	AvailableQuantity int64 `json:"availableQuantity,omitempty"`
  3209  	// AvailableTime: The timestamp when this Product becomes available for
  3210  	// SearchService.Search. Note that this is only applicable to Type.PRIMARY and
  3211  	// Type.COLLECTION, and ignored for Type.VARIANT.
  3212  	AvailableTime string `json:"availableTime,omitempty"`
  3213  	// Brands: The brands of the product. A maximum of 30 brands are allowed unless
  3214  	// overridden through the Google Cloud console. Each brand must be a UTF-8
  3215  	// encoded string with a length limit of 1,000 characters. Otherwise, an
  3216  	// INVALID_ARGUMENT error is returned. Corresponding properties: Google
  3217  	// Merchant Center property brand
  3218  	// (https://support.google.com/merchants/answer/6324351). Schema.org property
  3219  	// Product.brand (https://schema.org/brand).
  3220  	Brands []string `json:"brands,omitempty"`
  3221  	// Categories: Product categories. This field is repeated for supporting one
  3222  	// product belonging to several parallel categories. Strongly recommended using
  3223  	// the full path for better search / recommendation quality. To represent full
  3224  	// path of category, use '>' sign to separate different hierarchies. If '>' is
  3225  	// part of the category name, replace it with other character(s). For example,
  3226  	// if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and
  3227  	// ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be
  3228  	// represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports &
  3229  	// Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product
  3230  	// otherwise an INVALID_ARGUMENT error is returned. At most 250 values are
  3231  	// allowed per Product unless overridden through the Google Cloud console.
  3232  	// Empty values are not allowed. Each value must be a UTF-8 encoded string with
  3233  	// a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
  3234  	// returned. Corresponding properties: Google Merchant Center property
  3235  	// google_product_category. Schema.org property [Product.category]
  3236  	// (https://schema.org/category). [mc_google_product_category]:
  3237  	// https://support.google.com/merchants/answer/6324436
  3238  	Categories []string `json:"categories,omitempty"`
  3239  	// CollectionMemberIds: The id of the collection members when type is
  3240  	// Type.COLLECTION. Non-existent product ids are allowed. The type of the
  3241  	// members must be either Type.PRIMARY or Type.VARIANT otherwise an
  3242  	// INVALID_ARGUMENT error is thrown. Should not set it for other types. A
  3243  	// maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
  3244  	// return.
  3245  	CollectionMemberIds []string `json:"collectionMemberIds,omitempty"`
  3246  	// ColorInfo: The color of the product. Corresponding properties: Google
  3247  	// Merchant Center property color
  3248  	// (https://support.google.com/merchants/answer/6324487). Schema.org property
  3249  	// Product.color (https://schema.org/color).
  3250  	ColorInfo *GoogleCloudRetailV2ColorInfo `json:"colorInfo,omitempty"`
  3251  	// Conditions: The condition of the product. Strongly encouraged to use the
  3252  	// standard values: "new", "refurbished", "used". A maximum of 1 value is
  3253  	// allowed per Product. Each value must be a UTF-8 encoded string with a length
  3254  	// limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
  3255  	// Corresponding properties: Google Merchant Center property condition
  3256  	// (https://support.google.com/merchants/answer/6324469). Schema.org property
  3257  	// Offer.itemCondition (https://schema.org/itemCondition).
  3258  	Conditions []string `json:"conditions,omitempty"`
  3259  	// Description: Product description. This field must be a UTF-8 encoded string
  3260  	// with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT
  3261  	// error is returned. Corresponding properties: Google Merchant Center property
  3262  	// description (https://support.google.com/merchants/answer/6324468).
  3263  	// Schema.org property Product.description (https://schema.org/description).
  3264  	Description string `json:"description,omitempty"`
  3265  	// ExpireTime: Note that this field is applied in the following ways: * If the
  3266  	// Product is already expired when it is uploaded, this product is not indexed
  3267  	// for search. * If the Product is not expired when it is uploaded, only the
  3268  	// Type.PRIMARY's and Type.COLLECTION's expireTime is respected, and
  3269  	// Type.VARIANT's expireTime is not used. In general, we suggest the users to
  3270  	// delete the stale products explicitly, instead of using this field to
  3271  	// determine staleness. expire_time must be later than available_time and
  3272  	// publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding
  3273  	// properties: Google Merchant Center property expiration_date
  3274  	// (https://support.google.com/merchants/answer/6324499).
  3275  	ExpireTime string `json:"expireTime,omitempty"`
  3276  	// FulfillmentInfo: Fulfillment information, such as the store IDs for in-store
  3277  	// pickup or region IDs for different shipping methods. All the elements must
  3278  	// have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is
  3279  	// returned.
  3280  	FulfillmentInfo []*GoogleCloudRetailV2FulfillmentInfo `json:"fulfillmentInfo,omitempty"`
  3281  	// Gtin: The Global Trade Item Number (GTIN) of the product. This field must be
  3282  	// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an
  3283  	// INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise,
  3284  	// an INVALID_ARGUMENT error is returned. Corresponding properties: Google
  3285  	// Merchant Center property gtin
  3286  	// (https://support.google.com/merchants/answer/6324461). Schema.org property
  3287  	// Product.isbn (https://schema.org/isbn), Product.gtin8
  3288  	// (https://schema.org/gtin8), Product.gtin12 (https://schema.org/gtin12),
  3289  	// Product.gtin13 (https://schema.org/gtin13), or Product.gtin14
  3290  	// (https://schema.org/gtin14). If the value is not a valid GTIN, an
  3291  	// INVALID_ARGUMENT error is returned.
  3292  	Gtin string `json:"gtin,omitempty"`
  3293  	// Id: Immutable. Product identifier, which is the final component of name. For
  3294  	// example, this field is "id_1", if name is
  3295  	// `projects/*/locations/global/catalogs/default_catalog/branches/default_branch
  3296  	// /products/id_1`. This field must be a UTF-8 encoded string with a length
  3297  	// limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
  3298  	// Corresponding properties: Google Merchant Center property id
  3299  	// (https://support.google.com/merchants/answer/6324405). Schema.org property
  3300  	// Product.sku (https://schema.org/sku).
  3301  	Id string `json:"id,omitempty"`
  3302  	// Images: Product images for the product. We highly recommend putting the main
  3303  	// image first. A maximum of 300 images are allowed. Corresponding properties:
  3304  	// Google Merchant Center property image_link
  3305  	// (https://support.google.com/merchants/answer/6324350). Schema.org property
  3306  	// Product.image (https://schema.org/image).
  3307  	Images []*GoogleCloudRetailV2Image `json:"images,omitempty"`
  3308  	// LanguageCode: Language of the title/description and other string attributes.
  3309  	// Use language tags defined by BCP 47
  3310  	// (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this
  3311  	// field is ignored and the model automatically detects the text language. The
  3312  	// Product can include text in different languages, but duplicating Products to
  3313  	// provide text in multiple languages can result in degraded model performance.
  3314  	// For product search this field is in use. It defaults to "en-US" if unset.
  3315  	LanguageCode string `json:"languageCode,omitempty"`
  3316  	// LocalInventories: Output only. A list of local inventories specific to
  3317  	// different places. This field can be managed by
  3318  	// ProductService.AddLocalInventories and ProductService.RemoveLocalInventories
  3319  	// APIs if fine-grained, high-volume updates are necessary.
  3320  	LocalInventories []*GoogleCloudRetailV2LocalInventory `json:"localInventories,omitempty"`
  3321  	// Materials: The material of the product. For example, "leather", "wooden". A
  3322  	// maximum of 20 values are allowed. Each value must be a UTF-8 encoded string
  3323  	// with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error
  3324  	// is returned. Corresponding properties: Google Merchant Center property
  3325  	// material (https://support.google.com/merchants/answer/6324410). Schema.org
  3326  	// property Product.material (https://schema.org/material).
  3327  	Materials []string `json:"materials,omitempty"`
  3328  	// Name: Immutable. Full resource name of the product, such as
  3329  	// `projects/*/locations/global/catalogs/default_catalog/branches/default_branch
  3330  	// /products/product_id`.
  3331  	Name string `json:"name,omitempty"`
  3332  	// Patterns: The pattern or graphic print of the product. For example,
  3333  	// "striped", "polka dot", "paisley". A maximum of 20 values are allowed per
  3334  	// Product. Each value must be a UTF-8 encoded string with a length limit of
  3335  	// 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
  3336  	// Corresponding properties: Google Merchant Center property pattern
  3337  	// (https://support.google.com/merchants/answer/6324483). Schema.org property
  3338  	// Product.pattern (https://schema.org/pattern).
  3339  	Patterns []string `json:"patterns,omitempty"`
  3340  	// PriceInfo: Product price and cost information. Corresponding properties:
  3341  	// Google Merchant Center property price
  3342  	// (https://support.google.com/merchants/answer/6324371).
  3343  	PriceInfo *GoogleCloudRetailV2PriceInfo `json:"priceInfo,omitempty"`
  3344  	// PrimaryProductId: Variant group identifier. Must be an id, with the same
  3345  	// parent branch with this product. Otherwise, an error is thrown. For
  3346  	// Type.PRIMARY Products, this field can only be empty or set to the same value
  3347  	// as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000
  3348  	// products are allowed to share the same Type.PRIMARY Product. Otherwise, an
  3349  	// INVALID_ARGUMENT error is returned. Corresponding properties: Google
  3350  	// Merchant Center property item_group_id
  3351  	// (https://support.google.com/merchants/answer/6324507). Schema.org property
  3352  	// Product.inProductGroupWithID (https://schema.org/inProductGroupWithID).
  3353  	PrimaryProductId string `json:"primaryProductId,omitempty"`
  3354  	// Promotions: The promotions applied to the product. A maximum of 10 values
  3355  	// are allowed per Product. Only Promotion.promotion_id will be used, other
  3356  	// fields will be ignored if set.
  3357  	Promotions []*GoogleCloudRetailV2Promotion `json:"promotions,omitempty"`
  3358  	// PublishTime: The timestamp when the product is published by the retailer for
  3359  	// the first time, which indicates the freshness of the products. Note that
  3360  	// this field is different from available_time, given it purely describes
  3361  	// product freshness regardless of when it is available on search and
  3362  	// recommendation.
  3363  	PublishTime string `json:"publishTime,omitempty"`
  3364  	// Rating: The rating of this product.
  3365  	Rating *GoogleCloudRetailV2Rating `json:"rating,omitempty"`
  3366  	// RetrievableFields: Indicates which fields in the Products are returned in
  3367  	// SearchResponse. Supported fields for all types: * audience * availability *
  3368  	// brands * color_info * conditions * gtin * materials * name * patterns *
  3369  	// price_info * rating * sizes * title * uri Supported fields only for
  3370  	// Type.PRIMARY and Type.COLLECTION: * categories * description * images
  3371  	// Supported fields only for Type.VARIANT: * Only the first image in images To
  3372  	// mark attributes as retrievable, include paths of the form "attributes.key"
  3373  	// where "key" is the key of a custom attribute, as specified in attributes.
  3374  	// For Type.PRIMARY and Type.COLLECTION, the following fields are always
  3375  	// returned in SearchResponse by default: * name For Type.VARIANT, the
  3376  	// following fields are always returned in by default: * name * color_info The
  3377  	// maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
  3378  	// returned. Note: Returning more fields in SearchResponse can increase
  3379  	// response payload size and serving latency. This field is deprecated. Use the
  3380  	// retrievable site-wide control instead.
  3381  	RetrievableFields string `json:"retrievableFields,omitempty"`
  3382  	// Sizes: The size of the product. To represent different size systems or size
  3383  	// types, consider using this format: [[[size_system:]size_type:]size_value].
  3384  	// For example, in "US:MENS:M", "US" represents size system; "MENS" represents
  3385  	// size type; "M" represents size value. In "GIRLS:27", size system is empty;
  3386  	// "GIRLS" represents size type; "27" represents size value. In "32 inches",
  3387  	// both size system and size type are empty, while size value is "32 inches". A
  3388  	// maximum of 20 values are allowed per Product. Each value must be a UTF-8
  3389  	// encoded string with a length limit of 128 characters. Otherwise, an
  3390  	// INVALID_ARGUMENT error is returned. Corresponding properties: Google
  3391  	// Merchant Center property size
  3392  	// (https://support.google.com/merchants/answer/6324492), size_type
  3393  	// (https://support.google.com/merchants/answer/6324497), and size_system
  3394  	// (https://support.google.com/merchants/answer/6324502). Schema.org property
  3395  	// Product.size (https://schema.org/size).
  3396  	Sizes []string `json:"sizes,omitempty"`
  3397  	// Tags: Custom tags associated with the product. At most 250 values are
  3398  	// allowed per Product. This value must be a UTF-8 encoded string with a length
  3399  	// limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
  3400  	// This tag can be used for filtering recommendation results by passing the tag
  3401  	// as part of the PredictRequest.filter. Corresponding properties: Google
  3402  	// Merchant Center property custom_label_0–4
  3403  	// (https://support.google.com/merchants/answer/6324473).
  3404  	Tags []string `json:"tags,omitempty"`
  3405  	// Title: Required. Product title. This field must be a UTF-8 encoded string
  3406  	// with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT
  3407  	// error is returned. Corresponding properties: Google Merchant Center property
  3408  	// title (https://support.google.com/merchants/answer/6324415). Schema.org
  3409  	// property Product.name (https://schema.org/name).
  3410  	Title string `json:"title,omitempty"`
  3411  	// Ttl: Input only. The TTL (time to live) of the product. Note that this is
  3412  	// only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for
  3413  	// Type.VARIANT. In general, we suggest the users to delete the stale products
  3414  	// explicitly, instead of using this field to determine staleness. If it is
  3415  	// set, it must be a non-negative value, and expire_time is set as current
  3416  	// timestamp plus ttl. The derived expire_time is returned in the output and
  3417  	// ttl is left blank when retrieving the Product. If it is set, the product is
  3418  	// not available for SearchService.Search after current timestamp plus ttl.
  3419  	// However, the product can still be retrieved by ProductService.GetProduct and
  3420  	// ProductService.ListProducts.
  3421  	Ttl string `json:"ttl,omitempty"`
  3422  	// Type: Immutable. The type of the product. Default to
  3423  	// Catalog.product_level_config.ingestion_product_type if unset.
  3424  	//
  3425  	// Possible values:
  3426  	//   "TYPE_UNSPECIFIED" - Default value. Default to
  3427  	// Catalog.product_level_config.ingestion_product_type if unset.
  3428  	//   "PRIMARY" - The primary type. As the primary unit for predicting, indexing
  3429  	// and search serving, a Type.PRIMARY Product is grouped with multiple
  3430  	// Type.VARIANT Products.
  3431  	//   "VARIANT" - The variant type. Type.VARIANT Products usually share some
  3432  	// common attributes on the same Type.PRIMARY Products, but they have variant
  3433  	// attributes like different colors, sizes and prices, etc.
  3434  	//   "COLLECTION" - The collection type. Collection products are bundled
  3435  	// Type.PRIMARY Products or Type.VARIANT Products that are sold together, such
  3436  	// as a jewelry set with necklaces, earrings and rings, etc.
  3437  	Type string `json:"type,omitempty"`
  3438  	// Uri: Canonical URL directly linking to the product detail page. It is
  3439  	// strongly recommended to provide a valid uri for the product, otherwise the
  3440  	// service performance could be significantly degraded. This field must be a
  3441  	// UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
  3442  	// INVALID_ARGUMENT error is returned. Corresponding properties: Google
  3443  	// Merchant Center property link
  3444  	// (https://support.google.com/merchants/answer/6324416). Schema.org property
  3445  	// Offer.url (https://schema.org/url).
  3446  	Uri string `json:"uri,omitempty"`
  3447  	// Variants: Output only. Product variants grouped together on primary product
  3448  	// which share similar product attributes. It's automatically grouped by
  3449  	// primary_product_id for all the product variants. Only populated for
  3450  	// Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for
  3451  	// ProductService.GetProduct. Do not set this field in API requests.
  3452  	Variants []*GoogleCloudRetailV2Product `json:"variants,omitempty"`
  3453  
  3454  	// ServerResponse contains the HTTP response code and headers from the server.
  3455  	googleapi.ServerResponse `json:"-"`
  3456  	// ForceSendFields is a list of field names (e.g. "Attributes") to
  3457  	// unconditionally include in API requests. By default, fields with empty or
  3458  	// default values are omitted from API requests. See
  3459  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3460  	// details.
  3461  	ForceSendFields []string `json:"-"`
  3462  	// NullFields is a list of field names (e.g. "Attributes") to include in API
  3463  	// requests with the JSON null value. By default, fields with empty values are
  3464  	// omitted from API requests. See
  3465  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3466  	NullFields []string `json:"-"`
  3467  }
  3468  
  3469  func (s *GoogleCloudRetailV2Product) MarshalJSON() ([]byte, error) {
  3470  	type NoMethod GoogleCloudRetailV2Product
  3471  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3472  }
  3473  
  3474  // GoogleCloudRetailV2ProductDetail: Detailed product information associated
  3475  // with a user event.
  3476  type GoogleCloudRetailV2ProductDetail struct {
  3477  	// Product: Required. Product information. Required field(s): * Product.id
  3478  	// Optional override field(s): * Product.price_info If any supported optional
  3479  	// fields are provided, we will treat them as a full override when looking up
  3480  	// product information from the catalog. Thus, it is important to ensure that
  3481  	// the overriding fields are accurate and complete. All other product fields
  3482  	// are ignored and instead populated via catalog lookup after event ingestion.
  3483  	Product *GoogleCloudRetailV2Product `json:"product,omitempty"`
  3484  	// Quantity: Quantity of the product associated with the user event. For
  3485  	// example, this field will be 2 if two products are added to the shopping cart
  3486  	// for `purchase-complete` event. Required for `add-to-cart` and
  3487  	// `purchase-complete` event types.
  3488  	Quantity int64 `json:"quantity,omitempty"`
  3489  	// ForceSendFields is a list of field names (e.g. "Product") to unconditionally
  3490  	// include in API requests. By default, fields with empty or default values are
  3491  	// omitted from API requests. See
  3492  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3493  	// details.
  3494  	ForceSendFields []string `json:"-"`
  3495  	// NullFields is a list of field names (e.g. "Product") to include in API
  3496  	// requests with the JSON null value. By default, fields with empty values are
  3497  	// omitted from API requests. See
  3498  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3499  	NullFields []string `json:"-"`
  3500  }
  3501  
  3502  func (s *GoogleCloudRetailV2ProductDetail) MarshalJSON() ([]byte, error) {
  3503  	type NoMethod GoogleCloudRetailV2ProductDetail
  3504  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3505  }
  3506  
  3507  // GoogleCloudRetailV2ProductInlineSource: The inline source for the input
  3508  // config for ImportProducts method.
  3509  type GoogleCloudRetailV2ProductInlineSource struct {
  3510  	// Products: Required. A list of products to update/create. Each product must
  3511  	// have a valid Product.id. Recommended max of 100 items.
  3512  	Products []*GoogleCloudRetailV2Product `json:"products,omitempty"`
  3513  	// ForceSendFields is a list of field names (e.g. "Products") to
  3514  	// unconditionally include in API requests. By default, fields with empty or
  3515  	// default values are omitted from API requests. See
  3516  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3517  	// details.
  3518  	ForceSendFields []string `json:"-"`
  3519  	// NullFields is a list of field names (e.g. "Products") to include in API
  3520  	// requests with the JSON null value. By default, fields with empty values are
  3521  	// omitted from API requests. See
  3522  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3523  	NullFields []string `json:"-"`
  3524  }
  3525  
  3526  func (s *GoogleCloudRetailV2ProductInlineSource) MarshalJSON() ([]byte, error) {
  3527  	type NoMethod GoogleCloudRetailV2ProductInlineSource
  3528  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3529  }
  3530  
  3531  // GoogleCloudRetailV2ProductInputConfig: The input config source for products.
  3532  type GoogleCloudRetailV2ProductInputConfig struct {
  3533  	// BigQuerySource: BigQuery input source.
  3534  	BigQuerySource *GoogleCloudRetailV2BigQuerySource `json:"bigQuerySource,omitempty"`
  3535  	// GcsSource: Google Cloud Storage location for the input content.
  3536  	GcsSource *GoogleCloudRetailV2GcsSource `json:"gcsSource,omitempty"`
  3537  	// ProductInlineSource: The Inline source for the input content for products.
  3538  	ProductInlineSource *GoogleCloudRetailV2ProductInlineSource `json:"productInlineSource,omitempty"`
  3539  	// ForceSendFields is a list of field names (e.g. "BigQuerySource") to
  3540  	// unconditionally include in API requests. By default, fields with empty or
  3541  	// default values are omitted from API requests. See
  3542  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3543  	// details.
  3544  	ForceSendFields []string `json:"-"`
  3545  	// NullFields is a list of field names (e.g. "BigQuerySource") to include in
  3546  	// API requests with the JSON null value. By default, fields with empty values
  3547  	// are omitted from API requests. See
  3548  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3549  	NullFields []string `json:"-"`
  3550  }
  3551  
  3552  func (s *GoogleCloudRetailV2ProductInputConfig) MarshalJSON() ([]byte, error) {
  3553  	type NoMethod GoogleCloudRetailV2ProductInputConfig
  3554  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3555  }
  3556  
  3557  // GoogleCloudRetailV2ProductLevelConfig: Configures what level the product
  3558  // should be uploaded with regards to how users will be send events and how
  3559  // predictions will be made.
  3560  type GoogleCloudRetailV2ProductLevelConfig struct {
  3561  	// IngestionProductType: The type of Products allowed to be ingested into the
  3562  	// catalog. Acceptable values are: * `primary` (default): You can ingest
  3563  	// Products of all types. When ingesting a Product, its type will default to
  3564  	// Product.Type.PRIMARY if unset. * `variant` (incompatible with Retail
  3565  	// Search): You can only ingest Product.Type.VARIANT Products. This means
  3566  	// Product.primary_product_id cannot be empty. If this field is set to an
  3567  	// invalid value other than these, an INVALID_ARGUMENT error is returned. If
  3568  	// this field is `variant` and merchant_center_product_id_field is
  3569  	// `itemGroupId`, an INVALID_ARGUMENT error is returned. See Product levels
  3570  	// (https://cloud.google.com/retail/docs/catalog#product-levels) for more
  3571  	// details.
  3572  	IngestionProductType string `json:"ingestionProductType,omitempty"`
  3573  	// MerchantCenterProductIdField: Which field of Merchant Center Product
  3574  	// (/bigquery-transfer/docs/merchant-center-products-schema) should be imported
  3575  	// as Product.id. Acceptable values are: * `offerId` (default): Import
  3576  	// `offerId` as the product ID. * `itemGroupId`: Import `itemGroupId` as the
  3577  	// product ID. Notice that Retail API will choose one item from the ones with
  3578  	// the same `itemGroupId`, and use it to represent the item group. If this
  3579  	// field is set to an invalid value other than these, an INVALID_ARGUMENT error
  3580  	// is returned. If this field is `itemGroupId` and ingestion_product_type is
  3581  	// `variant`, an INVALID_ARGUMENT error is returned. See Product levels
  3582  	// (https://cloud.google.com/retail/docs/catalog#product-levels) for more
  3583  	// details.
  3584  	MerchantCenterProductIdField string `json:"merchantCenterProductIdField,omitempty"`
  3585  	// ForceSendFields is a list of field names (e.g. "IngestionProductType") to
  3586  	// unconditionally include in API requests. By default, fields with empty or
  3587  	// default values are omitted from API requests. See
  3588  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3589  	// details.
  3590  	ForceSendFields []string `json:"-"`
  3591  	// NullFields is a list of field names (e.g. "IngestionProductType") to include
  3592  	// in API requests with the JSON null value. By default, fields with empty
  3593  	// values are omitted from API requests. See
  3594  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3595  	NullFields []string `json:"-"`
  3596  }
  3597  
  3598  func (s *GoogleCloudRetailV2ProductLevelConfig) MarshalJSON() ([]byte, error) {
  3599  	type NoMethod GoogleCloudRetailV2ProductLevelConfig
  3600  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3601  }
  3602  
  3603  // GoogleCloudRetailV2Promotion: Promotion specification.
  3604  type GoogleCloudRetailV2Promotion struct {
  3605  	// PromotionId: Promotion identifier, which is the final component of name. For
  3606  	// example, this field is "free_gift", if name is
  3607  	// `projects/*/locations/global/catalogs/default_catalog/promotions/free_gift`.
  3608  	// The value must be a UTF-8 encoded string with a length limit of 128
  3609  	// characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or
  3610  	// ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned.
  3611  	// Corresponds to Google Merchant Center property promotion_id
  3612  	// (https://support.google.com/merchants/answer/7050148).
  3613  	PromotionId string `json:"promotionId,omitempty"`
  3614  	// ForceSendFields is a list of field names (e.g. "PromotionId") to
  3615  	// unconditionally include in API requests. By default, fields with empty or
  3616  	// default values are omitted from API requests. See
  3617  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3618  	// details.
  3619  	ForceSendFields []string `json:"-"`
  3620  	// NullFields is a list of field names (e.g. "PromotionId") to include in API
  3621  	// requests with the JSON null value. By default, fields with empty values are
  3622  	// omitted from API requests. See
  3623  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3624  	NullFields []string `json:"-"`
  3625  }
  3626  
  3627  func (s *GoogleCloudRetailV2Promotion) MarshalJSON() ([]byte, error) {
  3628  	type NoMethod GoogleCloudRetailV2Promotion
  3629  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3630  }
  3631  
  3632  // GoogleCloudRetailV2PurchaseTransaction: A transaction represents the entire
  3633  // purchase transaction.
  3634  type GoogleCloudRetailV2PurchaseTransaction struct {
  3635  	// Cost: All the costs associated with the products. These can be manufacturing
  3636  	// costs, shipping expenses not borne by the end user, or any other costs, such
  3637  	// that: * Profit = revenue - tax - cost
  3638  	Cost float64 `json:"cost,omitempty"`
  3639  	// CurrencyCode: Required. Currency code. Use three-character ISO-4217 code.
  3640  	CurrencyCode string `json:"currencyCode,omitempty"`
  3641  	// Id: The transaction ID with a length limit of 128 characters.
  3642  	Id string `json:"id,omitempty"`
  3643  	// Revenue: Required. Total non-zero revenue or grand total associated with the
  3644  	// transaction. This value include shipping, tax, or other adjustments to total
  3645  	// revenue that you want to include as part of your revenue calculations.
  3646  	Revenue float64 `json:"revenue,omitempty"`
  3647  	// Tax: All the taxes associated with the transaction.
  3648  	Tax float64 `json:"tax,omitempty"`
  3649  	// ForceSendFields is a list of field names (e.g. "Cost") to unconditionally
  3650  	// include in API requests. By default, fields with empty or default values are
  3651  	// omitted from API requests. See
  3652  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3653  	// details.
  3654  	ForceSendFields []string `json:"-"`
  3655  	// NullFields is a list of field names (e.g. "Cost") to include in API requests
  3656  	// with the JSON null value. By default, fields with empty values are omitted
  3657  	// from API requests. See
  3658  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3659  	NullFields []string `json:"-"`
  3660  }
  3661  
  3662  func (s *GoogleCloudRetailV2PurchaseTransaction) MarshalJSON() ([]byte, error) {
  3663  	type NoMethod GoogleCloudRetailV2PurchaseTransaction
  3664  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3665  }
  3666  
  3667  func (s *GoogleCloudRetailV2PurchaseTransaction) UnmarshalJSON(data []byte) error {
  3668  	type NoMethod GoogleCloudRetailV2PurchaseTransaction
  3669  	var s1 struct {
  3670  		Cost    gensupport.JSONFloat64 `json:"cost"`
  3671  		Revenue gensupport.JSONFloat64 `json:"revenue"`
  3672  		Tax     gensupport.JSONFloat64 `json:"tax"`
  3673  		*NoMethod
  3674  	}
  3675  	s1.NoMethod = (*NoMethod)(s)
  3676  	if err := json.Unmarshal(data, &s1); err != nil {
  3677  		return err
  3678  	}
  3679  	s.Cost = float64(s1.Cost)
  3680  	s.Revenue = float64(s1.Revenue)
  3681  	s.Tax = float64(s1.Tax)
  3682  	return nil
  3683  }
  3684  
  3685  // GoogleCloudRetailV2PurgeMetadata: Metadata related to the progress of the
  3686  // Purge operation. This will be returned by the
  3687  // google.longrunning.Operation.metadata field.
  3688  type GoogleCloudRetailV2PurgeMetadata struct {
  3689  }
  3690  
  3691  // GoogleCloudRetailV2PurgeProductsMetadata: Metadata related to the progress
  3692  // of the PurgeProducts operation. This will be returned by the
  3693  // google.longrunning.Operation.metadata field.
  3694  type GoogleCloudRetailV2PurgeProductsMetadata struct {
  3695  	// CreateTime: Operation create time.
  3696  	CreateTime string `json:"createTime,omitempty"`
  3697  	// FailureCount: Count of entries that encountered errors while processing.
  3698  	FailureCount int64 `json:"failureCount,omitempty,string"`
  3699  	// SuccessCount: Count of entries that were deleted successfully.
  3700  	SuccessCount int64 `json:"successCount,omitempty,string"`
  3701  	// UpdateTime: Operation last update time. If the operation is done, this is
  3702  	// also the finish time.
  3703  	UpdateTime string `json:"updateTime,omitempty"`
  3704  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3705  	// unconditionally include in API requests. By default, fields with empty or
  3706  	// default values are omitted from API requests. See
  3707  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3708  	// details.
  3709  	ForceSendFields []string `json:"-"`
  3710  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3711  	// requests with the JSON null value. By default, fields with empty values are
  3712  	// omitted from API requests. See
  3713  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3714  	NullFields []string `json:"-"`
  3715  }
  3716  
  3717  func (s *GoogleCloudRetailV2PurgeProductsMetadata) MarshalJSON() ([]byte, error) {
  3718  	type NoMethod GoogleCloudRetailV2PurgeProductsMetadata
  3719  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3720  }
  3721  
  3722  // GoogleCloudRetailV2PurgeProductsRequest: Request message for PurgeProducts
  3723  // method.
  3724  type GoogleCloudRetailV2PurgeProductsRequest struct {
  3725  	// Filter: Required. The filter string to specify the products to be deleted
  3726  	// with a length limit of 5,000 characters. Empty string filter is not allowed.
  3727  	// "*" implies delete all items in a branch. The eligible fields for filtering
  3728  	// are: * `availability`: Double quoted Product.availability string. *
  3729  	// `create_time` : in ISO 8601 "zulu" format. Supported syntax: * Comparators
  3730  	// (">", "<", ">=", "<=", "="). Examples: * create_time <=
  3731  	// "2015-02-13T17:05:46Z" * availability = "IN_STOCK" * Conjunctions ("AND")
  3732  	// Examples: * create_time <= "2015-02-13T17:05:46Z" AND availability =
  3733  	// "PREORDER" * Disjunctions ("OR") Examples: * create_time <=
  3734  	// "2015-02-13T17:05:46Z" OR availability = "IN_STOCK" * Can support nested
  3735  	// queries. Examples: * (create_time <= "2015-02-13T17:05:46Z" AND availability
  3736  	// = "PREORDER") OR (create_time >= "2015-02-14T13:03:32Z" AND availability =
  3737  	// "IN_STOCK") * Filter Limits: * Filter should not contain more than 6
  3738  	// conditions. * Max nesting depth should not exceed 2 levels. Examples
  3739  	// queries: * Delete back order products created before a timestamp.
  3740  	// create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
  3741  	Filter string `json:"filter,omitempty"`
  3742  	// Force: Actually perform the purge. If `force` is set to false, the method
  3743  	// will return the expected purge count without deleting any products.
  3744  	Force bool `json:"force,omitempty"`
  3745  	// ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
  3746  	// include in API requests. By default, fields with empty or default values are
  3747  	// omitted from API requests. See
  3748  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3749  	// details.
  3750  	ForceSendFields []string `json:"-"`
  3751  	// NullFields is a list of field names (e.g. "Filter") to include in API
  3752  	// requests with the JSON null value. By default, fields with empty values are
  3753  	// omitted from API requests. See
  3754  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3755  	NullFields []string `json:"-"`
  3756  }
  3757  
  3758  func (s *GoogleCloudRetailV2PurgeProductsRequest) MarshalJSON() ([]byte, error) {
  3759  	type NoMethod GoogleCloudRetailV2PurgeProductsRequest
  3760  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3761  }
  3762  
  3763  // GoogleCloudRetailV2PurgeProductsResponse: Response of the
  3764  // PurgeProductsRequest. If the long running operation is successfully done,
  3765  // then this message is returned by the google.longrunning.Operations.response
  3766  // field.
  3767  type GoogleCloudRetailV2PurgeProductsResponse struct {
  3768  	// PurgeCount: The total count of products purged as a result of the operation.
  3769  	PurgeCount int64 `json:"purgeCount,omitempty,string"`
  3770  	// PurgeSample: A sample of the product names that will be deleted. Only
  3771  	// populated if `force` is set to false. A max of 100 names will be returned
  3772  	// and the names are chosen at random.
  3773  	PurgeSample []string `json:"purgeSample,omitempty"`
  3774  	// ForceSendFields is a list of field names (e.g. "PurgeCount") to
  3775  	// unconditionally include in API requests. By default, fields with empty or
  3776  	// default values are omitted from API requests. See
  3777  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3778  	// details.
  3779  	ForceSendFields []string `json:"-"`
  3780  	// NullFields is a list of field names (e.g. "PurgeCount") to include in API
  3781  	// requests with the JSON null value. By default, fields with empty values are
  3782  	// omitted from API requests. See
  3783  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3784  	NullFields []string `json:"-"`
  3785  }
  3786  
  3787  func (s *GoogleCloudRetailV2PurgeProductsResponse) MarshalJSON() ([]byte, error) {
  3788  	type NoMethod GoogleCloudRetailV2PurgeProductsResponse
  3789  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3790  }
  3791  
  3792  // GoogleCloudRetailV2PurgeUserEventsRequest: Request message for
  3793  // PurgeUserEvents method.
  3794  type GoogleCloudRetailV2PurgeUserEventsRequest struct {
  3795  	// Filter: Required. The filter string to specify the events to be deleted with
  3796  	// a length limit of 5,000 characters. Empty string filter is not allowed. The
  3797  	// eligible fields for filtering are: * `eventType`: Double quoted
  3798  	// UserEvent.event_type string. * `eventTime`: in ISO 8601 "zulu" format. *
  3799  	// `visitorId`: Double quoted string. Specifying this will delete all events
  3800  	// associated with a visitor. * `userId`: Double quoted string. Specifying this
  3801  	// will delete all events associated with a user. Examples: * Deleting all
  3802  	// events in a time range: `eventTime > "2012-04-23T18:25:43.511Z" eventTime <
  3803  	// "2012-04-23T18:30:43.511Z" * Deleting specific eventType in time range:
  3804  	// `eventTime > "2012-04-23T18:25:43.511Z" eventType = "detail-page-view" *
  3805  	// Deleting all events for a specific visitor: `visitorId = "visitor1024" The
  3806  	// filtering fields are assumed to have an implicit AND.
  3807  	Filter string `json:"filter,omitempty"`
  3808  	// Force: Actually perform the purge. If `force` is set to false, the method
  3809  	// will return the expected purge count without deleting any user events.
  3810  	Force bool `json:"force,omitempty"`
  3811  	// ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
  3812  	// include in API requests. By default, fields with empty or default values are
  3813  	// omitted from API requests. See
  3814  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3815  	// details.
  3816  	ForceSendFields []string `json:"-"`
  3817  	// NullFields is a list of field names (e.g. "Filter") to include in API
  3818  	// requests with the JSON null value. By default, fields with empty values are
  3819  	// omitted from API requests. See
  3820  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3821  	NullFields []string `json:"-"`
  3822  }
  3823  
  3824  func (s *GoogleCloudRetailV2PurgeUserEventsRequest) MarshalJSON() ([]byte, error) {
  3825  	type NoMethod GoogleCloudRetailV2PurgeUserEventsRequest
  3826  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3827  }
  3828  
  3829  // GoogleCloudRetailV2PurgeUserEventsResponse: Response of the
  3830  // PurgeUserEventsRequest. If the long running operation is successfully done,
  3831  // then this message is returned by the google.longrunning.Operations.response
  3832  // field.
  3833  type GoogleCloudRetailV2PurgeUserEventsResponse struct {
  3834  	// PurgedEventsCount: The total count of events purged as a result of the
  3835  	// operation.
  3836  	PurgedEventsCount int64 `json:"purgedEventsCount,omitempty,string"`
  3837  	// ForceSendFields is a list of field names (e.g. "PurgedEventsCount") to
  3838  	// unconditionally include in API requests. By default, fields with empty or
  3839  	// default values are omitted from API requests. See
  3840  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3841  	// details.
  3842  	ForceSendFields []string `json:"-"`
  3843  	// NullFields is a list of field names (e.g. "PurgedEventsCount") to include in
  3844  	// API requests with the JSON null value. By default, fields with empty values
  3845  	// are omitted from API requests. See
  3846  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3847  	NullFields []string `json:"-"`
  3848  }
  3849  
  3850  func (s *GoogleCloudRetailV2PurgeUserEventsResponse) MarshalJSON() ([]byte, error) {
  3851  	type NoMethod GoogleCloudRetailV2PurgeUserEventsResponse
  3852  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3853  }
  3854  
  3855  // GoogleCloudRetailV2Rating: The rating of a Product.
  3856  type GoogleCloudRetailV2Rating struct {
  3857  	// AverageRating: The average rating of the Product. The rating is scaled at
  3858  	// 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
  3859  	AverageRating float64 `json:"averageRating,omitempty"`
  3860  	// RatingCount: The total number of ratings. This value is independent of the
  3861  	// value of rating_histogram. This value must be nonnegative. Otherwise, an
  3862  	// INVALID_ARGUMENT error is returned.
  3863  	RatingCount int64 `json:"ratingCount,omitempty"`
  3864  	// RatingHistogram: List of rating counts per rating value (index = rating -
  3865  	// 1). The list is empty if there is no rating. If the list is non-empty, its
  3866  	// size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For
  3867  	// example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings
  3868  	// with 1 star, 14 ratings with 2 star, and so on.
  3869  	RatingHistogram []int64 `json:"ratingHistogram,omitempty"`
  3870  	// ForceSendFields is a list of field names (e.g. "AverageRating") to
  3871  	// unconditionally include in API requests. By default, fields with empty or
  3872  	// default values are omitted from API requests. See
  3873  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3874  	// details.
  3875  	ForceSendFields []string `json:"-"`
  3876  	// NullFields is a list of field names (e.g. "AverageRating") to include in API
  3877  	// requests with the JSON null value. By default, fields with empty values are
  3878  	// omitted from API requests. See
  3879  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3880  	NullFields []string `json:"-"`
  3881  }
  3882  
  3883  func (s *GoogleCloudRetailV2Rating) MarshalJSON() ([]byte, error) {
  3884  	type NoMethod GoogleCloudRetailV2Rating
  3885  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3886  }
  3887  
  3888  func (s *GoogleCloudRetailV2Rating) UnmarshalJSON(data []byte) error {
  3889  	type NoMethod GoogleCloudRetailV2Rating
  3890  	var s1 struct {
  3891  		AverageRating gensupport.JSONFloat64 `json:"averageRating"`
  3892  		*NoMethod
  3893  	}
  3894  	s1.NoMethod = (*NoMethod)(s)
  3895  	if err := json.Unmarshal(data, &s1); err != nil {
  3896  		return err
  3897  	}
  3898  	s.AverageRating = float64(s1.AverageRating)
  3899  	return nil
  3900  }
  3901  
  3902  // GoogleCloudRetailV2RejoinUserEventsMetadata: Metadata for `RejoinUserEvents`
  3903  // method.
  3904  type GoogleCloudRetailV2RejoinUserEventsMetadata struct {
  3905  }
  3906  
  3907  // GoogleCloudRetailV2RejoinUserEventsRequest: Request message for
  3908  // RejoinUserEvents method.
  3909  type GoogleCloudRetailV2RejoinUserEventsRequest struct {
  3910  	// UserEventRejoinScope: The type of the user event rejoin to define the scope
  3911  	// and range of the user events to be rejoined with the latest product catalog.
  3912  	// Defaults to `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set,
  3913  	// or set to an invalid integer value.
  3914  	//
  3915  	// Possible values:
  3916  	//   "USER_EVENT_REJOIN_SCOPE_UNSPECIFIED" - Rejoin all events with the latest
  3917  	// product catalog, including both joined events and unjoined events.
  3918  	//   "JOINED_EVENTS" - Only rejoin joined events with the latest product
  3919  	// catalog.
  3920  	//   "UNJOINED_EVENTS" - Only rejoin unjoined events with the latest product
  3921  	// catalog.
  3922  	UserEventRejoinScope string `json:"userEventRejoinScope,omitempty"`
  3923  	// ForceSendFields is a list of field names (e.g. "UserEventRejoinScope") to
  3924  	// unconditionally include in API requests. By default, fields with empty or
  3925  	// default values are omitted from API requests. See
  3926  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3927  	// details.
  3928  	ForceSendFields []string `json:"-"`
  3929  	// NullFields is a list of field names (e.g. "UserEventRejoinScope") to include
  3930  	// in API requests with the JSON null value. By default, fields with empty
  3931  	// values are omitted from API requests. See
  3932  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3933  	NullFields []string `json:"-"`
  3934  }
  3935  
  3936  func (s *GoogleCloudRetailV2RejoinUserEventsRequest) MarshalJSON() ([]byte, error) {
  3937  	type NoMethod GoogleCloudRetailV2RejoinUserEventsRequest
  3938  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3939  }
  3940  
  3941  // GoogleCloudRetailV2RejoinUserEventsResponse: Response message for
  3942  // `RejoinUserEvents` method.
  3943  type GoogleCloudRetailV2RejoinUserEventsResponse struct {
  3944  	// RejoinedUserEventsCount: Number of user events that were joined with latest
  3945  	// product catalog.
  3946  	RejoinedUserEventsCount int64 `json:"rejoinedUserEventsCount,omitempty,string"`
  3947  	// ForceSendFields is a list of field names (e.g. "RejoinedUserEventsCount") to
  3948  	// unconditionally include in API requests. By default, fields with empty or
  3949  	// default values are omitted from API requests. See
  3950  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3951  	// details.
  3952  	ForceSendFields []string `json:"-"`
  3953  	// NullFields is a list of field names (e.g. "RejoinedUserEventsCount") to
  3954  	// include in API requests with the JSON null value. By default, fields with
  3955  	// empty values are omitted from API requests. See
  3956  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3957  	NullFields []string `json:"-"`
  3958  }
  3959  
  3960  func (s *GoogleCloudRetailV2RejoinUserEventsResponse) MarshalJSON() ([]byte, error) {
  3961  	type NoMethod GoogleCloudRetailV2RejoinUserEventsResponse
  3962  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3963  }
  3964  
  3965  // GoogleCloudRetailV2RemoveCatalogAttributeRequest: Request for
  3966  // CatalogService.RemoveCatalogAttribute method.
  3967  type GoogleCloudRetailV2RemoveCatalogAttributeRequest struct {
  3968  	// Key: Required. The attribute name key of the CatalogAttribute to remove.
  3969  	Key string `json:"key,omitempty"`
  3970  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
  3971  	// include in API requests. By default, fields with empty or default values are
  3972  	// omitted from API requests. See
  3973  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3974  	// details.
  3975  	ForceSendFields []string `json:"-"`
  3976  	// NullFields is a list of field names (e.g. "Key") to include in API requests
  3977  	// with the JSON null value. By default, fields with empty values are omitted
  3978  	// from API requests. See
  3979  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3980  	NullFields []string `json:"-"`
  3981  }
  3982  
  3983  func (s *GoogleCloudRetailV2RemoveCatalogAttributeRequest) MarshalJSON() ([]byte, error) {
  3984  	type NoMethod GoogleCloudRetailV2RemoveCatalogAttributeRequest
  3985  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3986  }
  3987  
  3988  // GoogleCloudRetailV2RemoveControlRequest: Request for RemoveControl method.
  3989  type GoogleCloudRetailV2RemoveControlRequest struct {
  3990  	// ControlId: Required. The id of the control to apply. Assumed to be in the
  3991  	// same catalog as the serving config.
  3992  	ControlId string `json:"controlId,omitempty"`
  3993  	// ForceSendFields is a list of field names (e.g. "ControlId") to
  3994  	// unconditionally include in API requests. By default, fields with empty or
  3995  	// default values are omitted from API requests. See
  3996  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3997  	// details.
  3998  	ForceSendFields []string `json:"-"`
  3999  	// NullFields is a list of field names (e.g. "ControlId") to include in API
  4000  	// requests with the JSON null value. By default, fields with empty values are
  4001  	// omitted from API requests. See
  4002  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4003  	NullFields []string `json:"-"`
  4004  }
  4005  
  4006  func (s *GoogleCloudRetailV2RemoveControlRequest) MarshalJSON() ([]byte, error) {
  4007  	type NoMethod GoogleCloudRetailV2RemoveControlRequest
  4008  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4009  }
  4010  
  4011  // GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata: Metadata related to the
  4012  // progress of the RemoveFulfillmentPlaces operation. Currently empty because
  4013  // there is no meaningful metadata populated from the
  4014  // ProductService.RemoveFulfillmentPlaces method.
  4015  type GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata struct {
  4016  }
  4017  
  4018  // GoogleCloudRetailV2RemoveFulfillmentPlacesRequest: Request message for
  4019  // ProductService.RemoveFulfillmentPlaces method.
  4020  type GoogleCloudRetailV2RemoveFulfillmentPlacesRequest struct {
  4021  	// AllowMissing: If set to true, and the Product is not found, the fulfillment
  4022  	// information will still be processed and retained for at most 1 day and
  4023  	// processed once the Product is created. If set to false, a NOT_FOUND error is
  4024  	// returned if the Product is not found.
  4025  	AllowMissing bool `json:"allowMissing,omitempty"`
  4026  	// PlaceIds: Required. The IDs for this type, such as the store IDs for
  4027  	// "pickup-in-store" or the region IDs for "same-day-delivery", to be removed
  4028  	// for this type. At least 1 value is required, and a maximum of 2000 values
  4029  	// are allowed. Each value must be a string with a length limit of 10
  4030  	// characters, matching the pattern `[a-zA-Z0-9_-]+`, such as "store1" or
  4031  	// "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned.
  4032  	PlaceIds []string `json:"placeIds,omitempty"`
  4033  	// RemoveTime: The time when the fulfillment updates are issued, used to
  4034  	// prevent out-of-order updates on fulfillment information. If not provided,
  4035  	// the internal system time will be used.
  4036  	RemoveTime string `json:"removeTime,omitempty"`
  4037  	// Type: Required. The fulfillment type, including commonly used types (such as
  4038  	// pickup in store and same day delivery), and custom types. Supported values:
  4039  	// * "pickup-in-store" * "ship-to-store" * "same-day-delivery" *
  4040  	// "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" *
  4041  	// "custom-type-4" * "custom-type-5" If this field is set to an invalid value
  4042  	// other than these, an INVALID_ARGUMENT error is returned. This field directly
  4043  	// corresponds to Product.fulfillment_info.type.
  4044  	Type string `json:"type,omitempty"`
  4045  	// ForceSendFields is a list of field names (e.g. "AllowMissing") to
  4046  	// unconditionally include in API requests. By default, fields with empty or
  4047  	// default values are omitted from API requests. See
  4048  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4049  	// details.
  4050  	ForceSendFields []string `json:"-"`
  4051  	// NullFields is a list of field names (e.g. "AllowMissing") to include in API
  4052  	// requests with the JSON null value. By default, fields with empty values are
  4053  	// omitted from API requests. See
  4054  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4055  	NullFields []string `json:"-"`
  4056  }
  4057  
  4058  func (s *GoogleCloudRetailV2RemoveFulfillmentPlacesRequest) MarshalJSON() ([]byte, error) {
  4059  	type NoMethod GoogleCloudRetailV2RemoveFulfillmentPlacesRequest
  4060  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4061  }
  4062  
  4063  // GoogleCloudRetailV2RemoveFulfillmentPlacesResponse: Response of the
  4064  // RemoveFulfillmentPlacesRequest. Currently empty because there is no
  4065  // meaningful response populated from the
  4066  // ProductService.RemoveFulfillmentPlaces method.
  4067  type GoogleCloudRetailV2RemoveFulfillmentPlacesResponse struct {
  4068  }
  4069  
  4070  // GoogleCloudRetailV2RemoveLocalInventoriesMetadata: Metadata related to the
  4071  // progress of the RemoveLocalInventories operation. Currently empty because
  4072  // there is no meaningful metadata populated from the
  4073  // ProductService.RemoveLocalInventories method.
  4074  type GoogleCloudRetailV2RemoveLocalInventoriesMetadata struct {
  4075  }
  4076  
  4077  // GoogleCloudRetailV2RemoveLocalInventoriesRequest: Request message for
  4078  // ProductService.RemoveLocalInventories method.
  4079  type GoogleCloudRetailV2RemoveLocalInventoriesRequest struct {
  4080  	// AllowMissing: If set to true, and the Product is not found, the local
  4081  	// inventory removal request will still be processed and retained for at most 1
  4082  	// day and processed once the Product is created. If set to false, a NOT_FOUND
  4083  	// error is returned if the Product is not found.
  4084  	AllowMissing bool `json:"allowMissing,omitempty"`
  4085  	// PlaceIds: Required. A list of place IDs to have their inventory deleted. At
  4086  	// most 3000 place IDs are allowed per request.
  4087  	PlaceIds []string `json:"placeIds,omitempty"`
  4088  	// RemoveTime: The time when the inventory deletions are issued. Used to
  4089  	// prevent out-of-order updates and deletions on local inventory fields. If not
  4090  	// provided, the internal system time will be used.
  4091  	RemoveTime string `json:"removeTime,omitempty"`
  4092  	// ForceSendFields is a list of field names (e.g. "AllowMissing") to
  4093  	// unconditionally include in API requests. By default, fields with empty or
  4094  	// default values are omitted from API requests. See
  4095  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4096  	// details.
  4097  	ForceSendFields []string `json:"-"`
  4098  	// NullFields is a list of field names (e.g. "AllowMissing") to include in API
  4099  	// requests with the JSON null value. By default, fields with empty values are
  4100  	// omitted from API requests. See
  4101  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4102  	NullFields []string `json:"-"`
  4103  }
  4104  
  4105  func (s *GoogleCloudRetailV2RemoveLocalInventoriesRequest) MarshalJSON() ([]byte, error) {
  4106  	type NoMethod GoogleCloudRetailV2RemoveLocalInventoriesRequest
  4107  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4108  }
  4109  
  4110  // GoogleCloudRetailV2RemoveLocalInventoriesResponse: Response of the
  4111  // ProductService.RemoveLocalInventories API. Currently empty because there is
  4112  // no meaningful response populated from the
  4113  // ProductService.RemoveLocalInventories method.
  4114  type GoogleCloudRetailV2RemoveLocalInventoriesResponse struct {
  4115  }
  4116  
  4117  // GoogleCloudRetailV2ReplaceCatalogAttributeRequest: Request for
  4118  // CatalogService.ReplaceCatalogAttribute method.
  4119  type GoogleCloudRetailV2ReplaceCatalogAttributeRequest struct {
  4120  	// CatalogAttribute: Required. The updated CatalogAttribute.
  4121  	CatalogAttribute *GoogleCloudRetailV2CatalogAttribute `json:"catalogAttribute,omitempty"`
  4122  	// UpdateMask: Indicates which fields in the provided CatalogAttribute to
  4123  	// update. The following are NOT supported: * CatalogAttribute.key If not set,
  4124  	// all supported fields are updated.
  4125  	UpdateMask string `json:"updateMask,omitempty"`
  4126  	// ForceSendFields is a list of field names (e.g. "CatalogAttribute") to
  4127  	// unconditionally include in API requests. By default, fields with empty or
  4128  	// default values are omitted from API requests. See
  4129  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4130  	// details.
  4131  	ForceSendFields []string `json:"-"`
  4132  	// NullFields is a list of field names (e.g. "CatalogAttribute") to include in
  4133  	// API requests with the JSON null value. By default, fields with empty values
  4134  	// are omitted from API requests. See
  4135  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4136  	NullFields []string `json:"-"`
  4137  }
  4138  
  4139  func (s *GoogleCloudRetailV2ReplaceCatalogAttributeRequest) MarshalJSON() ([]byte, error) {
  4140  	type NoMethod GoogleCloudRetailV2ReplaceCatalogAttributeRequest
  4141  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4142  }
  4143  
  4144  // GoogleCloudRetailV2ResumeModelRequest: Request for resuming training of a
  4145  // model.
  4146  type GoogleCloudRetailV2ResumeModelRequest struct {
  4147  }
  4148  
  4149  // GoogleCloudRetailV2Rule: A rule is a condition-action pair * A condition
  4150  // defines when a rule is to be triggered. * An action specifies what occurs on
  4151  // that trigger. Currently rules only work for controls with
  4152  // SOLUTION_TYPE_SEARCH.
  4153  type GoogleCloudRetailV2Rule struct {
  4154  	// BoostAction: A boost action.
  4155  	BoostAction *GoogleCloudRetailV2RuleBoostAction `json:"boostAction,omitempty"`
  4156  	// Condition: Required. The condition that triggers the rule. If the condition
  4157  	// is empty, the rule will always apply.
  4158  	Condition *GoogleCloudRetailV2Condition `json:"condition,omitempty"`
  4159  	// DoNotAssociateAction: Prevents term from being associated with other terms.
  4160  	DoNotAssociateAction *GoogleCloudRetailV2RuleDoNotAssociateAction `json:"doNotAssociateAction,omitempty"`
  4161  	// FilterAction: Filters results.
  4162  	FilterAction *GoogleCloudRetailV2RuleFilterAction `json:"filterAction,omitempty"`
  4163  	// ForceReturnFacetAction: Force returns an attribute as a facet in the
  4164  	// request.
  4165  	ForceReturnFacetAction *GoogleCloudRetailV2RuleForceReturnFacetAction `json:"forceReturnFacetAction,omitempty"`
  4166  	// IgnoreAction: Ignores specific terms from query during search.
  4167  	IgnoreAction *GoogleCloudRetailV2RuleIgnoreAction `json:"ignoreAction,omitempty"`
  4168  	// OnewaySynonymsAction: Treats specific term as a synonym with a group of
  4169  	// terms. Group of terms will not be treated as synonyms with the specific
  4170  	// term.
  4171  	OnewaySynonymsAction *GoogleCloudRetailV2RuleOnewaySynonymsAction `json:"onewaySynonymsAction,omitempty"`
  4172  	// RedirectAction: Redirects a shopper to a specific page.
  4173  	RedirectAction *GoogleCloudRetailV2RuleRedirectAction `json:"redirectAction,omitempty"`
  4174  	// RemoveFacetAction: Remove an attribute as a facet in the request (if
  4175  	// present).
  4176  	RemoveFacetAction *GoogleCloudRetailV2RuleRemoveFacetAction `json:"removeFacetAction,omitempty"`
  4177  	// ReplacementAction: Replaces specific terms in the query.
  4178  	ReplacementAction *GoogleCloudRetailV2RuleReplacementAction `json:"replacementAction,omitempty"`
  4179  	// TwowaySynonymsAction: Treats a set of terms as synonyms of one another.
  4180  	TwowaySynonymsAction *GoogleCloudRetailV2RuleTwowaySynonymsAction `json:"twowaySynonymsAction,omitempty"`
  4181  	// ForceSendFields is a list of field names (e.g. "BoostAction") to
  4182  	// unconditionally include in API requests. By default, fields with empty or
  4183  	// default values are omitted from API requests. See
  4184  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4185  	// details.
  4186  	ForceSendFields []string `json:"-"`
  4187  	// NullFields is a list of field names (e.g. "BoostAction") to include in API
  4188  	// requests with the JSON null value. By default, fields with empty values are
  4189  	// omitted from API requests. See
  4190  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4191  	NullFields []string `json:"-"`
  4192  }
  4193  
  4194  func (s *GoogleCloudRetailV2Rule) MarshalJSON() ([]byte, error) {
  4195  	type NoMethod GoogleCloudRetailV2Rule
  4196  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4197  }
  4198  
  4199  // GoogleCloudRetailV2RuleBoostAction: A boost action to apply to results
  4200  // matching condition specified above.
  4201  type GoogleCloudRetailV2RuleBoostAction struct {
  4202  	// Boost: Strength of the condition boost, which must be in [-1, 1]. Negative
  4203  	// boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big
  4204  	// promotion. However, it does not necessarily mean that the boosted item will
  4205  	// be the top result at all times, nor that other items will be excluded.
  4206  	// Results could still be shown even when none of them matches the condition.
  4207  	// And results that are significantly more relevant to the search query can
  4208  	// still trump your heavily favored but irrelevant items. Setting to -1.0 gives
  4209  	// the item a big demotion. However, results that are deeply relevant might
  4210  	// still be shown. The item will have an upstream battle to get a fairly high
  4211  	// ranking, but it is not blocked out completely. Setting to 0.0 means no boost
  4212  	// applied. The boosting condition is ignored.
  4213  	Boost float64 `json:"boost,omitempty"`
  4214  	// ProductsFilter: The filter can have a max size of 5000 characters. An
  4215  	// expression which specifies which products to apply an action to. The syntax
  4216  	// and supported fields are the same as a filter expression. See
  4217  	// SearchRequest.filter for detail syntax and limitations. Examples: * To boost
  4218  	// products with product ID "product_1" or "product_2", and color "Red" or
  4219  	// "Blue": *(id: ANY("product_1", "product_2")) * *AND * *(colorFamilies:
  4220  	// ANY("Red", "Blue")) *
  4221  	ProductsFilter string `json:"productsFilter,omitempty"`
  4222  	// ForceSendFields is a list of field names (e.g. "Boost") to unconditionally
  4223  	// include in API requests. By default, fields with empty or default values are
  4224  	// omitted from API requests. See
  4225  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4226  	// details.
  4227  	ForceSendFields []string `json:"-"`
  4228  	// NullFields is a list of field names (e.g. "Boost") to include in API
  4229  	// requests with the JSON null value. By default, fields with empty values are
  4230  	// omitted from API requests. See
  4231  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4232  	NullFields []string `json:"-"`
  4233  }
  4234  
  4235  func (s *GoogleCloudRetailV2RuleBoostAction) MarshalJSON() ([]byte, error) {
  4236  	type NoMethod GoogleCloudRetailV2RuleBoostAction
  4237  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4238  }
  4239  
  4240  func (s *GoogleCloudRetailV2RuleBoostAction) UnmarshalJSON(data []byte) error {
  4241  	type NoMethod GoogleCloudRetailV2RuleBoostAction
  4242  	var s1 struct {
  4243  		Boost gensupport.JSONFloat64 `json:"boost"`
  4244  		*NoMethod
  4245  	}
  4246  	s1.NoMethod = (*NoMethod)(s)
  4247  	if err := json.Unmarshal(data, &s1); err != nil {
  4248  		return err
  4249  	}
  4250  	s.Boost = float64(s1.Boost)
  4251  	return nil
  4252  }
  4253  
  4254  // GoogleCloudRetailV2RuleDoNotAssociateAction: Prevents `query_term` from
  4255  // being associated with specified terms during search. Example: Don't
  4256  // associate "gShoe" and "cheap".
  4257  type GoogleCloudRetailV2RuleDoNotAssociateAction struct {
  4258  	// DoNotAssociateTerms: Cannot contain duplicates or the query term. Can
  4259  	// specify up to 100 terms.
  4260  	DoNotAssociateTerms []string `json:"doNotAssociateTerms,omitempty"`
  4261  	// QueryTerms: Terms from the search query. Will not consider
  4262  	// do_not_associate_terms for search if in search query. Can specify up to 100
  4263  	// terms.
  4264  	QueryTerms []string `json:"queryTerms,omitempty"`
  4265  	// Terms: Will be [deprecated = true] post migration;
  4266  	Terms []string `json:"terms,omitempty"`
  4267  	// ForceSendFields is a list of field names (e.g. "DoNotAssociateTerms") to
  4268  	// unconditionally include in API requests. By default, fields with empty or
  4269  	// default values are omitted from API requests. See
  4270  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4271  	// details.
  4272  	ForceSendFields []string `json:"-"`
  4273  	// NullFields is a list of field names (e.g. "DoNotAssociateTerms") to include
  4274  	// in API requests with the JSON null value. By default, fields with empty
  4275  	// values are omitted from API requests. See
  4276  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4277  	NullFields []string `json:"-"`
  4278  }
  4279  
  4280  func (s *GoogleCloudRetailV2RuleDoNotAssociateAction) MarshalJSON() ([]byte, error) {
  4281  	type NoMethod GoogleCloudRetailV2RuleDoNotAssociateAction
  4282  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4283  }
  4284  
  4285  // GoogleCloudRetailV2RuleFilterAction: * Rule Condition: - No
  4286  // Condition.query_terms provided is a global match. - 1 or more
  4287  // Condition.query_terms provided are combined with OR operator. * Action
  4288  // Input: The request query and filter that are applied to the retrieved
  4289  // products, in addition to any filters already provided with the
  4290  // SearchRequest. The AND operator is used to combine the query's existing
  4291  // filters with the filter rule(s). NOTE: May result in 0 results when filters
  4292  // conflict. * Action Result: Filters the returned objects to be ONLY those
  4293  // that passed the filter.
  4294  type GoogleCloudRetailV2RuleFilterAction struct {
  4295  	// Filter: A filter to apply on the matching condition results. Supported
  4296  	// features: * filter must be set. * Filter syntax is identical to
  4297  	// SearchRequest.filter. For more information, see Filter
  4298  	// (/retail/docs/filter-and-order#filter). * To filter products with product ID
  4299  	// "product_1" or "product_2", and color "Red" or "Blue": *(id:
  4300  	// ANY("product_1", "product_2")) * *AND * *(colorFamilies: ANY("Red", "Blue"))
  4301  	// *
  4302  	Filter string `json:"filter,omitempty"`
  4303  	// ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
  4304  	// include in API requests. By default, fields with empty or default values are
  4305  	// omitted from API requests. See
  4306  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4307  	// details.
  4308  	ForceSendFields []string `json:"-"`
  4309  	// NullFields is a list of field names (e.g. "Filter") to include in API
  4310  	// requests with the JSON null value. By default, fields with empty values are
  4311  	// omitted from API requests. See
  4312  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4313  	NullFields []string `json:"-"`
  4314  }
  4315  
  4316  func (s *GoogleCloudRetailV2RuleFilterAction) MarshalJSON() ([]byte, error) {
  4317  	type NoMethod GoogleCloudRetailV2RuleFilterAction
  4318  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4319  }
  4320  
  4321  // GoogleCloudRetailV2RuleForceReturnFacetAction: Force returns an
  4322  // attribute/facet in the request around a certain position or above. * Rule
  4323  // Condition: Must specify non-empty Condition.query_terms (for search only) or
  4324  // Condition.page_categories (for browse only), but can't specify both. *
  4325  // Action Inputs: attribute name, position * Action Result: Will force return a
  4326  // facet key around a certain position or above if the condition is satisfied.
  4327  // Example: Suppose the query is "shoes", the Condition.query_terms is "shoes",
  4328  // the ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is "size"
  4329  // and the ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two
  4330  // cases: a) The facet key "size" is not already in the top 8 slots, then the
  4331  // facet "size" will appear at a position close to 8. b) The facet key "size"
  4332  // in among the top 8 positions in the request, then it will stay at its
  4333  // current rank.
  4334  type GoogleCloudRetailV2RuleForceReturnFacetAction struct {
  4335  	// FacetPositionAdjustments: Each instance corresponds to a force return
  4336  	// attribute for the given condition. There can't be more 3 instances here.
  4337  	FacetPositionAdjustments []*GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment `json:"facetPositionAdjustments,omitempty"`
  4338  	// ForceSendFields is a list of field names (e.g. "FacetPositionAdjustments")
  4339  	// to unconditionally include in API requests. By default, fields with empty or
  4340  	// default values are omitted from API requests. See
  4341  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4342  	// details.
  4343  	ForceSendFields []string `json:"-"`
  4344  	// NullFields is a list of field names (e.g. "FacetPositionAdjustments") to
  4345  	// include in API requests with the JSON null value. By default, fields with
  4346  	// empty values are omitted from API requests. See
  4347  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4348  	NullFields []string `json:"-"`
  4349  }
  4350  
  4351  func (s *GoogleCloudRetailV2RuleForceReturnFacetAction) MarshalJSON() ([]byte, error) {
  4352  	type NoMethod GoogleCloudRetailV2RuleForceReturnFacetAction
  4353  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4354  }
  4355  
  4356  // GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment: Each
  4357  // facet position adjustment consists of a single attribute name (i.e. facet
  4358  // key) along with a specified position.
  4359  type GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment struct {
  4360  	// AttributeName: The attribute name to force return as a facet. Each attribute
  4361  	// name should be a valid attribute name, be non-empty and contain at most 80
  4362  	// characters long.
  4363  	AttributeName string `json:"attributeName,omitempty"`
  4364  	// Position: This is the position in the request as explained above. It should
  4365  	// be strictly positive be at most 100.
  4366  	Position int64 `json:"position,omitempty"`
  4367  	// ForceSendFields is a list of field names (e.g. "AttributeName") to
  4368  	// unconditionally include in API requests. By default, fields with empty or
  4369  	// default values are omitted from API requests. See
  4370  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4371  	// details.
  4372  	ForceSendFields []string `json:"-"`
  4373  	// NullFields is a list of field names (e.g. "AttributeName") to include in API
  4374  	// requests with the JSON null value. By default, fields with empty values are
  4375  	// omitted from API requests. See
  4376  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4377  	NullFields []string `json:"-"`
  4378  }
  4379  
  4380  func (s *GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment) MarshalJSON() ([]byte, error) {
  4381  	type NoMethod GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment
  4382  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4383  }
  4384  
  4385  // GoogleCloudRetailV2RuleIgnoreAction: Prevents a term in the query from being
  4386  // used in search. Example: Don't search for "shoddy".
  4387  type GoogleCloudRetailV2RuleIgnoreAction struct {
  4388  	// IgnoreTerms: Terms to ignore in the search query.
  4389  	IgnoreTerms []string `json:"ignoreTerms,omitempty"`
  4390  	// ForceSendFields is a list of field names (e.g. "IgnoreTerms") to
  4391  	// unconditionally include in API requests. By default, fields with empty or
  4392  	// default values are omitted from API requests. See
  4393  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4394  	// details.
  4395  	ForceSendFields []string `json:"-"`
  4396  	// NullFields is a list of field names (e.g. "IgnoreTerms") to include in API
  4397  	// requests with the JSON null value. By default, fields with empty values are
  4398  	// omitted from API requests. See
  4399  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4400  	NullFields []string `json:"-"`
  4401  }
  4402  
  4403  func (s *GoogleCloudRetailV2RuleIgnoreAction) MarshalJSON() ([]byte, error) {
  4404  	type NoMethod GoogleCloudRetailV2RuleIgnoreAction
  4405  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4406  }
  4407  
  4408  // GoogleCloudRetailV2RuleOnewaySynonymsAction: Maps a set of terms to a set of
  4409  // synonyms. Set of synonyms will be treated as synonyms of each query term
  4410  // only. `query_terms` will not be treated as synonyms of each other. Example:
  4411  // "sneakers" will use a synonym of "shoes". "shoes" will not use a synonym of
  4412  // "sneakers".
  4413  type GoogleCloudRetailV2RuleOnewaySynonymsAction struct {
  4414  	// OnewayTerms: Will be [deprecated = true] post migration;
  4415  	OnewayTerms []string `json:"onewayTerms,omitempty"`
  4416  	// QueryTerms: Terms from the search query. Will treat synonyms as their
  4417  	// synonyms. Not themselves synonyms of the synonyms. Can specify up to 100
  4418  	// terms.
  4419  	QueryTerms []string `json:"queryTerms,omitempty"`
  4420  	// Synonyms: Defines a set of synonyms. Cannot contain duplicates. Can specify
  4421  	// up to 100 synonyms.
  4422  	Synonyms []string `json:"synonyms,omitempty"`
  4423  	// ForceSendFields is a list of field names (e.g. "OnewayTerms") to
  4424  	// unconditionally include in API requests. By default, fields with empty or
  4425  	// default values are omitted from API requests. See
  4426  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4427  	// details.
  4428  	ForceSendFields []string `json:"-"`
  4429  	// NullFields is a list of field names (e.g. "OnewayTerms") to include in API
  4430  	// requests with the JSON null value. By default, fields with empty values are
  4431  	// omitted from API requests. See
  4432  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4433  	NullFields []string `json:"-"`
  4434  }
  4435  
  4436  func (s *GoogleCloudRetailV2RuleOnewaySynonymsAction) MarshalJSON() ([]byte, error) {
  4437  	type NoMethod GoogleCloudRetailV2RuleOnewaySynonymsAction
  4438  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4439  }
  4440  
  4441  // GoogleCloudRetailV2RuleRedirectAction: Redirects a shopper to a specific
  4442  // page. * Rule Condition: Must specify Condition.query_terms. * Action Input:
  4443  // Request Query * Action Result: Redirects shopper to provided uri.
  4444  type GoogleCloudRetailV2RuleRedirectAction struct {
  4445  	// RedirectUri: URL must have length equal or less than 2000 characters.
  4446  	RedirectUri string `json:"redirectUri,omitempty"`
  4447  	// ForceSendFields is a list of field names (e.g. "RedirectUri") to
  4448  	// unconditionally include in API requests. By default, fields with empty or
  4449  	// default values are omitted from API requests. See
  4450  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4451  	// details.
  4452  	ForceSendFields []string `json:"-"`
  4453  	// NullFields is a list of field names (e.g. "RedirectUri") to include in API
  4454  	// requests with the JSON null value. By default, fields with empty values are
  4455  	// omitted from API requests. See
  4456  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4457  	NullFields []string `json:"-"`
  4458  }
  4459  
  4460  func (s *GoogleCloudRetailV2RuleRedirectAction) MarshalJSON() ([]byte, error) {
  4461  	type NoMethod GoogleCloudRetailV2RuleRedirectAction
  4462  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4463  }
  4464  
  4465  // GoogleCloudRetailV2RuleRemoveFacetAction: Removes an attribute/facet in the
  4466  // request if is present. * Rule Condition: Must specify non-empty
  4467  // Condition.query_terms (for search only) or Condition.page_categories (for
  4468  // browse only), but can't specify both. * Action Input: attribute name *
  4469  // Action Result: Will remove the attribute (as a facet) from the request if it
  4470  // is present. Example: Suppose the query is "shoes", the Condition.query_terms
  4471  // is "shoes" and the attribute name "size", then facet key "size" will be
  4472  // removed from the request (if it is present).
  4473  type GoogleCloudRetailV2RuleRemoveFacetAction struct {
  4474  	// AttributeNames: The attribute names (i.e. facet keys) to remove from the
  4475  	// dynamic facets (if present in the request). There can't be more 3 attribute
  4476  	// names. Each attribute name should be a valid attribute name, be non-empty
  4477  	// and contain at most 80 characters.
  4478  	AttributeNames []string `json:"attributeNames,omitempty"`
  4479  	// ForceSendFields is a list of field names (e.g. "AttributeNames") to
  4480  	// unconditionally include in API requests. By default, fields with empty or
  4481  	// default values are omitted from API requests. See
  4482  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4483  	// details.
  4484  	ForceSendFields []string `json:"-"`
  4485  	// NullFields is a list of field names (e.g. "AttributeNames") to include in
  4486  	// API requests with the JSON null value. By default, fields with empty values
  4487  	// are omitted from API requests. See
  4488  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4489  	NullFields []string `json:"-"`
  4490  }
  4491  
  4492  func (s *GoogleCloudRetailV2RuleRemoveFacetAction) MarshalJSON() ([]byte, error) {
  4493  	type NoMethod GoogleCloudRetailV2RuleRemoveFacetAction
  4494  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4495  }
  4496  
  4497  // GoogleCloudRetailV2RuleReplacementAction: Replaces a term in the query.
  4498  // Multiple replacement candidates can be specified. All `query_terms` will be
  4499  // replaced with the replacement term. Example: Replace "gShoe" with "google
  4500  // shoe".
  4501  type GoogleCloudRetailV2RuleReplacementAction struct {
  4502  	// QueryTerms: Terms from the search query. Will be replaced by replacement
  4503  	// term. Can specify up to 100 terms.
  4504  	QueryTerms []string `json:"queryTerms,omitempty"`
  4505  	// ReplacementTerm: Term that will be used for replacement.
  4506  	ReplacementTerm string `json:"replacementTerm,omitempty"`
  4507  	// Term: Will be [deprecated = true] post migration;
  4508  	Term string `json:"term,omitempty"`
  4509  	// ForceSendFields is a list of field names (e.g. "QueryTerms") to
  4510  	// unconditionally include in API requests. By default, fields with empty or
  4511  	// default values are omitted from API requests. See
  4512  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4513  	// details.
  4514  	ForceSendFields []string `json:"-"`
  4515  	// NullFields is a list of field names (e.g. "QueryTerms") to include in API
  4516  	// requests with the JSON null value. By default, fields with empty values are
  4517  	// omitted from API requests. See
  4518  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4519  	NullFields []string `json:"-"`
  4520  }
  4521  
  4522  func (s *GoogleCloudRetailV2RuleReplacementAction) MarshalJSON() ([]byte, error) {
  4523  	type NoMethod GoogleCloudRetailV2RuleReplacementAction
  4524  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4525  }
  4526  
  4527  // GoogleCloudRetailV2RuleTwowaySynonymsAction: Creates a set of terms that
  4528  // will be treated as synonyms of each other. Example: synonyms of "sneakers"
  4529  // and "shoes": * "sneakers" will use a synonym of "shoes". * "shoes" will use
  4530  // a synonym of "sneakers".
  4531  type GoogleCloudRetailV2RuleTwowaySynonymsAction struct {
  4532  	// Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must
  4533  	// specify at least 2 synonyms.
  4534  	Synonyms []string `json:"synonyms,omitempty"`
  4535  	// ForceSendFields is a list of field names (e.g. "Synonyms") to
  4536  	// unconditionally include in API requests. By default, fields with empty or
  4537  	// default values are omitted from API requests. See
  4538  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4539  	// details.
  4540  	ForceSendFields []string `json:"-"`
  4541  	// NullFields is a list of field names (e.g. "Synonyms") to include in API
  4542  	// requests with the JSON null value. By default, fields with empty values are
  4543  	// omitted from API requests. See
  4544  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4545  	NullFields []string `json:"-"`
  4546  }
  4547  
  4548  func (s *GoogleCloudRetailV2RuleTwowaySynonymsAction) MarshalJSON() ([]byte, error) {
  4549  	type NoMethod GoogleCloudRetailV2RuleTwowaySynonymsAction
  4550  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4551  }
  4552  
  4553  // GoogleCloudRetailV2SearchRequest: Request message for SearchService.Search
  4554  // method.
  4555  type GoogleCloudRetailV2SearchRequest struct {
  4556  	// BoostSpec: Boost specification to boost certain products. For more
  4557  	// information, see Boost results
  4558  	// (https://cloud.google.com/retail/docs/boosting). Notice that if both
  4559  	// ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the
  4560  	// boost conditions from both places are evaluated. If a search request matches
  4561  	// multiple boost conditions, the final boost score is equal to the sum of the
  4562  	// boost scores from all matched boost conditions.
  4563  	BoostSpec *GoogleCloudRetailV2SearchRequestBoostSpec `json:"boostSpec,omitempty"`
  4564  	// Branch: The branch resource name, such as
  4565  	// `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use
  4566  	// "default_branch" as the branch ID or leave this field empty, to search
  4567  	// products under the default branch.
  4568  	Branch string `json:"branch,omitempty"`
  4569  	// CanonicalFilter: The default filter that is applied when a user performs a
  4570  	// search without checking any filters on the search page. The filter applied
  4571  	// to every search request when quality improvement such as query expansion is
  4572  	// needed. In the case a query does not have a sufficient amount of results
  4573  	// this filter will be used to determine whether or not to enable the query
  4574  	// expansion flow. The original filter will still be used for the query
  4575  	// expanded search. This field is strongly recommended to achieve high search
  4576  	// quality. For more information about filter syntax, see SearchRequest.filter.
  4577  	CanonicalFilter string `json:"canonicalFilter,omitempty"`
  4578  	// DynamicFacetSpec: Deprecated. Refer to
  4579  	// https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic
  4580  	// facets. Do not set this field. The specification for dynamically generated
  4581  	// facets. Notice that only textual facets can be dynamically generated.
  4582  	DynamicFacetSpec *GoogleCloudRetailV2SearchRequestDynamicFacetSpec `json:"dynamicFacetSpec,omitempty"`
  4583  	// Entity: The entity for customers that may run multiple different entities,
  4584  	// domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
  4585  	// `google.com`, `youtube.com`, etc. If this is set, it should be exactly
  4586  	// matched with UserEvent.entity to get search results boosted by entity.
  4587  	Entity string `json:"entity,omitempty"`
  4588  	// FacetSpecs: Facet specifications for faceted search. If empty, no facets are
  4589  	// returned. A maximum of 200 values are allowed. Otherwise, an
  4590  	// INVALID_ARGUMENT error is returned.
  4591  	FacetSpecs []*GoogleCloudRetailV2SearchRequestFacetSpec `json:"facetSpecs,omitempty"`
  4592  	// Filter: The filter syntax consists of an expression language for
  4593  	// constructing a predicate from one or more fields of the products being
  4594  	// filtered. Filter expression is case-sensitive. For more information, see
  4595  	// Filter (https://cloud.google.com/retail/docs/filter-and-order#filter). If
  4596  	// this field is unrecognizable, an INVALID_ARGUMENT is returned.
  4597  	Filter string `json:"filter,omitempty"`
  4598  	// Labels: The labels applied to a resource must meet the following
  4599  	// requirements: * Each resource can have multiple labels, up to a maximum of
  4600  	// 64. * Each label must be a key-value pair. * Keys have a minimum length of 1
  4601  	// character and a maximum length of 63 characters and cannot be empty. Values
  4602  	// can be empty and have a maximum length of 63 characters. * Keys and values
  4603  	// can contain only lowercase letters, numeric characters, underscores, and
  4604  	// dashes. All characters must use UTF-8 encoding, and international characters
  4605  	// are allowed. * The key portion of a label must be unique. However, you can
  4606  	// use the same key with multiple resources. * Keys must start with a lowercase
  4607  	// letter or international character. For more information, see Requirements
  4608  	// for labels
  4609  	// (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
  4610  	// in the Resource Manager documentation.
  4611  	Labels map[string]string `json:"labels,omitempty"`
  4612  	// Offset: A 0-indexed integer that specifies the current offset (that is,
  4613  	// starting result location, amongst the Products deemed by the API as
  4614  	// relevant) in search results. This field is only considered if page_token is
  4615  	// unset. If this field is negative, an INVALID_ARGUMENT is returned.
  4616  	Offset int64 `json:"offset,omitempty"`
  4617  	// OrderBy: The order in which products are returned. Products can be ordered
  4618  	// by a field in an Product object. Leave it unset if ordered by relevance.
  4619  	// OrderBy expression is case-sensitive. For more information, see Order
  4620  	// (https://cloud.google.com/retail/docs/filter-and-order#order). If this field
  4621  	// is unrecognizable, an INVALID_ARGUMENT is returned.
  4622  	OrderBy string `json:"orderBy,omitempty"`
  4623  	// PageCategories: The categories associated with a category page. Must be set
  4624  	// for category navigation queries to achieve good search quality. The format
  4625  	// should be the same as UserEvent.page_categories; To represent full path of
  4626  	// category, use '>' sign to separate different hierarchies. If '>' is part of
  4627  	// the category name, replace it with other character(s). Category pages
  4628  	// include special pages such as sales or promotions. For instance, a special
  4629  	// sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017
  4630  	// Black Friday Deals"].
  4631  	PageCategories []string `json:"pageCategories,omitempty"`
  4632  	// PageSize: Maximum number of Products to return. If unspecified, defaults to
  4633  	// a reasonable value. The maximum allowed value is 120. Values above 120 will
  4634  	// be coerced to 120. If this field is negative, an INVALID_ARGUMENT is
  4635  	// returned.
  4636  	PageSize int64 `json:"pageSize,omitempty"`
  4637  	// PageToken: A page token SearchResponse.next_page_token, received from a
  4638  	// previous SearchService.Search call. Provide this to retrieve the subsequent
  4639  	// page. When paginating, all other parameters provided to SearchService.Search
  4640  	// must match the call that provided the page token. Otherwise, an
  4641  	// INVALID_ARGUMENT error is returned.
  4642  	PageToken string `json:"pageToken,omitempty"`
  4643  	// PersonalizationSpec: The specification for personalization. Notice that if
  4644  	// both ServingConfig.personalization_spec and
  4645  	// SearchRequest.personalization_spec are set.
  4646  	// SearchRequest.personalization_spec will override
  4647  	// ServingConfig.personalization_spec.
  4648  	PersonalizationSpec *GoogleCloudRetailV2SearchRequestPersonalizationSpec `json:"personalizationSpec,omitempty"`
  4649  	// Query: Raw search query. If this field is empty, the request is considered a
  4650  	// category browsing request and returned results are based on filter and
  4651  	// page_categories.
  4652  	Query string `json:"query,omitempty"`
  4653  	// QueryExpansionSpec: The query expansion specification that specifies the
  4654  	// conditions under which query expansion occurs. For more information, see
  4655  	// Query expansion
  4656  	// (https://cloud.google.com/retail/docs/result-size#query_expansion).
  4657  	QueryExpansionSpec *GoogleCloudRetailV2SearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"`
  4658  	// SearchMode: The search mode of the search request. If not specified, a
  4659  	// single search request triggers both product search and faceted search.
  4660  	//
  4661  	// Possible values:
  4662  	//   "SEARCH_MODE_UNSPECIFIED" - Default value. In this case both product
  4663  	// search and faceted search will be performed. Both
  4664  	// SearchResponse.SearchResult and SearchResponse.Facet will be returned.
  4665  	//   "PRODUCT_SEARCH_ONLY" - Only product search will be performed. The faceted
  4666  	// search will be disabled. Only SearchResponse.SearchResult will be returned.
  4667  	// SearchResponse.Facet will not be returned, even if SearchRequest.facet_specs
  4668  	// or SearchRequest.dynamic_facet_spec is set.
  4669  	//   "FACETED_SEARCH_ONLY" - Only faceted search will be performed. The product
  4670  	// search will be disabled. When in this mode, one or both of
  4671  	// SearchRequest.facet_specs and SearchRequest.dynamic_facet_spec should be
  4672  	// set. Otherwise, an INVALID_ARGUMENT error is returned. Only
  4673  	// SearchResponse.Facet will be returned. SearchResponse.SearchResult will not
  4674  	// be returned.
  4675  	SearchMode string `json:"searchMode,omitempty"`
  4676  	// SpellCorrectionSpec: The spell correction specification that specifies the
  4677  	// mode under which spell correction will take effect.
  4678  	SpellCorrectionSpec *GoogleCloudRetailV2SearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"`
  4679  	// UserInfo: User information.
  4680  	UserInfo *GoogleCloudRetailV2UserInfo `json:"userInfo,omitempty"`
  4681  	// VariantRollupKeys: The keys to fetch and rollup the matching variant
  4682  	// Products attributes, FulfillmentInfo or LocalInventorys attributes. The
  4683  	// attributes from all the matching variant Products or LocalInventorys are
  4684  	// merged and de-duplicated. Notice that rollup attributes will lead to extra
  4685  	// query latency. Maximum number of keys is 30. For FulfillmentInfo, a
  4686  	// fulfillment type and a fulfillment ID must be provided in the format of
  4687  	// "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
  4688  	// "pickupInStore" is fulfillment type and "store123" is the store ID.
  4689  	// Supported keys are: * colorFamilies * price * originalPrice * discount *
  4690  	// variantId * inventory(place_id,price) * inventory(place_id,original_price) *
  4691  	// inventory(place_id,attributes.key), where key is any key in the
  4692  	// Product.local_inventories.attributes map. * attributes.key, where key is any
  4693  	// key in the Product.attributes map. * pickupInStore.id, where id is any
  4694  	// FulfillmentInfo.place_ids for FulfillmentInfo.type "pickup-in-store". *
  4695  	// shipToStore.id, where id is any FulfillmentInfo.place_ids for
  4696  	// FulfillmentInfo.type "ship-to-store". * sameDayDelivery.id, where id is any
  4697  	// FulfillmentInfo.place_ids for FulfillmentInfo.type "same-day-delivery". *
  4698  	// nextDayDelivery.id, where id is any FulfillmentInfo.place_ids for
  4699  	// FulfillmentInfo.type "next-day-delivery". * customFulfillment1.id, where id
  4700  	// is any FulfillmentInfo.place_ids for FulfillmentInfo.type "custom-type-1". *
  4701  	// customFulfillment2.id, where id is any FulfillmentInfo.place_ids for
  4702  	// FulfillmentInfo.type "custom-type-2". * customFulfillment3.id, where id is
  4703  	// any FulfillmentInfo.place_ids for FulfillmentInfo.type "custom-type-3". *
  4704  	// customFulfillment4.id, where id is any FulfillmentInfo.place_ids for
  4705  	// FulfillmentInfo.type "custom-type-4". * customFulfillment5.id, where id is
  4706  	// any FulfillmentInfo.place_ids for FulfillmentInfo.type "custom-type-5". If
  4707  	// this field is set to an invalid value other than these, an INVALID_ARGUMENT
  4708  	// error is returned.
  4709  	VariantRollupKeys []string `json:"variantRollupKeys,omitempty"`
  4710  	// VisitorId: Required. A unique identifier for tracking visitors. For example,
  4711  	// this could be implemented with an HTTP cookie, which should be able to
  4712  	// uniquely identify a visitor on a single device. This unique identifier
  4713  	// should not change if the visitor logs in or out of the website. This should
  4714  	// be the same identifier as UserEvent.visitor_id. The field must be a UTF-8
  4715  	// encoded string with a length limit of 128 characters. Otherwise, an
  4716  	// INVALID_ARGUMENT error is returned.
  4717  	VisitorId string `json:"visitorId,omitempty"`
  4718  	// ForceSendFields is a list of field names (e.g. "BoostSpec") to
  4719  	// unconditionally include in API requests. By default, fields with empty or
  4720  	// default values are omitted from API requests. See
  4721  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4722  	// details.
  4723  	ForceSendFields []string `json:"-"`
  4724  	// NullFields is a list of field names (e.g. "BoostSpec") to include in API
  4725  	// requests with the JSON null value. By default, fields with empty values are
  4726  	// omitted from API requests. See
  4727  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4728  	NullFields []string `json:"-"`
  4729  }
  4730  
  4731  func (s *GoogleCloudRetailV2SearchRequest) MarshalJSON() ([]byte, error) {
  4732  	type NoMethod GoogleCloudRetailV2SearchRequest
  4733  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4734  }
  4735  
  4736  // GoogleCloudRetailV2SearchRequestBoostSpec: Boost specification to boost
  4737  // certain items.
  4738  type GoogleCloudRetailV2SearchRequestBoostSpec struct {
  4739  	// ConditionBoostSpecs: Condition boost specifications. If a product matches
  4740  	// multiple conditions in the specifictions, boost scores from these
  4741  	// specifications are all applied and combined in a non-linear way. Maximum
  4742  	// number of specifications is 20.
  4743  	ConditionBoostSpecs []*GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"`
  4744  	// SkipBoostSpecValidation: Whether to skip boostspec validation. If this field
  4745  	// is set to true, invalid BoostSpec.condition_boost_specs will be ignored and
  4746  	// valid BoostSpec.condition_boost_specs will still be applied.
  4747  	SkipBoostSpecValidation bool `json:"skipBoostSpecValidation,omitempty"`
  4748  	// ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") to
  4749  	// unconditionally include in API requests. By default, fields with empty or
  4750  	// default values are omitted from API requests. See
  4751  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4752  	// details.
  4753  	ForceSendFields []string `json:"-"`
  4754  	// NullFields is a list of field names (e.g. "ConditionBoostSpecs") to include
  4755  	// in API requests with the JSON null value. By default, fields with empty
  4756  	// values are omitted from API requests. See
  4757  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4758  	NullFields []string `json:"-"`
  4759  }
  4760  
  4761  func (s *GoogleCloudRetailV2SearchRequestBoostSpec) MarshalJSON() ([]byte, error) {
  4762  	type NoMethod GoogleCloudRetailV2SearchRequestBoostSpec
  4763  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4764  }
  4765  
  4766  // GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec: Boost applies
  4767  // to products which match a condition.
  4768  type GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec struct {
  4769  	// Boost: Strength of the condition boost, which should be in [-1, 1]. Negative
  4770  	// boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big
  4771  	// promotion. However, it does not necessarily mean that the boosted item will
  4772  	// be the top result at all times, nor that other items will be excluded.
  4773  	// Results could still be shown even when none of them matches the condition.
  4774  	// And results that are significantly more relevant to the search query can
  4775  	// still trump your heavily favored but irrelevant items. Setting to -1.0 gives
  4776  	// the item a big demotion. However, results that are deeply relevant might
  4777  	// still be shown. The item will have an upstream battle to get a fairly high
  4778  	// ranking, but it is not blocked out completely. Setting to 0.0 means no boost
  4779  	// applied. The boosting condition is ignored.
  4780  	Boost float64 `json:"boost,omitempty"`
  4781  	// Condition: An expression which specifies a boost condition. The syntax and
  4782  	// supported fields are the same as a filter expression. See
  4783  	// SearchRequest.filter for detail syntax and limitations. Examples: * To boost
  4784  	// products with product ID "product_1" or "product_2", and color "Red" or
  4785  	// "Blue": * (id: ANY("product_1", "product_2")) AND (colorFamilies:
  4786  	// ANY("Red","Blue"))
  4787  	Condition string `json:"condition,omitempty"`
  4788  	// ForceSendFields is a list of field names (e.g. "Boost") to unconditionally
  4789  	// include in API requests. By default, fields with empty or default values are
  4790  	// omitted from API requests. See
  4791  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4792  	// details.
  4793  	ForceSendFields []string `json:"-"`
  4794  	// NullFields is a list of field names (e.g. "Boost") to include in API
  4795  	// requests with the JSON null value. By default, fields with empty values are
  4796  	// omitted from API requests. See
  4797  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4798  	NullFields []string `json:"-"`
  4799  }
  4800  
  4801  func (s *GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) {
  4802  	type NoMethod GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec
  4803  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4804  }
  4805  
  4806  func (s *GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error {
  4807  	type NoMethod GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec
  4808  	var s1 struct {
  4809  		Boost gensupport.JSONFloat64 `json:"boost"`
  4810  		*NoMethod
  4811  	}
  4812  	s1.NoMethod = (*NoMethod)(s)
  4813  	if err := json.Unmarshal(data, &s1); err != nil {
  4814  		return err
  4815  	}
  4816  	s.Boost = float64(s1.Boost)
  4817  	return nil
  4818  }
  4819  
  4820  // GoogleCloudRetailV2SearchRequestDynamicFacetSpec: The specifications of
  4821  // dynamically generated facets.
  4822  type GoogleCloudRetailV2SearchRequestDynamicFacetSpec struct {
  4823  	// Mode: Mode of the DynamicFacet feature. Defaults to Mode.DISABLED if it's
  4824  	// unset.
  4825  	//
  4826  	// Possible values:
  4827  	//   "MODE_UNSPECIFIED" - Default value.
  4828  	//   "DISABLED" - Disable Dynamic Facet.
  4829  	//   "ENABLED" - Automatic mode built by Google Retail Search.
  4830  	Mode string `json:"mode,omitempty"`
  4831  	// ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
  4832  	// include in API requests. By default, fields with empty or default values are
  4833  	// omitted from API requests. See
  4834  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4835  	// details.
  4836  	ForceSendFields []string `json:"-"`
  4837  	// NullFields is a list of field names (e.g. "Mode") to include in API requests
  4838  	// with the JSON null value. By default, fields with empty values are omitted
  4839  	// from API requests. See
  4840  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4841  	NullFields []string `json:"-"`
  4842  }
  4843  
  4844  func (s *GoogleCloudRetailV2SearchRequestDynamicFacetSpec) MarshalJSON() ([]byte, error) {
  4845  	type NoMethod GoogleCloudRetailV2SearchRequestDynamicFacetSpec
  4846  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4847  }
  4848  
  4849  // GoogleCloudRetailV2SearchRequestFacetSpec: A facet specification to perform
  4850  // faceted search.
  4851  type GoogleCloudRetailV2SearchRequestFacetSpec struct {
  4852  	// EnableDynamicPosition: Enables dynamic position for this facet. If set to
  4853  	// true, the position of this facet among all facets in the response is
  4854  	// determined by Google Retail Search. It is ordered together with dynamic
  4855  	// facets if dynamic facets is enabled. If set to false, the position of this
  4856  	// facet in the response is the same as in the request, and it is ranked before
  4857  	// the facets with dynamic position enable and all dynamic facets. For example,
  4858  	// you may always want to have rating facet returned in the response, but it's
  4859  	// not necessarily to always display the rating facet at the top. In that case,
  4860  	// you can set enable_dynamic_position to true so that the position of rating
  4861  	// facet in response is determined by Google Retail Search. Another example,
  4862  	// assuming you have the following facets in the request: * "rating",
  4863  	// enable_dynamic_position = true * "price", enable_dynamic_position = false *
  4864  	// "brands", enable_dynamic_position = false And also you have a dynamic facets
  4865  	// enable, which generates a facet "gender". Then, the final order of the
  4866  	// facets in the response can be ("price", "brands", "rating", "gender") or
  4867  	// ("price", "brands", "gender", "rating") depends on how Google Retail Search
  4868  	// orders "gender" and "rating" facets. However, notice that "price" and
  4869  	// "brands" are always ranked at first and second position because their
  4870  	// enable_dynamic_position values are false.
  4871  	EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"`
  4872  	// ExcludedFilterKeys: List of keys to exclude when faceting. By default,
  4873  	// FacetKey.key is not excluded from the filter unless it is listed in this
  4874  	// field. Listing a facet key in this field allows its values to appear as
  4875  	// facet results, even when they are filtered out of search results. Using this
  4876  	// field does not affect what search results are returned. For example, suppose
  4877  	// there are 100 products with the color facet "Red" and 200 products with the
  4878  	// color facet "Blue". A query containing the filter "colorFamilies:ANY("Red")"
  4879  	// and having "colorFamilies" as FacetKey.key would by default return only
  4880  	// "Red" products in the search results, and also return "Red" with count 100
  4881  	// as the only color facet. Although there are also blue products available,
  4882  	// "Blue" would not be shown as an available facet value. If "colorFamilies" is
  4883  	// listed in "excludedFilterKeys", then the query returns the facet values
  4884  	// "Red" with count 100 and "Blue" with count 200, because the "colorFamilies"
  4885  	// key is now excluded from the filter. Because this field doesn't affect
  4886  	// search results, the search results are still correctly filtered to return
  4887  	// only "Red" products. A maximum of 100 values are allowed. Otherwise, an
  4888  	// INVALID_ARGUMENT error is returned.
  4889  	ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"`
  4890  	// FacetKey: Required. The facet key specification.
  4891  	FacetKey *GoogleCloudRetailV2SearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"`
  4892  	// Limit: Maximum of facet values that should be returned for this facet. If
  4893  	// unspecified, defaults to 50. The maximum allowed value is 300. Values above
  4894  	// 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT
  4895  	// is returned.
  4896  	Limit int64 `json:"limit,omitempty"`
  4897  	// ForceSendFields is a list of field names (e.g. "EnableDynamicPosition") to
  4898  	// unconditionally include in API requests. By default, fields with empty or
  4899  	// default values are omitted from API requests. See
  4900  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4901  	// details.
  4902  	ForceSendFields []string `json:"-"`
  4903  	// NullFields is a list of field names (e.g. "EnableDynamicPosition") to
  4904  	// include in API requests with the JSON null value. By default, fields with
  4905  	// empty values are omitted from API requests. See
  4906  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4907  	NullFields []string `json:"-"`
  4908  }
  4909  
  4910  func (s *GoogleCloudRetailV2SearchRequestFacetSpec) MarshalJSON() ([]byte, error) {
  4911  	type NoMethod GoogleCloudRetailV2SearchRequestFacetSpec
  4912  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4913  }
  4914  
  4915  // GoogleCloudRetailV2SearchRequestFacetSpecFacetKey: Specifies how a facet is
  4916  // computed.
  4917  type GoogleCloudRetailV2SearchRequestFacetSpecFacetKey struct {
  4918  	// CaseInsensitive: True to make facet keys case insensitive when getting
  4919  	// faceting values with prefixes or contains; false otherwise.
  4920  	CaseInsensitive bool `json:"caseInsensitive,omitempty"`
  4921  	// Contains: Only get facet values that contains the given strings. For
  4922  	// example, suppose "categories" has three values "Women > Shoe", "Women >
  4923  	// Dress" and "Men > Shoe". If set "contains" to "Shoe", the "categories" facet
  4924  	// gives only "Women > Shoe" and "Men > Shoe". Only supported on textual
  4925  	// fields. Maximum is 10.
  4926  	Contains []string `json:"contains,omitempty"`
  4927  	// Intervals: Set only if values should be bucketized into intervals. Must be
  4928  	// set for facets with numerical values. Must not be set for facet with text
  4929  	// values. Maximum number of intervals is 40. For all numerical facet keys that
  4930  	// appear in the list of products from the catalog, the percentiles 0, 10, 30,
  4931  	// 50, 70, 90, and 100 are computed from their distribution weekly. If the
  4932  	// model assigns a high score to a numerical facet key and its intervals are
  4933  	// not specified in the search request, these percentiles become the bounds for
  4934  	// its intervals and are returned in the response. If the facet key intervals
  4935  	// are specified in the request, then the specified intervals are returned
  4936  	// instead.
  4937  	Intervals []*GoogleCloudRetailV2Interval `json:"intervals,omitempty"`
  4938  	// Key: Required. Supported textual and numerical facet keys in Product object,
  4939  	// over which the facet values are computed. Facet key is case-sensitive.
  4940  	// Allowed facet keys when FacetKey.query is not specified: * textual_field = *
  4941  	// "brands" * "categories" * "genders" * "ageGroups" * "availability" *
  4942  	// "colorFamilies" * "colors" * "sizes" * "materials" * "patterns" *
  4943  	// "conditions" * "attributes.key" * "pickupInStore" * "shipToStore" *
  4944  	// "sameDayDelivery" * "nextDayDelivery" * "customFulfillment1" *
  4945  	// "customFulfillment2" * "customFulfillment3" * "customFulfillment4" *
  4946  	// "customFulfillment5" * "inventory(place_id,attributes.key)" *
  4947  	// numerical_field = * "price" * "discount" * "rating" * "ratingCount" *
  4948  	// "attributes.key" * "inventory(place_id,price)" *
  4949  	// "inventory(place_id,original_price)" * "inventory(place_id,attributes.key)"
  4950  	Key string `json:"key,omitempty"`
  4951  	// OrderBy: The order in which SearchResponse.Facet.values are returned.
  4952  	// Allowed values are: * "count desc", which means order by
  4953  	// SearchResponse.Facet.values.count descending. * "value desc", which means
  4954  	// order by SearchResponse.Facet.values.value descending. Only applies to
  4955  	// textual facets. If not set, textual values are sorted in natural order
  4956  	// (https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are
  4957  	// sorted in the order given by FacetSpec.FacetKey.intervals;
  4958  	// FulfillmentInfo.place_ids are sorted in the order given by
  4959  	// FacetSpec.FacetKey.restricted_values.
  4960  	OrderBy string `json:"orderBy,omitempty"`
  4961  	// Prefixes: Only get facet values that start with the given string prefix. For
  4962  	// example, suppose "categories" has three values "Women > Shoe", "Women >
  4963  	// Dress" and "Men > Shoe". If set "prefixes" to "Women", the "categories"
  4964  	// facet gives only "Women > Shoe" and "Women > Dress". Only supported on
  4965  	// textual fields. Maximum is 10.
  4966  	Prefixes []string `json:"prefixes,omitempty"`
  4967  	// Query: The query that is used to compute facet for the given facet key. When
  4968  	// provided, it overrides the default behavior of facet computation. The query
  4969  	// syntax is the same as a filter expression. See SearchRequest.filter for
  4970  	// detail syntax and limitations. Notice that there is no limitation on
  4971  	// FacetKey.key when query is specified. In the response,
  4972  	// SearchResponse.Facet.values.value is always "1" and
  4973  	// SearchResponse.Facet.values.count is the number of results that match the
  4974  	// query. For example, you can set a customized facet for "shipToStore", where
  4975  	// FacetKey.key is "customizedShipToStore", and FacetKey.query is
  4976  	// "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")". Then the
  4977  	// facet counts the products that are both in stock and ship to store "123".
  4978  	Query string `json:"query,omitempty"`
  4979  	// RestrictedValues: Only get facet for the given restricted values. For
  4980  	// example, when using "pickupInStore" as key and set restricted values to
  4981  	// ["store123", "store456"], only facets for "store123" and "store456" are
  4982  	// returned. Only supported on predefined textual fields, custom textual
  4983  	// attributes and fulfillments. Maximum is 20. Must be set for the fulfillment
  4984  	// facet keys: * pickupInStore * shipToStore * sameDayDelivery *
  4985  	// nextDayDelivery * customFulfillment1 * customFulfillment2 *
  4986  	// customFulfillment3 * customFulfillment4 * customFulfillment5
  4987  	RestrictedValues []string `json:"restrictedValues,omitempty"`
  4988  	// ReturnMinMax: Returns the min and max value for each numerical facet
  4989  	// intervals. Ignored for textual facets.
  4990  	ReturnMinMax bool `json:"returnMinMax,omitempty"`
  4991  	// ForceSendFields is a list of field names (e.g. "CaseInsensitive") to
  4992  	// unconditionally include in API requests. By default, fields with empty or
  4993  	// default values are omitted from API requests. See
  4994  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4995  	// details.
  4996  	ForceSendFields []string `json:"-"`
  4997  	// NullFields is a list of field names (e.g. "CaseInsensitive") to include in
  4998  	// API requests with the JSON null value. By default, fields with empty values
  4999  	// are omitted from API requests. See
  5000  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5001  	NullFields []string `json:"-"`
  5002  }
  5003  
  5004  func (s *GoogleCloudRetailV2SearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) {
  5005  	type NoMethod GoogleCloudRetailV2SearchRequestFacetSpecFacetKey
  5006  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5007  }
  5008  
  5009  // GoogleCloudRetailV2SearchRequestPersonalizationSpec: The specification for
  5010  // personalization.
  5011  type GoogleCloudRetailV2SearchRequestPersonalizationSpec struct {
  5012  	// Mode: Defaults to Mode.AUTO.
  5013  	//
  5014  	// Possible values:
  5015  	//   "MODE_UNSPECIFIED" - Default value. In this case, server behavior defaults
  5016  	// to Mode.AUTO.
  5017  	//   "AUTO" - Let CRS decide whether to use personalization based on quality of
  5018  	// user event data.
  5019  	//   "DISABLED" - Disable personalization.
  5020  	Mode string `json:"mode,omitempty"`
  5021  	// ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
  5022  	// include in API requests. By default, fields with empty or default values are
  5023  	// omitted from API requests. See
  5024  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5025  	// details.
  5026  	ForceSendFields []string `json:"-"`
  5027  	// NullFields is a list of field names (e.g. "Mode") to include in API requests
  5028  	// with the JSON null value. By default, fields with empty values are omitted
  5029  	// from API requests. See
  5030  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5031  	NullFields []string `json:"-"`
  5032  }
  5033  
  5034  func (s *GoogleCloudRetailV2SearchRequestPersonalizationSpec) MarshalJSON() ([]byte, error) {
  5035  	type NoMethod GoogleCloudRetailV2SearchRequestPersonalizationSpec
  5036  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5037  }
  5038  
  5039  // GoogleCloudRetailV2SearchRequestQueryExpansionSpec: Specification to
  5040  // determine under which conditions query expansion should occur.
  5041  type GoogleCloudRetailV2SearchRequestQueryExpansionSpec struct {
  5042  	// Condition: The condition under which query expansion should occur. Default
  5043  	// to Condition.DISABLED.
  5044  	//
  5045  	// Possible values:
  5046  	//   "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In this
  5047  	// case, server behavior defaults to Condition.DISABLED.
  5048  	//   "DISABLED" - Disabled query expansion. Only the exact search query is
  5049  	// used, even if SearchResponse.total_size is zero.
  5050  	//   "AUTO" - Automatic query expansion built by Google Retail Search.
  5051  	Condition string `json:"condition,omitempty"`
  5052  	// PinUnexpandedResults: Whether to pin unexpanded results. If this field is
  5053  	// set to true, unexpanded products are always at the top of the search
  5054  	// results, followed by the expanded results.
  5055  	PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"`
  5056  	// ForceSendFields is a list of field names (e.g. "Condition") to
  5057  	// unconditionally include in API requests. By default, fields with empty or
  5058  	// default values are omitted from API requests. See
  5059  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5060  	// details.
  5061  	ForceSendFields []string `json:"-"`
  5062  	// NullFields is a list of field names (e.g. "Condition") to include in API
  5063  	// requests with the JSON null value. By default, fields with empty values are
  5064  	// omitted from API requests. See
  5065  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5066  	NullFields []string `json:"-"`
  5067  }
  5068  
  5069  func (s *GoogleCloudRetailV2SearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) {
  5070  	type NoMethod GoogleCloudRetailV2SearchRequestQueryExpansionSpec
  5071  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5072  }
  5073  
  5074  // GoogleCloudRetailV2SearchRequestSpellCorrectionSpec: The specification for
  5075  // query spell correction.
  5076  type GoogleCloudRetailV2SearchRequestSpellCorrectionSpec struct {
  5077  	// Mode: The mode under which spell correction should take effect to replace
  5078  	// the original search query. Default to Mode.AUTO.
  5079  	//
  5080  	// Possible values:
  5081  	//   "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this case,
  5082  	// server behavior defaults to Mode.AUTO.
  5083  	//   "SUGGESTION_ONLY" - Google Retail Search will try to find a spell
  5084  	// suggestion if there is any and put in the SearchResponse.corrected_query.
  5085  	// The spell suggestion will not be used as the search query.
  5086  	//   "AUTO" - Automatic spell correction built by Google Retail Search. Search
  5087  	// will be based on the corrected query if found.
  5088  	Mode string `json:"mode,omitempty"`
  5089  	// ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
  5090  	// include in API requests. By default, fields with empty or default values are
  5091  	// omitted from API requests. See
  5092  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5093  	// details.
  5094  	ForceSendFields []string `json:"-"`
  5095  	// NullFields is a list of field names (e.g. "Mode") to include in API requests
  5096  	// with the JSON null value. By default, fields with empty values are omitted
  5097  	// from API requests. See
  5098  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5099  	NullFields []string `json:"-"`
  5100  }
  5101  
  5102  func (s *GoogleCloudRetailV2SearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) {
  5103  	type NoMethod GoogleCloudRetailV2SearchRequestSpellCorrectionSpec
  5104  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5105  }
  5106  
  5107  // GoogleCloudRetailV2SearchResponse: Response message for SearchService.Search
  5108  // method.
  5109  type GoogleCloudRetailV2SearchResponse struct {
  5110  	// AppliedControls: The fully qualified resource name of applied controls
  5111  	// (https://cloud.google.com/retail/docs/serving-control-rules).
  5112  	AppliedControls []string `json:"appliedControls,omitempty"`
  5113  	// AttributionToken: A unique search token. This should be included in the
  5114  	// UserEvent logs resulting from this search, which enables accurate
  5115  	// attribution of search model performance.
  5116  	AttributionToken string `json:"attributionToken,omitempty"`
  5117  	// CorrectedQuery: Contains the spell corrected query, if found. If the spell
  5118  	// correction type is AUTOMATIC, then the search results are based on
  5119  	// corrected_query. Otherwise the original query is used for search.
  5120  	CorrectedQuery string `json:"correctedQuery,omitempty"`
  5121  	// ExperimentInfo: Metadata related to A/B testing Experiment associated with
  5122  	// this response. Only exists when an experiment is triggered.
  5123  	ExperimentInfo []*GoogleCloudRetailV2ExperimentInfo `json:"experimentInfo,omitempty"`
  5124  	// Facets: Results of facets requested by user.
  5125  	Facets []*GoogleCloudRetailV2SearchResponseFacet `json:"facets,omitempty"`
  5126  	// InvalidConditionBoostSpecs: The invalid
  5127  	// SearchRequest.BoostSpec.condition_boost_specs that are not applied during
  5128  	// serving.
  5129  	InvalidConditionBoostSpecs []*GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec `json:"invalidConditionBoostSpecs,omitempty"`
  5130  	// NextPageToken: A token that can be sent as SearchRequest.page_token to
  5131  	// retrieve the next page. If this field is omitted, there are no subsequent
  5132  	// pages.
  5133  	NextPageToken string `json:"nextPageToken,omitempty"`
  5134  	// QueryExpansionInfo: Query expansion information for the returned results.
  5135  	QueryExpansionInfo *GoogleCloudRetailV2SearchResponseQueryExpansionInfo `json:"queryExpansionInfo,omitempty"`
  5136  	// RedirectUri: The URI of a customer-defined redirect page. If redirect action
  5137  	// is triggered, no search is performed, and only redirect_uri and
  5138  	// attribution_token are set in the response.
  5139  	RedirectUri string `json:"redirectUri,omitempty"`
  5140  	// Results: A list of matched items. The order represents the ranking.
  5141  	Results []*GoogleCloudRetailV2SearchResponseSearchResult `json:"results,omitempty"`
  5142  	// TotalSize: The estimated total count of matched items irrespective of
  5143  	// pagination. The count of results returned by pagination may be less than the
  5144  	// total_size that matches.
  5145  	TotalSize int64 `json:"totalSize,omitempty"`
  5146  
  5147  	// ServerResponse contains the HTTP response code and headers from the server.
  5148  	googleapi.ServerResponse `json:"-"`
  5149  	// ForceSendFields is a list of field names (e.g. "AppliedControls") to
  5150  	// unconditionally include in API requests. By default, fields with empty or
  5151  	// default values are omitted from API requests. See
  5152  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5153  	// details.
  5154  	ForceSendFields []string `json:"-"`
  5155  	// NullFields is a list of field names (e.g. "AppliedControls") to include in
  5156  	// API requests with the JSON null value. By default, fields with empty values
  5157  	// are omitted from API requests. See
  5158  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5159  	NullFields []string `json:"-"`
  5160  }
  5161  
  5162  func (s *GoogleCloudRetailV2SearchResponse) MarshalJSON() ([]byte, error) {
  5163  	type NoMethod GoogleCloudRetailV2SearchResponse
  5164  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5165  }
  5166  
  5167  // GoogleCloudRetailV2SearchResponseFacet: A facet result.
  5168  type GoogleCloudRetailV2SearchResponseFacet struct {
  5169  	// DynamicFacet: Whether the facet is dynamically generated.
  5170  	DynamicFacet bool `json:"dynamicFacet,omitempty"`
  5171  	// Key: The key for this facet. E.g., "colorFamilies" or "price" or
  5172  	// "attributes.attr1".
  5173  	Key string `json:"key,omitempty"`
  5174  	// Values: The facet values for this field.
  5175  	Values []*GoogleCloudRetailV2SearchResponseFacetFacetValue `json:"values,omitempty"`
  5176  	// ForceSendFields is a list of field names (e.g. "DynamicFacet") to
  5177  	// unconditionally include in API requests. By default, fields with empty or
  5178  	// default values are omitted from API requests. See
  5179  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5180  	// details.
  5181  	ForceSendFields []string `json:"-"`
  5182  	// NullFields is a list of field names (e.g. "DynamicFacet") to include in API
  5183  	// requests with the JSON null value. By default, fields with empty values are
  5184  	// omitted from API requests. See
  5185  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5186  	NullFields []string `json:"-"`
  5187  }
  5188  
  5189  func (s *GoogleCloudRetailV2SearchResponseFacet) MarshalJSON() ([]byte, error) {
  5190  	type NoMethod GoogleCloudRetailV2SearchResponseFacet
  5191  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5192  }
  5193  
  5194  // GoogleCloudRetailV2SearchResponseFacetFacetValue: A facet value which
  5195  // contains value names and their count.
  5196  type GoogleCloudRetailV2SearchResponseFacetFacetValue struct {
  5197  	// Count: Number of items that have this facet value.
  5198  	Count int64 `json:"count,omitempty,string"`
  5199  	// Interval: Interval value for a facet, such as [10, 20) for facet "price".
  5200  	Interval *GoogleCloudRetailV2Interval `json:"interval,omitempty"`
  5201  	// MaxValue: The maximum value in the FacetValue.interval. Only supported on
  5202  	// numerical facets and returned if
  5203  	// SearchRequest.FacetSpec.FacetKey.return_min_max is true.
  5204  	MaxValue float64 `json:"maxValue,omitempty"`
  5205  	// MinValue: The minimum value in the FacetValue.interval. Only supported on
  5206  	// numerical facets and returned if
  5207  	// SearchRequest.FacetSpec.FacetKey.return_min_max is true.
  5208  	MinValue float64 `json:"minValue,omitempty"`
  5209  	// Value: Text value of a facet, such as "Black" for facet "colorFamilies".
  5210  	Value string `json:"value,omitempty"`
  5211  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  5212  	// include in API requests. By default, fields with empty or default values are
  5213  	// omitted from API requests. See
  5214  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5215  	// details.
  5216  	ForceSendFields []string `json:"-"`
  5217  	// NullFields is a list of field names (e.g. "Count") to include in API
  5218  	// requests with the JSON null value. By default, fields with empty values are
  5219  	// omitted from API requests. See
  5220  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5221  	NullFields []string `json:"-"`
  5222  }
  5223  
  5224  func (s *GoogleCloudRetailV2SearchResponseFacetFacetValue) MarshalJSON() ([]byte, error) {
  5225  	type NoMethod GoogleCloudRetailV2SearchResponseFacetFacetValue
  5226  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5227  }
  5228  
  5229  func (s *GoogleCloudRetailV2SearchResponseFacetFacetValue) UnmarshalJSON(data []byte) error {
  5230  	type NoMethod GoogleCloudRetailV2SearchResponseFacetFacetValue
  5231  	var s1 struct {
  5232  		MaxValue gensupport.JSONFloat64 `json:"maxValue"`
  5233  		MinValue gensupport.JSONFloat64 `json:"minValue"`
  5234  		*NoMethod
  5235  	}
  5236  	s1.NoMethod = (*NoMethod)(s)
  5237  	if err := json.Unmarshal(data, &s1); err != nil {
  5238  		return err
  5239  	}
  5240  	s.MaxValue = float64(s1.MaxValue)
  5241  	s.MinValue = float64(s1.MinValue)
  5242  	return nil
  5243  }
  5244  
  5245  // GoogleCloudRetailV2SearchResponseQueryExpansionInfo: Information describing
  5246  // query expansion including whether expansion has occurred.
  5247  type GoogleCloudRetailV2SearchResponseQueryExpansionInfo struct {
  5248  	// ExpandedQuery: Bool describing whether query expansion has occurred.
  5249  	ExpandedQuery bool `json:"expandedQuery,omitempty"`
  5250  	// PinnedResultCount: Number of pinned results. This field will only be set
  5251  	// when expansion happens and
  5252  	// SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true.
  5253  	PinnedResultCount int64 `json:"pinnedResultCount,omitempty,string"`
  5254  	// ForceSendFields is a list of field names (e.g. "ExpandedQuery") to
  5255  	// unconditionally include in API requests. By default, fields with empty or
  5256  	// default values are omitted from API requests. See
  5257  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5258  	// details.
  5259  	ForceSendFields []string `json:"-"`
  5260  	// NullFields is a list of field names (e.g. "ExpandedQuery") to include in API
  5261  	// requests with the JSON null value. By default, fields with empty values are
  5262  	// omitted from API requests. See
  5263  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5264  	NullFields []string `json:"-"`
  5265  }
  5266  
  5267  func (s *GoogleCloudRetailV2SearchResponseQueryExpansionInfo) MarshalJSON() ([]byte, error) {
  5268  	type NoMethod GoogleCloudRetailV2SearchResponseQueryExpansionInfo
  5269  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5270  }
  5271  
  5272  // GoogleCloudRetailV2SearchResponseSearchResult: Represents the search
  5273  // results.
  5274  type GoogleCloudRetailV2SearchResponseSearchResult struct {
  5275  	// Id: Product.id of the searched Product.
  5276  	Id string `json:"id,omitempty"`
  5277  	// MatchingVariantCount: The count of matched variant Products.
  5278  	MatchingVariantCount int64 `json:"matchingVariantCount,omitempty"`
  5279  	// MatchingVariantFields: If a variant Product matches the search query, this
  5280  	// map indicates which Product fields are matched. The key is the Product.name,
  5281  	// the value is a field mask of the matched Product fields. If matched
  5282  	// attributes cannot be determined, this map will be empty. For example, a key
  5283  	// "sku1" with field mask "products.color_info" indicates there is a match
  5284  	// between "sku1" ColorInfo and the query.
  5285  	MatchingVariantFields map[string]string `json:"matchingVariantFields,omitempty"`
  5286  	// PersonalLabels: Specifies previous events related to this product for this
  5287  	// user based on UserEvent with same SearchRequest.visitor_id or
  5288  	// UserInfo.user_id. This is set only when
  5289  	// SearchRequest.PersonalizationSpec.mode is
  5290  	// SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * `purchased`:
  5291  	// Indicates that this product has been purchased before.
  5292  	PersonalLabels []string `json:"personalLabels,omitempty"`
  5293  	// Product: The product data snippet in the search response. Only Product.name
  5294  	// is guaranteed to be populated. Product.variants contains the product
  5295  	// variants that match the search query. If there are multiple product variants
  5296  	// matching the query, top 5 most relevant product variants are returned and
  5297  	// ordered by relevancy. If relevancy can be deternmined, use
  5298  	// matching_variant_fields to look up matched product variants fields. If
  5299  	// relevancy cannot be determined, e.g. when searching "shoe" all products in a
  5300  	// shoe product can be a match, 5 product variants are returned but order is
  5301  	// meaningless.
  5302  	Product *GoogleCloudRetailV2Product `json:"product,omitempty"`
  5303  	// VariantRollupValues: The rollup matching variant Product attributes. The key
  5304  	// is one of the SearchRequest.variant_rollup_keys. The values are the merged
  5305  	// and de-duplicated Product attributes. Notice that the rollup values are
  5306  	// respect filter. For example, when filtering by "colorFamilies:ANY(\"red\")"
  5307  	// and rollup "colorFamilies", only "red" is returned. For textual and
  5308  	// numerical attributes, the rollup values is a list of string or double values
  5309  	// with type google.protobuf.ListValue. For example, if there are two variants
  5310  	// with colors "red" and "blue", the rollup values are { key: "colorFamilies"
  5311  	// value { list_value { values { string_value: "red" } values { string_value:
  5312  	// "blue" } } } } For FulfillmentInfo, the rollup values is a double value with
  5313  	// type google.protobuf.Value. For example, `{key: "pickupInStore.store1" value
  5314  	// { number_value: 10 }}` means a there are 10 variants in this product are
  5315  	// available in the store "store1".
  5316  	VariantRollupValues googleapi.RawMessage `json:"variantRollupValues,omitempty"`
  5317  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  5318  	// include in API requests. By default, fields with empty or default values are
  5319  	// omitted from API requests. See
  5320  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5321  	// details.
  5322  	ForceSendFields []string `json:"-"`
  5323  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  5324  	// with the JSON null value. By default, fields with empty values are omitted
  5325  	// from API requests. See
  5326  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5327  	NullFields []string `json:"-"`
  5328  }
  5329  
  5330  func (s *GoogleCloudRetailV2SearchResponseSearchResult) MarshalJSON() ([]byte, error) {
  5331  	type NoMethod GoogleCloudRetailV2SearchResponseSearchResult
  5332  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5333  }
  5334  
  5335  // GoogleCloudRetailV2ServingConfig: Configures metadata that is used to
  5336  // generate serving time results (e.g. search results or recommendation
  5337  // predictions).
  5338  type GoogleCloudRetailV2ServingConfig struct {
  5339  	// BoostControlIds: Condition boost specifications. If a product matches
  5340  	// multiple conditions in the specifications, boost scores from these
  5341  	// specifications are all applied and combined in a non-linear way. Maximum
  5342  	// number of specifications is 100. Notice that if both
  5343  	// ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the
  5344  	// boost conditions from both places are evaluated. If a search request matches
  5345  	// multiple boost conditions, the final boost score is equal to the sum of the
  5346  	// boost scores from all matched boost conditions. Can only be set if
  5347  	// solution_types is SOLUTION_TYPE_SEARCH.
  5348  	BoostControlIds []string `json:"boostControlIds,omitempty"`
  5349  	// DisplayName: Required. The human readable serving config display name. Used
  5350  	// in Retail UI. This field must be a UTF-8 encoded string with a length limit
  5351  	// of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
  5352  	DisplayName string `json:"displayName,omitempty"`
  5353  	// DiversityLevel: How much diversity to use in recommendation model results
  5354  	// e.g. `medium-diversity` or `high-diversity`. Currently supported values: *
  5355  	// `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` *
  5356  	// `auto-diversity` If not specified, we choose default based on recommendation
  5357  	// model type. Default value: `no-diversity`. Can only be set if solution_types
  5358  	// is SOLUTION_TYPE_RECOMMENDATION.
  5359  	DiversityLevel string `json:"diversityLevel,omitempty"`
  5360  	// DiversityType: What kind of diversity to use - data driven or rule based. If
  5361  	// unset, the server behavior defaults to RULE_BASED_DIVERSITY.
  5362  	//
  5363  	// Possible values:
  5364  	//   "DIVERSITY_TYPE_UNSPECIFIED" - Default value.
  5365  	//   "RULE_BASED_DIVERSITY" - Rule based diversity.
  5366  	//   "DATA_DRIVEN_DIVERSITY" - Data driven diversity.
  5367  	DiversityType string `json:"diversityType,omitempty"`
  5368  	// DoNotAssociateControlIds: Condition do not associate specifications. If
  5369  	// multiple do not associate conditions match, all matching do not associate
  5370  	// controls in the list will execute. - Order does not matter. - Maximum number
  5371  	// of specifications is 100. Can only be set if solution_types is
  5372  	// SOLUTION_TYPE_SEARCH.
  5373  	DoNotAssociateControlIds []string `json:"doNotAssociateControlIds,omitempty"`
  5374  	// DynamicFacetSpec: The specification for dynamically generated facets. Notice
  5375  	// that only textual facets can be dynamically generated. Can only be set if
  5376  	// solution_types is SOLUTION_TYPE_SEARCH.
  5377  	DynamicFacetSpec *GoogleCloudRetailV2SearchRequestDynamicFacetSpec `json:"dynamicFacetSpec,omitempty"`
  5378  	// EnableCategoryFilterLevel: Whether to add additional category filters on the
  5379  	// `similar-items` model. If not specified, we enable it by default. Allowed
  5380  	// values are: * `no-category-match`: No additional filtering of original
  5381  	// results from the model and the customer's filters. *
  5382  	// `relaxed-category-match`: Only keep results with categories that match at
  5383  	// least one item categories in the PredictRequests's context item. * If
  5384  	// customer also sends filters in the PredictRequest, then the results will
  5385  	// satisfy both conditions (user given and category match). Can only be set if
  5386  	// solution_types is SOLUTION_TYPE_RECOMMENDATION.
  5387  	EnableCategoryFilterLevel string `json:"enableCategoryFilterLevel,omitempty"`
  5388  	// FacetControlIds: Facet specifications for faceted search. If empty, no
  5389  	// facets are returned. The ids refer to the ids of Control resources with only
  5390  	// the Facet control set. These controls are assumed to be in the same Catalog
  5391  	// as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an
  5392  	// INVALID_ARGUMENT error is returned. Can only be set if solution_types is
  5393  	// SOLUTION_TYPE_SEARCH.
  5394  	FacetControlIds []string `json:"facetControlIds,omitempty"`
  5395  	// FilterControlIds: Condition filter specifications. If a product matches
  5396  	// multiple conditions in the specifications, filters from these specifications
  5397  	// are all applied and combined via the AND operator. Maximum number of
  5398  	// specifications is 100. Can only be set if solution_types is
  5399  	// SOLUTION_TYPE_SEARCH.
  5400  	FilterControlIds []string `json:"filterControlIds,omitempty"`
  5401  	// IgnoreControlIds: Condition ignore specifications. If multiple ignore
  5402  	// conditions match, all matching ignore controls in the list will execute. -
  5403  	// Order does not matter. - Maximum number of specifications is 100. Can only
  5404  	// be set if solution_types is SOLUTION_TYPE_SEARCH.
  5405  	IgnoreControlIds []string `json:"ignoreControlIds,omitempty"`
  5406  	// IgnoreRecsDenylist: When the flag is enabled, the products in the denylist
  5407  	// will not be filtered out in the recommendation filtering results.
  5408  	IgnoreRecsDenylist bool `json:"ignoreRecsDenylist,omitempty"`
  5409  	// ModelId: The id of the model in the same Catalog to use at serving time.
  5410  	// Currently only RecommendationModels are supported:
  5411  	// https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be
  5412  	// changed but only to a compatible model (e.g. others-you-may-like CTR to
  5413  	// others-you-may-like CVR). Required when solution_types is
  5414  	// SOLUTION_TYPE_RECOMMENDATION.
  5415  	ModelId string `json:"modelId,omitempty"`
  5416  	// Name: Immutable. Fully qualified name
  5417  	// `projects/*/locations/global/catalogs/*/servingConfig/*`
  5418  	Name string `json:"name,omitempty"`
  5419  	// OnewaySynonymsControlIds: Condition oneway synonyms specifications. If
  5420  	// multiple oneway synonyms conditions match, all matching oneway synonyms
  5421  	// controls in the list will execute. Order of controls in the list will not
  5422  	// matter. Maximum number of specifications is 100. Can only be set if
  5423  	// solution_types is SOLUTION_TYPE_SEARCH.
  5424  	OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"`
  5425  	// PersonalizationSpec: The specification for personalization spec. Can only be
  5426  	// set if solution_types is SOLUTION_TYPE_SEARCH. Notice that if both
  5427  	// ServingConfig.personalization_spec and SearchRequest.personalization_spec
  5428  	// are set. SearchRequest.personalization_spec will override
  5429  	// ServingConfig.personalization_spec.
  5430  	PersonalizationSpec *GoogleCloudRetailV2SearchRequestPersonalizationSpec `json:"personalizationSpec,omitempty"`
  5431  	// PriceRerankingLevel: How much price ranking we want in serving results.
  5432  	// Price reranking causes product items with a similar recommendation
  5433  	// probability to be ordered by price, with the highest-priced items first.
  5434  	// This setting could result in a decrease in click-through and conversion
  5435  	// rates. Allowed values are: * `no-price-reranking` * `low-price-reranking` *
  5436  	// `medium-price-reranking` * `high-price-reranking` If not specified, we
  5437  	// choose default based on model type. Default value: `no-price-reranking`. Can
  5438  	// only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
  5439  	PriceRerankingLevel string `json:"priceRerankingLevel,omitempty"`
  5440  	// RedirectControlIds: Condition redirect specifications. Only the first
  5441  	// triggered redirect action is applied, even if multiple apply. Maximum number
  5442  	// of specifications is 1000. Can only be set if solution_types is
  5443  	// SOLUTION_TYPE_SEARCH.
  5444  	RedirectControlIds []string `json:"redirectControlIds,omitempty"`
  5445  	// ReplacementControlIds: Condition replacement specifications. - Applied
  5446  	// according to the order in the list. - A previously replaced term can not be
  5447  	// re-replaced. - Maximum number of specifications is 100. Can only be set if
  5448  	// solution_types is SOLUTION_TYPE_SEARCH.
  5449  	ReplacementControlIds []string `json:"replacementControlIds,omitempty"`
  5450  	// SolutionTypes: Required. Immutable. Specifies the solution types that a
  5451  	// serving config can be associated with. Currently we support setting only one
  5452  	// type of solution.
  5453  	//
  5454  	// Possible values:
  5455  	//   "SOLUTION_TYPE_UNSPECIFIED" - Default value.
  5456  	//   "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI.
  5457  	//   "SOLUTION_TYPE_SEARCH" - Used for Retail Search.
  5458  	SolutionTypes []string `json:"solutionTypes,omitempty"`
  5459  	// TwowaySynonymsControlIds: Condition synonyms specifications. If multiple
  5460  	// syonyms conditions match, all matching synonyms control in the list will
  5461  	// execute. Order of controls in the list will not matter. Maximum number of
  5462  	// specifications is 100. Can only be set if solution_types is
  5463  	// SOLUTION_TYPE_SEARCH.
  5464  	TwowaySynonymsControlIds []string `json:"twowaySynonymsControlIds,omitempty"`
  5465  
  5466  	// ServerResponse contains the HTTP response code and headers from the server.
  5467  	googleapi.ServerResponse `json:"-"`
  5468  	// ForceSendFields is a list of field names (e.g. "BoostControlIds") to
  5469  	// unconditionally include in API requests. By default, fields with empty or
  5470  	// default values are omitted from API requests. See
  5471  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5472  	// details.
  5473  	ForceSendFields []string `json:"-"`
  5474  	// NullFields is a list of field names (e.g. "BoostControlIds") to include in
  5475  	// API requests with the JSON null value. By default, fields with empty values
  5476  	// are omitted from API requests. See
  5477  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5478  	NullFields []string `json:"-"`
  5479  }
  5480  
  5481  func (s *GoogleCloudRetailV2ServingConfig) MarshalJSON() ([]byte, error) {
  5482  	type NoMethod GoogleCloudRetailV2ServingConfig
  5483  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5484  }
  5485  
  5486  // GoogleCloudRetailV2SetDefaultBranchRequest: Request message to set a
  5487  // specified branch as new default_branch.
  5488  type GoogleCloudRetailV2SetDefaultBranchRequest struct {
  5489  	// BranchId: The final component of the resource name of a branch. This field
  5490  	// must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT error is
  5491  	// returned. If there are no sufficient active products in the targeted branch
  5492  	// and force is not set, a FAILED_PRECONDITION error is returned.
  5493  	BranchId string `json:"branchId,omitempty"`
  5494  	// Force: If set to true, it permits switching to a branch with branch_id even
  5495  	// if it has no sufficient active products.
  5496  	Force bool `json:"force,omitempty"`
  5497  	// Note: Some note on this request, this can be retrieved by
  5498  	// CatalogService.GetDefaultBranch before next valid default branch set occurs.
  5499  	// This field must be a UTF-8 encoded string with a length limit of 1,000
  5500  	// characters. Otherwise, an INVALID_ARGUMENT error is returned.
  5501  	Note string `json:"note,omitempty"`
  5502  	// ForceSendFields is a list of field names (e.g. "BranchId") to
  5503  	// unconditionally include in API requests. By default, fields with empty or
  5504  	// default values are omitted from API requests. See
  5505  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5506  	// details.
  5507  	ForceSendFields []string `json:"-"`
  5508  	// NullFields is a list of field names (e.g. "BranchId") to include in API
  5509  	// requests with the JSON null value. By default, fields with empty values are
  5510  	// omitted from API requests. See
  5511  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5512  	NullFields []string `json:"-"`
  5513  }
  5514  
  5515  func (s *GoogleCloudRetailV2SetDefaultBranchRequest) MarshalJSON() ([]byte, error) {
  5516  	type NoMethod GoogleCloudRetailV2SetDefaultBranchRequest
  5517  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5518  }
  5519  
  5520  // GoogleCloudRetailV2SetInventoryMetadata: Metadata related to the progress of
  5521  // the SetInventory operation. Currently empty because there is no meaningful
  5522  // metadata populated from the ProductService.SetInventory method.
  5523  type GoogleCloudRetailV2SetInventoryMetadata struct {
  5524  }
  5525  
  5526  // GoogleCloudRetailV2SetInventoryRequest: Request message for
  5527  // ProductService.SetInventory method.
  5528  type GoogleCloudRetailV2SetInventoryRequest struct {
  5529  	// AllowMissing: If set to true, and the Product with name Product.name is not
  5530  	// found, the inventory update will still be processed and retained for at most
  5531  	// 1 day until the Product is created. If set to false, a NOT_FOUND error is
  5532  	// returned if the Product is not found.
  5533  	AllowMissing bool `json:"allowMissing,omitempty"`
  5534  	// Inventory: Required. The inventory information to update. The allowable
  5535  	// fields to update are: * Product.price_info * Product.availability *
  5536  	// Product.available_quantity * Product.fulfillment_info The updated inventory
  5537  	// fields must be specified in SetInventoryRequest.set_mask. If
  5538  	// SetInventoryRequest.inventory.name is empty or invalid, an INVALID_ARGUMENT
  5539  	// error is returned. If the caller does not have permission to update the
  5540  	// Product named in Product.name, regardless of whether or not it exists, a
  5541  	// PERMISSION_DENIED error is returned. If the Product to update does not have
  5542  	// existing inventory information, the provided inventory information will be
  5543  	// inserted. If the Product to update has existing inventory information, the
  5544  	// provided inventory information will be merged while respecting the last
  5545  	// update time for each inventory field, using the provided or default value
  5546  	// for SetInventoryRequest.set_time. The caller can replace place IDs for a
  5547  	// subset of fulfillment types in the following ways: * Adds "fulfillment_info"
  5548  	// in SetInventoryRequest.set_mask * Specifies only the desired fulfillment
  5549  	// types and corresponding place IDs to update in
  5550  	// SetInventoryRequest.inventory.fulfillment_info The caller can clear all
  5551  	// place IDs from a subset of fulfillment types in the following ways: * Adds
  5552  	// "fulfillment_info" in SetInventoryRequest.set_mask * Specifies only the
  5553  	// desired fulfillment types to clear in
  5554  	// SetInventoryRequest.inventory.fulfillment_info * Checks that only the
  5555  	// desired fulfillment info types have empty
  5556  	// SetInventoryRequest.inventory.fulfillment_info.place_ids The last update
  5557  	// time is recorded for the following inventory fields: * Product.price_info *
  5558  	// Product.availability * Product.available_quantity * Product.fulfillment_info
  5559  	// If a full overwrite of inventory information while ignoring timestamps is
  5560  	// needed, ProductService.UpdateProduct should be invoked instead.
  5561  	Inventory *GoogleCloudRetailV2Product `json:"inventory,omitempty"`
  5562  	// SetMask: Indicates which inventory fields in the provided Product to update.
  5563  	// At least one field must be provided. If an unsupported or unknown field is
  5564  	// provided, an INVALID_ARGUMENT error is returned and the entire update will
  5565  	// be ignored.
  5566  	SetMask string `json:"setMask,omitempty"`
  5567  	// SetTime: The time when the request is issued, used to prevent out-of-order
  5568  	// updates on inventory fields with the last update time recorded. If not
  5569  	// provided, the internal system time will be used.
  5570  	SetTime string `json:"setTime,omitempty"`
  5571  	// ForceSendFields is a list of field names (e.g. "AllowMissing") to
  5572  	// unconditionally include in API requests. By default, fields with empty or
  5573  	// default values are omitted from API requests. See
  5574  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5575  	// details.
  5576  	ForceSendFields []string `json:"-"`
  5577  	// NullFields is a list of field names (e.g. "AllowMissing") to include in API
  5578  	// requests with the JSON null value. By default, fields with empty values are
  5579  	// omitted from API requests. See
  5580  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5581  	NullFields []string `json:"-"`
  5582  }
  5583  
  5584  func (s *GoogleCloudRetailV2SetInventoryRequest) MarshalJSON() ([]byte, error) {
  5585  	type NoMethod GoogleCloudRetailV2SetInventoryRequest
  5586  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5587  }
  5588  
  5589  // GoogleCloudRetailV2SetInventoryResponse: Response of the
  5590  // SetInventoryRequest. Currently empty because there is no meaningful response
  5591  // populated from the ProductService.SetInventory method.
  5592  type GoogleCloudRetailV2SetInventoryResponse struct {
  5593  }
  5594  
  5595  // GoogleCloudRetailV2TuneModelMetadata: Metadata associated with a tune
  5596  // operation.
  5597  type GoogleCloudRetailV2TuneModelMetadata struct {
  5598  	// Model: The resource name of the model that this tune applies to. Format:
  5599  	// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
  5600  	// ls/{model_id}`
  5601  	Model string `json:"model,omitempty"`
  5602  	// ForceSendFields is a list of field names (e.g. "Model") to unconditionally
  5603  	// include in API requests. By default, fields with empty or default values are
  5604  	// omitted from API requests. See
  5605  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5606  	// details.
  5607  	ForceSendFields []string `json:"-"`
  5608  	// NullFields is a list of field names (e.g. "Model") to include in API
  5609  	// requests with the JSON null value. By default, fields with empty values are
  5610  	// omitted from API requests. See
  5611  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5612  	NullFields []string `json:"-"`
  5613  }
  5614  
  5615  func (s *GoogleCloudRetailV2TuneModelMetadata) MarshalJSON() ([]byte, error) {
  5616  	type NoMethod GoogleCloudRetailV2TuneModelMetadata
  5617  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5618  }
  5619  
  5620  // GoogleCloudRetailV2TuneModelRequest: Request to manually start a tuning
  5621  // process now (instead of waiting for the periodically scheduled tuning to
  5622  // happen).
  5623  type GoogleCloudRetailV2TuneModelRequest struct {
  5624  }
  5625  
  5626  // GoogleCloudRetailV2TuneModelResponse: Response associated with a tune
  5627  // operation.
  5628  type GoogleCloudRetailV2TuneModelResponse struct {
  5629  }
  5630  
  5631  // GoogleCloudRetailV2UserEvent: UserEvent captures all metadata information
  5632  // Retail API needs to know about how end users interact with customers'
  5633  // website.
  5634  type GoogleCloudRetailV2UserEvent struct {
  5635  	// Attributes: Extra user event features to include in the recommendation
  5636  	// model. If you provide custom attributes for ingested user events, also
  5637  	// include them in the user events that you associate with prediction requests.
  5638  	// Custom attribute formatting must be consistent between imported events and
  5639  	// events provided with prediction requests. This lets the Retail API use those
  5640  	// custom attributes when training models and serving predictions, which helps
  5641  	// improve recommendation quality. This field needs to pass all below criteria,
  5642  	// otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8
  5643  	// encoded string with a length limit of 5,000 characters. * For text
  5644  	// attributes, at most 400 values are allowed. Empty values are not allowed.
  5645  	// Each value must be a UTF-8 encoded string with a length limit of 256
  5646  	// characters. * For number attributes, at most 400 values are allowed. For
  5647  	// product recommendations, an example of extra user information is
  5648  	// traffic_channel, which is how a user arrives at the site. Users can arrive
  5649  	// at the site by coming to the site directly, coming through Google search, or
  5650  	// in other ways.
  5651  	Attributes map[string]GoogleCloudRetailV2CustomAttribute `json:"attributes,omitempty"`
  5652  	// AttributionToken: Highly recommended for user events that are the result of
  5653  	// PredictionService.Predict. This field enables accurate attribution of
  5654  	// recommendation model performance. The value must be a valid
  5655  	// PredictResponse.attribution_token for user events that are the result of
  5656  	// PredictionService.Predict. The value must be a valid
  5657  	// SearchResponse.attribution_token for user events that are the result of
  5658  	// SearchService.Search. This token enables us to accurately attribute page
  5659  	// view or purchase back to the event and the particular predict response
  5660  	// containing this clicked/purchased product. If user clicks on product K in
  5661  	// the recommendation results, pass PredictResponse.attribution_token as a URL
  5662  	// parameter to product K's page. When recording events on product K's page,
  5663  	// log the PredictResponse.attribution_token to this field.
  5664  	AttributionToken string `json:"attributionToken,omitempty"`
  5665  	// CartId: The ID or name of the associated shopping cart. This ID is used to
  5666  	// associate multiple items added or present in the cart before purchase. This
  5667  	// can only be set for `add-to-cart`, `purchase-complete`, or
  5668  	// `shopping-cart-page-view` events.
  5669  	CartId string `json:"cartId,omitempty"`
  5670  	// CompletionDetail: The main auto-completion details related to the event.
  5671  	// This field should be set for `search` event when autocomplete function is
  5672  	// enabled and the user clicks a suggestion for search.
  5673  	CompletionDetail *GoogleCloudRetailV2CompletionDetail `json:"completionDetail,omitempty"`
  5674  	// Entity: The entity for customers that may run multiple different entities,
  5675  	// domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
  5676  	// `google.com`, `youtube.com`, etc. We recommend that you set this field to
  5677  	// get better per-entity search, completion, and prediction results.
  5678  	Entity string `json:"entity,omitempty"`
  5679  	// EventTime: Only required for UserEventService.ImportUserEvents method.
  5680  	// Timestamp of when the user event happened.
  5681  	EventTime string `json:"eventTime,omitempty"`
  5682  	// EventType: Required. User event type. Allowed values are: * `add-to-cart`:
  5683  	// Products being added to cart. * `remove-from-cart`: Products being removed
  5684  	// from cart. * `category-page-view`: Special pages such as sale or promotion
  5685  	// pages viewed. * `detail-page-view`: Products detail page viewed. *
  5686  	// `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is
  5687  	// offered to a user. * `promotion-not-offered`: Promotion is not offered to a
  5688  	// user. * `purchase-complete`: User finishing a purchase. * `search`: Product
  5689  	// search. * `shopping-cart-page-view`: User viewing a shopping cart.
  5690  	EventType string `json:"eventType,omitempty"`
  5691  	// ExperimentIds: A list of identifiers for the independent experiment groups
  5692  	// this user event belongs to. This is used to distinguish between user events
  5693  	// associated with different experiment setups (e.g. using Retail API, using
  5694  	// different recommendation models).
  5695  	ExperimentIds []string `json:"experimentIds,omitempty"`
  5696  	// Filter: The filter syntax consists of an expression language for
  5697  	// constructing a predicate from one or more fields of the products being
  5698  	// filtered. See SearchRequest.filter for definition and syntax. The value must
  5699  	// be a UTF-8 encoded string with a length limit of 1,000 characters.
  5700  	// Otherwise, an INVALID_ARGUMENT error is returned.
  5701  	Filter string `json:"filter,omitempty"`
  5702  	// Offset: An integer that specifies the current offset for pagination (the
  5703  	// 0-indexed starting location, amongst the products deemed by the API as
  5704  	// relevant). See SearchRequest.offset for definition. If this field is
  5705  	// negative, an INVALID_ARGUMENT is returned. This can only be set for `search`
  5706  	// events. Other event types should not set this field. Otherwise, an
  5707  	// INVALID_ARGUMENT error is returned.
  5708  	Offset int64 `json:"offset,omitempty"`
  5709  	// OrderBy: The order in which products are returned. See
  5710  	// SearchRequest.order_by for definition and syntax. The value must be a UTF-8
  5711  	// encoded string with a length limit of 1,000 characters. Otherwise, an
  5712  	// INVALID_ARGUMENT error is returned. This can only be set for `search`
  5713  	// events. Other event types should not set this field. Otherwise, an
  5714  	// INVALID_ARGUMENT error is returned.
  5715  	OrderBy string `json:"orderBy,omitempty"`
  5716  	// PageCategories: The categories associated with a category page. To represent
  5717  	// full path of category, use '>' sign to separate different hierarchies. If
  5718  	// '>' is part of the category name, replace it with other character(s).
  5719  	// Category pages include special pages such as sales or promotions. For
  5720  	// instance, a special sale page may have the category hierarchy:
  5721  	// "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for
  5722  	// `category-page-view` events. At least one of search_query or page_categories
  5723  	// is required for `search` events. Other event types should not set this
  5724  	// field. Otherwise, an INVALID_ARGUMENT error is returned.
  5725  	PageCategories []string `json:"pageCategories,omitempty"`
  5726  	// PageViewId: A unique ID of a web page view. This should be kept the same for
  5727  	// all user events triggered from the same pageview. For example, an item
  5728  	// detail page view could trigger multiple events as the user is browsing the
  5729  	// page. The `pageViewId` property should be kept the same for all these events
  5730  	// so that they can be grouped together properly. When using the client side
  5731  	// event reporting with JavaScript pixel and Google Tag Manager, this value is
  5732  	// filled in automatically.
  5733  	PageViewId string `json:"pageViewId,omitempty"`
  5734  	// ProductDetails: The main product details related to the event. This field is
  5735  	// optional except for the following event types: * `add-to-cart` *
  5736  	// `detail-page-view` * `purchase-complete` In a `search` event, this field
  5737  	// represents the products returned to the end user on the current page (the
  5738  	// end user may have not finished browsing the whole page yet). When a new page
  5739  	// is returned to the end user, after pagination/filtering/ordering even for
  5740  	// the same query, a new `search` event with different product_details is
  5741  	// desired. The end user may have not finished browsing the whole page yet.
  5742  	ProductDetails []*GoogleCloudRetailV2ProductDetail `json:"productDetails,omitempty"`
  5743  	// PurchaseTransaction: A transaction represents the entire purchase
  5744  	// transaction. Required for `purchase-complete` events. Other event types
  5745  	// should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
  5746  	PurchaseTransaction *GoogleCloudRetailV2PurchaseTransaction `json:"purchaseTransaction,omitempty"`
  5747  	// ReferrerUri: The referrer URL of the current page. When using the client
  5748  	// side event reporting with JavaScript pixel and Google Tag Manager, this
  5749  	// value is filled in automatically.
  5750  	ReferrerUri string `json:"referrerUri,omitempty"`
  5751  	// SearchQuery: The user's search query. See SearchRequest.query for
  5752  	// definition. The value must be a UTF-8 encoded string with a length limit of
  5753  	// 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least
  5754  	// one of search_query or page_categories is required for `search` events.
  5755  	// Other event types should not set this field. Otherwise, an INVALID_ARGUMENT
  5756  	// error is returned.
  5757  	SearchQuery string `json:"searchQuery,omitempty"`
  5758  	// SessionId: A unique identifier for tracking a visitor session with a length
  5759  	// limit of 128 bytes. A session is an aggregation of an end user behavior in a
  5760  	// time span. A general guideline to populate the sesion_id: 1. If user has no
  5761  	// activity for 30 min, a new session_id should be assigned. 2. The session_id
  5762  	// should be unique across users, suggest use uuid or add visitor_id as prefix.
  5763  	SessionId string `json:"sessionId,omitempty"`
  5764  	// Uri: Complete URL (window.location.href) of the user's current page. When
  5765  	// using the client side event reporting with JavaScript pixel and Google Tag
  5766  	// Manager, this value is filled in automatically. Maximum length 5,000
  5767  	// characters.
  5768  	Uri string `json:"uri,omitempty"`
  5769  	// UserInfo: User information.
  5770  	UserInfo *GoogleCloudRetailV2UserInfo `json:"userInfo,omitempty"`
  5771  	// VisitorId: Required. A unique identifier for tracking visitors. For example,
  5772  	// this could be implemented with an HTTP cookie, which should be able to
  5773  	// uniquely identify a visitor on a single device. This unique identifier
  5774  	// should not change if the visitor log in/out of the website. Don't set the
  5775  	// field to the same fixed ID for different users. This mixes the event history
  5776  	// of those users together, which results in degraded model quality. The field
  5777  	// must be a UTF-8 encoded string with a length limit of 128 characters.
  5778  	// Otherwise, an INVALID_ARGUMENT error is returned. The field should not
  5779  	// contain PII or user-data. We recommend to use Google Analytics Client ID
  5780  	// (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
  5781  	// for this field.
  5782  	VisitorId string `json:"visitorId,omitempty"`
  5783  
  5784  	// ServerResponse contains the HTTP response code and headers from the server.
  5785  	googleapi.ServerResponse `json:"-"`
  5786  	// ForceSendFields is a list of field names (e.g. "Attributes") to
  5787  	// unconditionally include in API requests. By default, fields with empty or
  5788  	// default values are omitted from API requests. See
  5789  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5790  	// details.
  5791  	ForceSendFields []string `json:"-"`
  5792  	// NullFields is a list of field names (e.g. "Attributes") to include in API
  5793  	// requests with the JSON null value. By default, fields with empty values are
  5794  	// omitted from API requests. See
  5795  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5796  	NullFields []string `json:"-"`
  5797  }
  5798  
  5799  func (s *GoogleCloudRetailV2UserEvent) MarshalJSON() ([]byte, error) {
  5800  	type NoMethod GoogleCloudRetailV2UserEvent
  5801  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5802  }
  5803  
  5804  // GoogleCloudRetailV2UserEventImportSummary: A summary of import result. The
  5805  // UserEventImportSummary summarizes the import status for user events.
  5806  type GoogleCloudRetailV2UserEventImportSummary struct {
  5807  	// JoinedEventsCount: Count of user events imported with complete existing
  5808  	// catalog information.
  5809  	JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"`
  5810  	// UnjoinedEventsCount: Count of user events imported, but with catalog
  5811  	// information not found in the imported catalog.
  5812  	UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"`
  5813  	// ForceSendFields is a list of field names (e.g. "JoinedEventsCount") to
  5814  	// unconditionally include in API requests. By default, fields with empty or
  5815  	// default values are omitted from API requests. See
  5816  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5817  	// details.
  5818  	ForceSendFields []string `json:"-"`
  5819  	// NullFields is a list of field names (e.g. "JoinedEventsCount") to include in
  5820  	// API requests with the JSON null value. By default, fields with empty values
  5821  	// are omitted from API requests. See
  5822  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5823  	NullFields []string `json:"-"`
  5824  }
  5825  
  5826  func (s *GoogleCloudRetailV2UserEventImportSummary) MarshalJSON() ([]byte, error) {
  5827  	type NoMethod GoogleCloudRetailV2UserEventImportSummary
  5828  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5829  }
  5830  
  5831  // GoogleCloudRetailV2UserEventInlineSource: The inline source for the input
  5832  // config for ImportUserEvents method.
  5833  type GoogleCloudRetailV2UserEventInlineSource struct {
  5834  	// UserEvents: Required. A list of user events to import. Recommended max of
  5835  	// 10k items.
  5836  	UserEvents []*GoogleCloudRetailV2UserEvent `json:"userEvents,omitempty"`
  5837  	// ForceSendFields is a list of field names (e.g. "UserEvents") to
  5838  	// unconditionally include in API requests. By default, fields with empty or
  5839  	// default values are omitted from API requests. See
  5840  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5841  	// details.
  5842  	ForceSendFields []string `json:"-"`
  5843  	// NullFields is a list of field names (e.g. "UserEvents") to include in API
  5844  	// requests with the JSON null value. By default, fields with empty values are
  5845  	// omitted from API requests. See
  5846  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5847  	NullFields []string `json:"-"`
  5848  }
  5849  
  5850  func (s *GoogleCloudRetailV2UserEventInlineSource) MarshalJSON() ([]byte, error) {
  5851  	type NoMethod GoogleCloudRetailV2UserEventInlineSource
  5852  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5853  }
  5854  
  5855  // GoogleCloudRetailV2UserEventInputConfig: The input config source for user
  5856  // events.
  5857  type GoogleCloudRetailV2UserEventInputConfig struct {
  5858  	// BigQuerySource: Required. BigQuery input source.
  5859  	BigQuerySource *GoogleCloudRetailV2BigQuerySource `json:"bigQuerySource,omitempty"`
  5860  	// GcsSource: Required. Google Cloud Storage location for the input content.
  5861  	GcsSource *GoogleCloudRetailV2GcsSource `json:"gcsSource,omitempty"`
  5862  	// UserEventInlineSource: Required. The Inline source for the input content for
  5863  	// UserEvents.
  5864  	UserEventInlineSource *GoogleCloudRetailV2UserEventInlineSource `json:"userEventInlineSource,omitempty"`
  5865  	// ForceSendFields is a list of field names (e.g. "BigQuerySource") to
  5866  	// unconditionally include in API requests. By default, fields with empty or
  5867  	// default values are omitted from API requests. See
  5868  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5869  	// details.
  5870  	ForceSendFields []string `json:"-"`
  5871  	// NullFields is a list of field names (e.g. "BigQuerySource") to include in
  5872  	// API requests with the JSON null value. By default, fields with empty values
  5873  	// are omitted from API requests. See
  5874  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5875  	NullFields []string `json:"-"`
  5876  }
  5877  
  5878  func (s *GoogleCloudRetailV2UserEventInputConfig) MarshalJSON() ([]byte, error) {
  5879  	type NoMethod GoogleCloudRetailV2UserEventInputConfig
  5880  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5881  }
  5882  
  5883  // GoogleCloudRetailV2UserInfo: Information of an end user.
  5884  type GoogleCloudRetailV2UserInfo struct {
  5885  	// DirectUserRequest: True if the request is made directly from the end user,
  5886  	// in which case the ip_address and user_agent can be populated from the HTTP
  5887  	// request. This flag should be set only if the API request is made directly
  5888  	// from the end user such as a mobile app (and not if a gateway or a server is
  5889  	// processing and pushing the user events). This should not be set when using
  5890  	// the JavaScript tag in UserEventService.CollectUserEvent.
  5891  	DirectUserRequest bool `json:"directUserRequest,omitempty"`
  5892  	// IpAddress: The end user's IP address. This field is used to extract location
  5893  	// information for personalization. This field must be either an IPv4 address
  5894  	// (e.g. "104.133.9.80") or an IPv6 address (e.g.
  5895  	// "2001:0db8:85a3:0000:0000:8a2e:0370:7334"). Otherwise, an INVALID_ARGUMENT
  5896  	// error is returned. This should not be set when: * setting
  5897  	// SearchRequest.user_info. * using the JavaScript tag in
  5898  	// UserEventService.CollectUserEvent or if direct_user_request is set.
  5899  	IpAddress string `json:"ipAddress,omitempty"`
  5900  	// UserAgent: User agent as included in the HTTP header. Required for getting
  5901  	// SearchResponse.sponsored_results. The field must be a UTF-8 encoded string
  5902  	// with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT
  5903  	// error is returned. This should not be set when using the client side event
  5904  	// reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or
  5905  	// if direct_user_request is set.
  5906  	UserAgent string `json:"userAgent,omitempty"`
  5907  	// UserId: Highly recommended for logged-in users. Unique identifier for
  5908  	// logged-in user, such as a user name. Don't set for anonymous users. Always
  5909  	// use a hashed value for this ID. Don't set the field to the same fixed ID for
  5910  	// different users. This mixes the event history of those users together, which
  5911  	// results in degraded model quality. The field must be a UTF-8 encoded string
  5912  	// with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error
  5913  	// is returned.
  5914  	UserId string `json:"userId,omitempty"`
  5915  	// ForceSendFields is a list of field names (e.g. "DirectUserRequest") to
  5916  	// unconditionally include in API requests. By default, fields with empty or
  5917  	// default values are omitted from API requests. See
  5918  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5919  	// details.
  5920  	ForceSendFields []string `json:"-"`
  5921  	// NullFields is a list of field names (e.g. "DirectUserRequest") to include in
  5922  	// API requests with the JSON null value. By default, fields with empty values
  5923  	// are omitted from API requests. See
  5924  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5925  	NullFields []string `json:"-"`
  5926  }
  5927  
  5928  func (s *GoogleCloudRetailV2UserInfo) MarshalJSON() ([]byte, error) {
  5929  	type NoMethod GoogleCloudRetailV2UserInfo
  5930  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5931  }
  5932  
  5933  // GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata: Metadata related to
  5934  // the progress of the AddFulfillmentPlaces operation. Currently empty because
  5935  // there is no meaningful metadata populated from the
  5936  // ProductService.AddFulfillmentPlaces method.
  5937  type GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata struct {
  5938  }
  5939  
  5940  // GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse: Response of the
  5941  // AddFulfillmentPlacesRequest. Currently empty because there is no meaningful
  5942  // response populated from the ProductService.AddFulfillmentPlaces method.
  5943  type GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse struct {
  5944  }
  5945  
  5946  // GoogleCloudRetailV2alphaAddLocalInventoriesMetadata: Metadata related to the
  5947  // progress of the AddLocalInventories operation. Currently empty because there
  5948  // is no meaningful metadata populated from the
  5949  // ProductService.AddLocalInventories method.
  5950  type GoogleCloudRetailV2alphaAddLocalInventoriesMetadata struct {
  5951  }
  5952  
  5953  // GoogleCloudRetailV2alphaAddLocalInventoriesResponse: Response of the
  5954  // ProductService.AddLocalInventories API. Currently empty because there is no
  5955  // meaningful response populated from the ProductService.AddLocalInventories
  5956  // method.
  5957  type GoogleCloudRetailV2alphaAddLocalInventoriesResponse struct {
  5958  }
  5959  
  5960  // GoogleCloudRetailV2alphaBigQueryOutputResult: A BigQuery output result.
  5961  type GoogleCloudRetailV2alphaBigQueryOutputResult struct {
  5962  	// DatasetId: The ID of a BigQuery Dataset.
  5963  	DatasetId string `json:"datasetId,omitempty"`
  5964  	// TableId: The ID of a BigQuery Table.
  5965  	TableId string `json:"tableId,omitempty"`
  5966  	// ForceSendFields is a list of field names (e.g. "DatasetId") to
  5967  	// unconditionally include in API requests. By default, fields with empty or
  5968  	// default values are omitted from API requests. See
  5969  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5970  	// details.
  5971  	ForceSendFields []string `json:"-"`
  5972  	// NullFields is a list of field names (e.g. "DatasetId") to include in API
  5973  	// requests with the JSON null value. By default, fields with empty values are
  5974  	// omitted from API requests. See
  5975  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5976  	NullFields []string `json:"-"`
  5977  }
  5978  
  5979  func (s *GoogleCloudRetailV2alphaBigQueryOutputResult) MarshalJSON() ([]byte, error) {
  5980  	type NoMethod GoogleCloudRetailV2alphaBigQueryOutputResult
  5981  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5982  }
  5983  
  5984  // GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata: Common
  5985  // metadata related to the progress of the operations.
  5986  type GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata struct {
  5987  	// CreateTime: Operation create time.
  5988  	CreateTime string `json:"createTime,omitempty"`
  5989  	// UpdateTime: Operation last update time. If the operation is done, this is
  5990  	// also the finish time.
  5991  	UpdateTime string `json:"updateTime,omitempty"`
  5992  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  5993  	// unconditionally include in API requests. By default, fields with empty or
  5994  	// default values are omitted from API requests. See
  5995  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5996  	// details.
  5997  	ForceSendFields []string `json:"-"`
  5998  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  5999  	// requests with the JSON null value. By default, fields with empty values are
  6000  	// omitted from API requests. See
  6001  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6002  	NullFields []string `json:"-"`
  6003  }
  6004  
  6005  func (s *GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata) MarshalJSON() ([]byte, error) {
  6006  	type NoMethod GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata
  6007  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6008  }
  6009  
  6010  // GoogleCloudRetailV2alphaCreateModelMetadata: Metadata associated with a
  6011  // create operation.
  6012  type GoogleCloudRetailV2alphaCreateModelMetadata struct {
  6013  	// Model: The resource name of the model that this create applies to. Format:
  6014  	// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
  6015  	// ls/{model_id}`
  6016  	Model string `json:"model,omitempty"`
  6017  	// ForceSendFields is a list of field names (e.g. "Model") to unconditionally
  6018  	// include in API requests. By default, fields with empty or default values are
  6019  	// omitted from API requests. See
  6020  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6021  	// details.
  6022  	ForceSendFields []string `json:"-"`
  6023  	// NullFields is a list of field names (e.g. "Model") to include in API
  6024  	// requests with the JSON null value. By default, fields with empty values are
  6025  	// omitted from API requests. See
  6026  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6027  	NullFields []string `json:"-"`
  6028  }
  6029  
  6030  func (s *GoogleCloudRetailV2alphaCreateModelMetadata) MarshalJSON() ([]byte, error) {
  6031  	type NoMethod GoogleCloudRetailV2alphaCreateModelMetadata
  6032  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6033  }
  6034  
  6035  // GoogleCloudRetailV2alphaEnrollSolutionMetadata: Metadata related to the
  6036  // EnrollSolution method. This will be returned by the
  6037  // google.longrunning.Operation.metadata field.
  6038  type GoogleCloudRetailV2alphaEnrollSolutionMetadata struct {
  6039  }
  6040  
  6041  // GoogleCloudRetailV2alphaEnrollSolutionResponse: Response for EnrollSolution
  6042  // method.
  6043  type GoogleCloudRetailV2alphaEnrollSolutionResponse struct {
  6044  	// EnrolledSolution: Retail API solution that the project has enrolled.
  6045  	//
  6046  	// Possible values:
  6047  	//   "SOLUTION_TYPE_UNSPECIFIED" - Default value.
  6048  	//   "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI.
  6049  	//   "SOLUTION_TYPE_SEARCH" - Used for Retail Search.
  6050  	EnrolledSolution string `json:"enrolledSolution,omitempty"`
  6051  	// ForceSendFields is a list of field names (e.g. "EnrolledSolution") to
  6052  	// unconditionally include in API requests. By default, fields with empty or
  6053  	// default values are omitted from API requests. See
  6054  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6055  	// details.
  6056  	ForceSendFields []string `json:"-"`
  6057  	// NullFields is a list of field names (e.g. "EnrolledSolution") to include in
  6058  	// API requests with the JSON null value. By default, fields with empty values
  6059  	// are omitted from API requests. See
  6060  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6061  	NullFields []string `json:"-"`
  6062  }
  6063  
  6064  func (s *GoogleCloudRetailV2alphaEnrollSolutionResponse) MarshalJSON() ([]byte, error) {
  6065  	type NoMethod GoogleCloudRetailV2alphaEnrollSolutionResponse
  6066  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6067  }
  6068  
  6069  // GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse: Response of the
  6070  // ExportAnalyticsMetricsRequest. If the long running operation was successful,
  6071  // then this message is returned by the google.longrunning.Operations.response
  6072  // field if the operation was successful.
  6073  type GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse struct {
  6074  	// ErrorSamples: A sample of errors encountered while processing the request.
  6075  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  6076  	// ErrorsConfig: This field is never set.
  6077  	ErrorsConfig *GoogleCloudRetailV2alphaExportErrorsConfig `json:"errorsConfig,omitempty"`
  6078  	// OutputResult: Output result indicating where the data were exported to.
  6079  	OutputResult *GoogleCloudRetailV2alphaOutputResult `json:"outputResult,omitempty"`
  6080  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  6081  	// unconditionally include in API requests. By default, fields with empty or
  6082  	// default values are omitted from API requests. See
  6083  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6084  	// details.
  6085  	ForceSendFields []string `json:"-"`
  6086  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  6087  	// requests with the JSON null value. By default, fields with empty values are
  6088  	// omitted from API requests. See
  6089  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6090  	NullFields []string `json:"-"`
  6091  }
  6092  
  6093  func (s *GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse) MarshalJSON() ([]byte, error) {
  6094  	type NoMethod GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse
  6095  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6096  }
  6097  
  6098  // GoogleCloudRetailV2alphaExportErrorsConfig: Configuration of destination for
  6099  // Export related errors.
  6100  type GoogleCloudRetailV2alphaExportErrorsConfig struct {
  6101  	// GcsPrefix: Google Cloud Storage path for import errors. This must be an
  6102  	// empty, existing Cloud Storage bucket. Export errors will be written to a
  6103  	// file in this bucket, one per line, as a JSON-encoded `google.rpc.Status`
  6104  	// message.
  6105  	GcsPrefix string `json:"gcsPrefix,omitempty"`
  6106  	// ForceSendFields is a list of field names (e.g. "GcsPrefix") to
  6107  	// unconditionally include in API requests. By default, fields with empty or
  6108  	// default values are omitted from API requests. See
  6109  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6110  	// details.
  6111  	ForceSendFields []string `json:"-"`
  6112  	// NullFields is a list of field names (e.g. "GcsPrefix") to include in API
  6113  	// requests with the JSON null value. By default, fields with empty values are
  6114  	// omitted from API requests. See
  6115  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6116  	NullFields []string `json:"-"`
  6117  }
  6118  
  6119  func (s *GoogleCloudRetailV2alphaExportErrorsConfig) MarshalJSON() ([]byte, error) {
  6120  	type NoMethod GoogleCloudRetailV2alphaExportErrorsConfig
  6121  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6122  }
  6123  
  6124  // GoogleCloudRetailV2alphaExportMetadata: Metadata related to the progress of
  6125  // the Export operation. This is returned by the
  6126  // google.longrunning.Operation.metadata field.
  6127  type GoogleCloudRetailV2alphaExportMetadata struct {
  6128  	// CreateTime: Operation create time.
  6129  	CreateTime string `json:"createTime,omitempty"`
  6130  	// UpdateTime: Operation last update time. If the operation is done, this is
  6131  	// also the finish time.
  6132  	UpdateTime string `json:"updateTime,omitempty"`
  6133  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  6134  	// unconditionally include in API requests. By default, fields with empty or
  6135  	// default values are omitted from API requests. See
  6136  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6137  	// details.
  6138  	ForceSendFields []string `json:"-"`
  6139  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  6140  	// requests with the JSON null value. By default, fields with empty values are
  6141  	// omitted from API requests. See
  6142  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6143  	NullFields []string `json:"-"`
  6144  }
  6145  
  6146  func (s *GoogleCloudRetailV2alphaExportMetadata) MarshalJSON() ([]byte, error) {
  6147  	type NoMethod GoogleCloudRetailV2alphaExportMetadata
  6148  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6149  }
  6150  
  6151  // GoogleCloudRetailV2alphaExportProductsResponse: Response of the
  6152  // ExportProductsRequest. If the long running operation is done, then this
  6153  // message is returned by the google.longrunning.Operations.response field if
  6154  // the operation was successful.
  6155  type GoogleCloudRetailV2alphaExportProductsResponse struct {
  6156  	// ErrorSamples: A sample of errors encountered while processing the request.
  6157  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  6158  	// ErrorsConfig: This field is never set.
  6159  	ErrorsConfig *GoogleCloudRetailV2alphaExportErrorsConfig `json:"errorsConfig,omitempty"`
  6160  	// OutputResult: Output result indicating where the data were exported to.
  6161  	OutputResult *GoogleCloudRetailV2alphaOutputResult `json:"outputResult,omitempty"`
  6162  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  6163  	// unconditionally include in API requests. By default, fields with empty or
  6164  	// default values are omitted from API requests. See
  6165  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6166  	// details.
  6167  	ForceSendFields []string `json:"-"`
  6168  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  6169  	// requests with the JSON null value. By default, fields with empty values are
  6170  	// omitted from API requests. See
  6171  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6172  	NullFields []string `json:"-"`
  6173  }
  6174  
  6175  func (s *GoogleCloudRetailV2alphaExportProductsResponse) MarshalJSON() ([]byte, error) {
  6176  	type NoMethod GoogleCloudRetailV2alphaExportProductsResponse
  6177  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6178  }
  6179  
  6180  // GoogleCloudRetailV2alphaExportUserEventsResponse: Response of the
  6181  // ExportUserEventsRequest. If the long running operation was successful, then
  6182  // this message is returned by the google.longrunning.Operations.response field
  6183  // if the operation was successful.
  6184  type GoogleCloudRetailV2alphaExportUserEventsResponse struct {
  6185  	// ErrorSamples: A sample of errors encountered while processing the request.
  6186  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  6187  	// ErrorsConfig: This field is never set.
  6188  	ErrorsConfig *GoogleCloudRetailV2alphaExportErrorsConfig `json:"errorsConfig,omitempty"`
  6189  	// OutputResult: Output result indicating where the data were exported to.
  6190  	OutputResult *GoogleCloudRetailV2alphaOutputResult `json:"outputResult,omitempty"`
  6191  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  6192  	// unconditionally include in API requests. By default, fields with empty or
  6193  	// default values are omitted from API requests. See
  6194  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6195  	// details.
  6196  	ForceSendFields []string `json:"-"`
  6197  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  6198  	// requests with the JSON null value. By default, fields with empty values are
  6199  	// omitted from API requests. See
  6200  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6201  	NullFields []string `json:"-"`
  6202  }
  6203  
  6204  func (s *GoogleCloudRetailV2alphaExportUserEventsResponse) MarshalJSON() ([]byte, error) {
  6205  	type NoMethod GoogleCloudRetailV2alphaExportUserEventsResponse
  6206  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6207  }
  6208  
  6209  // GoogleCloudRetailV2alphaGcsOutputResult: A Gcs output result.
  6210  type GoogleCloudRetailV2alphaGcsOutputResult struct {
  6211  	// OutputUri: The uri of Gcs output
  6212  	OutputUri string `json:"outputUri,omitempty"`
  6213  	// ForceSendFields is a list of field names (e.g. "OutputUri") to
  6214  	// unconditionally include in API requests. By default, fields with empty or
  6215  	// default values are omitted from API requests. See
  6216  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6217  	// details.
  6218  	ForceSendFields []string `json:"-"`
  6219  	// NullFields is a list of field names (e.g. "OutputUri") to include in API
  6220  	// requests with the JSON null value. By default, fields with empty values are
  6221  	// omitted from API requests. See
  6222  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6223  	NullFields []string `json:"-"`
  6224  }
  6225  
  6226  func (s *GoogleCloudRetailV2alphaGcsOutputResult) MarshalJSON() ([]byte, error) {
  6227  	type NoMethod GoogleCloudRetailV2alphaGcsOutputResult
  6228  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6229  }
  6230  
  6231  // GoogleCloudRetailV2alphaImportCompletionDataResponse: Response of the
  6232  // ImportCompletionDataRequest. If the long running operation is done, this
  6233  // message is returned by the google.longrunning.Operations.response field if
  6234  // the operation is successful.
  6235  type GoogleCloudRetailV2alphaImportCompletionDataResponse struct {
  6236  	// ErrorSamples: A sample of errors encountered while processing the request.
  6237  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  6238  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  6239  	// unconditionally include in API requests. By default, fields with empty or
  6240  	// default values are omitted from API requests. See
  6241  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6242  	// details.
  6243  	ForceSendFields []string `json:"-"`
  6244  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  6245  	// requests with the JSON null value. By default, fields with empty values are
  6246  	// omitted from API requests. See
  6247  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6248  	NullFields []string `json:"-"`
  6249  }
  6250  
  6251  func (s *GoogleCloudRetailV2alphaImportCompletionDataResponse) MarshalJSON() ([]byte, error) {
  6252  	type NoMethod GoogleCloudRetailV2alphaImportCompletionDataResponse
  6253  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6254  }
  6255  
  6256  // GoogleCloudRetailV2alphaImportErrorsConfig: Configuration of destination for
  6257  // Import related errors.
  6258  type GoogleCloudRetailV2alphaImportErrorsConfig struct {
  6259  	// GcsPrefix: Google Cloud Storage prefix for import errors. This must be an
  6260  	// empty, existing Cloud Storage directory. Import errors are written to
  6261  	// sharded files in this directory, one per line, as a JSON-encoded
  6262  	// `google.rpc.Status` message.
  6263  	GcsPrefix string `json:"gcsPrefix,omitempty"`
  6264  	// ForceSendFields is a list of field names (e.g. "GcsPrefix") to
  6265  	// unconditionally include in API requests. By default, fields with empty or
  6266  	// default values are omitted from API requests. See
  6267  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6268  	// details.
  6269  	ForceSendFields []string `json:"-"`
  6270  	// NullFields is a list of field names (e.g. "GcsPrefix") to include in API
  6271  	// requests with the JSON null value. By default, fields with empty values are
  6272  	// omitted from API requests. See
  6273  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6274  	NullFields []string `json:"-"`
  6275  }
  6276  
  6277  func (s *GoogleCloudRetailV2alphaImportErrorsConfig) MarshalJSON() ([]byte, error) {
  6278  	type NoMethod GoogleCloudRetailV2alphaImportErrorsConfig
  6279  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6280  }
  6281  
  6282  // GoogleCloudRetailV2alphaImportMetadata: Metadata related to the progress of
  6283  // the Import operation. This is returned by the
  6284  // google.longrunning.Operation.metadata field.
  6285  type GoogleCloudRetailV2alphaImportMetadata struct {
  6286  	// CreateTime: Operation create time.
  6287  	CreateTime string `json:"createTime,omitempty"`
  6288  	// FailureCount: Count of entries that encountered errors while processing.
  6289  	FailureCount int64 `json:"failureCount,omitempty,string"`
  6290  	// NotificationPubsubTopic: Pub/Sub topic for receiving notification. If this
  6291  	// field is set, when the import is finished, a notification is sent to
  6292  	// specified Pub/Sub topic. The message data is JSON string of a Operation.
  6293  	// Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
  6294  	NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"`
  6295  	// RequestId: Deprecated. This field is never set.
  6296  	RequestId string `json:"requestId,omitempty"`
  6297  	// SuccessCount: Count of entries that were processed successfully.
  6298  	SuccessCount int64 `json:"successCount,omitempty,string"`
  6299  	// TransformedUserEventsMetadata: Metadata related to transform user events.
  6300  	TransformedUserEventsMetadata *GoogleCloudRetailV2alphaTransformedUserEventsMetadata `json:"transformedUserEventsMetadata,omitempty"`
  6301  	// UpdateTime: Operation last update time. If the operation is done, this is
  6302  	// also the finish time.
  6303  	UpdateTime string `json:"updateTime,omitempty"`
  6304  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  6305  	// unconditionally include in API requests. By default, fields with empty or
  6306  	// default values are omitted from API requests. See
  6307  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6308  	// details.
  6309  	ForceSendFields []string `json:"-"`
  6310  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  6311  	// requests with the JSON null value. By default, fields with empty values are
  6312  	// omitted from API requests. See
  6313  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6314  	NullFields []string `json:"-"`
  6315  }
  6316  
  6317  func (s *GoogleCloudRetailV2alphaImportMetadata) MarshalJSON() ([]byte, error) {
  6318  	type NoMethod GoogleCloudRetailV2alphaImportMetadata
  6319  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6320  }
  6321  
  6322  // GoogleCloudRetailV2alphaImportProductsResponse: Response of the
  6323  // ImportProductsRequest. If the long running operation is done, then this
  6324  // message is returned by the google.longrunning.Operations.response field if
  6325  // the operation was successful.
  6326  type GoogleCloudRetailV2alphaImportProductsResponse struct {
  6327  	// ErrorSamples: A sample of errors encountered while processing the request.
  6328  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  6329  	// ErrorsConfig: Echoes the destination for the complete errors in the request
  6330  	// if set.
  6331  	ErrorsConfig *GoogleCloudRetailV2alphaImportErrorsConfig `json:"errorsConfig,omitempty"`
  6332  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  6333  	// unconditionally include in API requests. By default, fields with empty or
  6334  	// default values are omitted from API requests. See
  6335  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6336  	// details.
  6337  	ForceSendFields []string `json:"-"`
  6338  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  6339  	// requests with the JSON null value. By default, fields with empty values are
  6340  	// omitted from API requests. See
  6341  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6342  	NullFields []string `json:"-"`
  6343  }
  6344  
  6345  func (s *GoogleCloudRetailV2alphaImportProductsResponse) MarshalJSON() ([]byte, error) {
  6346  	type NoMethod GoogleCloudRetailV2alphaImportProductsResponse
  6347  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6348  }
  6349  
  6350  // GoogleCloudRetailV2alphaImportUserEventsResponse: Response of the
  6351  // ImportUserEventsRequest. If the long running operation was successful, then
  6352  // this message is returned by the google.longrunning.Operations.response field
  6353  // if the operation was successful.
  6354  type GoogleCloudRetailV2alphaImportUserEventsResponse struct {
  6355  	// ErrorSamples: A sample of errors encountered while processing the request.
  6356  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  6357  	// ErrorsConfig: Echoes the destination for the complete errors if this field
  6358  	// was set in the request.
  6359  	ErrorsConfig *GoogleCloudRetailV2alphaImportErrorsConfig `json:"errorsConfig,omitempty"`
  6360  	// ImportSummary: Aggregated statistics of user event import status.
  6361  	ImportSummary *GoogleCloudRetailV2alphaUserEventImportSummary `json:"importSummary,omitempty"`
  6362  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  6363  	// unconditionally include in API requests. By default, fields with empty or
  6364  	// default values are omitted from API requests. See
  6365  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6366  	// details.
  6367  	ForceSendFields []string `json:"-"`
  6368  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  6369  	// requests with the JSON null value. By default, fields with empty values are
  6370  	// omitted from API requests. See
  6371  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6372  	NullFields []string `json:"-"`
  6373  }
  6374  
  6375  func (s *GoogleCloudRetailV2alphaImportUserEventsResponse) MarshalJSON() ([]byte, error) {
  6376  	type NoMethod GoogleCloudRetailV2alphaImportUserEventsResponse
  6377  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6378  }
  6379  
  6380  // GoogleCloudRetailV2alphaMerchantCenterAccountLink: Represents a link between
  6381  // a Merchant Center account and a branch. After a link is established,
  6382  // products from the linked Merchant Center account are streamed to the linked
  6383  // branch.
  6384  type GoogleCloudRetailV2alphaMerchantCenterAccountLink struct {
  6385  	// BranchId: Required. The branch ID (e.g. 0/1/2) within the catalog that
  6386  	// products from merchant_center_account_id are streamed to. When updating this
  6387  	// field, an empty value will use the currently configured default branch.
  6388  	// However, changing the default branch later on won't change the linked branch
  6389  	// here. A single branch ID can only have one linked Merchant Center account
  6390  	// ID.
  6391  	BranchId string `json:"branchId,omitempty"`
  6392  	// FeedFilters: Criteria for the Merchant Center feeds to be ingested via the
  6393  	// link. All offers will be ingested if the list is empty. Otherwise the offers
  6394  	// will be ingested from selected feeds.
  6395  	FeedFilters []*GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter `json:"feedFilters,omitempty"`
  6396  	// FeedLabel: The FeedLabel used to perform filtering. Note: this replaces
  6397  	// region_id
  6398  	// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label).
  6399  	// Example value: `US`. Example value: `FeedLabel1`.
  6400  	FeedLabel string `json:"feedLabel,omitempty"`
  6401  	// Id: Output only. Immutable. MerchantCenterAccountLink identifier, which is
  6402  	// the final component of name. This field is auto generated and follows the
  6403  	// convention: `BranchId_MerchantCenterAccountId`.
  6404  	// `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi
  6405  	// nks/id_1`.
  6406  	Id string `json:"id,omitempty"`
  6407  	// LanguageCode: Language of the title/description and other string attributes.
  6408  	// Use language tags defined by BCP 47
  6409  	// (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies
  6410  	// the language of offers in Merchant Center that will be accepted. If empty,
  6411  	// no language filtering will be performed. Example value: `en`.
  6412  	LanguageCode string `json:"languageCode,omitempty"`
  6413  	// MerchantCenterAccountId: Required. The linked Merchant center account id
  6414  	// (https://developers.google.com/shopping-content/guides/accountstatuses). The
  6415  	// account must be a standalone account or a sub-account of a MCA.
  6416  	MerchantCenterAccountId int64 `json:"merchantCenterAccountId,omitempty,string"`
  6417  	// Name: Output only. Immutable. Full resource name of the Merchant Center
  6418  	// Account Link, such as
  6419  	// `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi
  6420  	// nks/merchant_center_account_link`.
  6421  	Name string `json:"name,omitempty"`
  6422  	// ProjectId: Output only. Google Cloud project ID.
  6423  	ProjectId string `json:"projectId,omitempty"`
  6424  	// Source: Optional. An optional arbitrary string that could be used as a tag
  6425  	// for tracking link source.
  6426  	Source string `json:"source,omitempty"`
  6427  	// State: Output only. Represents the state of the link.
  6428  	//
  6429  	// Possible values:
  6430  	//   "STATE_UNSPECIFIED" - Default value.
  6431  	//   "PENDING" - Link is created and LRO is not complete.
  6432  	//   "ACTIVE" - Link is active.
  6433  	//   "FAILED" - Link creation failed.
  6434  	State string `json:"state,omitempty"`
  6435  	// ForceSendFields is a list of field names (e.g. "BranchId") to
  6436  	// unconditionally include in API requests. By default, fields with empty or
  6437  	// default values are omitted from API requests. See
  6438  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6439  	// details.
  6440  	ForceSendFields []string `json:"-"`
  6441  	// NullFields is a list of field names (e.g. "BranchId") to include in API
  6442  	// requests with the JSON null value. By default, fields with empty values are
  6443  	// omitted from API requests. See
  6444  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6445  	NullFields []string `json:"-"`
  6446  }
  6447  
  6448  func (s *GoogleCloudRetailV2alphaMerchantCenterAccountLink) MarshalJSON() ([]byte, error) {
  6449  	type NoMethod GoogleCloudRetailV2alphaMerchantCenterAccountLink
  6450  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6451  }
  6452  
  6453  // GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter:
  6454  // Merchant Center Feed filter criterion.
  6455  type GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter struct {
  6456  	// PrimaryFeedId: Merchant Center primary feed ID.
  6457  	PrimaryFeedId int64 `json:"primaryFeedId,omitempty,string"`
  6458  	// PrimaryFeedName: Merchant Center primary feed name. The name is used for the
  6459  	// display purposes only.
  6460  	PrimaryFeedName string `json:"primaryFeedName,omitempty"`
  6461  	// ForceSendFields is a list of field names (e.g. "PrimaryFeedId") to
  6462  	// unconditionally include in API requests. By default, fields with empty or
  6463  	// default values are omitted from API requests. See
  6464  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6465  	// details.
  6466  	ForceSendFields []string `json:"-"`
  6467  	// NullFields is a list of field names (e.g. "PrimaryFeedId") to include in API
  6468  	// requests with the JSON null value. By default, fields with empty values are
  6469  	// omitted from API requests. See
  6470  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6471  	NullFields []string `json:"-"`
  6472  }
  6473  
  6474  func (s *GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter) MarshalJSON() ([]byte, error) {
  6475  	type NoMethod GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter
  6476  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6477  }
  6478  
  6479  // GoogleCloudRetailV2alphaModel: Metadata that describes the training and
  6480  // serving parameters of a Model. A Model can be associated with a
  6481  // ServingConfig and then queried through the Predict API.
  6482  type GoogleCloudRetailV2alphaModel struct {
  6483  	// CreateTime: Output only. Timestamp the Recommendation Model was created at.
  6484  	CreateTime string `json:"createTime,omitempty"`
  6485  	// DataState: Output only. The state of data requirements for this model:
  6486  	// `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the
  6487  	// data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR`
  6488  	// state even if serving state is `ACTIVE`: models were trained successfully
  6489  	// before, but cannot be refreshed because model no longer has sufficient data
  6490  	// for training.
  6491  	//
  6492  	// Possible values:
  6493  	//   "DATA_STATE_UNSPECIFIED" - Unspecified default value, should never be
  6494  	// explicitly set.
  6495  	//   "DATA_OK" - The model has sufficient training data.
  6496  	//   "DATA_ERROR" - The model does not have sufficient training data. Error
  6497  	// messages can be queried via Stackdriver.
  6498  	DataState string `json:"dataState,omitempty"`
  6499  	// DisplayName: Required. The display name of the model. Should be human
  6500  	// readable, used to display Recommendation Models in the Retail Cloud Console
  6501  	// Dashboard. UTF-8 encoded string with limit of 1024 characters.
  6502  	DisplayName string `json:"displayName,omitempty"`
  6503  	// FilteringOption: Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`,
  6504  	// recommendation filtering by attributes is enabled for the model.
  6505  	//
  6506  	// Possible values:
  6507  	//   "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED" - Value used when unset. In
  6508  	// this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.
  6509  	//   "RECOMMENDATIONS_FILTERING_DISABLED" - Recommendation filtering is
  6510  	// disabled.
  6511  	//   "RECOMMENDATIONS_FILTERING_ENABLED" - Recommendation filtering is enabled.
  6512  	FilteringOption string `json:"filteringOption,omitempty"`
  6513  	// LastTuneTime: Output only. The timestamp when the latest successful tune
  6514  	// finished.
  6515  	LastTuneTime string `json:"lastTuneTime,omitempty"`
  6516  	// ModelFeaturesConfig: Optional. Additional model features config.
  6517  	ModelFeaturesConfig *GoogleCloudRetailV2alphaModelModelFeaturesConfig `json:"modelFeaturesConfig,omitempty"`
  6518  	// Name: Required. The fully qualified resource name of the model. Format:
  6519  	// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
  6520  	// ls/{model_id}` catalog_id has char limit of 50. recommendation_model_id has
  6521  	// char limit of 40.
  6522  	Name string `json:"name,omitempty"`
  6523  	// OptimizationObjective: Optional. The optimization objective e.g. `cvr`.
  6524  	// Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not
  6525  	// specified, we choose default based on model type. Default depends on type of
  6526  	// recommendation: `recommended-for-you` => `ctr` `others-you-may-like` =>
  6527  	// `ctr` `frequently-bought-together` => `revenue_per_order` This field
  6528  	// together with optimization_objective describe model metadata to use to
  6529  	// control model training and serving. See
  6530  	// https://cloud.google.com/retail/docs/models for more details on what the
  6531  	// model metadata control and which combination of parameters are valid. For
  6532  	// invalid combinations of parameters (e.g. type = `frequently-bought-together`
  6533  	// and optimization_objective = `ctr`), you receive an error 400 if you try to
  6534  	// create/update a recommendation with this set of knobs.
  6535  	OptimizationObjective string `json:"optimizationObjective,omitempty"`
  6536  	// PageOptimizationConfig: Optional. The page optimization config.
  6537  	PageOptimizationConfig *GoogleCloudRetailV2alphaModelPageOptimizationConfig `json:"pageOptimizationConfig,omitempty"`
  6538  	// PeriodicTuningState: Optional. The state of periodic tuning. The period we
  6539  	// use is 3 months - to do a one-off tune earlier use the `TuneModel` method.
  6540  	// Default value is `PERIODIC_TUNING_ENABLED`.
  6541  	//
  6542  	// Possible values:
  6543  	//   "PERIODIC_TUNING_STATE_UNSPECIFIED" - Unspecified default value, should
  6544  	// never be explicitly set.
  6545  	//   "PERIODIC_TUNING_DISABLED" - The model has periodic tuning disabled.
  6546  	// Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or
  6547  	// by calling the `TuneModel` method.
  6548  	//   "ALL_TUNING_DISABLED" - The model cannot be tuned with periodic tuning OR
  6549  	// the `TuneModel` method. Hide the options in customer UI and reject any
  6550  	// requests through the backend self serve API.
  6551  	//   "PERIODIC_TUNING_ENABLED" - The model has periodic tuning enabled. Tuning
  6552  	// can be disabled by calling the `DisableModelPeriodicTuning` method.
  6553  	PeriodicTuningState string `json:"periodicTuningState,omitempty"`
  6554  	// ServingConfigLists: Output only. The list of valid serving configs
  6555  	// associated with the PageOptimizationConfig.
  6556  	ServingConfigLists []*GoogleCloudRetailV2alphaModelServingConfigList `json:"servingConfigLists,omitempty"`
  6557  	// ServingState: Output only. The serving state of the model: `ACTIVE`,
  6558  	// `NOT_ACTIVE`.
  6559  	//
  6560  	// Possible values:
  6561  	//   "SERVING_STATE_UNSPECIFIED" - Unspecified serving state.
  6562  	//   "INACTIVE" - The model is not serving.
  6563  	//   "ACTIVE" - The model is serving and can be queried.
  6564  	//   "TUNED" - The model is trained on tuned hyperparameters and can be
  6565  	// queried.
  6566  	ServingState string `json:"servingState,omitempty"`
  6567  	// TrainingState: Optional. The training state that the model is in (e.g.
  6568  	// `TRAINING` or `PAUSED`). Since part of the cost of running the service is
  6569  	// frequency of training - this can be used to determine when to train model in
  6570  	// order to control cost. If not specified: the default value for `CreateModel`
  6571  	// method is `TRAINING`. The default value for `UpdateModel` method is to keep
  6572  	// the state the same as before.
  6573  	//
  6574  	// Possible values:
  6575  	//   "TRAINING_STATE_UNSPECIFIED" - Unspecified training state.
  6576  	//   "PAUSED" - The model training is paused.
  6577  	//   "TRAINING" - The model is training.
  6578  	TrainingState string `json:"trainingState,omitempty"`
  6579  	// TuningOperation: Output only. The tune operation associated with the model.
  6580  	// Can be used to determine if there is an ongoing tune for this
  6581  	// recommendation. Empty field implies no tune is goig on.
  6582  	TuningOperation string `json:"tuningOperation,omitempty"`
  6583  	// Type: Required. The type of model e.g. `home-page`. Currently supported
  6584  	// values: `recommended-for-you`, `others-you-may-like`,
  6585  	// `frequently-bought-together`, `page-optimization`, `similar-items`,
  6586  	// `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This
  6587  	// field together with optimization_objective describe model metadata to use to
  6588  	// control model training and serving. See
  6589  	// https://cloud.google.com/retail/docs/models for more details on what the
  6590  	// model metadata control and which combination of parameters are valid. For
  6591  	// invalid combinations of parameters (e.g. type = `frequently-bought-together`
  6592  	// and optimization_objective = `ctr`), you receive an error 400 if you try to
  6593  	// create/update a recommendation with this set of knobs.
  6594  	Type string `json:"type,omitempty"`
  6595  	// UpdateTime: Output only. Timestamp the Recommendation Model was last
  6596  	// updated. E.g. if a Recommendation Model was paused - this would be the time
  6597  	// the pause was initiated.
  6598  	UpdateTime string `json:"updateTime,omitempty"`
  6599  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  6600  	// unconditionally include in API requests. By default, fields with empty or
  6601  	// default values are omitted from API requests. See
  6602  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6603  	// details.
  6604  	ForceSendFields []string `json:"-"`
  6605  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  6606  	// requests with the JSON null value. By default, fields with empty values are
  6607  	// omitted from API requests. See
  6608  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6609  	NullFields []string `json:"-"`
  6610  }
  6611  
  6612  func (s *GoogleCloudRetailV2alphaModel) MarshalJSON() ([]byte, error) {
  6613  	type NoMethod GoogleCloudRetailV2alphaModel
  6614  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6615  }
  6616  
  6617  // GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig:
  6618  // Additional configs for the frequently-bought-together model type.
  6619  type GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig struct {
  6620  	// ContextProductsType: Optional. Specifies the context of the model when it is
  6621  	// used in predict requests. Can only be set for the
  6622  	// `frequently-bought-together` type. If it isn't specified, it defaults to
  6623  	// MULTIPLE_CONTEXT_PRODUCTS.
  6624  	//
  6625  	// Possible values:
  6626  	//   "CONTEXT_PRODUCTS_TYPE_UNSPECIFIED" - Unspecified default value, should
  6627  	// never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.
  6628  	//   "SINGLE_CONTEXT_PRODUCT" - Use only a single product as context for the
  6629  	// recommendation. Typically used on pages like add-to-cart or product details.
  6630  	//   "MULTIPLE_CONTEXT_PRODUCTS" - Use one or multiple products as context for
  6631  	// the recommendation. Typically used on shopping cart pages.
  6632  	ContextProductsType string `json:"contextProductsType,omitempty"`
  6633  	// ForceSendFields is a list of field names (e.g. "ContextProductsType") to
  6634  	// unconditionally include in API requests. By default, fields with empty or
  6635  	// default values are omitted from API requests. See
  6636  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6637  	// details.
  6638  	ForceSendFields []string `json:"-"`
  6639  	// NullFields is a list of field names (e.g. "ContextProductsType") to include
  6640  	// in API requests with the JSON null value. By default, fields with empty
  6641  	// values are omitted from API requests. See
  6642  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6643  	NullFields []string `json:"-"`
  6644  }
  6645  
  6646  func (s *GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig) MarshalJSON() ([]byte, error) {
  6647  	type NoMethod GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig
  6648  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6649  }
  6650  
  6651  // GoogleCloudRetailV2alphaModelModelFeaturesConfig: Additional model features
  6652  // config.
  6653  type GoogleCloudRetailV2alphaModelModelFeaturesConfig struct {
  6654  	// FrequentlyBoughtTogetherConfig: Additional configs for
  6655  	// frequently-bought-together models.
  6656  	FrequentlyBoughtTogetherConfig *GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig `json:"frequentlyBoughtTogetherConfig,omitempty"`
  6657  	// ForceSendFields is a list of field names (e.g.
  6658  	// "FrequentlyBoughtTogetherConfig") to unconditionally include in API
  6659  	// requests. By default, fields with empty or default values are omitted from
  6660  	// API requests. See
  6661  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6662  	// details.
  6663  	ForceSendFields []string `json:"-"`
  6664  	// NullFields is a list of field names (e.g. "FrequentlyBoughtTogetherConfig")
  6665  	// to include in API requests with the JSON null value. By default, fields with
  6666  	// empty values are omitted from API requests. See
  6667  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6668  	NullFields []string `json:"-"`
  6669  }
  6670  
  6671  func (s *GoogleCloudRetailV2alphaModelModelFeaturesConfig) MarshalJSON() ([]byte, error) {
  6672  	type NoMethod GoogleCloudRetailV2alphaModelModelFeaturesConfig
  6673  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6674  }
  6675  
  6676  // GoogleCloudRetailV2alphaModelPageOptimizationConfig: The
  6677  // PageOptimizationConfig for model training. This determines how many panels
  6678  // to optimize for, and which serving configs to consider for each panel. The
  6679  // purpose of this model is to optimize which ServingConfig to show on which
  6680  // panels in way that optimizes the visitors shopping journey.
  6681  type GoogleCloudRetailV2alphaModelPageOptimizationConfig struct {
  6682  	// PageOptimizationEventType: Required. The type of UserEvent this page
  6683  	// optimization is shown for. Each page has an associated event type - this
  6684  	// will be the corresponding event type for the page that the page optimization
  6685  	// model is used on. Supported types: * `add-to-cart`: Products being added to
  6686  	// cart. * `detail-page-view`: Products detail page viewed. * `home-page-view`:
  6687  	// Homepage viewed * `category-page-view`: Homepage viewed *
  6688  	// `shopping-cart-page-view`: User viewing a shopping cart. `home-page-view`
  6689  	// only allows models with type `recommended-for-you`. All other
  6690  	// page_optimization_event_type allow all Model.types.
  6691  	PageOptimizationEventType string `json:"pageOptimizationEventType,omitempty"`
  6692  	// Panels: Required. A list of panel configurations. Limit = 5.
  6693  	Panels []*GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel `json:"panels,omitempty"`
  6694  	// Restriction: Optional. How to restrict results across panels e.g. can the
  6695  	// same ServingConfig be shown on multiple panels at once. If unspecified,
  6696  	// default to `UNIQUE_MODEL_RESTRICTION`.
  6697  	//
  6698  	// Possible values:
  6699  	//   "RESTRICTION_UNSPECIFIED" - Unspecified value for restriction.
  6700  	//   "NO_RESTRICTION" - Allow any ServingConfig to be show on any number of
  6701  	// panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr,
  6702  	// home_page_ctr_no_diversity `Panel2 candidates`: home_page_ctr_no_diversity,
  6703  	// home_page_ctr_diversity, pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION
  6704  	// `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr,
  6705  	// home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr,
  6706  	// home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity) * (pdp_cvr,
  6707  	// pdp_cvr_no_diversity) * (home_page_ctr_no_diversity,
  6708  	// home_page_ctr_no_diversity) * (home_page_ctr_no_diversity,
  6709  	// home_page_ctr_diversity) * (home_page_ctr_no_diversity,
  6710  	// pdp_cvr_no_diversity) * `Invalid combinations`: []
  6711  	//   "UNIQUE_SERVING_CONFIG_RESTRICTION" - Do not allow the same
  6712  	// ServingConfig.name to be shown on multiple panels. Example: `Panel1
  6713  	// candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2
  6714  	// candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low,
  6715  	// pdp_cvr_no_diversity * `Restriction` = `UNIQUE_SERVING_CONFIG_RESTRICTION`
  6716  	// `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr,
  6717  	// home_page_ctr_diversity_low) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr,
  6718  	// pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr,
  6719  	// home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) *
  6720  	// (home_page_ctr_no_diversity, home_page_ctr_diversity_low) *
  6721  	// (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`:
  6722  	// * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) *
  6723  	//   "UNIQUE_MODEL_RESTRICTION" - Do not allow multiple ServingConfigs with
  6724  	// same Model.name to be show on on different panels. Example: `Panel1
  6725  	// candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2
  6726  	// candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low,
  6727  	// pdp_cvr_no_diversity * `Restriction` = `UNIQUE_MODEL_RESTRICTION` `Valid
  6728  	// combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr,
  6729  	// home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr,
  6730  	// pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr,
  6731  	// home_page_ctr_diversity_low) * (home_page_ctr_no_diversity,
  6732  	// pdp_cvr_no_diversity) * `Invalid combinations`: * *
  6733  	// (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr,
  6734  	// pdp_cvr_no_diversity) *
  6735  	//   "UNIQUE_MODEL_TYPE_RESTRICTION" - Do not allow multiple ServingConfigs
  6736  	// with same Model.type to be shown on different panels. Example: `Panel1
  6737  	// candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2
  6738  	// candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low,
  6739  	// pdp_cvr_no_diversity * `Restriction` = `UNIQUE_MODEL_RESTRICTION` `Valid
  6740  	// combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr,
  6741  	// home_page_ctr_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr,
  6742  	// home_page_ctr_diversity_low) * (home_page_ctr_no_diversity,
  6743  	// pdp_cvr_no_diversity) * `Invalid combinations`: * * (pdp_ctr,
  6744  	// pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr,
  6745  	// pdp_cvr_no_diversity) * (home_page_ctr_no_diversity,
  6746  	// home_page_ctr_no_diversity) * (home_page_ctr_no_diversity,
  6747  	// home_page_ctr_diversity) *
  6748  	Restriction string `json:"restriction,omitempty"`
  6749  	// ForceSendFields is a list of field names (e.g. "PageOptimizationEventType")
  6750  	// to unconditionally include in API requests. By default, fields with empty or
  6751  	// default values are omitted from API requests. See
  6752  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6753  	// details.
  6754  	ForceSendFields []string `json:"-"`
  6755  	// NullFields is a list of field names (e.g. "PageOptimizationEventType") to
  6756  	// include in API requests with the JSON null value. By default, fields with
  6757  	// empty values are omitted from API requests. See
  6758  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6759  	NullFields []string `json:"-"`
  6760  }
  6761  
  6762  func (s *GoogleCloudRetailV2alphaModelPageOptimizationConfig) MarshalJSON() ([]byte, error) {
  6763  	type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfig
  6764  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6765  }
  6766  
  6767  // GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate: A candidate to
  6768  // consider for a given panel. Currently only ServingConfig are valid
  6769  // candidates.
  6770  type GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate struct {
  6771  	// ServingConfigId: This has to be a valid ServingConfig identifier. For
  6772  	// example, for a ServingConfig with full name:
  6773  	// `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candi
  6774  	// date_config`, this would be `my_candidate_config`.
  6775  	ServingConfigId string `json:"servingConfigId,omitempty"`
  6776  	// ForceSendFields is a list of field names (e.g. "ServingConfigId") to
  6777  	// unconditionally include in API requests. By default, fields with empty or
  6778  	// default values are omitted from API requests. See
  6779  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6780  	// details.
  6781  	ForceSendFields []string `json:"-"`
  6782  	// NullFields is a list of field names (e.g. "ServingConfigId") to include in
  6783  	// API requests with the JSON null value. By default, fields with empty values
  6784  	// are omitted from API requests. See
  6785  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6786  	NullFields []string `json:"-"`
  6787  }
  6788  
  6789  func (s *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate) MarshalJSON() ([]byte, error) {
  6790  	type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate
  6791  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6792  }
  6793  
  6794  // GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel: An individual
  6795  // panel with a list of ServingConfigs to consider for it.
  6796  type GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel struct {
  6797  	// Candidates: Required. The candidates to consider on the panel.
  6798  	Candidates []*GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"candidates,omitempty"`
  6799  	// DefaultCandidate: Required. The default candidate. If the model fails at
  6800  	// serving time, we fall back to the default.
  6801  	DefaultCandidate *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"defaultCandidate,omitempty"`
  6802  	// DisplayName: Optional. The name to display for the panel.
  6803  	DisplayName string `json:"displayName,omitempty"`
  6804  	// ForceSendFields is a list of field names (e.g. "Candidates") to
  6805  	// unconditionally include in API requests. By default, fields with empty or
  6806  	// default values are omitted from API requests. See
  6807  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6808  	// details.
  6809  	ForceSendFields []string `json:"-"`
  6810  	// NullFields is a list of field names (e.g. "Candidates") to include in API
  6811  	// requests with the JSON null value. By default, fields with empty values are
  6812  	// omitted from API requests. See
  6813  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6814  	NullFields []string `json:"-"`
  6815  }
  6816  
  6817  func (s *GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel) MarshalJSON() ([]byte, error) {
  6818  	type NoMethod GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel
  6819  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6820  }
  6821  
  6822  // GoogleCloudRetailV2alphaModelServingConfigList: Represents an ordered
  6823  // combination of valid serving configs, which can be used for
  6824  // `PAGE_OPTIMIZATION` recommendations.
  6825  type GoogleCloudRetailV2alphaModelServingConfigList struct {
  6826  	// ServingConfigIds: Optional. A set of valid serving configs that may be used
  6827  	// for `PAGE_OPTIMIZATION`.
  6828  	ServingConfigIds []string `json:"servingConfigIds,omitempty"`
  6829  	// ForceSendFields is a list of field names (e.g. "ServingConfigIds") to
  6830  	// unconditionally include in API requests. By default, fields with empty or
  6831  	// default values are omitted from API requests. See
  6832  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6833  	// details.
  6834  	ForceSendFields []string `json:"-"`
  6835  	// NullFields is a list of field names (e.g. "ServingConfigIds") to include in
  6836  	// API requests with the JSON null value. By default, fields with empty values
  6837  	// are omitted from API requests. See
  6838  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6839  	NullFields []string `json:"-"`
  6840  }
  6841  
  6842  func (s *GoogleCloudRetailV2alphaModelServingConfigList) MarshalJSON() ([]byte, error) {
  6843  	type NoMethod GoogleCloudRetailV2alphaModelServingConfigList
  6844  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6845  }
  6846  
  6847  // GoogleCloudRetailV2alphaOutputResult: Output result that stores the
  6848  // information about where the exported data is stored.
  6849  type GoogleCloudRetailV2alphaOutputResult struct {
  6850  	// BigqueryResult: The BigQuery location where the result is stored.
  6851  	BigqueryResult []*GoogleCloudRetailV2alphaBigQueryOutputResult `json:"bigqueryResult,omitempty"`
  6852  	// GcsResult: The Google Cloud Storage location where the result is stored.
  6853  	GcsResult []*GoogleCloudRetailV2alphaGcsOutputResult `json:"gcsResult,omitempty"`
  6854  	// ForceSendFields is a list of field names (e.g. "BigqueryResult") to
  6855  	// unconditionally include in API requests. By default, fields with empty or
  6856  	// default values are omitted from API requests. See
  6857  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6858  	// details.
  6859  	ForceSendFields []string `json:"-"`
  6860  	// NullFields is a list of field names (e.g. "BigqueryResult") to include in
  6861  	// API requests with the JSON null value. By default, fields with empty values
  6862  	// are omitted from API requests. See
  6863  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6864  	NullFields []string `json:"-"`
  6865  }
  6866  
  6867  func (s *GoogleCloudRetailV2alphaOutputResult) MarshalJSON() ([]byte, error) {
  6868  	type NoMethod GoogleCloudRetailV2alphaOutputResult
  6869  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6870  }
  6871  
  6872  // GoogleCloudRetailV2alphaPurgeMetadata: Metadata related to the progress of
  6873  // the Purge operation. This will be returned by the
  6874  // google.longrunning.Operation.metadata field.
  6875  type GoogleCloudRetailV2alphaPurgeMetadata struct {
  6876  }
  6877  
  6878  // GoogleCloudRetailV2alphaPurgeProductsMetadata: Metadata related to the
  6879  // progress of the PurgeProducts operation. This will be returned by the
  6880  // google.longrunning.Operation.metadata field.
  6881  type GoogleCloudRetailV2alphaPurgeProductsMetadata struct {
  6882  	// CreateTime: Operation create time.
  6883  	CreateTime string `json:"createTime,omitempty"`
  6884  	// FailureCount: Count of entries that encountered errors while processing.
  6885  	FailureCount int64 `json:"failureCount,omitempty,string"`
  6886  	// SuccessCount: Count of entries that were deleted successfully.
  6887  	SuccessCount int64 `json:"successCount,omitempty,string"`
  6888  	// UpdateTime: Operation last update time. If the operation is done, this is
  6889  	// also the finish time.
  6890  	UpdateTime string `json:"updateTime,omitempty"`
  6891  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  6892  	// unconditionally include in API requests. By default, fields with empty or
  6893  	// default values are omitted from API requests. See
  6894  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6895  	// details.
  6896  	ForceSendFields []string `json:"-"`
  6897  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  6898  	// requests with the JSON null value. By default, fields with empty values are
  6899  	// omitted from API requests. See
  6900  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6901  	NullFields []string `json:"-"`
  6902  }
  6903  
  6904  func (s *GoogleCloudRetailV2alphaPurgeProductsMetadata) MarshalJSON() ([]byte, error) {
  6905  	type NoMethod GoogleCloudRetailV2alphaPurgeProductsMetadata
  6906  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6907  }
  6908  
  6909  // GoogleCloudRetailV2alphaPurgeProductsResponse: Response of the
  6910  // PurgeProductsRequest. If the long running operation is successfully done,
  6911  // then this message is returned by the google.longrunning.Operations.response
  6912  // field.
  6913  type GoogleCloudRetailV2alphaPurgeProductsResponse struct {
  6914  	// PurgeCount: The total count of products purged as a result of the operation.
  6915  	PurgeCount int64 `json:"purgeCount,omitempty,string"`
  6916  	// PurgeSample: A sample of the product names that will be deleted. Only
  6917  	// populated if `force` is set to false. A max of 100 names will be returned
  6918  	// and the names are chosen at random.
  6919  	PurgeSample []string `json:"purgeSample,omitempty"`
  6920  	// ForceSendFields is a list of field names (e.g. "PurgeCount") to
  6921  	// unconditionally include in API requests. By default, fields with empty or
  6922  	// default values are omitted from API requests. See
  6923  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6924  	// details.
  6925  	ForceSendFields []string `json:"-"`
  6926  	// NullFields is a list of field names (e.g. "PurgeCount") to include in API
  6927  	// requests with the JSON null value. By default, fields with empty values are
  6928  	// omitted from API requests. See
  6929  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6930  	NullFields []string `json:"-"`
  6931  }
  6932  
  6933  func (s *GoogleCloudRetailV2alphaPurgeProductsResponse) MarshalJSON() ([]byte, error) {
  6934  	type NoMethod GoogleCloudRetailV2alphaPurgeProductsResponse
  6935  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6936  }
  6937  
  6938  // GoogleCloudRetailV2alphaPurgeUserEventsResponse: Response of the
  6939  // PurgeUserEventsRequest. If the long running operation is successfully done,
  6940  // then this message is returned by the google.longrunning.Operations.response
  6941  // field.
  6942  type GoogleCloudRetailV2alphaPurgeUserEventsResponse struct {
  6943  	// PurgedEventsCount: The total count of events purged as a result of the
  6944  	// operation.
  6945  	PurgedEventsCount int64 `json:"purgedEventsCount,omitempty,string"`
  6946  	// ForceSendFields is a list of field names (e.g. "PurgedEventsCount") to
  6947  	// unconditionally include in API requests. By default, fields with empty or
  6948  	// default values are omitted from API requests. See
  6949  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6950  	// details.
  6951  	ForceSendFields []string `json:"-"`
  6952  	// NullFields is a list of field names (e.g. "PurgedEventsCount") to include in
  6953  	// API requests with the JSON null value. By default, fields with empty values
  6954  	// are omitted from API requests. See
  6955  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6956  	NullFields []string `json:"-"`
  6957  }
  6958  
  6959  func (s *GoogleCloudRetailV2alphaPurgeUserEventsResponse) MarshalJSON() ([]byte, error) {
  6960  	type NoMethod GoogleCloudRetailV2alphaPurgeUserEventsResponse
  6961  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6962  }
  6963  
  6964  // GoogleCloudRetailV2alphaRejoinUserEventsMetadata: Metadata for
  6965  // `RejoinUserEvents` method.
  6966  type GoogleCloudRetailV2alphaRejoinUserEventsMetadata struct {
  6967  }
  6968  
  6969  // GoogleCloudRetailV2alphaRejoinUserEventsResponse: Response message for
  6970  // `RejoinUserEvents` method.
  6971  type GoogleCloudRetailV2alphaRejoinUserEventsResponse struct {
  6972  	// RejoinedUserEventsCount: Number of user events that were joined with latest
  6973  	// product catalog.
  6974  	RejoinedUserEventsCount int64 `json:"rejoinedUserEventsCount,omitempty,string"`
  6975  	// ForceSendFields is a list of field names (e.g. "RejoinedUserEventsCount") to
  6976  	// unconditionally include in API requests. By default, fields with empty or
  6977  	// default values are omitted from API requests. See
  6978  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  6979  	// details.
  6980  	ForceSendFields []string `json:"-"`
  6981  	// NullFields is a list of field names (e.g. "RejoinedUserEventsCount") to
  6982  	// include in API requests with the JSON null value. By default, fields with
  6983  	// empty values are omitted from API requests. See
  6984  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  6985  	NullFields []string `json:"-"`
  6986  }
  6987  
  6988  func (s *GoogleCloudRetailV2alphaRejoinUserEventsResponse) MarshalJSON() ([]byte, error) {
  6989  	type NoMethod GoogleCloudRetailV2alphaRejoinUserEventsResponse
  6990  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  6991  }
  6992  
  6993  // GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata: Metadata related to
  6994  // the progress of the RemoveFulfillmentPlaces operation. Currently empty
  6995  // because there is no meaningful metadata populated from the
  6996  // ProductService.RemoveFulfillmentPlaces method.
  6997  type GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata struct {
  6998  }
  6999  
  7000  // GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse: Response of the
  7001  // RemoveFulfillmentPlacesRequest. Currently empty because there is no
  7002  // meaningful response populated from the
  7003  // ProductService.RemoveFulfillmentPlaces method.
  7004  type GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse struct {
  7005  }
  7006  
  7007  // GoogleCloudRetailV2alphaRemoveLocalInventoriesMetadata: Metadata related to
  7008  // the progress of the RemoveLocalInventories operation. Currently empty
  7009  // because there is no meaningful metadata populated from the
  7010  // ProductService.RemoveLocalInventories method.
  7011  type GoogleCloudRetailV2alphaRemoveLocalInventoriesMetadata struct {
  7012  }
  7013  
  7014  // GoogleCloudRetailV2alphaRemoveLocalInventoriesResponse: Response of the
  7015  // ProductService.RemoveLocalInventories API. Currently empty because there is
  7016  // no meaningful response populated from the
  7017  // ProductService.RemoveLocalInventories method.
  7018  type GoogleCloudRetailV2alphaRemoveLocalInventoriesResponse struct {
  7019  }
  7020  
  7021  // GoogleCloudRetailV2alphaSetInventoryMetadata: Metadata related to the
  7022  // progress of the SetInventory operation. Currently empty because there is no
  7023  // meaningful metadata populated from the ProductService.SetInventory method.
  7024  type GoogleCloudRetailV2alphaSetInventoryMetadata struct {
  7025  }
  7026  
  7027  // GoogleCloudRetailV2alphaSetInventoryResponse: Response of the
  7028  // SetInventoryRequest. Currently empty because there is no meaningful response
  7029  // populated from the ProductService.SetInventory method.
  7030  type GoogleCloudRetailV2alphaSetInventoryResponse struct {
  7031  }
  7032  
  7033  // GoogleCloudRetailV2alphaTransformedUserEventsMetadata: Metadata related to
  7034  // transform user events operation.
  7035  type GoogleCloudRetailV2alphaTransformedUserEventsMetadata struct {
  7036  	// SourceEventsCount: Count of entries in the source user events BigQuery
  7037  	// table.
  7038  	SourceEventsCount int64 `json:"sourceEventsCount,omitempty,string"`
  7039  	// TransformedEventsCount: Count of entries in the transformed user events
  7040  	// BigQuery table, which could be different from the actually imported number
  7041  	// of user events.
  7042  	TransformedEventsCount int64 `json:"transformedEventsCount,omitempty,string"`
  7043  	// ForceSendFields is a list of field names (e.g. "SourceEventsCount") to
  7044  	// unconditionally include in API requests. By default, fields with empty or
  7045  	// default values are omitted from API requests. See
  7046  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7047  	// details.
  7048  	ForceSendFields []string `json:"-"`
  7049  	// NullFields is a list of field names (e.g. "SourceEventsCount") to include in
  7050  	// API requests with the JSON null value. By default, fields with empty values
  7051  	// are omitted from API requests. See
  7052  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7053  	NullFields []string `json:"-"`
  7054  }
  7055  
  7056  func (s *GoogleCloudRetailV2alphaTransformedUserEventsMetadata) MarshalJSON() ([]byte, error) {
  7057  	type NoMethod GoogleCloudRetailV2alphaTransformedUserEventsMetadata
  7058  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7059  }
  7060  
  7061  // GoogleCloudRetailV2alphaTuneModelMetadata: Metadata associated with a tune
  7062  // operation.
  7063  type GoogleCloudRetailV2alphaTuneModelMetadata struct {
  7064  	// Model: The resource name of the model that this tune applies to. Format:
  7065  	// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
  7066  	// ls/{model_id}`
  7067  	Model string `json:"model,omitempty"`
  7068  	// ForceSendFields is a list of field names (e.g. "Model") to unconditionally
  7069  	// include in API requests. By default, fields with empty or default values are
  7070  	// omitted from API requests. See
  7071  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7072  	// details.
  7073  	ForceSendFields []string `json:"-"`
  7074  	// NullFields is a list of field names (e.g. "Model") to include in API
  7075  	// requests with the JSON null value. By default, fields with empty values are
  7076  	// omitted from API requests. See
  7077  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7078  	NullFields []string `json:"-"`
  7079  }
  7080  
  7081  func (s *GoogleCloudRetailV2alphaTuneModelMetadata) MarshalJSON() ([]byte, error) {
  7082  	type NoMethod GoogleCloudRetailV2alphaTuneModelMetadata
  7083  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7084  }
  7085  
  7086  // GoogleCloudRetailV2alphaTuneModelResponse: Response associated with a tune
  7087  // operation.
  7088  type GoogleCloudRetailV2alphaTuneModelResponse struct {
  7089  }
  7090  
  7091  // GoogleCloudRetailV2alphaUserEventImportSummary: A summary of import result.
  7092  // The UserEventImportSummary summarizes the import status for user events.
  7093  type GoogleCloudRetailV2alphaUserEventImportSummary struct {
  7094  	// JoinedEventsCount: Count of user events imported with complete existing
  7095  	// catalog information.
  7096  	JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"`
  7097  	// UnjoinedEventsCount: Count of user events imported, but with catalog
  7098  	// information not found in the imported catalog.
  7099  	UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"`
  7100  	// ForceSendFields is a list of field names (e.g. "JoinedEventsCount") to
  7101  	// unconditionally include in API requests. By default, fields with empty or
  7102  	// default values are omitted from API requests. See
  7103  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7104  	// details.
  7105  	ForceSendFields []string `json:"-"`
  7106  	// NullFields is a list of field names (e.g. "JoinedEventsCount") to include in
  7107  	// API requests with the JSON null value. By default, fields with empty values
  7108  	// are omitted from API requests. See
  7109  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7110  	NullFields []string `json:"-"`
  7111  }
  7112  
  7113  func (s *GoogleCloudRetailV2alphaUserEventImportSummary) MarshalJSON() ([]byte, error) {
  7114  	type NoMethod GoogleCloudRetailV2alphaUserEventImportSummary
  7115  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7116  }
  7117  
  7118  // GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata: Metadata related to the
  7119  // progress of the AddFulfillmentPlaces operation. Currently empty because
  7120  // there is no meaningful metadata populated from the
  7121  // ProductService.AddFulfillmentPlaces method.
  7122  type GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata struct {
  7123  }
  7124  
  7125  // GoogleCloudRetailV2betaAddFulfillmentPlacesResponse: Response of the
  7126  // AddFulfillmentPlacesRequest. Currently empty because there is no meaningful
  7127  // response populated from the ProductService.AddFulfillmentPlaces method.
  7128  type GoogleCloudRetailV2betaAddFulfillmentPlacesResponse struct {
  7129  }
  7130  
  7131  // GoogleCloudRetailV2betaAddLocalInventoriesMetadata: Metadata related to the
  7132  // progress of the AddLocalInventories operation. Currently empty because there
  7133  // is no meaningful metadata populated from the
  7134  // ProductService.AddLocalInventories method.
  7135  type GoogleCloudRetailV2betaAddLocalInventoriesMetadata struct {
  7136  }
  7137  
  7138  // GoogleCloudRetailV2betaAddLocalInventoriesResponse: Response of the
  7139  // ProductService.AddLocalInventories API. Currently empty because there is no
  7140  // meaningful response populated from the ProductService.AddLocalInventories
  7141  // method.
  7142  type GoogleCloudRetailV2betaAddLocalInventoriesResponse struct {
  7143  }
  7144  
  7145  // GoogleCloudRetailV2betaBigQueryOutputResult: A BigQuery output result.
  7146  type GoogleCloudRetailV2betaBigQueryOutputResult struct {
  7147  	// DatasetId: The ID of a BigQuery Dataset.
  7148  	DatasetId string `json:"datasetId,omitempty"`
  7149  	// TableId: The ID of a BigQuery Table.
  7150  	TableId string `json:"tableId,omitempty"`
  7151  	// ForceSendFields is a list of field names (e.g. "DatasetId") to
  7152  	// unconditionally include in API requests. By default, fields with empty or
  7153  	// default values are omitted from API requests. See
  7154  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7155  	// details.
  7156  	ForceSendFields []string `json:"-"`
  7157  	// NullFields is a list of field names (e.g. "DatasetId") to include in API
  7158  	// requests with the JSON null value. By default, fields with empty values are
  7159  	// omitted from API requests. See
  7160  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7161  	NullFields []string `json:"-"`
  7162  }
  7163  
  7164  func (s *GoogleCloudRetailV2betaBigQueryOutputResult) MarshalJSON() ([]byte, error) {
  7165  	type NoMethod GoogleCloudRetailV2betaBigQueryOutputResult
  7166  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7167  }
  7168  
  7169  // GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata: Common
  7170  // metadata related to the progress of the operations.
  7171  type GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata struct {
  7172  	// CreateTime: Operation create time.
  7173  	CreateTime string `json:"createTime,omitempty"`
  7174  	// UpdateTime: Operation last update time. If the operation is done, this is
  7175  	// also the finish time.
  7176  	UpdateTime string `json:"updateTime,omitempty"`
  7177  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  7178  	// unconditionally include in API requests. By default, fields with empty or
  7179  	// default values are omitted from API requests. See
  7180  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7181  	// details.
  7182  	ForceSendFields []string `json:"-"`
  7183  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  7184  	// requests with the JSON null value. By default, fields with empty values are
  7185  	// omitted from API requests. See
  7186  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7187  	NullFields []string `json:"-"`
  7188  }
  7189  
  7190  func (s *GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata) MarshalJSON() ([]byte, error) {
  7191  	type NoMethod GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata
  7192  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7193  }
  7194  
  7195  // GoogleCloudRetailV2betaCreateModelMetadata: Metadata associated with a
  7196  // create operation.
  7197  type GoogleCloudRetailV2betaCreateModelMetadata struct {
  7198  	// Model: The resource name of the model that this create applies to. Format:
  7199  	// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
  7200  	// ls/{model_id}`
  7201  	Model string `json:"model,omitempty"`
  7202  	// ForceSendFields is a list of field names (e.g. "Model") to unconditionally
  7203  	// include in API requests. By default, fields with empty or default values are
  7204  	// omitted from API requests. See
  7205  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7206  	// details.
  7207  	ForceSendFields []string `json:"-"`
  7208  	// NullFields is a list of field names (e.g. "Model") to include in API
  7209  	// requests with the JSON null value. By default, fields with empty values are
  7210  	// omitted from API requests. See
  7211  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7212  	NullFields []string `json:"-"`
  7213  }
  7214  
  7215  func (s *GoogleCloudRetailV2betaCreateModelMetadata) MarshalJSON() ([]byte, error) {
  7216  	type NoMethod GoogleCloudRetailV2betaCreateModelMetadata
  7217  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7218  }
  7219  
  7220  // GoogleCloudRetailV2betaExportAnalyticsMetricsResponse: Response of the
  7221  // ExportAnalyticsMetricsRequest. If the long running operation was successful,
  7222  // then this message is returned by the google.longrunning.Operations.response
  7223  // field if the operation was successful.
  7224  type GoogleCloudRetailV2betaExportAnalyticsMetricsResponse struct {
  7225  	// ErrorSamples: A sample of errors encountered while processing the request.
  7226  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  7227  	// ErrorsConfig: This field is never set.
  7228  	ErrorsConfig *GoogleCloudRetailV2betaExportErrorsConfig `json:"errorsConfig,omitempty"`
  7229  	// OutputResult: Output result indicating where the data were exported to.
  7230  	OutputResult *GoogleCloudRetailV2betaOutputResult `json:"outputResult,omitempty"`
  7231  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  7232  	// unconditionally include in API requests. By default, fields with empty or
  7233  	// default values are omitted from API requests. See
  7234  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7235  	// details.
  7236  	ForceSendFields []string `json:"-"`
  7237  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  7238  	// requests with the JSON null value. By default, fields with empty values are
  7239  	// omitted from API requests. See
  7240  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7241  	NullFields []string `json:"-"`
  7242  }
  7243  
  7244  func (s *GoogleCloudRetailV2betaExportAnalyticsMetricsResponse) MarshalJSON() ([]byte, error) {
  7245  	type NoMethod GoogleCloudRetailV2betaExportAnalyticsMetricsResponse
  7246  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7247  }
  7248  
  7249  // GoogleCloudRetailV2betaExportErrorsConfig: Configuration of destination for
  7250  // Export related errors.
  7251  type GoogleCloudRetailV2betaExportErrorsConfig struct {
  7252  	// GcsPrefix: Google Cloud Storage path for import errors. This must be an
  7253  	// empty, existing Cloud Storage bucket. Export errors will be written to a
  7254  	// file in this bucket, one per line, as a JSON-encoded `google.rpc.Status`
  7255  	// message.
  7256  	GcsPrefix string `json:"gcsPrefix,omitempty"`
  7257  	// ForceSendFields is a list of field names (e.g. "GcsPrefix") to
  7258  	// unconditionally include in API requests. By default, fields with empty or
  7259  	// default values are omitted from API requests. See
  7260  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7261  	// details.
  7262  	ForceSendFields []string `json:"-"`
  7263  	// NullFields is a list of field names (e.g. "GcsPrefix") to include in API
  7264  	// requests with the JSON null value. By default, fields with empty values are
  7265  	// omitted from API requests. See
  7266  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7267  	NullFields []string `json:"-"`
  7268  }
  7269  
  7270  func (s *GoogleCloudRetailV2betaExportErrorsConfig) MarshalJSON() ([]byte, error) {
  7271  	type NoMethod GoogleCloudRetailV2betaExportErrorsConfig
  7272  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7273  }
  7274  
  7275  // GoogleCloudRetailV2betaExportMetadata: Metadata related to the progress of
  7276  // the Export operation. This is returned by the
  7277  // google.longrunning.Operation.metadata field.
  7278  type GoogleCloudRetailV2betaExportMetadata struct {
  7279  	// CreateTime: Operation create time.
  7280  	CreateTime string `json:"createTime,omitempty"`
  7281  	// UpdateTime: Operation last update time. If the operation is done, this is
  7282  	// also the finish time.
  7283  	UpdateTime string `json:"updateTime,omitempty"`
  7284  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  7285  	// unconditionally include in API requests. By default, fields with empty or
  7286  	// default values are omitted from API requests. See
  7287  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7288  	// details.
  7289  	ForceSendFields []string `json:"-"`
  7290  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  7291  	// requests with the JSON null value. By default, fields with empty values are
  7292  	// omitted from API requests. See
  7293  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7294  	NullFields []string `json:"-"`
  7295  }
  7296  
  7297  func (s *GoogleCloudRetailV2betaExportMetadata) MarshalJSON() ([]byte, error) {
  7298  	type NoMethod GoogleCloudRetailV2betaExportMetadata
  7299  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7300  }
  7301  
  7302  // GoogleCloudRetailV2betaExportProductsResponse: Response of the
  7303  // ExportProductsRequest. If the long running operation is done, then this
  7304  // message is returned by the google.longrunning.Operations.response field if
  7305  // the operation was successful.
  7306  type GoogleCloudRetailV2betaExportProductsResponse struct {
  7307  	// ErrorSamples: A sample of errors encountered while processing the request.
  7308  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  7309  	// ErrorsConfig: This field is never set.
  7310  	ErrorsConfig *GoogleCloudRetailV2betaExportErrorsConfig `json:"errorsConfig,omitempty"`
  7311  	// OutputResult: Output result indicating where the data were exported to.
  7312  	OutputResult *GoogleCloudRetailV2betaOutputResult `json:"outputResult,omitempty"`
  7313  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  7314  	// unconditionally include in API requests. By default, fields with empty or
  7315  	// default values are omitted from API requests. See
  7316  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7317  	// details.
  7318  	ForceSendFields []string `json:"-"`
  7319  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  7320  	// requests with the JSON null value. By default, fields with empty values are
  7321  	// omitted from API requests. See
  7322  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7323  	NullFields []string `json:"-"`
  7324  }
  7325  
  7326  func (s *GoogleCloudRetailV2betaExportProductsResponse) MarshalJSON() ([]byte, error) {
  7327  	type NoMethod GoogleCloudRetailV2betaExportProductsResponse
  7328  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7329  }
  7330  
  7331  // GoogleCloudRetailV2betaExportUserEventsResponse: Response of the
  7332  // ExportUserEventsRequest. If the long running operation was successful, then
  7333  // this message is returned by the google.longrunning.Operations.response field
  7334  // if the operation was successful.
  7335  type GoogleCloudRetailV2betaExportUserEventsResponse struct {
  7336  	// ErrorSamples: A sample of errors encountered while processing the request.
  7337  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  7338  	// ErrorsConfig: This field is never set.
  7339  	ErrorsConfig *GoogleCloudRetailV2betaExportErrorsConfig `json:"errorsConfig,omitempty"`
  7340  	// OutputResult: Output result indicating where the data were exported to.
  7341  	OutputResult *GoogleCloudRetailV2betaOutputResult `json:"outputResult,omitempty"`
  7342  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  7343  	// unconditionally include in API requests. By default, fields with empty or
  7344  	// default values are omitted from API requests. See
  7345  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7346  	// details.
  7347  	ForceSendFields []string `json:"-"`
  7348  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  7349  	// requests with the JSON null value. By default, fields with empty values are
  7350  	// omitted from API requests. See
  7351  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7352  	NullFields []string `json:"-"`
  7353  }
  7354  
  7355  func (s *GoogleCloudRetailV2betaExportUserEventsResponse) MarshalJSON() ([]byte, error) {
  7356  	type NoMethod GoogleCloudRetailV2betaExportUserEventsResponse
  7357  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7358  }
  7359  
  7360  // GoogleCloudRetailV2betaGcsOutputResult: A Gcs output result.
  7361  type GoogleCloudRetailV2betaGcsOutputResult struct {
  7362  	// OutputUri: The uri of Gcs output
  7363  	OutputUri string `json:"outputUri,omitempty"`
  7364  	// ForceSendFields is a list of field names (e.g. "OutputUri") to
  7365  	// unconditionally include in API requests. By default, fields with empty or
  7366  	// default values are omitted from API requests. See
  7367  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7368  	// details.
  7369  	ForceSendFields []string `json:"-"`
  7370  	// NullFields is a list of field names (e.g. "OutputUri") to include in API
  7371  	// requests with the JSON null value. By default, fields with empty values are
  7372  	// omitted from API requests. See
  7373  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7374  	NullFields []string `json:"-"`
  7375  }
  7376  
  7377  func (s *GoogleCloudRetailV2betaGcsOutputResult) MarshalJSON() ([]byte, error) {
  7378  	type NoMethod GoogleCloudRetailV2betaGcsOutputResult
  7379  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7380  }
  7381  
  7382  // GoogleCloudRetailV2betaImportCompletionDataResponse: Response of the
  7383  // ImportCompletionDataRequest. If the long running operation is done, this
  7384  // message is returned by the google.longrunning.Operations.response field if
  7385  // the operation is successful.
  7386  type GoogleCloudRetailV2betaImportCompletionDataResponse struct {
  7387  	// ErrorSamples: A sample of errors encountered while processing the request.
  7388  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  7389  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  7390  	// unconditionally include in API requests. By default, fields with empty or
  7391  	// default values are omitted from API requests. See
  7392  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7393  	// details.
  7394  	ForceSendFields []string `json:"-"`
  7395  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  7396  	// requests with the JSON null value. By default, fields with empty values are
  7397  	// omitted from API requests. See
  7398  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7399  	NullFields []string `json:"-"`
  7400  }
  7401  
  7402  func (s *GoogleCloudRetailV2betaImportCompletionDataResponse) MarshalJSON() ([]byte, error) {
  7403  	type NoMethod GoogleCloudRetailV2betaImportCompletionDataResponse
  7404  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7405  }
  7406  
  7407  // GoogleCloudRetailV2betaImportErrorsConfig: Configuration of destination for
  7408  // Import related errors.
  7409  type GoogleCloudRetailV2betaImportErrorsConfig struct {
  7410  	// GcsPrefix: Google Cloud Storage prefix for import errors. This must be an
  7411  	// empty, existing Cloud Storage directory. Import errors are written to
  7412  	// sharded files in this directory, one per line, as a JSON-encoded
  7413  	// `google.rpc.Status` message.
  7414  	GcsPrefix string `json:"gcsPrefix,omitempty"`
  7415  	// ForceSendFields is a list of field names (e.g. "GcsPrefix") to
  7416  	// unconditionally include in API requests. By default, fields with empty or
  7417  	// default values are omitted from API requests. See
  7418  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7419  	// details.
  7420  	ForceSendFields []string `json:"-"`
  7421  	// NullFields is a list of field names (e.g. "GcsPrefix") to include in API
  7422  	// requests with the JSON null value. By default, fields with empty values are
  7423  	// omitted from API requests. See
  7424  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7425  	NullFields []string `json:"-"`
  7426  }
  7427  
  7428  func (s *GoogleCloudRetailV2betaImportErrorsConfig) MarshalJSON() ([]byte, error) {
  7429  	type NoMethod GoogleCloudRetailV2betaImportErrorsConfig
  7430  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7431  }
  7432  
  7433  // GoogleCloudRetailV2betaImportMetadata: Metadata related to the progress of
  7434  // the Import operation. This is returned by the
  7435  // google.longrunning.Operation.metadata field.
  7436  type GoogleCloudRetailV2betaImportMetadata struct {
  7437  	// CreateTime: Operation create time.
  7438  	CreateTime string `json:"createTime,omitempty"`
  7439  	// FailureCount: Count of entries that encountered errors while processing.
  7440  	FailureCount int64 `json:"failureCount,omitempty,string"`
  7441  	// NotificationPubsubTopic: Pub/Sub topic for receiving notification. If this
  7442  	// field is set, when the import is finished, a notification is sent to
  7443  	// specified Pub/Sub topic. The message data is JSON string of a Operation.
  7444  	// Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
  7445  	NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"`
  7446  	// RequestId: Deprecated. This field is never set.
  7447  	RequestId string `json:"requestId,omitempty"`
  7448  	// SuccessCount: Count of entries that were processed successfully.
  7449  	SuccessCount int64 `json:"successCount,omitempty,string"`
  7450  	// UpdateTime: Operation last update time. If the operation is done, this is
  7451  	// also the finish time.
  7452  	UpdateTime string `json:"updateTime,omitempty"`
  7453  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  7454  	// unconditionally include in API requests. By default, fields with empty or
  7455  	// default values are omitted from API requests. See
  7456  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7457  	// details.
  7458  	ForceSendFields []string `json:"-"`
  7459  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  7460  	// requests with the JSON null value. By default, fields with empty values are
  7461  	// omitted from API requests. See
  7462  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7463  	NullFields []string `json:"-"`
  7464  }
  7465  
  7466  func (s *GoogleCloudRetailV2betaImportMetadata) MarshalJSON() ([]byte, error) {
  7467  	type NoMethod GoogleCloudRetailV2betaImportMetadata
  7468  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7469  }
  7470  
  7471  // GoogleCloudRetailV2betaImportProductsResponse: Response of the
  7472  // ImportProductsRequest. If the long running operation is done, then this
  7473  // message is returned by the google.longrunning.Operations.response field if
  7474  // the operation was successful.
  7475  type GoogleCloudRetailV2betaImportProductsResponse struct {
  7476  	// ErrorSamples: A sample of errors encountered while processing the request.
  7477  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  7478  	// ErrorsConfig: Echoes the destination for the complete errors in the request
  7479  	// if set.
  7480  	ErrorsConfig *GoogleCloudRetailV2betaImportErrorsConfig `json:"errorsConfig,omitempty"`
  7481  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  7482  	// unconditionally include in API requests. By default, fields with empty or
  7483  	// default values are omitted from API requests. See
  7484  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7485  	// details.
  7486  	ForceSendFields []string `json:"-"`
  7487  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  7488  	// requests with the JSON null value. By default, fields with empty values are
  7489  	// omitted from API requests. See
  7490  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7491  	NullFields []string `json:"-"`
  7492  }
  7493  
  7494  func (s *GoogleCloudRetailV2betaImportProductsResponse) MarshalJSON() ([]byte, error) {
  7495  	type NoMethod GoogleCloudRetailV2betaImportProductsResponse
  7496  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7497  }
  7498  
  7499  // GoogleCloudRetailV2betaImportUserEventsResponse: Response of the
  7500  // ImportUserEventsRequest. If the long running operation was successful, then
  7501  // this message is returned by the google.longrunning.Operations.response field
  7502  // if the operation was successful.
  7503  type GoogleCloudRetailV2betaImportUserEventsResponse struct {
  7504  	// ErrorSamples: A sample of errors encountered while processing the request.
  7505  	ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
  7506  	// ErrorsConfig: Echoes the destination for the complete errors if this field
  7507  	// was set in the request.
  7508  	ErrorsConfig *GoogleCloudRetailV2betaImportErrorsConfig `json:"errorsConfig,omitempty"`
  7509  	// ImportSummary: Aggregated statistics of user event import status.
  7510  	ImportSummary *GoogleCloudRetailV2betaUserEventImportSummary `json:"importSummary,omitempty"`
  7511  	// ForceSendFields is a list of field names (e.g. "ErrorSamples") to
  7512  	// unconditionally include in API requests. By default, fields with empty or
  7513  	// default values are omitted from API requests. See
  7514  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7515  	// details.
  7516  	ForceSendFields []string `json:"-"`
  7517  	// NullFields is a list of field names (e.g. "ErrorSamples") to include in API
  7518  	// requests with the JSON null value. By default, fields with empty values are
  7519  	// omitted from API requests. See
  7520  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7521  	NullFields []string `json:"-"`
  7522  }
  7523  
  7524  func (s *GoogleCloudRetailV2betaImportUserEventsResponse) MarshalJSON() ([]byte, error) {
  7525  	type NoMethod GoogleCloudRetailV2betaImportUserEventsResponse
  7526  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7527  }
  7528  
  7529  // GoogleCloudRetailV2betaMerchantCenterAccountLink: Represents a link between
  7530  // a Merchant Center account and a branch. After a link is established,
  7531  // products from the linked Merchant Center account are streamed to the linked
  7532  // branch.
  7533  type GoogleCloudRetailV2betaMerchantCenterAccountLink struct {
  7534  	// BranchId: Required. The branch ID (e.g. 0/1/2) within the catalog that
  7535  	// products from merchant_center_account_id are streamed to. When updating this
  7536  	// field, an empty value will use the currently configured default branch.
  7537  	// However, changing the default branch later on won't change the linked branch
  7538  	// here. A single branch ID can only have one linked Merchant Center account
  7539  	// ID.
  7540  	BranchId string `json:"branchId,omitempty"`
  7541  	// FeedFilters: Criteria for the Merchant Center feeds to be ingested via the
  7542  	// link. All offers will be ingested if the list is empty. Otherwise the offers
  7543  	// will be ingested from selected feeds.
  7544  	FeedFilters []*GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter `json:"feedFilters,omitempty"`
  7545  	// FeedLabel: The FeedLabel used to perform filtering. Note: this replaces
  7546  	// region_id
  7547  	// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label).
  7548  	// Example value: `US`. Example value: `FeedLabel1`.
  7549  	FeedLabel string `json:"feedLabel,omitempty"`
  7550  	// Id: Output only. Immutable. MerchantCenterAccountLink identifier, which is
  7551  	// the final component of name. This field is auto generated and follows the
  7552  	// convention: `BranchId_MerchantCenterAccountId`.
  7553  	// `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi
  7554  	// nks/id_1`.
  7555  	Id string `json:"id,omitempty"`
  7556  	// LanguageCode: Language of the title/description and other string attributes.
  7557  	// Use language tags defined by BCP 47
  7558  	// (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies
  7559  	// the language of offers in Merchant Center that will be accepted. If empty,
  7560  	// no language filtering will be performed. Example value: `en`.
  7561  	LanguageCode string `json:"languageCode,omitempty"`
  7562  	// MerchantCenterAccountId: Required. The linked Merchant center account id
  7563  	// (https://developers.google.com/shopping-content/guides/accountstatuses). The
  7564  	// account must be a standalone account or a sub-account of a MCA.
  7565  	MerchantCenterAccountId int64 `json:"merchantCenterAccountId,omitempty,string"`
  7566  	// Name: Output only. Immutable. Full resource name of the Merchant Center
  7567  	// Account Link, such as
  7568  	// `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLi
  7569  	// nks/merchant_center_account_link`.
  7570  	Name string `json:"name,omitempty"`
  7571  	// ProjectId: Output only. Google Cloud project ID.
  7572  	ProjectId string `json:"projectId,omitempty"`
  7573  	// Source: Optional. An optional arbitrary string that could be used as a tag
  7574  	// for tracking link source.
  7575  	Source string `json:"source,omitempty"`
  7576  	// State: Output only. Represents the state of the link.
  7577  	//
  7578  	// Possible values:
  7579  	//   "STATE_UNSPECIFIED" - Default value.
  7580  	//   "PENDING" - Link is created and LRO is not complete.
  7581  	//   "ACTIVE" - Link is active.
  7582  	//   "FAILED" - Link creation failed.
  7583  	State string `json:"state,omitempty"`
  7584  	// ForceSendFields is a list of field names (e.g. "BranchId") to
  7585  	// unconditionally include in API requests. By default, fields with empty or
  7586  	// default values are omitted from API requests. See
  7587  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7588  	// details.
  7589  	ForceSendFields []string `json:"-"`
  7590  	// NullFields is a list of field names (e.g. "BranchId") to include in API
  7591  	// requests with the JSON null value. By default, fields with empty values are
  7592  	// omitted from API requests. See
  7593  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7594  	NullFields []string `json:"-"`
  7595  }
  7596  
  7597  func (s *GoogleCloudRetailV2betaMerchantCenterAccountLink) MarshalJSON() ([]byte, error) {
  7598  	type NoMethod GoogleCloudRetailV2betaMerchantCenterAccountLink
  7599  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7600  }
  7601  
  7602  // GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter:
  7603  // Merchant Center Feed filter criterion.
  7604  type GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter struct {
  7605  	// PrimaryFeedId: Merchant Center primary feed ID.
  7606  	PrimaryFeedId int64 `json:"primaryFeedId,omitempty,string"`
  7607  	// PrimaryFeedName: Merchant Center primary feed name. The name is used for the
  7608  	// display purposes only.
  7609  	PrimaryFeedName string `json:"primaryFeedName,omitempty"`
  7610  	// ForceSendFields is a list of field names (e.g. "PrimaryFeedId") to
  7611  	// unconditionally include in API requests. By default, fields with empty or
  7612  	// default values are omitted from API requests. See
  7613  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7614  	// details.
  7615  	ForceSendFields []string `json:"-"`
  7616  	// NullFields is a list of field names (e.g. "PrimaryFeedId") to include in API
  7617  	// requests with the JSON null value. By default, fields with empty values are
  7618  	// omitted from API requests. See
  7619  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7620  	NullFields []string `json:"-"`
  7621  }
  7622  
  7623  func (s *GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter) MarshalJSON() ([]byte, error) {
  7624  	type NoMethod GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter
  7625  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7626  }
  7627  
  7628  // GoogleCloudRetailV2betaModel: Metadata that describes the training and
  7629  // serving parameters of a Model. A Model can be associated with a
  7630  // ServingConfig and then queried through the Predict API.
  7631  type GoogleCloudRetailV2betaModel struct {
  7632  	// CreateTime: Output only. Timestamp the Recommendation Model was created at.
  7633  	CreateTime string `json:"createTime,omitempty"`
  7634  	// DataState: Output only. The state of data requirements for this model:
  7635  	// `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the
  7636  	// data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR`
  7637  	// state even if serving state is `ACTIVE`: models were trained successfully
  7638  	// before, but cannot be refreshed because model no longer has sufficient data
  7639  	// for training.
  7640  	//
  7641  	// Possible values:
  7642  	//   "DATA_STATE_UNSPECIFIED" - Unspecified default value, should never be
  7643  	// explicitly set.
  7644  	//   "DATA_OK" - The model has sufficient training data.
  7645  	//   "DATA_ERROR" - The model does not have sufficient training data. Error
  7646  	// messages can be queried via Stackdriver.
  7647  	DataState string `json:"dataState,omitempty"`
  7648  	// DisplayName: Required. The display name of the model. Should be human
  7649  	// readable, used to display Recommendation Models in the Retail Cloud Console
  7650  	// Dashboard. UTF-8 encoded string with limit of 1024 characters.
  7651  	DisplayName string `json:"displayName,omitempty"`
  7652  	// FilteringOption: Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`,
  7653  	// recommendation filtering by attributes is enabled for the model.
  7654  	//
  7655  	// Possible values:
  7656  	//   "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED" - Value used when unset. In
  7657  	// this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.
  7658  	//   "RECOMMENDATIONS_FILTERING_DISABLED" - Recommendation filtering is
  7659  	// disabled.
  7660  	//   "RECOMMENDATIONS_FILTERING_ENABLED" - Recommendation filtering is enabled.
  7661  	FilteringOption string `json:"filteringOption,omitempty"`
  7662  	// LastTuneTime: Output only. The timestamp when the latest successful tune
  7663  	// finished.
  7664  	LastTuneTime string `json:"lastTuneTime,omitempty"`
  7665  	// ModelFeaturesConfig: Optional. Additional model features config.
  7666  	ModelFeaturesConfig *GoogleCloudRetailV2betaModelModelFeaturesConfig `json:"modelFeaturesConfig,omitempty"`
  7667  	// Name: Required. The fully qualified resource name of the model. Format:
  7668  	// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
  7669  	// ls/{model_id}` catalog_id has char limit of 50. recommendation_model_id has
  7670  	// char limit of 40.
  7671  	Name string `json:"name,omitempty"`
  7672  	// OptimizationObjective: Optional. The optimization objective e.g. `cvr`.
  7673  	// Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not
  7674  	// specified, we choose default based on model type. Default depends on type of
  7675  	// recommendation: `recommended-for-you` => `ctr` `others-you-may-like` =>
  7676  	// `ctr` `frequently-bought-together` => `revenue_per_order` This field
  7677  	// together with optimization_objective describe model metadata to use to
  7678  	// control model training and serving. See
  7679  	// https://cloud.google.com/retail/docs/models for more details on what the
  7680  	// model metadata control and which combination of parameters are valid. For
  7681  	// invalid combinations of parameters (e.g. type = `frequently-bought-together`
  7682  	// and optimization_objective = `ctr`), you receive an error 400 if you try to
  7683  	// create/update a recommendation with this set of knobs.
  7684  	OptimizationObjective string `json:"optimizationObjective,omitempty"`
  7685  	// PeriodicTuningState: Optional. The state of periodic tuning. The period we
  7686  	// use is 3 months - to do a one-off tune earlier use the `TuneModel` method.
  7687  	// Default value is `PERIODIC_TUNING_ENABLED`.
  7688  	//
  7689  	// Possible values:
  7690  	//   "PERIODIC_TUNING_STATE_UNSPECIFIED" - Unspecified default value, should
  7691  	// never be explicitly set.
  7692  	//   "PERIODIC_TUNING_DISABLED" - The model has periodic tuning disabled.
  7693  	// Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or
  7694  	// by calling the `TuneModel` method.
  7695  	//   "ALL_TUNING_DISABLED" - The model cannot be tuned with periodic tuning OR
  7696  	// the `TuneModel` method. Hide the options in customer UI and reject any
  7697  	// requests through the backend self serve API.
  7698  	//   "PERIODIC_TUNING_ENABLED" - The model has periodic tuning enabled. Tuning
  7699  	// can be disabled by calling the `DisableModelPeriodicTuning` method.
  7700  	PeriodicTuningState string `json:"periodicTuningState,omitempty"`
  7701  	// ServingConfigLists: Output only. The list of valid serving configs
  7702  	// associated with the PageOptimizationConfig.
  7703  	ServingConfigLists []*GoogleCloudRetailV2betaModelServingConfigList `json:"servingConfigLists,omitempty"`
  7704  	// ServingState: Output only. The serving state of the model: `ACTIVE`,
  7705  	// `NOT_ACTIVE`.
  7706  	//
  7707  	// Possible values:
  7708  	//   "SERVING_STATE_UNSPECIFIED" - Unspecified serving state.
  7709  	//   "INACTIVE" - The model is not serving.
  7710  	//   "ACTIVE" - The model is serving and can be queried.
  7711  	//   "TUNED" - The model is trained on tuned hyperparameters and can be
  7712  	// queried.
  7713  	ServingState string `json:"servingState,omitempty"`
  7714  	// TrainingState: Optional. The training state that the model is in (e.g.
  7715  	// `TRAINING` or `PAUSED`). Since part of the cost of running the service is
  7716  	// frequency of training - this can be used to determine when to train model in
  7717  	// order to control cost. If not specified: the default value for `CreateModel`
  7718  	// method is `TRAINING`. The default value for `UpdateModel` method is to keep
  7719  	// the state the same as before.
  7720  	//
  7721  	// Possible values:
  7722  	//   "TRAINING_STATE_UNSPECIFIED" - Unspecified training state.
  7723  	//   "PAUSED" - The model training is paused.
  7724  	//   "TRAINING" - The model is training.
  7725  	TrainingState string `json:"trainingState,omitempty"`
  7726  	// TuningOperation: Output only. The tune operation associated with the model.
  7727  	// Can be used to determine if there is an ongoing tune for this
  7728  	// recommendation. Empty field implies no tune is goig on.
  7729  	TuningOperation string `json:"tuningOperation,omitempty"`
  7730  	// Type: Required. The type of model e.g. `home-page`. Currently supported
  7731  	// values: `recommended-for-you`, `others-you-may-like`,
  7732  	// `frequently-bought-together`, `page-optimization`, `similar-items`,
  7733  	// `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This
  7734  	// field together with optimization_objective describe model metadata to use to
  7735  	// control model training and serving. See
  7736  	// https://cloud.google.com/retail/docs/models for more details on what the
  7737  	// model metadata control and which combination of parameters are valid. For
  7738  	// invalid combinations of parameters (e.g. type = `frequently-bought-together`
  7739  	// and optimization_objective = `ctr`), you receive an error 400 if you try to
  7740  	// create/update a recommendation with this set of knobs.
  7741  	Type string `json:"type,omitempty"`
  7742  	// UpdateTime: Output only. Timestamp the Recommendation Model was last
  7743  	// updated. E.g. if a Recommendation Model was paused - this would be the time
  7744  	// the pause was initiated.
  7745  	UpdateTime string `json:"updateTime,omitempty"`
  7746  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  7747  	// unconditionally include in API requests. By default, fields with empty or
  7748  	// default values are omitted from API requests. See
  7749  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7750  	// details.
  7751  	ForceSendFields []string `json:"-"`
  7752  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  7753  	// requests with the JSON null value. By default, fields with empty values are
  7754  	// omitted from API requests. See
  7755  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7756  	NullFields []string `json:"-"`
  7757  }
  7758  
  7759  func (s *GoogleCloudRetailV2betaModel) MarshalJSON() ([]byte, error) {
  7760  	type NoMethod GoogleCloudRetailV2betaModel
  7761  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7762  }
  7763  
  7764  // GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig:
  7765  // Additional configs for the frequently-bought-together model type.
  7766  type GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig struct {
  7767  	// ContextProductsType: Optional. Specifies the context of the model when it is
  7768  	// used in predict requests. Can only be set for the
  7769  	// `frequently-bought-together` type. If it isn't specified, it defaults to
  7770  	// MULTIPLE_CONTEXT_PRODUCTS.
  7771  	//
  7772  	// Possible values:
  7773  	//   "CONTEXT_PRODUCTS_TYPE_UNSPECIFIED" - Unspecified default value, should
  7774  	// never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.
  7775  	//   "SINGLE_CONTEXT_PRODUCT" - Use only a single product as context for the
  7776  	// recommendation. Typically used on pages like add-to-cart or product details.
  7777  	//   "MULTIPLE_CONTEXT_PRODUCTS" - Use one or multiple products as context for
  7778  	// the recommendation. Typically used on shopping cart pages.
  7779  	ContextProductsType string `json:"contextProductsType,omitempty"`
  7780  	// ForceSendFields is a list of field names (e.g. "ContextProductsType") to
  7781  	// unconditionally include in API requests. By default, fields with empty or
  7782  	// default values are omitted from API requests. See
  7783  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7784  	// details.
  7785  	ForceSendFields []string `json:"-"`
  7786  	// NullFields is a list of field names (e.g. "ContextProductsType") to include
  7787  	// in API requests with the JSON null value. By default, fields with empty
  7788  	// values are omitted from API requests. See
  7789  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7790  	NullFields []string `json:"-"`
  7791  }
  7792  
  7793  func (s *GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig) MarshalJSON() ([]byte, error) {
  7794  	type NoMethod GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig
  7795  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7796  }
  7797  
  7798  // GoogleCloudRetailV2betaModelModelFeaturesConfig: Additional model features
  7799  // config.
  7800  type GoogleCloudRetailV2betaModelModelFeaturesConfig struct {
  7801  	// FrequentlyBoughtTogetherConfig: Additional configs for
  7802  	// frequently-bought-together models.
  7803  	FrequentlyBoughtTogetherConfig *GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig `json:"frequentlyBoughtTogetherConfig,omitempty"`
  7804  	// ForceSendFields is a list of field names (e.g.
  7805  	// "FrequentlyBoughtTogetherConfig") to unconditionally include in API
  7806  	// requests. By default, fields with empty or default values are omitted from
  7807  	// API requests. See
  7808  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7809  	// details.
  7810  	ForceSendFields []string `json:"-"`
  7811  	// NullFields is a list of field names (e.g. "FrequentlyBoughtTogetherConfig")
  7812  	// to include in API requests with the JSON null value. By default, fields with
  7813  	// empty values are omitted from API requests. See
  7814  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7815  	NullFields []string `json:"-"`
  7816  }
  7817  
  7818  func (s *GoogleCloudRetailV2betaModelModelFeaturesConfig) MarshalJSON() ([]byte, error) {
  7819  	type NoMethod GoogleCloudRetailV2betaModelModelFeaturesConfig
  7820  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7821  }
  7822  
  7823  // GoogleCloudRetailV2betaModelServingConfigList: Represents an ordered
  7824  // combination of valid serving configs, which can be used for
  7825  // `PAGE_OPTIMIZATION` recommendations.
  7826  type GoogleCloudRetailV2betaModelServingConfigList struct {
  7827  	// ServingConfigIds: Optional. A set of valid serving configs that may be used
  7828  	// for `PAGE_OPTIMIZATION`.
  7829  	ServingConfigIds []string `json:"servingConfigIds,omitempty"`
  7830  	// ForceSendFields is a list of field names (e.g. "ServingConfigIds") to
  7831  	// unconditionally include in API requests. By default, fields with empty or
  7832  	// default values are omitted from API requests. See
  7833  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7834  	// details.
  7835  	ForceSendFields []string `json:"-"`
  7836  	// NullFields is a list of field names (e.g. "ServingConfigIds") to include in
  7837  	// API requests with the JSON null value. By default, fields with empty values
  7838  	// are omitted from API requests. See
  7839  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7840  	NullFields []string `json:"-"`
  7841  }
  7842  
  7843  func (s *GoogleCloudRetailV2betaModelServingConfigList) MarshalJSON() ([]byte, error) {
  7844  	type NoMethod GoogleCloudRetailV2betaModelServingConfigList
  7845  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7846  }
  7847  
  7848  // GoogleCloudRetailV2betaOutputResult: Output result that stores the
  7849  // information about where the exported data is stored.
  7850  type GoogleCloudRetailV2betaOutputResult struct {
  7851  	// BigqueryResult: The BigQuery location where the result is stored.
  7852  	BigqueryResult []*GoogleCloudRetailV2betaBigQueryOutputResult `json:"bigqueryResult,omitempty"`
  7853  	// GcsResult: The Google Cloud Storage location where the result is stored.
  7854  	GcsResult []*GoogleCloudRetailV2betaGcsOutputResult `json:"gcsResult,omitempty"`
  7855  	// ForceSendFields is a list of field names (e.g. "BigqueryResult") to
  7856  	// unconditionally include in API requests. By default, fields with empty or
  7857  	// default values are omitted from API requests. See
  7858  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7859  	// details.
  7860  	ForceSendFields []string `json:"-"`
  7861  	// NullFields is a list of field names (e.g. "BigqueryResult") to include in
  7862  	// API requests with the JSON null value. By default, fields with empty values
  7863  	// are omitted from API requests. See
  7864  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7865  	NullFields []string `json:"-"`
  7866  }
  7867  
  7868  func (s *GoogleCloudRetailV2betaOutputResult) MarshalJSON() ([]byte, error) {
  7869  	type NoMethod GoogleCloudRetailV2betaOutputResult
  7870  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7871  }
  7872  
  7873  // GoogleCloudRetailV2betaPurgeMetadata: Metadata related to the progress of
  7874  // the Purge operation. This will be returned by the
  7875  // google.longrunning.Operation.metadata field.
  7876  type GoogleCloudRetailV2betaPurgeMetadata struct {
  7877  }
  7878  
  7879  // GoogleCloudRetailV2betaPurgeProductsMetadata: Metadata related to the
  7880  // progress of the PurgeProducts operation. This will be returned by the
  7881  // google.longrunning.Operation.metadata field.
  7882  type GoogleCloudRetailV2betaPurgeProductsMetadata struct {
  7883  	// CreateTime: Operation create time.
  7884  	CreateTime string `json:"createTime,omitempty"`
  7885  	// FailureCount: Count of entries that encountered errors while processing.
  7886  	FailureCount int64 `json:"failureCount,omitempty,string"`
  7887  	// SuccessCount: Count of entries that were deleted successfully.
  7888  	SuccessCount int64 `json:"successCount,omitempty,string"`
  7889  	// UpdateTime: Operation last update time. If the operation is done, this is
  7890  	// also the finish time.
  7891  	UpdateTime string `json:"updateTime,omitempty"`
  7892  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  7893  	// unconditionally include in API requests. By default, fields with empty or
  7894  	// default values are omitted from API requests. See
  7895  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7896  	// details.
  7897  	ForceSendFields []string `json:"-"`
  7898  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  7899  	// requests with the JSON null value. By default, fields with empty values are
  7900  	// omitted from API requests. See
  7901  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7902  	NullFields []string `json:"-"`
  7903  }
  7904  
  7905  func (s *GoogleCloudRetailV2betaPurgeProductsMetadata) MarshalJSON() ([]byte, error) {
  7906  	type NoMethod GoogleCloudRetailV2betaPurgeProductsMetadata
  7907  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7908  }
  7909  
  7910  // GoogleCloudRetailV2betaPurgeProductsResponse: Response of the
  7911  // PurgeProductsRequest. If the long running operation is successfully done,
  7912  // then this message is returned by the google.longrunning.Operations.response
  7913  // field.
  7914  type GoogleCloudRetailV2betaPurgeProductsResponse struct {
  7915  	// PurgeCount: The total count of products purged as a result of the operation.
  7916  	PurgeCount int64 `json:"purgeCount,omitempty,string"`
  7917  	// PurgeSample: A sample of the product names that will be deleted. Only
  7918  	// populated if `force` is set to false. A max of 100 names will be returned
  7919  	// and the names are chosen at random.
  7920  	PurgeSample []string `json:"purgeSample,omitempty"`
  7921  	// ForceSendFields is a list of field names (e.g. "PurgeCount") to
  7922  	// unconditionally include in API requests. By default, fields with empty or
  7923  	// default values are omitted from API requests. See
  7924  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7925  	// details.
  7926  	ForceSendFields []string `json:"-"`
  7927  	// NullFields is a list of field names (e.g. "PurgeCount") to include in API
  7928  	// requests with the JSON null value. By default, fields with empty values are
  7929  	// omitted from API requests. See
  7930  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7931  	NullFields []string `json:"-"`
  7932  }
  7933  
  7934  func (s *GoogleCloudRetailV2betaPurgeProductsResponse) MarshalJSON() ([]byte, error) {
  7935  	type NoMethod GoogleCloudRetailV2betaPurgeProductsResponse
  7936  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7937  }
  7938  
  7939  // GoogleCloudRetailV2betaPurgeUserEventsResponse: Response of the
  7940  // PurgeUserEventsRequest. If the long running operation is successfully done,
  7941  // then this message is returned by the google.longrunning.Operations.response
  7942  // field.
  7943  type GoogleCloudRetailV2betaPurgeUserEventsResponse struct {
  7944  	// PurgedEventsCount: The total count of events purged as a result of the
  7945  	// operation.
  7946  	PurgedEventsCount int64 `json:"purgedEventsCount,omitempty,string"`
  7947  	// ForceSendFields is a list of field names (e.g. "PurgedEventsCount") to
  7948  	// unconditionally include in API requests. By default, fields with empty or
  7949  	// default values are omitted from API requests. See
  7950  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7951  	// details.
  7952  	ForceSendFields []string `json:"-"`
  7953  	// NullFields is a list of field names (e.g. "PurgedEventsCount") to include in
  7954  	// API requests with the JSON null value. By default, fields with empty values
  7955  	// are omitted from API requests. See
  7956  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7957  	NullFields []string `json:"-"`
  7958  }
  7959  
  7960  func (s *GoogleCloudRetailV2betaPurgeUserEventsResponse) MarshalJSON() ([]byte, error) {
  7961  	type NoMethod GoogleCloudRetailV2betaPurgeUserEventsResponse
  7962  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7963  }
  7964  
  7965  // GoogleCloudRetailV2betaRejoinUserEventsMetadata: Metadata for
  7966  // `RejoinUserEvents` method.
  7967  type GoogleCloudRetailV2betaRejoinUserEventsMetadata struct {
  7968  }
  7969  
  7970  // GoogleCloudRetailV2betaRejoinUserEventsResponse: Response message for
  7971  // `RejoinUserEvents` method.
  7972  type GoogleCloudRetailV2betaRejoinUserEventsResponse struct {
  7973  	// RejoinedUserEventsCount: Number of user events that were joined with latest
  7974  	// product catalog.
  7975  	RejoinedUserEventsCount int64 `json:"rejoinedUserEventsCount,omitempty,string"`
  7976  	// ForceSendFields is a list of field names (e.g. "RejoinedUserEventsCount") to
  7977  	// unconditionally include in API requests. By default, fields with empty or
  7978  	// default values are omitted from API requests. See
  7979  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  7980  	// details.
  7981  	ForceSendFields []string `json:"-"`
  7982  	// NullFields is a list of field names (e.g. "RejoinedUserEventsCount") to
  7983  	// include in API requests with the JSON null value. By default, fields with
  7984  	// empty values are omitted from API requests. See
  7985  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  7986  	NullFields []string `json:"-"`
  7987  }
  7988  
  7989  func (s *GoogleCloudRetailV2betaRejoinUserEventsResponse) MarshalJSON() ([]byte, error) {
  7990  	type NoMethod GoogleCloudRetailV2betaRejoinUserEventsResponse
  7991  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  7992  }
  7993  
  7994  // GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata: Metadata related to
  7995  // the progress of the RemoveFulfillmentPlaces operation. Currently empty
  7996  // because there is no meaningful metadata populated from the
  7997  // ProductService.RemoveFulfillmentPlaces method.
  7998  type GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata struct {
  7999  }
  8000  
  8001  // GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse: Response of the
  8002  // RemoveFulfillmentPlacesRequest. Currently empty because there is no
  8003  // meaningful response populated from the
  8004  // ProductService.RemoveFulfillmentPlaces method.
  8005  type GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse struct {
  8006  }
  8007  
  8008  // GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata: Metadata related to
  8009  // the progress of the RemoveLocalInventories operation. Currently empty
  8010  // because there is no meaningful metadata populated from the
  8011  // ProductService.RemoveLocalInventories method.
  8012  type GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata struct {
  8013  }
  8014  
  8015  // GoogleCloudRetailV2betaRemoveLocalInventoriesResponse: Response of the
  8016  // ProductService.RemoveLocalInventories API. Currently empty because there is
  8017  // no meaningful response populated from the
  8018  // ProductService.RemoveLocalInventories method.
  8019  type GoogleCloudRetailV2betaRemoveLocalInventoriesResponse struct {
  8020  }
  8021  
  8022  // GoogleCloudRetailV2betaSetInventoryMetadata: Metadata related to the
  8023  // progress of the SetInventory operation. Currently empty because there is no
  8024  // meaningful metadata populated from the ProductService.SetInventory method.
  8025  type GoogleCloudRetailV2betaSetInventoryMetadata struct {
  8026  }
  8027  
  8028  // GoogleCloudRetailV2betaSetInventoryResponse: Response of the
  8029  // SetInventoryRequest. Currently empty because there is no meaningful response
  8030  // populated from the ProductService.SetInventory method.
  8031  type GoogleCloudRetailV2betaSetInventoryResponse struct {
  8032  }
  8033  
  8034  // GoogleCloudRetailV2betaTuneModelMetadata: Metadata associated with a tune
  8035  // operation.
  8036  type GoogleCloudRetailV2betaTuneModelMetadata struct {
  8037  	// Model: The resource name of the model that this tune applies to. Format:
  8038  	// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mode
  8039  	// ls/{model_id}`
  8040  	Model string `json:"model,omitempty"`
  8041  	// ForceSendFields is a list of field names (e.g. "Model") to unconditionally
  8042  	// include in API requests. By default, fields with empty or default values are
  8043  	// omitted from API requests. See
  8044  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8045  	// details.
  8046  	ForceSendFields []string `json:"-"`
  8047  	// NullFields is a list of field names (e.g. "Model") to include in API
  8048  	// requests with the JSON null value. By default, fields with empty values are
  8049  	// omitted from API requests. See
  8050  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8051  	NullFields []string `json:"-"`
  8052  }
  8053  
  8054  func (s *GoogleCloudRetailV2betaTuneModelMetadata) MarshalJSON() ([]byte, error) {
  8055  	type NoMethod GoogleCloudRetailV2betaTuneModelMetadata
  8056  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8057  }
  8058  
  8059  // GoogleCloudRetailV2betaTuneModelResponse: Response associated with a tune
  8060  // operation.
  8061  type GoogleCloudRetailV2betaTuneModelResponse struct {
  8062  }
  8063  
  8064  // GoogleCloudRetailV2betaUserEventImportSummary: A summary of import result.
  8065  // The UserEventImportSummary summarizes the import status for user events.
  8066  type GoogleCloudRetailV2betaUserEventImportSummary struct {
  8067  	// JoinedEventsCount: Count of user events imported with complete existing
  8068  	// catalog information.
  8069  	JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"`
  8070  	// UnjoinedEventsCount: Count of user events imported, but with catalog
  8071  	// information not found in the imported catalog.
  8072  	UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"`
  8073  	// ForceSendFields is a list of field names (e.g. "JoinedEventsCount") to
  8074  	// unconditionally include in API requests. By default, fields with empty or
  8075  	// default values are omitted from API requests. See
  8076  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8077  	// details.
  8078  	ForceSendFields []string `json:"-"`
  8079  	// NullFields is a list of field names (e.g. "JoinedEventsCount") to include in
  8080  	// API requests with the JSON null value. By default, fields with empty values
  8081  	// are omitted from API requests. See
  8082  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8083  	NullFields []string `json:"-"`
  8084  }
  8085  
  8086  func (s *GoogleCloudRetailV2betaUserEventImportSummary) MarshalJSON() ([]byte, error) {
  8087  	type NoMethod GoogleCloudRetailV2betaUserEventImportSummary
  8088  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8089  }
  8090  
  8091  // GoogleLongrunningListOperationsResponse: The response message for
  8092  // Operations.ListOperations.
  8093  type GoogleLongrunningListOperationsResponse struct {
  8094  	// NextPageToken: The standard List next-page token.
  8095  	NextPageToken string `json:"nextPageToken,omitempty"`
  8096  	// Operations: A list of operations that matches the specified filter in the
  8097  	// request.
  8098  	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
  8099  
  8100  	// ServerResponse contains the HTTP response code and headers from the server.
  8101  	googleapi.ServerResponse `json:"-"`
  8102  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  8103  	// unconditionally include in API requests. By default, fields with empty or
  8104  	// default values are omitted from API requests. See
  8105  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8106  	// details.
  8107  	ForceSendFields []string `json:"-"`
  8108  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  8109  	// requests with the JSON null value. By default, fields with empty values are
  8110  	// omitted from API requests. See
  8111  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8112  	NullFields []string `json:"-"`
  8113  }
  8114  
  8115  func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
  8116  	type NoMethod GoogleLongrunningListOperationsResponse
  8117  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8118  }
  8119  
  8120  // GoogleLongrunningOperation: This resource represents a long-running
  8121  // operation that is the result of a network API call.
  8122  type GoogleLongrunningOperation struct {
  8123  	// Done: If the value is `false`, it means the operation is still in progress.
  8124  	// If `true`, the operation is completed, and either `error` or `response` is
  8125  	// available.
  8126  	Done bool `json:"done,omitempty"`
  8127  	// Error: The error result of the operation in case of failure or cancellation.
  8128  	Error *GoogleRpcStatus `json:"error,omitempty"`
  8129  	// Metadata: Service-specific metadata associated with the operation. It
  8130  	// typically contains progress information and common metadata such as create
  8131  	// time. Some services might not provide such metadata. Any method that returns
  8132  	// a long-running operation should document the metadata type, if any.
  8133  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  8134  	// Name: The server-assigned name, which is only unique within the same service
  8135  	// that originally returns it. If you use the default HTTP mapping, the `name`
  8136  	// should be a resource name ending with `operations/{unique_id}`.
  8137  	Name string `json:"name,omitempty"`
  8138  	// Response: The normal, successful response of the operation. If the original
  8139  	// method returns no data on success, such as `Delete`, the response is
  8140  	// `google.protobuf.Empty`. If the original method is standard
  8141  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  8142  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  8143  	// original method name. For example, if the original method name is
  8144  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  8145  	Response googleapi.RawMessage `json:"response,omitempty"`
  8146  
  8147  	// ServerResponse contains the HTTP response code and headers from the server.
  8148  	googleapi.ServerResponse `json:"-"`
  8149  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  8150  	// include in API requests. By default, fields with empty or default values are
  8151  	// omitted from API requests. See
  8152  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8153  	// details.
  8154  	ForceSendFields []string `json:"-"`
  8155  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  8156  	// with the JSON null value. By default, fields with empty values are omitted
  8157  	// from API requests. See
  8158  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8159  	NullFields []string `json:"-"`
  8160  }
  8161  
  8162  func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  8163  	type NoMethod GoogleLongrunningOperation
  8164  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8165  }
  8166  
  8167  // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid
  8168  // defining duplicated empty messages in your APIs. A typical example is to use
  8169  // it as the request or the response type of an API method. For instance:
  8170  // service Foo { rpc Bar(google.protobuf.Empty) returns
  8171  // (google.protobuf.Empty); }
  8172  type GoogleProtobufEmpty struct {
  8173  	// ServerResponse contains the HTTP response code and headers from the server.
  8174  	googleapi.ServerResponse `json:"-"`
  8175  }
  8176  
  8177  // GoogleRpcStatus: The `Status` type defines a logical error model that is
  8178  // suitable for different programming environments, including REST APIs and RPC
  8179  // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
  8180  // contains three pieces of data: error code, error message, and error details.
  8181  // You can find out more about this error model and how to work with it in the
  8182  // API Design Guide (https://cloud.google.com/apis/design/errors).
  8183  type GoogleRpcStatus struct {
  8184  	// Code: The status code, which should be an enum value of google.rpc.Code.
  8185  	Code int64 `json:"code,omitempty"`
  8186  	// Details: A list of messages that carry the error details. There is a common
  8187  	// set of message types for APIs to use.
  8188  	Details []googleapi.RawMessage `json:"details,omitempty"`
  8189  	// Message: A developer-facing error message, which should be in English. Any
  8190  	// user-facing error message should be localized and sent in the
  8191  	// google.rpc.Status.details field, or localized by the client.
  8192  	Message string `json:"message,omitempty"`
  8193  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  8194  	// include in API requests. By default, fields with empty or default values are
  8195  	// omitted from API requests. See
  8196  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8197  	// details.
  8198  	ForceSendFields []string `json:"-"`
  8199  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  8200  	// with the JSON null value. By default, fields with empty values are omitted
  8201  	// from API requests. See
  8202  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8203  	NullFields []string `json:"-"`
  8204  }
  8205  
  8206  func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  8207  	type NoMethod GoogleRpcStatus
  8208  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8209  }
  8210  
  8211  // GoogleTypeDate: Represents a whole or partial calendar date, such as a
  8212  // birthday. The time of day and time zone are either specified elsewhere or
  8213  // are insignificant. The date is relative to the Gregorian Calendar. This can
  8214  // represent one of the following: * A full date, with non-zero year, month,
  8215  // and day values. * A month and day, with a zero year (for example, an
  8216  // anniversary). * A year on its own, with a zero month and a zero day. * A
  8217  // year and month, with a zero day (for example, a credit card expiration
  8218  // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
  8219  // google.protobuf.Timestamp
  8220  type GoogleTypeDate struct {
  8221  	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
  8222  	// or 0 to specify a year by itself or a year and month where the day isn't
  8223  	// significant.
  8224  	Day int64 `json:"day,omitempty"`
  8225  	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
  8226  	// a month and day.
  8227  	Month int64 `json:"month,omitempty"`
  8228  	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
  8229  	// without a year.
  8230  	Year int64 `json:"year,omitempty"`
  8231  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
  8232  	// include in API requests. By default, fields with empty or default values are
  8233  	// omitted from API requests. See
  8234  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  8235  	// details.
  8236  	ForceSendFields []string `json:"-"`
  8237  	// NullFields is a list of field names (e.g. "Day") to include in API requests
  8238  	// with the JSON null value. By default, fields with empty values are omitted
  8239  	// from API requests. See
  8240  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  8241  	NullFields []string `json:"-"`
  8242  }
  8243  
  8244  func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) {
  8245  	type NoMethod GoogleTypeDate
  8246  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  8247  }
  8248  
  8249  type ProjectsLocationsCatalogsCompleteQueryCall struct {
  8250  	s            *Service
  8251  	catalog      string
  8252  	urlParams_   gensupport.URLParams
  8253  	ifNoneMatch_ string
  8254  	ctx_         context.Context
  8255  	header_      http.Header
  8256  }
  8257  
  8258  // CompleteQuery: Completes the specified prefix with keyword suggestions. This
  8259  // feature is only available for users who have Retail Search enabled. Enable
  8260  // Retail Search on Cloud Console before using this feature.
  8261  //
  8262  //   - catalog: Catalog for which the completion is performed. Full resource name
  8263  //     of catalog, such as
  8264  //     `projects/*/locations/global/catalogs/default_catalog`.
  8265  func (r *ProjectsLocationsCatalogsService) CompleteQuery(catalog string) *ProjectsLocationsCatalogsCompleteQueryCall {
  8266  	c := &ProjectsLocationsCatalogsCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8267  	c.catalog = catalog
  8268  	return c
  8269  }
  8270  
  8271  // Dataset sets the optional parameter "dataset": Determines which dataset to
  8272  // use for fetching completion. "user-data" will use the imported dataset
  8273  // through CompletionService.ImportCompletionData. "cloud-retail" will use the
  8274  // dataset generated by cloud retail based on user events. If leave empty, it
  8275  // will use the "user-data". Current supported values: * user-data *
  8276  // cloud-retail: This option requires enabling auto-learning function first.
  8277  // See guidelines
  8278  // (https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
  8279  func (c *ProjectsLocationsCatalogsCompleteQueryCall) Dataset(dataset string) *ProjectsLocationsCatalogsCompleteQueryCall {
  8280  	c.urlParams_.Set("dataset", dataset)
  8281  	return c
  8282  }
  8283  
  8284  // DeviceType sets the optional parameter "deviceType": The device type context
  8285  // for completion suggestions. We recommend that you leave this field empty. It
  8286  // can apply different suggestions on different device types, e.g. `DESKTOP`,
  8287  // `MOBILE`. If it is empty, the suggestions are across all device types.
  8288  // Supported formats: * `UNKNOWN_DEVICE_TYPE` * `DESKTOP` * `MOBILE` * A
  8289  // customized string starts with `OTHER_`, e.g. `OTHER_IPHONE`.
  8290  func (c *ProjectsLocationsCatalogsCompleteQueryCall) DeviceType(deviceType string) *ProjectsLocationsCatalogsCompleteQueryCall {
  8291  	c.urlParams_.Set("deviceType", deviceType)
  8292  	return c
  8293  }
  8294  
  8295  // EnableAttributeSuggestions sets the optional parameter
  8296  // "enableAttributeSuggestions": If true, attribute suggestions are enabled and
  8297  // provided in response. This field is only available for "cloud-retail"
  8298  // dataset.
  8299  func (c *ProjectsLocationsCatalogsCompleteQueryCall) EnableAttributeSuggestions(enableAttributeSuggestions bool) *ProjectsLocationsCatalogsCompleteQueryCall {
  8300  	c.urlParams_.Set("enableAttributeSuggestions", fmt.Sprint(enableAttributeSuggestions))
  8301  	return c
  8302  }
  8303  
  8304  // Entity sets the optional parameter "entity": The entity for customers who
  8305  // run multiple entities, domains, sites, or regions, for example, `Google US`,
  8306  // `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it
  8307  // must be an exact match with UserEvent.entity to get per-entity autocomplete
  8308  // results.
  8309  func (c *ProjectsLocationsCatalogsCompleteQueryCall) Entity(entity string) *ProjectsLocationsCatalogsCompleteQueryCall {
  8310  	c.urlParams_.Set("entity", entity)
  8311  	return c
  8312  }
  8313  
  8314  // LanguageCodes sets the optional parameter "languageCodes": Note that this
  8315  // field applies for `user-data` dataset only. For requests with `cloud-retail`
  8316  // dataset, setting this field has no effect. The language filters applied to
  8317  // the output suggestions. If set, it should contain the language of the query.
  8318  // If not set, suggestions are returned without considering language
  8319  // restrictions. This is the BCP-47 language code, such as "en-US" or
  8320  // "sr-Latn". For more information, see Tags for Identifying Languages
  8321  // (https://tools.ietf.org/html/bcp47). The maximum number of language codes is
  8322  // 3.
  8323  func (c *ProjectsLocationsCatalogsCompleteQueryCall) LanguageCodes(languageCodes ...string) *ProjectsLocationsCatalogsCompleteQueryCall {
  8324  	c.urlParams_.SetMulti("languageCodes", append([]string{}, languageCodes...))
  8325  	return c
  8326  }
  8327  
  8328  // MaxSuggestions sets the optional parameter "maxSuggestions": Completion max
  8329  // suggestions. If left unset or set to 0, then will fallback to the configured
  8330  // value CompletionConfig.max_suggestions. The maximum allowed max suggestions
  8331  // is 20. If it is set higher, it will be capped by 20.
  8332  func (c *ProjectsLocationsCatalogsCompleteQueryCall) MaxSuggestions(maxSuggestions int64) *ProjectsLocationsCatalogsCompleteQueryCall {
  8333  	c.urlParams_.Set("maxSuggestions", fmt.Sprint(maxSuggestions))
  8334  	return c
  8335  }
  8336  
  8337  // Query sets the optional parameter "query": Required. The query used to
  8338  // generate suggestions. The maximum number of allowed characters is 255.
  8339  func (c *ProjectsLocationsCatalogsCompleteQueryCall) Query(query string) *ProjectsLocationsCatalogsCompleteQueryCall {
  8340  	c.urlParams_.Set("query", query)
  8341  	return c
  8342  }
  8343  
  8344  // VisitorId sets the optional parameter "visitorId": Required field. A unique
  8345  // identifier for tracking visitors. For example, this could be implemented
  8346  // with an HTTP cookie, which should be able to uniquely identify a visitor on
  8347  // a single device. This unique identifier should not change if the visitor
  8348  // logs in or out of the website. The field must be a UTF-8 encoded string with
  8349  // a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
  8350  // returned.
  8351  func (c *ProjectsLocationsCatalogsCompleteQueryCall) VisitorId(visitorId string) *ProjectsLocationsCatalogsCompleteQueryCall {
  8352  	c.urlParams_.Set("visitorId", visitorId)
  8353  	return c
  8354  }
  8355  
  8356  // Fields allows partial responses to be retrieved. See
  8357  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8358  // details.
  8359  func (c *ProjectsLocationsCatalogsCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCompleteQueryCall {
  8360  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8361  	return c
  8362  }
  8363  
  8364  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8365  // object's ETag matches the given value. This is useful for getting updates
  8366  // only after the object has changed since the last request.
  8367  func (c *ProjectsLocationsCatalogsCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsCompleteQueryCall {
  8368  	c.ifNoneMatch_ = entityTag
  8369  	return c
  8370  }
  8371  
  8372  // Context sets the context to be used in this call's Do method.
  8373  func (c *ProjectsLocationsCatalogsCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCompleteQueryCall {
  8374  	c.ctx_ = ctx
  8375  	return c
  8376  }
  8377  
  8378  // Header returns a http.Header that can be modified by the caller to add
  8379  // headers to the request.
  8380  func (c *ProjectsLocationsCatalogsCompleteQueryCall) Header() http.Header {
  8381  	if c.header_ == nil {
  8382  		c.header_ = make(http.Header)
  8383  	}
  8384  	return c.header_
  8385  }
  8386  
  8387  func (c *ProjectsLocationsCatalogsCompleteQueryCall) doRequest(alt string) (*http.Response, error) {
  8388  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8389  	if c.ifNoneMatch_ != "" {
  8390  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8391  	}
  8392  	var body io.Reader = nil
  8393  	c.urlParams_.Set("alt", alt)
  8394  	c.urlParams_.Set("prettyPrint", "false")
  8395  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}:completeQuery")
  8396  	urls += "?" + c.urlParams_.Encode()
  8397  	req, err := http.NewRequest("GET", urls, body)
  8398  	if err != nil {
  8399  		return nil, err
  8400  	}
  8401  	req.Header = reqHeaders
  8402  	googleapi.Expand(req.URL, map[string]string{
  8403  		"catalog": c.catalog,
  8404  	})
  8405  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8406  }
  8407  
  8408  // Do executes the "retail.projects.locations.catalogs.completeQuery" call.
  8409  // Any non-2xx status code is an error. Response headers are in either
  8410  // *GoogleCloudRetailV2CompleteQueryResponse.ServerResponse.Header or (if a
  8411  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8412  // googleapi.IsNotModified to check whether the returned error was because
  8413  // http.StatusNotModified was returned.
  8414  func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2CompleteQueryResponse, error) {
  8415  	gensupport.SetOptions(c.urlParams_, opts...)
  8416  	res, err := c.doRequest("json")
  8417  	if res != nil && res.StatusCode == http.StatusNotModified {
  8418  		if res.Body != nil {
  8419  			res.Body.Close()
  8420  		}
  8421  		return nil, gensupport.WrapError(&googleapi.Error{
  8422  			Code:   res.StatusCode,
  8423  			Header: res.Header,
  8424  		})
  8425  	}
  8426  	if err != nil {
  8427  		return nil, err
  8428  	}
  8429  	defer googleapi.CloseBody(res)
  8430  	if err := googleapi.CheckResponse(res); err != nil {
  8431  		return nil, gensupport.WrapError(err)
  8432  	}
  8433  	ret := &GoogleCloudRetailV2CompleteQueryResponse{
  8434  		ServerResponse: googleapi.ServerResponse{
  8435  			Header:         res.Header,
  8436  			HTTPStatusCode: res.StatusCode,
  8437  		},
  8438  	}
  8439  	target := &ret
  8440  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8441  		return nil, err
  8442  	}
  8443  	return ret, nil
  8444  }
  8445  
  8446  type ProjectsLocationsCatalogsExportAnalyticsMetricsCall struct {
  8447  	s                                                *Service
  8448  	catalog                                          string
  8449  	googlecloudretailv2exportanalyticsmetricsrequest *GoogleCloudRetailV2ExportAnalyticsMetricsRequest
  8450  	urlParams_                                       gensupport.URLParams
  8451  	ctx_                                             context.Context
  8452  	header_                                          http.Header
  8453  }
  8454  
  8455  // ExportAnalyticsMetrics: Exports analytics metrics. `Operation.response` is
  8456  // of type `ExportAnalyticsMetricsResponse`. `Operation.metadata` is of type
  8457  // `ExportMetadata`.
  8458  //
  8459  //   - catalog: Full resource name of the parent catalog. Expected format:
  8460  //     `projects/*/locations/*/catalogs/*`.
  8461  func (r *ProjectsLocationsCatalogsService) ExportAnalyticsMetrics(catalog string, googlecloudretailv2exportanalyticsmetricsrequest *GoogleCloudRetailV2ExportAnalyticsMetricsRequest) *ProjectsLocationsCatalogsExportAnalyticsMetricsCall {
  8462  	c := &ProjectsLocationsCatalogsExportAnalyticsMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8463  	c.catalog = catalog
  8464  	c.googlecloudretailv2exportanalyticsmetricsrequest = googlecloudretailv2exportanalyticsmetricsrequest
  8465  	return c
  8466  }
  8467  
  8468  // Fields allows partial responses to be retrieved. See
  8469  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8470  // details.
  8471  func (c *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsExportAnalyticsMetricsCall {
  8472  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8473  	return c
  8474  }
  8475  
  8476  // Context sets the context to be used in this call's Do method.
  8477  func (c *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) Context(ctx context.Context) *ProjectsLocationsCatalogsExportAnalyticsMetricsCall {
  8478  	c.ctx_ = ctx
  8479  	return c
  8480  }
  8481  
  8482  // Header returns a http.Header that can be modified by the caller to add
  8483  // headers to the request.
  8484  func (c *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) Header() http.Header {
  8485  	if c.header_ == nil {
  8486  		c.header_ = make(http.Header)
  8487  	}
  8488  	return c.header_
  8489  }
  8490  
  8491  func (c *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) doRequest(alt string) (*http.Response, error) {
  8492  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8493  	var body io.Reader = nil
  8494  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2exportanalyticsmetricsrequest)
  8495  	if err != nil {
  8496  		return nil, err
  8497  	}
  8498  	c.urlParams_.Set("alt", alt)
  8499  	c.urlParams_.Set("prettyPrint", "false")
  8500  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}:exportAnalyticsMetrics")
  8501  	urls += "?" + c.urlParams_.Encode()
  8502  	req, err := http.NewRequest("POST", urls, body)
  8503  	if err != nil {
  8504  		return nil, err
  8505  	}
  8506  	req.Header = reqHeaders
  8507  	googleapi.Expand(req.URL, map[string]string{
  8508  		"catalog": c.catalog,
  8509  	})
  8510  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8511  }
  8512  
  8513  // Do executes the "retail.projects.locations.catalogs.exportAnalyticsMetrics" call.
  8514  // Any non-2xx status code is an error. Response headers are in either
  8515  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  8516  // returned at all) in error.(*googleapi.Error).Header. Use
  8517  // googleapi.IsNotModified to check whether the returned error was because
  8518  // http.StatusNotModified was returned.
  8519  func (c *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  8520  	gensupport.SetOptions(c.urlParams_, opts...)
  8521  	res, err := c.doRequest("json")
  8522  	if res != nil && res.StatusCode == http.StatusNotModified {
  8523  		if res.Body != nil {
  8524  			res.Body.Close()
  8525  		}
  8526  		return nil, gensupport.WrapError(&googleapi.Error{
  8527  			Code:   res.StatusCode,
  8528  			Header: res.Header,
  8529  		})
  8530  	}
  8531  	if err != nil {
  8532  		return nil, err
  8533  	}
  8534  	defer googleapi.CloseBody(res)
  8535  	if err := googleapi.CheckResponse(res); err != nil {
  8536  		return nil, gensupport.WrapError(err)
  8537  	}
  8538  	ret := &GoogleLongrunningOperation{
  8539  		ServerResponse: googleapi.ServerResponse{
  8540  			Header:         res.Header,
  8541  			HTTPStatusCode: res.StatusCode,
  8542  		},
  8543  	}
  8544  	target := &ret
  8545  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8546  		return nil, err
  8547  	}
  8548  	return ret, nil
  8549  }
  8550  
  8551  type ProjectsLocationsCatalogsGetAttributesConfigCall struct {
  8552  	s            *Service
  8553  	name         string
  8554  	urlParams_   gensupport.URLParams
  8555  	ifNoneMatch_ string
  8556  	ctx_         context.Context
  8557  	header_      http.Header
  8558  }
  8559  
  8560  // GetAttributesConfig: Gets an AttributesConfig.
  8561  //
  8562  //   - name: Full AttributesConfig resource name. Format:
  8563  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at
  8564  //     tributesConfig`.
  8565  func (r *ProjectsLocationsCatalogsService) GetAttributesConfig(name string) *ProjectsLocationsCatalogsGetAttributesConfigCall {
  8566  	c := &ProjectsLocationsCatalogsGetAttributesConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8567  	c.name = name
  8568  	return c
  8569  }
  8570  
  8571  // Fields allows partial responses to be retrieved. See
  8572  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8573  // details.
  8574  func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetAttributesConfigCall {
  8575  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8576  	return c
  8577  }
  8578  
  8579  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8580  // object's ETag matches the given value. This is useful for getting updates
  8581  // only after the object has changed since the last request.
  8582  func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetAttributesConfigCall {
  8583  	c.ifNoneMatch_ = entityTag
  8584  	return c
  8585  }
  8586  
  8587  // Context sets the context to be used in this call's Do method.
  8588  func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetAttributesConfigCall {
  8589  	c.ctx_ = ctx
  8590  	return c
  8591  }
  8592  
  8593  // Header returns a http.Header that can be modified by the caller to add
  8594  // headers to the request.
  8595  func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Header() http.Header {
  8596  	if c.header_ == nil {
  8597  		c.header_ = make(http.Header)
  8598  	}
  8599  	return c.header_
  8600  }
  8601  
  8602  func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) doRequest(alt string) (*http.Response, error) {
  8603  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8604  	if c.ifNoneMatch_ != "" {
  8605  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8606  	}
  8607  	var body io.Reader = nil
  8608  	c.urlParams_.Set("alt", alt)
  8609  	c.urlParams_.Set("prettyPrint", "false")
  8610  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  8611  	urls += "?" + c.urlParams_.Encode()
  8612  	req, err := http.NewRequest("GET", urls, body)
  8613  	if err != nil {
  8614  		return nil, err
  8615  	}
  8616  	req.Header = reqHeaders
  8617  	googleapi.Expand(req.URL, map[string]string{
  8618  		"name": c.name,
  8619  	})
  8620  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8621  }
  8622  
  8623  // Do executes the "retail.projects.locations.catalogs.getAttributesConfig" call.
  8624  // Any non-2xx status code is an error. Response headers are in either
  8625  // *GoogleCloudRetailV2AttributesConfig.ServerResponse.Header or (if a response
  8626  // was returned at all) in error.(*googleapi.Error).Header. Use
  8627  // googleapi.IsNotModified to check whether the returned error was because
  8628  // http.StatusNotModified was returned.
  8629  func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, error) {
  8630  	gensupport.SetOptions(c.urlParams_, opts...)
  8631  	res, err := c.doRequest("json")
  8632  	if res != nil && res.StatusCode == http.StatusNotModified {
  8633  		if res.Body != nil {
  8634  			res.Body.Close()
  8635  		}
  8636  		return nil, gensupport.WrapError(&googleapi.Error{
  8637  			Code:   res.StatusCode,
  8638  			Header: res.Header,
  8639  		})
  8640  	}
  8641  	if err != nil {
  8642  		return nil, err
  8643  	}
  8644  	defer googleapi.CloseBody(res)
  8645  	if err := googleapi.CheckResponse(res); err != nil {
  8646  		return nil, gensupport.WrapError(err)
  8647  	}
  8648  	ret := &GoogleCloudRetailV2AttributesConfig{
  8649  		ServerResponse: googleapi.ServerResponse{
  8650  			Header:         res.Header,
  8651  			HTTPStatusCode: res.StatusCode,
  8652  		},
  8653  	}
  8654  	target := &ret
  8655  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8656  		return nil, err
  8657  	}
  8658  	return ret, nil
  8659  }
  8660  
  8661  type ProjectsLocationsCatalogsGetCompletionConfigCall struct {
  8662  	s            *Service
  8663  	name         string
  8664  	urlParams_   gensupport.URLParams
  8665  	ifNoneMatch_ string
  8666  	ctx_         context.Context
  8667  	header_      http.Header
  8668  }
  8669  
  8670  // GetCompletionConfig: Gets a CompletionConfig.
  8671  //
  8672  //   - name: Full CompletionConfig resource name. Format:
  8673  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/co
  8674  //     mpletionConfig`.
  8675  func (r *ProjectsLocationsCatalogsService) GetCompletionConfig(name string) *ProjectsLocationsCatalogsGetCompletionConfigCall {
  8676  	c := &ProjectsLocationsCatalogsGetCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8677  	c.name = name
  8678  	return c
  8679  }
  8680  
  8681  // Fields allows partial responses to be retrieved. See
  8682  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8683  // details.
  8684  func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetCompletionConfigCall {
  8685  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8686  	return c
  8687  }
  8688  
  8689  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8690  // object's ETag matches the given value. This is useful for getting updates
  8691  // only after the object has changed since the last request.
  8692  func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetCompletionConfigCall {
  8693  	c.ifNoneMatch_ = entityTag
  8694  	return c
  8695  }
  8696  
  8697  // Context sets the context to be used in this call's Do method.
  8698  func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetCompletionConfigCall {
  8699  	c.ctx_ = ctx
  8700  	return c
  8701  }
  8702  
  8703  // Header returns a http.Header that can be modified by the caller to add
  8704  // headers to the request.
  8705  func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Header() http.Header {
  8706  	if c.header_ == nil {
  8707  		c.header_ = make(http.Header)
  8708  	}
  8709  	return c.header_
  8710  }
  8711  
  8712  func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) doRequest(alt string) (*http.Response, error) {
  8713  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8714  	if c.ifNoneMatch_ != "" {
  8715  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8716  	}
  8717  	var body io.Reader = nil
  8718  	c.urlParams_.Set("alt", alt)
  8719  	c.urlParams_.Set("prettyPrint", "false")
  8720  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  8721  	urls += "?" + c.urlParams_.Encode()
  8722  	req, err := http.NewRequest("GET", urls, body)
  8723  	if err != nil {
  8724  		return nil, err
  8725  	}
  8726  	req.Header = reqHeaders
  8727  	googleapi.Expand(req.URL, map[string]string{
  8728  		"name": c.name,
  8729  	})
  8730  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8731  }
  8732  
  8733  // Do executes the "retail.projects.locations.catalogs.getCompletionConfig" call.
  8734  // Any non-2xx status code is an error. Response headers are in either
  8735  // *GoogleCloudRetailV2CompletionConfig.ServerResponse.Header or (if a response
  8736  // was returned at all) in error.(*googleapi.Error).Header. Use
  8737  // googleapi.IsNotModified to check whether the returned error was because
  8738  // http.StatusNotModified was returned.
  8739  func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2CompletionConfig, error) {
  8740  	gensupport.SetOptions(c.urlParams_, opts...)
  8741  	res, err := c.doRequest("json")
  8742  	if res != nil && res.StatusCode == http.StatusNotModified {
  8743  		if res.Body != nil {
  8744  			res.Body.Close()
  8745  		}
  8746  		return nil, gensupport.WrapError(&googleapi.Error{
  8747  			Code:   res.StatusCode,
  8748  			Header: res.Header,
  8749  		})
  8750  	}
  8751  	if err != nil {
  8752  		return nil, err
  8753  	}
  8754  	defer googleapi.CloseBody(res)
  8755  	if err := googleapi.CheckResponse(res); err != nil {
  8756  		return nil, gensupport.WrapError(err)
  8757  	}
  8758  	ret := &GoogleCloudRetailV2CompletionConfig{
  8759  		ServerResponse: googleapi.ServerResponse{
  8760  			Header:         res.Header,
  8761  			HTTPStatusCode: res.StatusCode,
  8762  		},
  8763  	}
  8764  	target := &ret
  8765  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8766  		return nil, err
  8767  	}
  8768  	return ret, nil
  8769  }
  8770  
  8771  type ProjectsLocationsCatalogsGetDefaultBranchCall struct {
  8772  	s            *Service
  8773  	catalog      string
  8774  	urlParams_   gensupport.URLParams
  8775  	ifNoneMatch_ string
  8776  	ctx_         context.Context
  8777  	header_      http.Header
  8778  }
  8779  
  8780  // GetDefaultBranch: Get which branch is currently default branch set by
  8781  // CatalogService.SetDefaultBranch method under a specified parent catalog.
  8782  //
  8783  //   - catalog: The parent catalog resource name, such as
  8784  //     `projects/*/locations/global/catalogs/default_catalog`.
  8785  func (r *ProjectsLocationsCatalogsService) GetDefaultBranch(catalog string) *ProjectsLocationsCatalogsGetDefaultBranchCall {
  8786  	c := &ProjectsLocationsCatalogsGetDefaultBranchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8787  	c.catalog = catalog
  8788  	return c
  8789  }
  8790  
  8791  // Fields allows partial responses to be retrieved. See
  8792  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8793  // details.
  8794  func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetDefaultBranchCall {
  8795  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8796  	return c
  8797  }
  8798  
  8799  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8800  // object's ETag matches the given value. This is useful for getting updates
  8801  // only after the object has changed since the last request.
  8802  func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetDefaultBranchCall {
  8803  	c.ifNoneMatch_ = entityTag
  8804  	return c
  8805  }
  8806  
  8807  // Context sets the context to be used in this call's Do method.
  8808  func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetDefaultBranchCall {
  8809  	c.ctx_ = ctx
  8810  	return c
  8811  }
  8812  
  8813  // Header returns a http.Header that can be modified by the caller to add
  8814  // headers to the request.
  8815  func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Header() http.Header {
  8816  	if c.header_ == nil {
  8817  		c.header_ = make(http.Header)
  8818  	}
  8819  	return c.header_
  8820  }
  8821  
  8822  func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) doRequest(alt string) (*http.Response, error) {
  8823  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8824  	if c.ifNoneMatch_ != "" {
  8825  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8826  	}
  8827  	var body io.Reader = nil
  8828  	c.urlParams_.Set("alt", alt)
  8829  	c.urlParams_.Set("prettyPrint", "false")
  8830  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}:getDefaultBranch")
  8831  	urls += "?" + c.urlParams_.Encode()
  8832  	req, err := http.NewRequest("GET", urls, body)
  8833  	if err != nil {
  8834  		return nil, err
  8835  	}
  8836  	req.Header = reqHeaders
  8837  	googleapi.Expand(req.URL, map[string]string{
  8838  		"catalog": c.catalog,
  8839  	})
  8840  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8841  }
  8842  
  8843  // Do executes the "retail.projects.locations.catalogs.getDefaultBranch" call.
  8844  // Any non-2xx status code is an error. Response headers are in either
  8845  // *GoogleCloudRetailV2GetDefaultBranchResponse.ServerResponse.Header or (if a
  8846  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8847  // googleapi.IsNotModified to check whether the returned error was because
  8848  // http.StatusNotModified was returned.
  8849  func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2GetDefaultBranchResponse, error) {
  8850  	gensupport.SetOptions(c.urlParams_, opts...)
  8851  	res, err := c.doRequest("json")
  8852  	if res != nil && res.StatusCode == http.StatusNotModified {
  8853  		if res.Body != nil {
  8854  			res.Body.Close()
  8855  		}
  8856  		return nil, gensupport.WrapError(&googleapi.Error{
  8857  			Code:   res.StatusCode,
  8858  			Header: res.Header,
  8859  		})
  8860  	}
  8861  	if err != nil {
  8862  		return nil, err
  8863  	}
  8864  	defer googleapi.CloseBody(res)
  8865  	if err := googleapi.CheckResponse(res); err != nil {
  8866  		return nil, gensupport.WrapError(err)
  8867  	}
  8868  	ret := &GoogleCloudRetailV2GetDefaultBranchResponse{
  8869  		ServerResponse: googleapi.ServerResponse{
  8870  			Header:         res.Header,
  8871  			HTTPStatusCode: res.StatusCode,
  8872  		},
  8873  	}
  8874  	target := &ret
  8875  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8876  		return nil, err
  8877  	}
  8878  	return ret, nil
  8879  }
  8880  
  8881  type ProjectsLocationsCatalogsListCall struct {
  8882  	s            *Service
  8883  	parent       string
  8884  	urlParams_   gensupport.URLParams
  8885  	ifNoneMatch_ string
  8886  	ctx_         context.Context
  8887  	header_      http.Header
  8888  }
  8889  
  8890  // List: Lists all the Catalogs associated with the project.
  8891  //
  8892  //   - parent: The account resource name with an associated location. If the
  8893  //     caller does not have permission to list Catalogs under this location,
  8894  //     regardless of whether or not this location exists, a PERMISSION_DENIED
  8895  //     error is returned.
  8896  func (r *ProjectsLocationsCatalogsService) List(parent string) *ProjectsLocationsCatalogsListCall {
  8897  	c := &ProjectsLocationsCatalogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8898  	c.parent = parent
  8899  	return c
  8900  }
  8901  
  8902  // PageSize sets the optional parameter "pageSize": Maximum number of Catalogs
  8903  // to return. If unspecified, defaults to 50. The maximum allowed value is
  8904  // 1000. Values above 1000 will be coerced to 1000. If this field is negative,
  8905  // an INVALID_ARGUMENT is returned.
  8906  func (c *ProjectsLocationsCatalogsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsListCall {
  8907  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8908  	return c
  8909  }
  8910  
  8911  // PageToken sets the optional parameter "pageToken": A page token
  8912  // ListCatalogsResponse.next_page_token, received from a previous
  8913  // CatalogService.ListCatalogs call. Provide this to retrieve the subsequent
  8914  // page. When paginating, all other parameters provided to
  8915  // CatalogService.ListCatalogs must match the call that provided the page
  8916  // token. Otherwise, an INVALID_ARGUMENT error is returned.
  8917  func (c *ProjectsLocationsCatalogsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsListCall {
  8918  	c.urlParams_.Set("pageToken", pageToken)
  8919  	return c
  8920  }
  8921  
  8922  // Fields allows partial responses to be retrieved. See
  8923  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8924  // details.
  8925  func (c *ProjectsLocationsCatalogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsListCall {
  8926  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8927  	return c
  8928  }
  8929  
  8930  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8931  // object's ETag matches the given value. This is useful for getting updates
  8932  // only after the object has changed since the last request.
  8933  func (c *ProjectsLocationsCatalogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsListCall {
  8934  	c.ifNoneMatch_ = entityTag
  8935  	return c
  8936  }
  8937  
  8938  // Context sets the context to be used in this call's Do method.
  8939  func (c *ProjectsLocationsCatalogsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsListCall {
  8940  	c.ctx_ = ctx
  8941  	return c
  8942  }
  8943  
  8944  // Header returns a http.Header that can be modified by the caller to add
  8945  // headers to the request.
  8946  func (c *ProjectsLocationsCatalogsListCall) Header() http.Header {
  8947  	if c.header_ == nil {
  8948  		c.header_ = make(http.Header)
  8949  	}
  8950  	return c.header_
  8951  }
  8952  
  8953  func (c *ProjectsLocationsCatalogsListCall) doRequest(alt string) (*http.Response, error) {
  8954  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8955  	if c.ifNoneMatch_ != "" {
  8956  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8957  	}
  8958  	var body io.Reader = nil
  8959  	c.urlParams_.Set("alt", alt)
  8960  	c.urlParams_.Set("prettyPrint", "false")
  8961  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/catalogs")
  8962  	urls += "?" + c.urlParams_.Encode()
  8963  	req, err := http.NewRequest("GET", urls, body)
  8964  	if err != nil {
  8965  		return nil, err
  8966  	}
  8967  	req.Header = reqHeaders
  8968  	googleapi.Expand(req.URL, map[string]string{
  8969  		"parent": c.parent,
  8970  	})
  8971  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8972  }
  8973  
  8974  // Do executes the "retail.projects.locations.catalogs.list" call.
  8975  // Any non-2xx status code is an error. Response headers are in either
  8976  // *GoogleCloudRetailV2ListCatalogsResponse.ServerResponse.Header or (if a
  8977  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8978  // googleapi.IsNotModified to check whether the returned error was because
  8979  // http.StatusNotModified was returned.
  8980  func (c *ProjectsLocationsCatalogsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ListCatalogsResponse, error) {
  8981  	gensupport.SetOptions(c.urlParams_, opts...)
  8982  	res, err := c.doRequest("json")
  8983  	if res != nil && res.StatusCode == http.StatusNotModified {
  8984  		if res.Body != nil {
  8985  			res.Body.Close()
  8986  		}
  8987  		return nil, gensupport.WrapError(&googleapi.Error{
  8988  			Code:   res.StatusCode,
  8989  			Header: res.Header,
  8990  		})
  8991  	}
  8992  	if err != nil {
  8993  		return nil, err
  8994  	}
  8995  	defer googleapi.CloseBody(res)
  8996  	if err := googleapi.CheckResponse(res); err != nil {
  8997  		return nil, gensupport.WrapError(err)
  8998  	}
  8999  	ret := &GoogleCloudRetailV2ListCatalogsResponse{
  9000  		ServerResponse: googleapi.ServerResponse{
  9001  			Header:         res.Header,
  9002  			HTTPStatusCode: res.StatusCode,
  9003  		},
  9004  	}
  9005  	target := &ret
  9006  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9007  		return nil, err
  9008  	}
  9009  	return ret, nil
  9010  }
  9011  
  9012  // Pages invokes f for each page of results.
  9013  // A non-nil error returned from f will halt the iteration.
  9014  // The provided context supersedes any context provided to the Context method.
  9015  func (c *ProjectsLocationsCatalogsListCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2ListCatalogsResponse) error) error {
  9016  	c.ctx_ = ctx
  9017  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9018  	for {
  9019  		x, err := c.Do()
  9020  		if err != nil {
  9021  			return err
  9022  		}
  9023  		if err := f(x); err != nil {
  9024  			return err
  9025  		}
  9026  		if x.NextPageToken == "" {
  9027  			return nil
  9028  		}
  9029  		c.PageToken(x.NextPageToken)
  9030  	}
  9031  }
  9032  
  9033  type ProjectsLocationsCatalogsPatchCall struct {
  9034  	s                          *Service
  9035  	name                       string
  9036  	googlecloudretailv2catalog *GoogleCloudRetailV2Catalog
  9037  	urlParams_                 gensupport.URLParams
  9038  	ctx_                       context.Context
  9039  	header_                    http.Header
  9040  }
  9041  
  9042  // Patch: Updates the Catalogs.
  9043  //
  9044  // - name: Immutable. The fully qualified resource name of the catalog.
  9045  func (r *ProjectsLocationsCatalogsService) Patch(name string, googlecloudretailv2catalog *GoogleCloudRetailV2Catalog) *ProjectsLocationsCatalogsPatchCall {
  9046  	c := &ProjectsLocationsCatalogsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9047  	c.name = name
  9048  	c.googlecloudretailv2catalog = googlecloudretailv2catalog
  9049  	return c
  9050  }
  9051  
  9052  // UpdateMask sets the optional parameter "updateMask": Indicates which fields
  9053  // in the provided Catalog to update. If an unsupported or unknown field is
  9054  // provided, an INVALID_ARGUMENT error is returned.
  9055  func (c *ProjectsLocationsCatalogsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsPatchCall {
  9056  	c.urlParams_.Set("updateMask", updateMask)
  9057  	return c
  9058  }
  9059  
  9060  // Fields allows partial responses to be retrieved. See
  9061  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9062  // details.
  9063  func (c *ProjectsLocationsCatalogsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsPatchCall {
  9064  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9065  	return c
  9066  }
  9067  
  9068  // Context sets the context to be used in this call's Do method.
  9069  func (c *ProjectsLocationsCatalogsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsPatchCall {
  9070  	c.ctx_ = ctx
  9071  	return c
  9072  }
  9073  
  9074  // Header returns a http.Header that can be modified by the caller to add
  9075  // headers to the request.
  9076  func (c *ProjectsLocationsCatalogsPatchCall) Header() http.Header {
  9077  	if c.header_ == nil {
  9078  		c.header_ = make(http.Header)
  9079  	}
  9080  	return c.header_
  9081  }
  9082  
  9083  func (c *ProjectsLocationsCatalogsPatchCall) doRequest(alt string) (*http.Response, error) {
  9084  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9085  	var body io.Reader = nil
  9086  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2catalog)
  9087  	if err != nil {
  9088  		return nil, err
  9089  	}
  9090  	c.urlParams_.Set("alt", alt)
  9091  	c.urlParams_.Set("prettyPrint", "false")
  9092  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  9093  	urls += "?" + c.urlParams_.Encode()
  9094  	req, err := http.NewRequest("PATCH", urls, body)
  9095  	if err != nil {
  9096  		return nil, err
  9097  	}
  9098  	req.Header = reqHeaders
  9099  	googleapi.Expand(req.URL, map[string]string{
  9100  		"name": c.name,
  9101  	})
  9102  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9103  }
  9104  
  9105  // Do executes the "retail.projects.locations.catalogs.patch" call.
  9106  // Any non-2xx status code is an error. Response headers are in either
  9107  // *GoogleCloudRetailV2Catalog.ServerResponse.Header or (if a response was
  9108  // returned at all) in error.(*googleapi.Error).Header. Use
  9109  // googleapi.IsNotModified to check whether the returned error was because
  9110  // http.StatusNotModified was returned.
  9111  func (c *ProjectsLocationsCatalogsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Catalog, error) {
  9112  	gensupport.SetOptions(c.urlParams_, opts...)
  9113  	res, err := c.doRequest("json")
  9114  	if res != nil && res.StatusCode == http.StatusNotModified {
  9115  		if res.Body != nil {
  9116  			res.Body.Close()
  9117  		}
  9118  		return nil, gensupport.WrapError(&googleapi.Error{
  9119  			Code:   res.StatusCode,
  9120  			Header: res.Header,
  9121  		})
  9122  	}
  9123  	if err != nil {
  9124  		return nil, err
  9125  	}
  9126  	defer googleapi.CloseBody(res)
  9127  	if err := googleapi.CheckResponse(res); err != nil {
  9128  		return nil, gensupport.WrapError(err)
  9129  	}
  9130  	ret := &GoogleCloudRetailV2Catalog{
  9131  		ServerResponse: googleapi.ServerResponse{
  9132  			Header:         res.Header,
  9133  			HTTPStatusCode: res.StatusCode,
  9134  		},
  9135  	}
  9136  	target := &ret
  9137  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9138  		return nil, err
  9139  	}
  9140  	return ret, nil
  9141  }
  9142  
  9143  type ProjectsLocationsCatalogsSetDefaultBranchCall struct {
  9144  	s                                          *Service
  9145  	catalog                                    string
  9146  	googlecloudretailv2setdefaultbranchrequest *GoogleCloudRetailV2SetDefaultBranchRequest
  9147  	urlParams_                                 gensupport.URLParams
  9148  	ctx_                                       context.Context
  9149  	header_                                    http.Header
  9150  }
  9151  
  9152  // SetDefaultBranch: Set a specified branch id as default branch. API methods
  9153  // such as SearchService.Search, ProductService.GetProduct,
  9154  // ProductService.ListProducts will treat requests using "default_branch" to
  9155  // the actual branch id set as default. For example, if
  9156  // `projects/*/locations/*/catalogs/*/branches/1` is set as default, setting
  9157  // SearchRequest.branch to
  9158  // `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent to
  9159  // setting SearchRequest.branch to
  9160  // `projects/*/locations/*/catalogs/*/branches/1`. Using multiple branches can
  9161  // be useful when developers would like to have a staging branch to test and
  9162  // verify for future usage. When it becomes ready, developers switch on the
  9163  // staging branch using this API while keeping using
  9164  // `projects/*/locations/*/catalogs/*/branches/default_branch` as
  9165  // SearchRequest.branch to route the traffic to this staging branch. CAUTION:
  9166  // If you have live predict/search traffic, switching the default branch could
  9167  // potentially cause outages if the ID space of the new branch is very
  9168  // different from the old one. More specifically: * PredictionService will only
  9169  // return product IDs from branch {newBranch}. * SearchService will only return
  9170  // product IDs from branch {newBranch} (if branch is not explicitly set). *
  9171  // UserEventService will only join events with products from branch
  9172  // {newBranch}.
  9173  //
  9174  //   - catalog: Full resource name of the catalog, such as
  9175  //     `projects/*/locations/global/catalogs/default_catalog`.
  9176  func (r *ProjectsLocationsCatalogsService) SetDefaultBranch(catalog string, googlecloudretailv2setdefaultbranchrequest *GoogleCloudRetailV2SetDefaultBranchRequest) *ProjectsLocationsCatalogsSetDefaultBranchCall {
  9177  	c := &ProjectsLocationsCatalogsSetDefaultBranchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9178  	c.catalog = catalog
  9179  	c.googlecloudretailv2setdefaultbranchrequest = googlecloudretailv2setdefaultbranchrequest
  9180  	return c
  9181  }
  9182  
  9183  // Fields allows partial responses to be retrieved. See
  9184  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9185  // details.
  9186  func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsSetDefaultBranchCall {
  9187  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9188  	return c
  9189  }
  9190  
  9191  // Context sets the context to be used in this call's Do method.
  9192  func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsSetDefaultBranchCall {
  9193  	c.ctx_ = ctx
  9194  	return c
  9195  }
  9196  
  9197  // Header returns a http.Header that can be modified by the caller to add
  9198  // headers to the request.
  9199  func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) Header() http.Header {
  9200  	if c.header_ == nil {
  9201  		c.header_ = make(http.Header)
  9202  	}
  9203  	return c.header_
  9204  }
  9205  
  9206  func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) doRequest(alt string) (*http.Response, error) {
  9207  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9208  	var body io.Reader = nil
  9209  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2setdefaultbranchrequest)
  9210  	if err != nil {
  9211  		return nil, err
  9212  	}
  9213  	c.urlParams_.Set("alt", alt)
  9214  	c.urlParams_.Set("prettyPrint", "false")
  9215  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}:setDefaultBranch")
  9216  	urls += "?" + c.urlParams_.Encode()
  9217  	req, err := http.NewRequest("POST", urls, body)
  9218  	if err != nil {
  9219  		return nil, err
  9220  	}
  9221  	req.Header = reqHeaders
  9222  	googleapi.Expand(req.URL, map[string]string{
  9223  		"catalog": c.catalog,
  9224  	})
  9225  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9226  }
  9227  
  9228  // Do executes the "retail.projects.locations.catalogs.setDefaultBranch" call.
  9229  // Any non-2xx status code is an error. Response headers are in either
  9230  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  9231  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9232  // check whether the returned error was because http.StatusNotModified was
  9233  // returned.
  9234  func (c *ProjectsLocationsCatalogsSetDefaultBranchCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  9235  	gensupport.SetOptions(c.urlParams_, opts...)
  9236  	res, err := c.doRequest("json")
  9237  	if res != nil && res.StatusCode == http.StatusNotModified {
  9238  		if res.Body != nil {
  9239  			res.Body.Close()
  9240  		}
  9241  		return nil, gensupport.WrapError(&googleapi.Error{
  9242  			Code:   res.StatusCode,
  9243  			Header: res.Header,
  9244  		})
  9245  	}
  9246  	if err != nil {
  9247  		return nil, err
  9248  	}
  9249  	defer googleapi.CloseBody(res)
  9250  	if err := googleapi.CheckResponse(res); err != nil {
  9251  		return nil, gensupport.WrapError(err)
  9252  	}
  9253  	ret := &GoogleProtobufEmpty{
  9254  		ServerResponse: googleapi.ServerResponse{
  9255  			Header:         res.Header,
  9256  			HTTPStatusCode: res.StatusCode,
  9257  		},
  9258  	}
  9259  	target := &ret
  9260  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9261  		return nil, err
  9262  	}
  9263  	return ret, nil
  9264  }
  9265  
  9266  type ProjectsLocationsCatalogsUpdateAttributesConfigCall struct {
  9267  	s                                   *Service
  9268  	name                                string
  9269  	googlecloudretailv2attributesconfig *GoogleCloudRetailV2AttributesConfig
  9270  	urlParams_                          gensupport.URLParams
  9271  	ctx_                                context.Context
  9272  	header_                             http.Header
  9273  }
  9274  
  9275  // UpdateAttributesConfig: Updates the AttributesConfig. The catalog attributes
  9276  // in the request will be updated in the catalog, or inserted if they do not
  9277  // exist. Existing catalog attributes not included in the request will remain
  9278  // unchanged. Attributes that are assigned to products, but do not exist at the
  9279  // catalog level, are always included in the response. The product attribute is
  9280  // assigned default values for missing catalog attribute fields, e.g.,
  9281  // searchable and dynamic facetable options.
  9282  //
  9283  //   - name: Immutable. The fully qualified resource name of the attribute
  9284  //     config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`.
  9285  func (r *ProjectsLocationsCatalogsService) UpdateAttributesConfig(name string, googlecloudretailv2attributesconfig *GoogleCloudRetailV2AttributesConfig) *ProjectsLocationsCatalogsUpdateAttributesConfigCall {
  9286  	c := &ProjectsLocationsCatalogsUpdateAttributesConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9287  	c.name = name
  9288  	c.googlecloudretailv2attributesconfig = googlecloudretailv2attributesconfig
  9289  	return c
  9290  }
  9291  
  9292  // UpdateMask sets the optional parameter "updateMask": Indicates which fields
  9293  // in the provided AttributesConfig to update. The following is the only
  9294  // supported field: * AttributesConfig.catalog_attributes If not set, all
  9295  // supported fields are updated.
  9296  func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateAttributesConfigCall {
  9297  	c.urlParams_.Set("updateMask", updateMask)
  9298  	return c
  9299  }
  9300  
  9301  // Fields allows partial responses to be retrieved. See
  9302  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9303  // details.
  9304  func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateAttributesConfigCall {
  9305  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9306  	return c
  9307  }
  9308  
  9309  // Context sets the context to be used in this call's Do method.
  9310  func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateAttributesConfigCall {
  9311  	c.ctx_ = ctx
  9312  	return c
  9313  }
  9314  
  9315  // Header returns a http.Header that can be modified by the caller to add
  9316  // headers to the request.
  9317  func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Header() http.Header {
  9318  	if c.header_ == nil {
  9319  		c.header_ = make(http.Header)
  9320  	}
  9321  	return c.header_
  9322  }
  9323  
  9324  func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) doRequest(alt string) (*http.Response, error) {
  9325  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9326  	var body io.Reader = nil
  9327  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2attributesconfig)
  9328  	if err != nil {
  9329  		return nil, err
  9330  	}
  9331  	c.urlParams_.Set("alt", alt)
  9332  	c.urlParams_.Set("prettyPrint", "false")
  9333  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  9334  	urls += "?" + c.urlParams_.Encode()
  9335  	req, err := http.NewRequest("PATCH", urls, body)
  9336  	if err != nil {
  9337  		return nil, err
  9338  	}
  9339  	req.Header = reqHeaders
  9340  	googleapi.Expand(req.URL, map[string]string{
  9341  		"name": c.name,
  9342  	})
  9343  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9344  }
  9345  
  9346  // Do executes the "retail.projects.locations.catalogs.updateAttributesConfig" call.
  9347  // Any non-2xx status code is an error. Response headers are in either
  9348  // *GoogleCloudRetailV2AttributesConfig.ServerResponse.Header or (if a response
  9349  // was returned at all) in error.(*googleapi.Error).Header. Use
  9350  // googleapi.IsNotModified to check whether the returned error was because
  9351  // http.StatusNotModified was returned.
  9352  func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, error) {
  9353  	gensupport.SetOptions(c.urlParams_, opts...)
  9354  	res, err := c.doRequest("json")
  9355  	if res != nil && res.StatusCode == http.StatusNotModified {
  9356  		if res.Body != nil {
  9357  			res.Body.Close()
  9358  		}
  9359  		return nil, gensupport.WrapError(&googleapi.Error{
  9360  			Code:   res.StatusCode,
  9361  			Header: res.Header,
  9362  		})
  9363  	}
  9364  	if err != nil {
  9365  		return nil, err
  9366  	}
  9367  	defer googleapi.CloseBody(res)
  9368  	if err := googleapi.CheckResponse(res); err != nil {
  9369  		return nil, gensupport.WrapError(err)
  9370  	}
  9371  	ret := &GoogleCloudRetailV2AttributesConfig{
  9372  		ServerResponse: googleapi.ServerResponse{
  9373  			Header:         res.Header,
  9374  			HTTPStatusCode: res.StatusCode,
  9375  		},
  9376  	}
  9377  	target := &ret
  9378  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9379  		return nil, err
  9380  	}
  9381  	return ret, nil
  9382  }
  9383  
  9384  type ProjectsLocationsCatalogsUpdateCompletionConfigCall struct {
  9385  	s                                   *Service
  9386  	name                                string
  9387  	googlecloudretailv2completionconfig *GoogleCloudRetailV2CompletionConfig
  9388  	urlParams_                          gensupport.URLParams
  9389  	ctx_                                context.Context
  9390  	header_                             http.Header
  9391  }
  9392  
  9393  // UpdateCompletionConfig: Updates the CompletionConfigs.
  9394  //
  9395  //   - name: Immutable. Fully qualified name
  9396  //     `projects/*/locations/*/catalogs/*/completionConfig`.
  9397  func (r *ProjectsLocationsCatalogsService) UpdateCompletionConfig(name string, googlecloudretailv2completionconfig *GoogleCloudRetailV2CompletionConfig) *ProjectsLocationsCatalogsUpdateCompletionConfigCall {
  9398  	c := &ProjectsLocationsCatalogsUpdateCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9399  	c.name = name
  9400  	c.googlecloudretailv2completionconfig = googlecloudretailv2completionconfig
  9401  	return c
  9402  }
  9403  
  9404  // UpdateMask sets the optional parameter "updateMask": Indicates which fields
  9405  // in the provided CompletionConfig to update. The following are the only
  9406  // supported fields: * CompletionConfig.matching_order *
  9407  // CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length *
  9408  // CompletionConfig.auto_learning If not set, all supported fields are updated.
  9409  func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateCompletionConfigCall {
  9410  	c.urlParams_.Set("updateMask", updateMask)
  9411  	return c
  9412  }
  9413  
  9414  // Fields allows partial responses to be retrieved. See
  9415  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9416  // details.
  9417  func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateCompletionConfigCall {
  9418  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9419  	return c
  9420  }
  9421  
  9422  // Context sets the context to be used in this call's Do method.
  9423  func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateCompletionConfigCall {
  9424  	c.ctx_ = ctx
  9425  	return c
  9426  }
  9427  
  9428  // Header returns a http.Header that can be modified by the caller to add
  9429  // headers to the request.
  9430  func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Header() http.Header {
  9431  	if c.header_ == nil {
  9432  		c.header_ = make(http.Header)
  9433  	}
  9434  	return c.header_
  9435  }
  9436  
  9437  func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) doRequest(alt string) (*http.Response, error) {
  9438  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9439  	var body io.Reader = nil
  9440  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2completionconfig)
  9441  	if err != nil {
  9442  		return nil, err
  9443  	}
  9444  	c.urlParams_.Set("alt", alt)
  9445  	c.urlParams_.Set("prettyPrint", "false")
  9446  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  9447  	urls += "?" + c.urlParams_.Encode()
  9448  	req, err := http.NewRequest("PATCH", urls, body)
  9449  	if err != nil {
  9450  		return nil, err
  9451  	}
  9452  	req.Header = reqHeaders
  9453  	googleapi.Expand(req.URL, map[string]string{
  9454  		"name": c.name,
  9455  	})
  9456  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9457  }
  9458  
  9459  // Do executes the "retail.projects.locations.catalogs.updateCompletionConfig" call.
  9460  // Any non-2xx status code is an error. Response headers are in either
  9461  // *GoogleCloudRetailV2CompletionConfig.ServerResponse.Header or (if a response
  9462  // was returned at all) in error.(*googleapi.Error).Header. Use
  9463  // googleapi.IsNotModified to check whether the returned error was because
  9464  // http.StatusNotModified was returned.
  9465  func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2CompletionConfig, error) {
  9466  	gensupport.SetOptions(c.urlParams_, opts...)
  9467  	res, err := c.doRequest("json")
  9468  	if res != nil && res.StatusCode == http.StatusNotModified {
  9469  		if res.Body != nil {
  9470  			res.Body.Close()
  9471  		}
  9472  		return nil, gensupport.WrapError(&googleapi.Error{
  9473  			Code:   res.StatusCode,
  9474  			Header: res.Header,
  9475  		})
  9476  	}
  9477  	if err != nil {
  9478  		return nil, err
  9479  	}
  9480  	defer googleapi.CloseBody(res)
  9481  	if err := googleapi.CheckResponse(res); err != nil {
  9482  		return nil, gensupport.WrapError(err)
  9483  	}
  9484  	ret := &GoogleCloudRetailV2CompletionConfig{
  9485  		ServerResponse: googleapi.ServerResponse{
  9486  			Header:         res.Header,
  9487  			HTTPStatusCode: res.StatusCode,
  9488  		},
  9489  	}
  9490  	target := &ret
  9491  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9492  		return nil, err
  9493  	}
  9494  	return ret, nil
  9495  }
  9496  
  9497  type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct {
  9498  	s                                             *Service
  9499  	attributesConfig                              string
  9500  	googlecloudretailv2addcatalogattributerequest *GoogleCloudRetailV2AddCatalogAttributeRequest
  9501  	urlParams_                                    gensupport.URLParams
  9502  	ctx_                                          context.Context
  9503  	header_                                       http.Header
  9504  }
  9505  
  9506  // AddCatalogAttribute: Adds the specified CatalogAttribute to the
  9507  // AttributesConfig. If the CatalogAttribute to add already exists, an
  9508  // ALREADY_EXISTS error is returned.
  9509  //
  9510  //   - attributesConfig: Full AttributesConfig resource name. Format:
  9511  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at
  9512  //     tributesConfig`.
  9513  func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2addcatalogattributerequest *GoogleCloudRetailV2AddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall {
  9514  	c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9515  	c.attributesConfig = attributesConfig
  9516  	c.googlecloudretailv2addcatalogattributerequest = googlecloudretailv2addcatalogattributerequest
  9517  	return c
  9518  }
  9519  
  9520  // Fields allows partial responses to be retrieved. See
  9521  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9522  // details.
  9523  func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall {
  9524  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9525  	return c
  9526  }
  9527  
  9528  // Context sets the context to be used in this call's Do method.
  9529  func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall {
  9530  	c.ctx_ = ctx
  9531  	return c
  9532  }
  9533  
  9534  // Header returns a http.Header that can be modified by the caller to add
  9535  // headers to the request.
  9536  func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header {
  9537  	if c.header_ == nil {
  9538  		c.header_ = make(http.Header)
  9539  	}
  9540  	return c.header_
  9541  }
  9542  
  9543  func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) {
  9544  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9545  	var body io.Reader = nil
  9546  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2addcatalogattributerequest)
  9547  	if err != nil {
  9548  		return nil, err
  9549  	}
  9550  	c.urlParams_.Set("alt", alt)
  9551  	c.urlParams_.Set("prettyPrint", "false")
  9552  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+attributesConfig}:addCatalogAttribute")
  9553  	urls += "?" + c.urlParams_.Encode()
  9554  	req, err := http.NewRequest("POST", urls, body)
  9555  	if err != nil {
  9556  		return nil, err
  9557  	}
  9558  	req.Header = reqHeaders
  9559  	googleapi.Expand(req.URL, map[string]string{
  9560  		"attributesConfig": c.attributesConfig,
  9561  	})
  9562  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9563  }
  9564  
  9565  // Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call.
  9566  // Any non-2xx status code is an error. Response headers are in either
  9567  // *GoogleCloudRetailV2AttributesConfig.ServerResponse.Header or (if a response
  9568  // was returned at all) in error.(*googleapi.Error).Header. Use
  9569  // googleapi.IsNotModified to check whether the returned error was because
  9570  // http.StatusNotModified was returned.
  9571  func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, error) {
  9572  	gensupport.SetOptions(c.urlParams_, opts...)
  9573  	res, err := c.doRequest("json")
  9574  	if res != nil && res.StatusCode == http.StatusNotModified {
  9575  		if res.Body != nil {
  9576  			res.Body.Close()
  9577  		}
  9578  		return nil, gensupport.WrapError(&googleapi.Error{
  9579  			Code:   res.StatusCode,
  9580  			Header: res.Header,
  9581  		})
  9582  	}
  9583  	if err != nil {
  9584  		return nil, err
  9585  	}
  9586  	defer googleapi.CloseBody(res)
  9587  	if err := googleapi.CheckResponse(res); err != nil {
  9588  		return nil, gensupport.WrapError(err)
  9589  	}
  9590  	ret := &GoogleCloudRetailV2AttributesConfig{
  9591  		ServerResponse: googleapi.ServerResponse{
  9592  			Header:         res.Header,
  9593  			HTTPStatusCode: res.StatusCode,
  9594  		},
  9595  	}
  9596  	target := &ret
  9597  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9598  		return nil, err
  9599  	}
  9600  	return ret, nil
  9601  }
  9602  
  9603  type ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct {
  9604  	s                                                *Service
  9605  	attributesConfig                                 string
  9606  	googlecloudretailv2removecatalogattributerequest *GoogleCloudRetailV2RemoveCatalogAttributeRequest
  9607  	urlParams_                                       gensupport.URLParams
  9608  	ctx_                                             context.Context
  9609  	header_                                          http.Header
  9610  }
  9611  
  9612  // RemoveCatalogAttribute: Removes the specified CatalogAttribute from the
  9613  // AttributesConfig. If the CatalogAttribute to remove does not exist, a
  9614  // NOT_FOUND error is returned.
  9615  //
  9616  //   - attributesConfig: Full AttributesConfig resource name. Format:
  9617  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at
  9618  //     tributesConfig`.
  9619  func (r *ProjectsLocationsCatalogsAttributesConfigService) RemoveCatalogAttribute(attributesConfig string, googlecloudretailv2removecatalogattributerequest *GoogleCloudRetailV2RemoveCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall {
  9620  	c := &ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9621  	c.attributesConfig = attributesConfig
  9622  	c.googlecloudretailv2removecatalogattributerequest = googlecloudretailv2removecatalogattributerequest
  9623  	return c
  9624  }
  9625  
  9626  // Fields allows partial responses to be retrieved. See
  9627  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9628  // details.
  9629  func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall {
  9630  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9631  	return c
  9632  }
  9633  
  9634  // Context sets the context to be used in this call's Do method.
  9635  func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall {
  9636  	c.ctx_ = ctx
  9637  	return c
  9638  }
  9639  
  9640  // Header returns a http.Header that can be modified by the caller to add
  9641  // headers to the request.
  9642  func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Header() http.Header {
  9643  	if c.header_ == nil {
  9644  		c.header_ = make(http.Header)
  9645  	}
  9646  	return c.header_
  9647  }
  9648  
  9649  func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) doRequest(alt string) (*http.Response, error) {
  9650  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9651  	var body io.Reader = nil
  9652  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2removecatalogattributerequest)
  9653  	if err != nil {
  9654  		return nil, err
  9655  	}
  9656  	c.urlParams_.Set("alt", alt)
  9657  	c.urlParams_.Set("prettyPrint", "false")
  9658  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+attributesConfig}:removeCatalogAttribute")
  9659  	urls += "?" + c.urlParams_.Encode()
  9660  	req, err := http.NewRequest("POST", urls, body)
  9661  	if err != nil {
  9662  		return nil, err
  9663  	}
  9664  	req.Header = reqHeaders
  9665  	googleapi.Expand(req.URL, map[string]string{
  9666  		"attributesConfig": c.attributesConfig,
  9667  	})
  9668  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9669  }
  9670  
  9671  // Do executes the "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute" call.
  9672  // Any non-2xx status code is an error. Response headers are in either
  9673  // *GoogleCloudRetailV2AttributesConfig.ServerResponse.Header or (if a response
  9674  // was returned at all) in error.(*googleapi.Error).Header. Use
  9675  // googleapi.IsNotModified to check whether the returned error was because
  9676  // http.StatusNotModified was returned.
  9677  func (c *ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, error) {
  9678  	gensupport.SetOptions(c.urlParams_, opts...)
  9679  	res, err := c.doRequest("json")
  9680  	if res != nil && res.StatusCode == http.StatusNotModified {
  9681  		if res.Body != nil {
  9682  			res.Body.Close()
  9683  		}
  9684  		return nil, gensupport.WrapError(&googleapi.Error{
  9685  			Code:   res.StatusCode,
  9686  			Header: res.Header,
  9687  		})
  9688  	}
  9689  	if err != nil {
  9690  		return nil, err
  9691  	}
  9692  	defer googleapi.CloseBody(res)
  9693  	if err := googleapi.CheckResponse(res); err != nil {
  9694  		return nil, gensupport.WrapError(err)
  9695  	}
  9696  	ret := &GoogleCloudRetailV2AttributesConfig{
  9697  		ServerResponse: googleapi.ServerResponse{
  9698  			Header:         res.Header,
  9699  			HTTPStatusCode: res.StatusCode,
  9700  		},
  9701  	}
  9702  	target := &ret
  9703  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9704  		return nil, err
  9705  	}
  9706  	return ret, nil
  9707  }
  9708  
  9709  type ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall struct {
  9710  	s                                                 *Service
  9711  	attributesConfig                                  string
  9712  	googlecloudretailv2replacecatalogattributerequest *GoogleCloudRetailV2ReplaceCatalogAttributeRequest
  9713  	urlParams_                                        gensupport.URLParams
  9714  	ctx_                                              context.Context
  9715  	header_                                           http.Header
  9716  }
  9717  
  9718  // ReplaceCatalogAttribute: Replaces the specified CatalogAttribute in the
  9719  // AttributesConfig by updating the catalog attribute with the same
  9720  // CatalogAttribute.key. If the CatalogAttribute to replace does not exist, a
  9721  // NOT_FOUND error is returned.
  9722  //
  9723  //   - attributesConfig: Full AttributesConfig resource name. Format:
  9724  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/at
  9725  //     tributesConfig`.
  9726  func (r *ProjectsLocationsCatalogsAttributesConfigService) ReplaceCatalogAttribute(attributesConfig string, googlecloudretailv2replacecatalogattributerequest *GoogleCloudRetailV2ReplaceCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall {
  9727  	c := &ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9728  	c.attributesConfig = attributesConfig
  9729  	c.googlecloudretailv2replacecatalogattributerequest = googlecloudretailv2replacecatalogattributerequest
  9730  	return c
  9731  }
  9732  
  9733  // Fields allows partial responses to be retrieved. See
  9734  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9735  // details.
  9736  func (c *ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall {
  9737  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9738  	return c
  9739  }
  9740  
  9741  // Context sets the context to be used in this call's Do method.
  9742  func (c *ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall {
  9743  	c.ctx_ = ctx
  9744  	return c
  9745  }
  9746  
  9747  // Header returns a http.Header that can be modified by the caller to add
  9748  // headers to the request.
  9749  func (c *ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall) Header() http.Header {
  9750  	if c.header_ == nil {
  9751  		c.header_ = make(http.Header)
  9752  	}
  9753  	return c.header_
  9754  }
  9755  
  9756  func (c *ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall) doRequest(alt string) (*http.Response, error) {
  9757  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9758  	var body io.Reader = nil
  9759  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2replacecatalogattributerequest)
  9760  	if err != nil {
  9761  		return nil, err
  9762  	}
  9763  	c.urlParams_.Set("alt", alt)
  9764  	c.urlParams_.Set("prettyPrint", "false")
  9765  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+attributesConfig}:replaceCatalogAttribute")
  9766  	urls += "?" + c.urlParams_.Encode()
  9767  	req, err := http.NewRequest("POST", urls, body)
  9768  	if err != nil {
  9769  		return nil, err
  9770  	}
  9771  	req.Header = reqHeaders
  9772  	googleapi.Expand(req.URL, map[string]string{
  9773  		"attributesConfig": c.attributesConfig,
  9774  	})
  9775  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9776  }
  9777  
  9778  // Do executes the "retail.projects.locations.catalogs.attributesConfig.replaceCatalogAttribute" call.
  9779  // Any non-2xx status code is an error. Response headers are in either
  9780  // *GoogleCloudRetailV2AttributesConfig.ServerResponse.Header or (if a response
  9781  // was returned at all) in error.(*googleapi.Error).Header. Use
  9782  // googleapi.IsNotModified to check whether the returned error was because
  9783  // http.StatusNotModified was returned.
  9784  func (c *ProjectsLocationsCatalogsAttributesConfigReplaceCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2AttributesConfig, error) {
  9785  	gensupport.SetOptions(c.urlParams_, opts...)
  9786  	res, err := c.doRequest("json")
  9787  	if res != nil && res.StatusCode == http.StatusNotModified {
  9788  		if res.Body != nil {
  9789  			res.Body.Close()
  9790  		}
  9791  		return nil, gensupport.WrapError(&googleapi.Error{
  9792  			Code:   res.StatusCode,
  9793  			Header: res.Header,
  9794  		})
  9795  	}
  9796  	if err != nil {
  9797  		return nil, err
  9798  	}
  9799  	defer googleapi.CloseBody(res)
  9800  	if err := googleapi.CheckResponse(res); err != nil {
  9801  		return nil, gensupport.WrapError(err)
  9802  	}
  9803  	ret := &GoogleCloudRetailV2AttributesConfig{
  9804  		ServerResponse: googleapi.ServerResponse{
  9805  			Header:         res.Header,
  9806  			HTTPStatusCode: res.StatusCode,
  9807  		},
  9808  	}
  9809  	target := &ret
  9810  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9811  		return nil, err
  9812  	}
  9813  	return ret, nil
  9814  }
  9815  
  9816  type ProjectsLocationsCatalogsBranchesOperationsGetCall struct {
  9817  	s            *Service
  9818  	name         string
  9819  	urlParams_   gensupport.URLParams
  9820  	ifNoneMatch_ string
  9821  	ctx_         context.Context
  9822  	header_      http.Header
  9823  }
  9824  
  9825  // Get: Gets the latest state of a long-running operation. Clients can use this
  9826  // method to poll the operation result at intervals as recommended by the API
  9827  // service.
  9828  //
  9829  // - name: The name of the operation resource.
  9830  func (r *ProjectsLocationsCatalogsBranchesOperationsService) Get(name string) *ProjectsLocationsCatalogsBranchesOperationsGetCall {
  9831  	c := &ProjectsLocationsCatalogsBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9832  	c.name = name
  9833  	return c
  9834  }
  9835  
  9836  // Fields allows partial responses to be retrieved. See
  9837  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9838  // details.
  9839  func (c *ProjectsLocationsCatalogsBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesOperationsGetCall {
  9840  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9841  	return c
  9842  }
  9843  
  9844  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9845  // object's ETag matches the given value. This is useful for getting updates
  9846  // only after the object has changed since the last request.
  9847  func (c *ProjectsLocationsCatalogsBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsBranchesOperationsGetCall {
  9848  	c.ifNoneMatch_ = entityTag
  9849  	return c
  9850  }
  9851  
  9852  // Context sets the context to be used in this call's Do method.
  9853  func (c *ProjectsLocationsCatalogsBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesOperationsGetCall {
  9854  	c.ctx_ = ctx
  9855  	return c
  9856  }
  9857  
  9858  // Header returns a http.Header that can be modified by the caller to add
  9859  // headers to the request.
  9860  func (c *ProjectsLocationsCatalogsBranchesOperationsGetCall) Header() http.Header {
  9861  	if c.header_ == nil {
  9862  		c.header_ = make(http.Header)
  9863  	}
  9864  	return c.header_
  9865  }
  9866  
  9867  func (c *ProjectsLocationsCatalogsBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  9868  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9869  	if c.ifNoneMatch_ != "" {
  9870  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9871  	}
  9872  	var body io.Reader = nil
  9873  	c.urlParams_.Set("alt", alt)
  9874  	c.urlParams_.Set("prettyPrint", "false")
  9875  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  9876  	urls += "?" + c.urlParams_.Encode()
  9877  	req, err := http.NewRequest("GET", urls, body)
  9878  	if err != nil {
  9879  		return nil, err
  9880  	}
  9881  	req.Header = reqHeaders
  9882  	googleapi.Expand(req.URL, map[string]string{
  9883  		"name": c.name,
  9884  	})
  9885  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9886  }
  9887  
  9888  // Do executes the "retail.projects.locations.catalogs.branches.operations.get" call.
  9889  // Any non-2xx status code is an error. Response headers are in either
  9890  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  9891  // returned at all) in error.(*googleapi.Error).Header. Use
  9892  // googleapi.IsNotModified to check whether the returned error was because
  9893  // http.StatusNotModified was returned.
  9894  func (c *ProjectsLocationsCatalogsBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  9895  	gensupport.SetOptions(c.urlParams_, opts...)
  9896  	res, err := c.doRequest("json")
  9897  	if res != nil && res.StatusCode == http.StatusNotModified {
  9898  		if res.Body != nil {
  9899  			res.Body.Close()
  9900  		}
  9901  		return nil, gensupport.WrapError(&googleapi.Error{
  9902  			Code:   res.StatusCode,
  9903  			Header: res.Header,
  9904  		})
  9905  	}
  9906  	if err != nil {
  9907  		return nil, err
  9908  	}
  9909  	defer googleapi.CloseBody(res)
  9910  	if err := googleapi.CheckResponse(res); err != nil {
  9911  		return nil, gensupport.WrapError(err)
  9912  	}
  9913  	ret := &GoogleLongrunningOperation{
  9914  		ServerResponse: googleapi.ServerResponse{
  9915  			Header:         res.Header,
  9916  			HTTPStatusCode: res.StatusCode,
  9917  		},
  9918  	}
  9919  	target := &ret
  9920  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9921  		return nil, err
  9922  	}
  9923  	return ret, nil
  9924  }
  9925  
  9926  type ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall struct {
  9927  	s                                              *Service
  9928  	product                                        string
  9929  	googlecloudretailv2addfulfillmentplacesrequest *GoogleCloudRetailV2AddFulfillmentPlacesRequest
  9930  	urlParams_                                     gensupport.URLParams
  9931  	ctx_                                           context.Context
  9932  	header_                                        http.Header
  9933  }
  9934  
  9935  // AddFulfillmentPlaces: We recommend that you use the
  9936  // ProductService.AddLocalInventories method instead of the
  9937  // ProductService.AddFulfillmentPlaces method.
  9938  // ProductService.AddLocalInventories achieves the same results but provides
  9939  // more fine-grained control over ingesting local inventory data. Incrementally
  9940  // adds place IDs to Product.fulfillment_info.place_ids. This process is
  9941  // asynchronous and does not require the Product to exist before updating
  9942  // fulfillment information. If the request is valid, the update will be
  9943  // enqueued and processed downstream. As a consequence, when a response is
  9944  // returned, the added place IDs are not immediately manifested in the Product
  9945  // queried by ProductService.GetProduct or ProductService.ListProducts. The
  9946  // returned Operations will be obsolete after 1 day, and GetOperation API will
  9947  // return NOT_FOUND afterwards. If conflicting updates are issued, the
  9948  // Operations associated with the stale updates will not be marked as done
  9949  // until being obsolete.
  9950  //
  9951  //   - product: Full resource name of Product, such as
  9952  //     `projects/*/locations/global/catalogs/default_catalog/branches/default_bran
  9953  //     ch/products/some_product_id`. If the caller does not have permission to
  9954  //     access the Product, regardless of whether or not it exists, a
  9955  //     PERMISSION_DENIED error is returned.
  9956  func (r *ProjectsLocationsCatalogsBranchesProductsService) AddFulfillmentPlaces(product string, googlecloudretailv2addfulfillmentplacesrequest *GoogleCloudRetailV2AddFulfillmentPlacesRequest) *ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall {
  9957  	c := &ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9958  	c.product = product
  9959  	c.googlecloudretailv2addfulfillmentplacesrequest = googlecloudretailv2addfulfillmentplacesrequest
  9960  	return c
  9961  }
  9962  
  9963  // Fields allows partial responses to be retrieved. See
  9964  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9965  // details.
  9966  func (c *ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall {
  9967  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9968  	return c
  9969  }
  9970  
  9971  // Context sets the context to be used in this call's Do method.
  9972  func (c *ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall {
  9973  	c.ctx_ = ctx
  9974  	return c
  9975  }
  9976  
  9977  // Header returns a http.Header that can be modified by the caller to add
  9978  // headers to the request.
  9979  func (c *ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall) Header() http.Header {
  9980  	if c.header_ == nil {
  9981  		c.header_ = make(http.Header)
  9982  	}
  9983  	return c.header_
  9984  }
  9985  
  9986  func (c *ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall) doRequest(alt string) (*http.Response, error) {
  9987  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9988  	var body io.Reader = nil
  9989  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2addfulfillmentplacesrequest)
  9990  	if err != nil {
  9991  		return nil, err
  9992  	}
  9993  	c.urlParams_.Set("alt", alt)
  9994  	c.urlParams_.Set("prettyPrint", "false")
  9995  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+product}:addFulfillmentPlaces")
  9996  	urls += "?" + c.urlParams_.Encode()
  9997  	req, err := http.NewRequest("POST", urls, body)
  9998  	if err != nil {
  9999  		return nil, err
 10000  	}
 10001  	req.Header = reqHeaders
 10002  	googleapi.Expand(req.URL, map[string]string{
 10003  		"product": c.product,
 10004  	})
 10005  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10006  }
 10007  
 10008  // Do executes the "retail.projects.locations.catalogs.branches.products.addFulfillmentPlaces" call.
 10009  // Any non-2xx status code is an error. Response headers are in either
 10010  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 10011  // returned at all) in error.(*googleapi.Error).Header. Use
 10012  // googleapi.IsNotModified to check whether the returned error was because
 10013  // http.StatusNotModified was returned.
 10014  func (c *ProjectsLocationsCatalogsBranchesProductsAddFulfillmentPlacesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 10015  	gensupport.SetOptions(c.urlParams_, opts...)
 10016  	res, err := c.doRequest("json")
 10017  	if res != nil && res.StatusCode == http.StatusNotModified {
 10018  		if res.Body != nil {
 10019  			res.Body.Close()
 10020  		}
 10021  		return nil, gensupport.WrapError(&googleapi.Error{
 10022  			Code:   res.StatusCode,
 10023  			Header: res.Header,
 10024  		})
 10025  	}
 10026  	if err != nil {
 10027  		return nil, err
 10028  	}
 10029  	defer googleapi.CloseBody(res)
 10030  	if err := googleapi.CheckResponse(res); err != nil {
 10031  		return nil, gensupport.WrapError(err)
 10032  	}
 10033  	ret := &GoogleLongrunningOperation{
 10034  		ServerResponse: googleapi.ServerResponse{
 10035  			Header:         res.Header,
 10036  			HTTPStatusCode: res.StatusCode,
 10037  		},
 10038  	}
 10039  	target := &ret
 10040  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10041  		return nil, err
 10042  	}
 10043  	return ret, nil
 10044  }
 10045  
 10046  type ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall struct {
 10047  	s                                             *Service
 10048  	product                                       string
 10049  	googlecloudretailv2addlocalinventoriesrequest *GoogleCloudRetailV2AddLocalInventoriesRequest
 10050  	urlParams_                                    gensupport.URLParams
 10051  	ctx_                                          context.Context
 10052  	header_                                       http.Header
 10053  }
 10054  
 10055  // AddLocalInventories: Updates local inventory information for a Product at a
 10056  // list of places, while respecting the last update timestamps of each
 10057  // inventory field. This process is asynchronous and does not require the
 10058  // Product to exist before updating inventory information. If the request is
 10059  // valid, the update will be enqueued and processed downstream. As a
 10060  // consequence, when a response is returned, updates are not immediately
 10061  // manifested in the Product queried by ProductService.GetProduct or
 10062  // ProductService.ListProducts. Local inventory information can only be
 10063  // modified using this method. ProductService.CreateProduct and
 10064  // ProductService.UpdateProduct has no effect on local inventories. The
 10065  // returned Operations will be obsolete after 1 day, and GetOperation API will
 10066  // return NOT_FOUND afterwards. If conflicting updates are issued, the
 10067  // Operations associated with the stale updates will not be marked as done
 10068  // until being obsolete.
 10069  //
 10070  //   - product: Full resource name of Product, such as
 10071  //     `projects/*/locations/global/catalogs/default_catalog/branches/default_bran
 10072  //     ch/products/some_product_id`. If the caller does not have permission to
 10073  //     access the Product, regardless of whether or not it exists, a
 10074  //     PERMISSION_DENIED error is returned.
 10075  func (r *ProjectsLocationsCatalogsBranchesProductsService) AddLocalInventories(product string, googlecloudretailv2addlocalinventoriesrequest *GoogleCloudRetailV2AddLocalInventoriesRequest) *ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall {
 10076  	c := &ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10077  	c.product = product
 10078  	c.googlecloudretailv2addlocalinventoriesrequest = googlecloudretailv2addlocalinventoriesrequest
 10079  	return c
 10080  }
 10081  
 10082  // Fields allows partial responses to be retrieved. See
 10083  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10084  // details.
 10085  func (c *ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall {
 10086  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10087  	return c
 10088  }
 10089  
 10090  // Context sets the context to be used in this call's Do method.
 10091  func (c *ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall {
 10092  	c.ctx_ = ctx
 10093  	return c
 10094  }
 10095  
 10096  // Header returns a http.Header that can be modified by the caller to add
 10097  // headers to the request.
 10098  func (c *ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall) Header() http.Header {
 10099  	if c.header_ == nil {
 10100  		c.header_ = make(http.Header)
 10101  	}
 10102  	return c.header_
 10103  }
 10104  
 10105  func (c *ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall) doRequest(alt string) (*http.Response, error) {
 10106  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10107  	var body io.Reader = nil
 10108  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2addlocalinventoriesrequest)
 10109  	if err != nil {
 10110  		return nil, err
 10111  	}
 10112  	c.urlParams_.Set("alt", alt)
 10113  	c.urlParams_.Set("prettyPrint", "false")
 10114  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+product}:addLocalInventories")
 10115  	urls += "?" + c.urlParams_.Encode()
 10116  	req, err := http.NewRequest("POST", urls, body)
 10117  	if err != nil {
 10118  		return nil, err
 10119  	}
 10120  	req.Header = reqHeaders
 10121  	googleapi.Expand(req.URL, map[string]string{
 10122  		"product": c.product,
 10123  	})
 10124  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10125  }
 10126  
 10127  // Do executes the "retail.projects.locations.catalogs.branches.products.addLocalInventories" call.
 10128  // Any non-2xx status code is an error. Response headers are in either
 10129  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 10130  // returned at all) in error.(*googleapi.Error).Header. Use
 10131  // googleapi.IsNotModified to check whether the returned error was because
 10132  // http.StatusNotModified was returned.
 10133  func (c *ProjectsLocationsCatalogsBranchesProductsAddLocalInventoriesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 10134  	gensupport.SetOptions(c.urlParams_, opts...)
 10135  	res, err := c.doRequest("json")
 10136  	if res != nil && res.StatusCode == http.StatusNotModified {
 10137  		if res.Body != nil {
 10138  			res.Body.Close()
 10139  		}
 10140  		return nil, gensupport.WrapError(&googleapi.Error{
 10141  			Code:   res.StatusCode,
 10142  			Header: res.Header,
 10143  		})
 10144  	}
 10145  	if err != nil {
 10146  		return nil, err
 10147  	}
 10148  	defer googleapi.CloseBody(res)
 10149  	if err := googleapi.CheckResponse(res); err != nil {
 10150  		return nil, gensupport.WrapError(err)
 10151  	}
 10152  	ret := &GoogleLongrunningOperation{
 10153  		ServerResponse: googleapi.ServerResponse{
 10154  			Header:         res.Header,
 10155  			HTTPStatusCode: res.StatusCode,
 10156  		},
 10157  	}
 10158  	target := &ret
 10159  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10160  		return nil, err
 10161  	}
 10162  	return ret, nil
 10163  }
 10164  
 10165  type ProjectsLocationsCatalogsBranchesProductsCreateCall struct {
 10166  	s                          *Service
 10167  	parent                     string
 10168  	googlecloudretailv2product *GoogleCloudRetailV2Product
 10169  	urlParams_                 gensupport.URLParams
 10170  	ctx_                       context.Context
 10171  	header_                    http.Header
 10172  }
 10173  
 10174  // Create: Creates a Product.
 10175  //
 10176  //   - parent: The parent catalog resource name, such as
 10177  //     `projects/*/locations/global/catalogs/default_catalog/branches/default_bran
 10178  //     ch`.
 10179  func (r *ProjectsLocationsCatalogsBranchesProductsService) Create(parent string, googlecloudretailv2product *GoogleCloudRetailV2Product) *ProjectsLocationsCatalogsBranchesProductsCreateCall {
 10180  	c := &ProjectsLocationsCatalogsBranchesProductsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10181  	c.parent = parent
 10182  	c.googlecloudretailv2product = googlecloudretailv2product
 10183  	return c
 10184  }
 10185  
 10186  // ProductId sets the optional parameter "productId": Required. The ID to use
 10187  // for the Product, which will become the final component of the Product.name.
 10188  // If the caller does not have permission to create the Product, regardless of
 10189  // whether or not it exists, a PERMISSION_DENIED error is returned. This field
 10190  // must be unique among all Products with the same parent. Otherwise, an
 10191  // ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string
 10192  // with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error
 10193  // is returned.
 10194  func (c *ProjectsLocationsCatalogsBranchesProductsCreateCall) ProductId(productId string) *ProjectsLocationsCatalogsBranchesProductsCreateCall {
 10195  	c.urlParams_.Set("productId", productId)
 10196  	return c
 10197  }
 10198  
 10199  // Fields allows partial responses to be retrieved. See
 10200  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10201  // details.
 10202  func (c *ProjectsLocationsCatalogsBranchesProductsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsCreateCall {
 10203  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10204  	return c
 10205  }
 10206  
 10207  // Context sets the context to be used in this call's Do method.
 10208  func (c *ProjectsLocationsCatalogsBranchesProductsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsCreateCall {
 10209  	c.ctx_ = ctx
 10210  	return c
 10211  }
 10212  
 10213  // Header returns a http.Header that can be modified by the caller to add
 10214  // headers to the request.
 10215  func (c *ProjectsLocationsCatalogsBranchesProductsCreateCall) Header() http.Header {
 10216  	if c.header_ == nil {
 10217  		c.header_ = make(http.Header)
 10218  	}
 10219  	return c.header_
 10220  }
 10221  
 10222  func (c *ProjectsLocationsCatalogsBranchesProductsCreateCall) doRequest(alt string) (*http.Response, error) {
 10223  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10224  	var body io.Reader = nil
 10225  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2product)
 10226  	if err != nil {
 10227  		return nil, err
 10228  	}
 10229  	c.urlParams_.Set("alt", alt)
 10230  	c.urlParams_.Set("prettyPrint", "false")
 10231  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/products")
 10232  	urls += "?" + c.urlParams_.Encode()
 10233  	req, err := http.NewRequest("POST", urls, body)
 10234  	if err != nil {
 10235  		return nil, err
 10236  	}
 10237  	req.Header = reqHeaders
 10238  	googleapi.Expand(req.URL, map[string]string{
 10239  		"parent": c.parent,
 10240  	})
 10241  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10242  }
 10243  
 10244  // Do executes the "retail.projects.locations.catalogs.branches.products.create" call.
 10245  // Any non-2xx status code is an error. Response headers are in either
 10246  // *GoogleCloudRetailV2Product.ServerResponse.Header or (if a response was
 10247  // returned at all) in error.(*googleapi.Error).Header. Use
 10248  // googleapi.IsNotModified to check whether the returned error was because
 10249  // http.StatusNotModified was returned.
 10250  func (c *ProjectsLocationsCatalogsBranchesProductsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Product, error) {
 10251  	gensupport.SetOptions(c.urlParams_, opts...)
 10252  	res, err := c.doRequest("json")
 10253  	if res != nil && res.StatusCode == http.StatusNotModified {
 10254  		if res.Body != nil {
 10255  			res.Body.Close()
 10256  		}
 10257  		return nil, gensupport.WrapError(&googleapi.Error{
 10258  			Code:   res.StatusCode,
 10259  			Header: res.Header,
 10260  		})
 10261  	}
 10262  	if err != nil {
 10263  		return nil, err
 10264  	}
 10265  	defer googleapi.CloseBody(res)
 10266  	if err := googleapi.CheckResponse(res); err != nil {
 10267  		return nil, gensupport.WrapError(err)
 10268  	}
 10269  	ret := &GoogleCloudRetailV2Product{
 10270  		ServerResponse: googleapi.ServerResponse{
 10271  			Header:         res.Header,
 10272  			HTTPStatusCode: res.StatusCode,
 10273  		},
 10274  	}
 10275  	target := &ret
 10276  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10277  		return nil, err
 10278  	}
 10279  	return ret, nil
 10280  }
 10281  
 10282  type ProjectsLocationsCatalogsBranchesProductsDeleteCall struct {
 10283  	s          *Service
 10284  	name       string
 10285  	urlParams_ gensupport.URLParams
 10286  	ctx_       context.Context
 10287  	header_    http.Header
 10288  }
 10289  
 10290  // Delete: Deletes a Product.
 10291  //
 10292  //   - name: Full resource name of Product, such as
 10293  //     `projects/*/locations/global/catalogs/default_catalog/branches/default_bran
 10294  //     ch/products/some_product_id`. If the caller does not have permission to
 10295  //     delete the Product, regardless of whether or not it exists, a
 10296  //     PERMISSION_DENIED error is returned. If the Product to delete does not
 10297  //     exist, a NOT_FOUND error is returned. The Product to delete can neither be
 10298  //     a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY
 10299  //     Product with more than one variants. Otherwise, an INVALID_ARGUMENT error
 10300  //     is returned. All inventory information for the named Product will be
 10301  //     deleted.
 10302  func (r *ProjectsLocationsCatalogsBranchesProductsService) Delete(name string) *ProjectsLocationsCatalogsBranchesProductsDeleteCall {
 10303  	c := &ProjectsLocationsCatalogsBranchesProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10304  	c.name = name
 10305  	return c
 10306  }
 10307  
 10308  // Fields allows partial responses to be retrieved. See
 10309  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10310  // details.
 10311  func (c *ProjectsLocationsCatalogsBranchesProductsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsDeleteCall {
 10312  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10313  	return c
 10314  }
 10315  
 10316  // Context sets the context to be used in this call's Do method.
 10317  func (c *ProjectsLocationsCatalogsBranchesProductsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsDeleteCall {
 10318  	c.ctx_ = ctx
 10319  	return c
 10320  }
 10321  
 10322  // Header returns a http.Header that can be modified by the caller to add
 10323  // headers to the request.
 10324  func (c *ProjectsLocationsCatalogsBranchesProductsDeleteCall) Header() http.Header {
 10325  	if c.header_ == nil {
 10326  		c.header_ = make(http.Header)
 10327  	}
 10328  	return c.header_
 10329  }
 10330  
 10331  func (c *ProjectsLocationsCatalogsBranchesProductsDeleteCall) doRequest(alt string) (*http.Response, error) {
 10332  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10333  	var body io.Reader = nil
 10334  	c.urlParams_.Set("alt", alt)
 10335  	c.urlParams_.Set("prettyPrint", "false")
 10336  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 10337  	urls += "?" + c.urlParams_.Encode()
 10338  	req, err := http.NewRequest("DELETE", urls, body)
 10339  	if err != nil {
 10340  		return nil, err
 10341  	}
 10342  	req.Header = reqHeaders
 10343  	googleapi.Expand(req.URL, map[string]string{
 10344  		"name": c.name,
 10345  	})
 10346  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10347  }
 10348  
 10349  // Do executes the "retail.projects.locations.catalogs.branches.products.delete" call.
 10350  // Any non-2xx status code is an error. Response headers are in either
 10351  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
 10352  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10353  // check whether the returned error was because http.StatusNotModified was
 10354  // returned.
 10355  func (c *ProjectsLocationsCatalogsBranchesProductsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
 10356  	gensupport.SetOptions(c.urlParams_, opts...)
 10357  	res, err := c.doRequest("json")
 10358  	if res != nil && res.StatusCode == http.StatusNotModified {
 10359  		if res.Body != nil {
 10360  			res.Body.Close()
 10361  		}
 10362  		return nil, gensupport.WrapError(&googleapi.Error{
 10363  			Code:   res.StatusCode,
 10364  			Header: res.Header,
 10365  		})
 10366  	}
 10367  	if err != nil {
 10368  		return nil, err
 10369  	}
 10370  	defer googleapi.CloseBody(res)
 10371  	if err := googleapi.CheckResponse(res); err != nil {
 10372  		return nil, gensupport.WrapError(err)
 10373  	}
 10374  	ret := &GoogleProtobufEmpty{
 10375  		ServerResponse: googleapi.ServerResponse{
 10376  			Header:         res.Header,
 10377  			HTTPStatusCode: res.StatusCode,
 10378  		},
 10379  	}
 10380  	target := &ret
 10381  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10382  		return nil, err
 10383  	}
 10384  	return ret, nil
 10385  }
 10386  
 10387  type ProjectsLocationsCatalogsBranchesProductsGetCall struct {
 10388  	s            *Service
 10389  	name         string
 10390  	urlParams_   gensupport.URLParams
 10391  	ifNoneMatch_ string
 10392  	ctx_         context.Context
 10393  	header_      http.Header
 10394  }
 10395  
 10396  // Get: Gets a Product.
 10397  //
 10398  //   - name: Full resource name of Product, such as
 10399  //     `projects/*/locations/global/catalogs/default_catalog/branches/default_bran
 10400  //     ch/products/some_product_id`. If the caller does not have permission to
 10401  //     access the Product, regardless of whether or not it exists, a
 10402  //     PERMISSION_DENIED error is returned. If the requested Product does not
 10403  //     exist, a NOT_FOUND error is returned.
 10404  func (r *ProjectsLocationsCatalogsBranchesProductsService) Get(name string) *ProjectsLocationsCatalogsBranchesProductsGetCall {
 10405  	c := &ProjectsLocationsCatalogsBranchesProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10406  	c.name = name
 10407  	return c
 10408  }
 10409  
 10410  // Fields allows partial responses to be retrieved. See
 10411  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10412  // details.
 10413  func (c *ProjectsLocationsCatalogsBranchesProductsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsGetCall {
 10414  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10415  	return c
 10416  }
 10417  
 10418  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10419  // object's ETag matches the given value. This is useful for getting updates
 10420  // only after the object has changed since the last request.
 10421  func (c *ProjectsLocationsCatalogsBranchesProductsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsBranchesProductsGetCall {
 10422  	c.ifNoneMatch_ = entityTag
 10423  	return c
 10424  }
 10425  
 10426  // Context sets the context to be used in this call's Do method.
 10427  func (c *ProjectsLocationsCatalogsBranchesProductsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsGetCall {
 10428  	c.ctx_ = ctx
 10429  	return c
 10430  }
 10431  
 10432  // Header returns a http.Header that can be modified by the caller to add
 10433  // headers to the request.
 10434  func (c *ProjectsLocationsCatalogsBranchesProductsGetCall) Header() http.Header {
 10435  	if c.header_ == nil {
 10436  		c.header_ = make(http.Header)
 10437  	}
 10438  	return c.header_
 10439  }
 10440  
 10441  func (c *ProjectsLocationsCatalogsBranchesProductsGetCall) doRequest(alt string) (*http.Response, error) {
 10442  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10443  	if c.ifNoneMatch_ != "" {
 10444  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10445  	}
 10446  	var body io.Reader = nil
 10447  	c.urlParams_.Set("alt", alt)
 10448  	c.urlParams_.Set("prettyPrint", "false")
 10449  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 10450  	urls += "?" + c.urlParams_.Encode()
 10451  	req, err := http.NewRequest("GET", urls, body)
 10452  	if err != nil {
 10453  		return nil, err
 10454  	}
 10455  	req.Header = reqHeaders
 10456  	googleapi.Expand(req.URL, map[string]string{
 10457  		"name": c.name,
 10458  	})
 10459  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10460  }
 10461  
 10462  // Do executes the "retail.projects.locations.catalogs.branches.products.get" call.
 10463  // Any non-2xx status code is an error. Response headers are in either
 10464  // *GoogleCloudRetailV2Product.ServerResponse.Header or (if a response was
 10465  // returned at all) in error.(*googleapi.Error).Header. Use
 10466  // googleapi.IsNotModified to check whether the returned error was because
 10467  // http.StatusNotModified was returned.
 10468  func (c *ProjectsLocationsCatalogsBranchesProductsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Product, error) {
 10469  	gensupport.SetOptions(c.urlParams_, opts...)
 10470  	res, err := c.doRequest("json")
 10471  	if res != nil && res.StatusCode == http.StatusNotModified {
 10472  		if res.Body != nil {
 10473  			res.Body.Close()
 10474  		}
 10475  		return nil, gensupport.WrapError(&googleapi.Error{
 10476  			Code:   res.StatusCode,
 10477  			Header: res.Header,
 10478  		})
 10479  	}
 10480  	if err != nil {
 10481  		return nil, err
 10482  	}
 10483  	defer googleapi.CloseBody(res)
 10484  	if err := googleapi.CheckResponse(res); err != nil {
 10485  		return nil, gensupport.WrapError(err)
 10486  	}
 10487  	ret := &GoogleCloudRetailV2Product{
 10488  		ServerResponse: googleapi.ServerResponse{
 10489  			Header:         res.Header,
 10490  			HTTPStatusCode: res.StatusCode,
 10491  		},
 10492  	}
 10493  	target := &ret
 10494  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10495  		return nil, err
 10496  	}
 10497  	return ret, nil
 10498  }
 10499  
 10500  type ProjectsLocationsCatalogsBranchesProductsImportCall struct {
 10501  	s                                        *Service
 10502  	parent                                   string
 10503  	googlecloudretailv2importproductsrequest *GoogleCloudRetailV2ImportProductsRequest
 10504  	urlParams_                               gensupport.URLParams
 10505  	ctx_                                     context.Context
 10506  	header_                                  http.Header
 10507  }
 10508  
 10509  // Import: Bulk import of multiple Products. Request processing may be
 10510  // synchronous. Non-existing items are created. Note that it is possible for a
 10511  // subset of the Products to be successfully updated.
 10512  //
 10513  //   - parent:
 10514  //     `projects/1234/locations/global/catalogs/default_catalog/branches/default_b
 10515  //     ranch` If no updateMask is specified, requires products.create permission.
 10516  //     If updateMask is specified, requires products.update permission.
 10517  func (r *ProjectsLocationsCatalogsBranchesProductsService) Import(parent string, googlecloudretailv2importproductsrequest *GoogleCloudRetailV2ImportProductsRequest) *ProjectsLocationsCatalogsBranchesProductsImportCall {
 10518  	c := &ProjectsLocationsCatalogsBranchesProductsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10519  	c.parent = parent
 10520  	c.googlecloudretailv2importproductsrequest = googlecloudretailv2importproductsrequest
 10521  	return c
 10522  }
 10523  
 10524  // Fields allows partial responses to be retrieved. See
 10525  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10526  // details.
 10527  func (c *ProjectsLocationsCatalogsBranchesProductsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsImportCall {
 10528  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10529  	return c
 10530  }
 10531  
 10532  // Context sets the context to be used in this call's Do method.
 10533  func (c *ProjectsLocationsCatalogsBranchesProductsImportCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsImportCall {
 10534  	c.ctx_ = ctx
 10535  	return c
 10536  }
 10537  
 10538  // Header returns a http.Header that can be modified by the caller to add
 10539  // headers to the request.
 10540  func (c *ProjectsLocationsCatalogsBranchesProductsImportCall) Header() http.Header {
 10541  	if c.header_ == nil {
 10542  		c.header_ = make(http.Header)
 10543  	}
 10544  	return c.header_
 10545  }
 10546  
 10547  func (c *ProjectsLocationsCatalogsBranchesProductsImportCall) doRequest(alt string) (*http.Response, error) {
 10548  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10549  	var body io.Reader = nil
 10550  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2importproductsrequest)
 10551  	if err != nil {
 10552  		return nil, err
 10553  	}
 10554  	c.urlParams_.Set("alt", alt)
 10555  	c.urlParams_.Set("prettyPrint", "false")
 10556  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/products:import")
 10557  	urls += "?" + c.urlParams_.Encode()
 10558  	req, err := http.NewRequest("POST", urls, body)
 10559  	if err != nil {
 10560  		return nil, err
 10561  	}
 10562  	req.Header = reqHeaders
 10563  	googleapi.Expand(req.URL, map[string]string{
 10564  		"parent": c.parent,
 10565  	})
 10566  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10567  }
 10568  
 10569  // Do executes the "retail.projects.locations.catalogs.branches.products.import" call.
 10570  // Any non-2xx status code is an error. Response headers are in either
 10571  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 10572  // returned at all) in error.(*googleapi.Error).Header. Use
 10573  // googleapi.IsNotModified to check whether the returned error was because
 10574  // http.StatusNotModified was returned.
 10575  func (c *ProjectsLocationsCatalogsBranchesProductsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 10576  	gensupport.SetOptions(c.urlParams_, opts...)
 10577  	res, err := c.doRequest("json")
 10578  	if res != nil && res.StatusCode == http.StatusNotModified {
 10579  		if res.Body != nil {
 10580  			res.Body.Close()
 10581  		}
 10582  		return nil, gensupport.WrapError(&googleapi.Error{
 10583  			Code:   res.StatusCode,
 10584  			Header: res.Header,
 10585  		})
 10586  	}
 10587  	if err != nil {
 10588  		return nil, err
 10589  	}
 10590  	defer googleapi.CloseBody(res)
 10591  	if err := googleapi.CheckResponse(res); err != nil {
 10592  		return nil, gensupport.WrapError(err)
 10593  	}
 10594  	ret := &GoogleLongrunningOperation{
 10595  		ServerResponse: googleapi.ServerResponse{
 10596  			Header:         res.Header,
 10597  			HTTPStatusCode: res.StatusCode,
 10598  		},
 10599  	}
 10600  	target := &ret
 10601  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10602  		return nil, err
 10603  	}
 10604  	return ret, nil
 10605  }
 10606  
 10607  type ProjectsLocationsCatalogsBranchesProductsListCall struct {
 10608  	s            *Service
 10609  	parent       string
 10610  	urlParams_   gensupport.URLParams
 10611  	ifNoneMatch_ string
 10612  	ctx_         context.Context
 10613  	header_      http.Header
 10614  }
 10615  
 10616  // List: Gets a list of Products.
 10617  //
 10618  //   - parent: The parent branch resource name, such as
 10619  //     `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use
 10620  //     `default_branch` as the branch ID, to list products under the default
 10621  //     branch. If the caller does not have permission to list Products under this
 10622  //     branch, regardless of whether or not this branch exists, a
 10623  //     PERMISSION_DENIED error is returned.
 10624  func (r *ProjectsLocationsCatalogsBranchesProductsService) List(parent string) *ProjectsLocationsCatalogsBranchesProductsListCall {
 10625  	c := &ProjectsLocationsCatalogsBranchesProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10626  	c.parent = parent
 10627  	return c
 10628  }
 10629  
 10630  // Filter sets the optional parameter "filter": A filter to apply on the list
 10631  // results. Supported features: * List all the products under the parent branch
 10632  // if filter is unset. * List Product.Type.VARIANT Products sharing the same
 10633  // Product.Type.PRIMARY Product. For example: `primary_product_id =
 10634  // "some_product_id" * List Products bundled in a Product.Type.COLLECTION
 10635  // Product. For example: `collection_product_id = "some_product_id" * List
 10636  // Products with a partibular type. For example: `type = "PRIMARY" `type =
 10637  // "VARIANT" `type = "COLLECTION" If the field is unrecognizable, an
 10638  // INVALID_ARGUMENT error is returned. If the specified Product.Type.PRIMARY
 10639  // Product or Product.Type.COLLECTION Product does not exist, a NOT_FOUND error
 10640  // is returned.
 10641  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) Filter(filter string) *ProjectsLocationsCatalogsBranchesProductsListCall {
 10642  	c.urlParams_.Set("filter", filter)
 10643  	return c
 10644  }
 10645  
 10646  // PageSize sets the optional parameter "pageSize": Maximum number of Products
 10647  // to return. If unspecified, defaults to 100. The maximum allowed value is
 10648  // 1000. Values above 1000 will be coerced to 1000. If this field is negative,
 10649  // an INVALID_ARGUMENT error is returned.
 10650  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsBranchesProductsListCall {
 10651  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10652  	return c
 10653  }
 10654  
 10655  // PageToken sets the optional parameter "pageToken": A page token
 10656  // ListProductsResponse.next_page_token, received from a previous
 10657  // ProductService.ListProducts call. Provide this to retrieve the subsequent
 10658  // page. When paginating, all other parameters provided to
 10659  // ProductService.ListProducts must match the call that provided the page
 10660  // token. Otherwise, an INVALID_ARGUMENT error is returned.
 10661  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsBranchesProductsListCall {
 10662  	c.urlParams_.Set("pageToken", pageToken)
 10663  	return c
 10664  }
 10665  
 10666  // ReadMask sets the optional parameter "readMask": The fields of Product to
 10667  // return in the responses. If not set or empty, the following fields are
 10668  // returned: * Product.name * Product.id * Product.title * Product.uri *
 10669  // Product.images * Product.price_info * Product.brands If "*" is provided, all
 10670  // fields are returned. Product.name is always returned no matter what mask is
 10671  // set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT
 10672  // error is returned.
 10673  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) ReadMask(readMask string) *ProjectsLocationsCatalogsBranchesProductsListCall {
 10674  	c.urlParams_.Set("readMask", readMask)
 10675  	return c
 10676  }
 10677  
 10678  // Fields allows partial responses to be retrieved. See
 10679  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10680  // details.
 10681  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsListCall {
 10682  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10683  	return c
 10684  }
 10685  
 10686  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10687  // object's ETag matches the given value. This is useful for getting updates
 10688  // only after the object has changed since the last request.
 10689  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsBranchesProductsListCall {
 10690  	c.ifNoneMatch_ = entityTag
 10691  	return c
 10692  }
 10693  
 10694  // Context sets the context to be used in this call's Do method.
 10695  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsListCall {
 10696  	c.ctx_ = ctx
 10697  	return c
 10698  }
 10699  
 10700  // Header returns a http.Header that can be modified by the caller to add
 10701  // headers to the request.
 10702  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) Header() http.Header {
 10703  	if c.header_ == nil {
 10704  		c.header_ = make(http.Header)
 10705  	}
 10706  	return c.header_
 10707  }
 10708  
 10709  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) doRequest(alt string) (*http.Response, error) {
 10710  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10711  	if c.ifNoneMatch_ != "" {
 10712  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10713  	}
 10714  	var body io.Reader = nil
 10715  	c.urlParams_.Set("alt", alt)
 10716  	c.urlParams_.Set("prettyPrint", "false")
 10717  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/products")
 10718  	urls += "?" + c.urlParams_.Encode()
 10719  	req, err := http.NewRequest("GET", urls, body)
 10720  	if err != nil {
 10721  		return nil, err
 10722  	}
 10723  	req.Header = reqHeaders
 10724  	googleapi.Expand(req.URL, map[string]string{
 10725  		"parent": c.parent,
 10726  	})
 10727  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10728  }
 10729  
 10730  // Do executes the "retail.projects.locations.catalogs.branches.products.list" call.
 10731  // Any non-2xx status code is an error. Response headers are in either
 10732  // *GoogleCloudRetailV2ListProductsResponse.ServerResponse.Header or (if a
 10733  // response was returned at all) in error.(*googleapi.Error).Header. Use
 10734  // googleapi.IsNotModified to check whether the returned error was because
 10735  // http.StatusNotModified was returned.
 10736  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ListProductsResponse, error) {
 10737  	gensupport.SetOptions(c.urlParams_, opts...)
 10738  	res, err := c.doRequest("json")
 10739  	if res != nil && res.StatusCode == http.StatusNotModified {
 10740  		if res.Body != nil {
 10741  			res.Body.Close()
 10742  		}
 10743  		return nil, gensupport.WrapError(&googleapi.Error{
 10744  			Code:   res.StatusCode,
 10745  			Header: res.Header,
 10746  		})
 10747  	}
 10748  	if err != nil {
 10749  		return nil, err
 10750  	}
 10751  	defer googleapi.CloseBody(res)
 10752  	if err := googleapi.CheckResponse(res); err != nil {
 10753  		return nil, gensupport.WrapError(err)
 10754  	}
 10755  	ret := &GoogleCloudRetailV2ListProductsResponse{
 10756  		ServerResponse: googleapi.ServerResponse{
 10757  			Header:         res.Header,
 10758  			HTTPStatusCode: res.StatusCode,
 10759  		},
 10760  	}
 10761  	target := &ret
 10762  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10763  		return nil, err
 10764  	}
 10765  	return ret, nil
 10766  }
 10767  
 10768  // Pages invokes f for each page of results.
 10769  // A non-nil error returned from f will halt the iteration.
 10770  // The provided context supersedes any context provided to the Context method.
 10771  func (c *ProjectsLocationsCatalogsBranchesProductsListCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2ListProductsResponse) error) error {
 10772  	c.ctx_ = ctx
 10773  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10774  	for {
 10775  		x, err := c.Do()
 10776  		if err != nil {
 10777  			return err
 10778  		}
 10779  		if err := f(x); err != nil {
 10780  			return err
 10781  		}
 10782  		if x.NextPageToken == "" {
 10783  			return nil
 10784  		}
 10785  		c.PageToken(x.NextPageToken)
 10786  	}
 10787  }
 10788  
 10789  type ProjectsLocationsCatalogsBranchesProductsPatchCall struct {
 10790  	s                          *Service
 10791  	name                       string
 10792  	googlecloudretailv2product *GoogleCloudRetailV2Product
 10793  	urlParams_                 gensupport.URLParams
 10794  	ctx_                       context.Context
 10795  	header_                    http.Header
 10796  }
 10797  
 10798  // Patch: Updates a Product.
 10799  //
 10800  //   - name: Immutable. Full resource name of the product, such as
 10801  //     `projects/*/locations/global/catalogs/default_catalog/branches/default_bran
 10802  //     ch/products/product_id`.
 10803  func (r *ProjectsLocationsCatalogsBranchesProductsService) Patch(name string, googlecloudretailv2product *GoogleCloudRetailV2Product) *ProjectsLocationsCatalogsBranchesProductsPatchCall {
 10804  	c := &ProjectsLocationsCatalogsBranchesProductsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10805  	c.name = name
 10806  	c.googlecloudretailv2product = googlecloudretailv2product
 10807  	return c
 10808  }
 10809  
 10810  // AllowMissing sets the optional parameter "allowMissing": If set to true, and
 10811  // the Product is not found, a new Product will be created. In this situation,
 10812  // `update_mask` is ignored.
 10813  func (c *ProjectsLocationsCatalogsBranchesProductsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCatalogsBranchesProductsPatchCall {
 10814  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
 10815  	return c
 10816  }
 10817  
 10818  // UpdateMask sets the optional parameter "updateMask": Indicates which fields
 10819  // in the provided Product to update. The immutable and output only fields are
 10820  // NOT supported. If not set, all supported fields (the fields that are neither
 10821  // immutable nor output only) are updated. If an unsupported or unknown field
 10822  // is provided, an INVALID_ARGUMENT error is returned. The attribute key can be
 10823  // updated by setting the mask path as "attributes.${key_name}". If a key name
 10824  // is present in the mask but not in the patching product from the request,
 10825  // this key will be deleted after the update.
 10826  func (c *ProjectsLocationsCatalogsBranchesProductsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsBranchesProductsPatchCall {
 10827  	c.urlParams_.Set("updateMask", updateMask)
 10828  	return c
 10829  }
 10830  
 10831  // Fields allows partial responses to be retrieved. See
 10832  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10833  // details.
 10834  func (c *ProjectsLocationsCatalogsBranchesProductsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsPatchCall {
 10835  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10836  	return c
 10837  }
 10838  
 10839  // Context sets the context to be used in this call's Do method.
 10840  func (c *ProjectsLocationsCatalogsBranchesProductsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsPatchCall {
 10841  	c.ctx_ = ctx
 10842  	return c
 10843  }
 10844  
 10845  // Header returns a http.Header that can be modified by the caller to add
 10846  // headers to the request.
 10847  func (c *ProjectsLocationsCatalogsBranchesProductsPatchCall) Header() http.Header {
 10848  	if c.header_ == nil {
 10849  		c.header_ = make(http.Header)
 10850  	}
 10851  	return c.header_
 10852  }
 10853  
 10854  func (c *ProjectsLocationsCatalogsBranchesProductsPatchCall) doRequest(alt string) (*http.Response, error) {
 10855  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10856  	var body io.Reader = nil
 10857  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2product)
 10858  	if err != nil {
 10859  		return nil, err
 10860  	}
 10861  	c.urlParams_.Set("alt", alt)
 10862  	c.urlParams_.Set("prettyPrint", "false")
 10863  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 10864  	urls += "?" + c.urlParams_.Encode()
 10865  	req, err := http.NewRequest("PATCH", urls, body)
 10866  	if err != nil {
 10867  		return nil, err
 10868  	}
 10869  	req.Header = reqHeaders
 10870  	googleapi.Expand(req.URL, map[string]string{
 10871  		"name": c.name,
 10872  	})
 10873  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10874  }
 10875  
 10876  // Do executes the "retail.projects.locations.catalogs.branches.products.patch" call.
 10877  // Any non-2xx status code is an error. Response headers are in either
 10878  // *GoogleCloudRetailV2Product.ServerResponse.Header or (if a response was
 10879  // returned at all) in error.(*googleapi.Error).Header. Use
 10880  // googleapi.IsNotModified to check whether the returned error was because
 10881  // http.StatusNotModified was returned.
 10882  func (c *ProjectsLocationsCatalogsBranchesProductsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Product, error) {
 10883  	gensupport.SetOptions(c.urlParams_, opts...)
 10884  	res, err := c.doRequest("json")
 10885  	if res != nil && res.StatusCode == http.StatusNotModified {
 10886  		if res.Body != nil {
 10887  			res.Body.Close()
 10888  		}
 10889  		return nil, gensupport.WrapError(&googleapi.Error{
 10890  			Code:   res.StatusCode,
 10891  			Header: res.Header,
 10892  		})
 10893  	}
 10894  	if err != nil {
 10895  		return nil, err
 10896  	}
 10897  	defer googleapi.CloseBody(res)
 10898  	if err := googleapi.CheckResponse(res); err != nil {
 10899  		return nil, gensupport.WrapError(err)
 10900  	}
 10901  	ret := &GoogleCloudRetailV2Product{
 10902  		ServerResponse: googleapi.ServerResponse{
 10903  			Header:         res.Header,
 10904  			HTTPStatusCode: res.StatusCode,
 10905  		},
 10906  	}
 10907  	target := &ret
 10908  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10909  		return nil, err
 10910  	}
 10911  	return ret, nil
 10912  }
 10913  
 10914  type ProjectsLocationsCatalogsBranchesProductsPurgeCall struct {
 10915  	s                                       *Service
 10916  	parent                                  string
 10917  	googlecloudretailv2purgeproductsrequest *GoogleCloudRetailV2PurgeProductsRequest
 10918  	urlParams_                              gensupport.URLParams
 10919  	ctx_                                    context.Context
 10920  	header_                                 http.Header
 10921  }
 10922  
 10923  // Purge: Permanently deletes all selected Products under a branch. This
 10924  // process is asynchronous. If the request is valid, the removal will be
 10925  // enqueued and processed offline. Depending on the number of Products, this
 10926  // operation could take hours to complete. Before the operation completes, some
 10927  // Products may still be returned by ProductService.GetProduct or
 10928  // ProductService.ListProducts. Depending on the number of Products, this
 10929  // operation could take hours to complete. To get a sample of Products that
 10930  // would be deleted, set PurgeProductsRequest.force to false.
 10931  //
 10932  //   - parent: The resource name of the branch under which the products are
 10933  //     created. The format is
 10934  //     `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${br
 10935  //     anchId}`.
 10936  func (r *ProjectsLocationsCatalogsBranchesProductsService) Purge(parent string, googlecloudretailv2purgeproductsrequest *GoogleCloudRetailV2PurgeProductsRequest) *ProjectsLocationsCatalogsBranchesProductsPurgeCall {
 10937  	c := &ProjectsLocationsCatalogsBranchesProductsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10938  	c.parent = parent
 10939  	c.googlecloudretailv2purgeproductsrequest = googlecloudretailv2purgeproductsrequest
 10940  	return c
 10941  }
 10942  
 10943  // Fields allows partial responses to be retrieved. See
 10944  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10945  // details.
 10946  func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsPurgeCall {
 10947  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10948  	return c
 10949  }
 10950  
 10951  // Context sets the context to be used in this call's Do method.
 10952  func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsPurgeCall {
 10953  	c.ctx_ = ctx
 10954  	return c
 10955  }
 10956  
 10957  // Header returns a http.Header that can be modified by the caller to add
 10958  // headers to the request.
 10959  func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) Header() http.Header {
 10960  	if c.header_ == nil {
 10961  		c.header_ = make(http.Header)
 10962  	}
 10963  	return c.header_
 10964  }
 10965  
 10966  func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) doRequest(alt string) (*http.Response, error) {
 10967  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10968  	var body io.Reader = nil
 10969  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2purgeproductsrequest)
 10970  	if err != nil {
 10971  		return nil, err
 10972  	}
 10973  	c.urlParams_.Set("alt", alt)
 10974  	c.urlParams_.Set("prettyPrint", "false")
 10975  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/products:purge")
 10976  	urls += "?" + c.urlParams_.Encode()
 10977  	req, err := http.NewRequest("POST", urls, body)
 10978  	if err != nil {
 10979  		return nil, err
 10980  	}
 10981  	req.Header = reqHeaders
 10982  	googleapi.Expand(req.URL, map[string]string{
 10983  		"parent": c.parent,
 10984  	})
 10985  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10986  }
 10987  
 10988  // Do executes the "retail.projects.locations.catalogs.branches.products.purge" call.
 10989  // Any non-2xx status code is an error. Response headers are in either
 10990  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 10991  // returned at all) in error.(*googleapi.Error).Header. Use
 10992  // googleapi.IsNotModified to check whether the returned error was because
 10993  // http.StatusNotModified was returned.
 10994  func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 10995  	gensupport.SetOptions(c.urlParams_, opts...)
 10996  	res, err := c.doRequest("json")
 10997  	if res != nil && res.StatusCode == http.StatusNotModified {
 10998  		if res.Body != nil {
 10999  			res.Body.Close()
 11000  		}
 11001  		return nil, gensupport.WrapError(&googleapi.Error{
 11002  			Code:   res.StatusCode,
 11003  			Header: res.Header,
 11004  		})
 11005  	}
 11006  	if err != nil {
 11007  		return nil, err
 11008  	}
 11009  	defer googleapi.CloseBody(res)
 11010  	if err := googleapi.CheckResponse(res); err != nil {
 11011  		return nil, gensupport.WrapError(err)
 11012  	}
 11013  	ret := &GoogleLongrunningOperation{
 11014  		ServerResponse: googleapi.ServerResponse{
 11015  			Header:         res.Header,
 11016  			HTTPStatusCode: res.StatusCode,
 11017  		},
 11018  	}
 11019  	target := &ret
 11020  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11021  		return nil, err
 11022  	}
 11023  	return ret, nil
 11024  }
 11025  
 11026  type ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall struct {
 11027  	s                                                 *Service
 11028  	product                                           string
 11029  	googlecloudretailv2removefulfillmentplacesrequest *GoogleCloudRetailV2RemoveFulfillmentPlacesRequest
 11030  	urlParams_                                        gensupport.URLParams
 11031  	ctx_                                              context.Context
 11032  	header_                                           http.Header
 11033  }
 11034  
 11035  // RemoveFulfillmentPlaces: We recommend that you use the
 11036  // ProductService.RemoveLocalInventories method instead of the
 11037  // ProductService.RemoveFulfillmentPlaces method.
 11038  // ProductService.RemoveLocalInventories achieves the same results but provides
 11039  // more fine-grained control over ingesting local inventory data. Incrementally
 11040  // removes place IDs from a Product.fulfillment_info.place_ids. This process is
 11041  // asynchronous and does not require the Product to exist before updating
 11042  // fulfillment information. If the request is valid, the update will be
 11043  // enqueued and processed downstream. As a consequence, when a response is
 11044  // returned, the removed place IDs are not immediately manifested in the
 11045  // Product queried by ProductService.GetProduct or ProductService.ListProducts.
 11046  // The returned Operations will be obsolete after 1 day, and GetOperation API
 11047  // will return NOT_FOUND afterwards. If conflicting updates are issued, the
 11048  // Operations associated with the stale updates will not be marked as done
 11049  // until being obsolete.
 11050  //
 11051  //   - product: Full resource name of Product, such as
 11052  //     `projects/*/locations/global/catalogs/default_catalog/branches/default_bran
 11053  //     ch/products/some_product_id`. If the caller does not have permission to
 11054  //     access the Product, regardless of whether or not it exists, a
 11055  //     PERMISSION_DENIED error is returned.
 11056  func (r *ProjectsLocationsCatalogsBranchesProductsService) RemoveFulfillmentPlaces(product string, googlecloudretailv2removefulfillmentplacesrequest *GoogleCloudRetailV2RemoveFulfillmentPlacesRequest) *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall {
 11057  	c := &ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11058  	c.product = product
 11059  	c.googlecloudretailv2removefulfillmentplacesrequest = googlecloudretailv2removefulfillmentplacesrequest
 11060  	return c
 11061  }
 11062  
 11063  // Fields allows partial responses to be retrieved. See
 11064  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11065  // details.
 11066  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall {
 11067  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11068  	return c
 11069  }
 11070  
 11071  // Context sets the context to be used in this call's Do method.
 11072  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall {
 11073  	c.ctx_ = ctx
 11074  	return c
 11075  }
 11076  
 11077  // Header returns a http.Header that can be modified by the caller to add
 11078  // headers to the request.
 11079  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Header() http.Header {
 11080  	if c.header_ == nil {
 11081  		c.header_ = make(http.Header)
 11082  	}
 11083  	return c.header_
 11084  }
 11085  
 11086  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) doRequest(alt string) (*http.Response, error) {
 11087  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11088  	var body io.Reader = nil
 11089  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2removefulfillmentplacesrequest)
 11090  	if err != nil {
 11091  		return nil, err
 11092  	}
 11093  	c.urlParams_.Set("alt", alt)
 11094  	c.urlParams_.Set("prettyPrint", "false")
 11095  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+product}:removeFulfillmentPlaces")
 11096  	urls += "?" + c.urlParams_.Encode()
 11097  	req, err := http.NewRequest("POST", urls, body)
 11098  	if err != nil {
 11099  		return nil, err
 11100  	}
 11101  	req.Header = reqHeaders
 11102  	googleapi.Expand(req.URL, map[string]string{
 11103  		"product": c.product,
 11104  	})
 11105  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11106  }
 11107  
 11108  // Do executes the "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces" call.
 11109  // Any non-2xx status code is an error. Response headers are in either
 11110  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 11111  // returned at all) in error.(*googleapi.Error).Header. Use
 11112  // googleapi.IsNotModified to check whether the returned error was because
 11113  // http.StatusNotModified was returned.
 11114  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 11115  	gensupport.SetOptions(c.urlParams_, opts...)
 11116  	res, err := c.doRequest("json")
 11117  	if res != nil && res.StatusCode == http.StatusNotModified {
 11118  		if res.Body != nil {
 11119  			res.Body.Close()
 11120  		}
 11121  		return nil, gensupport.WrapError(&googleapi.Error{
 11122  			Code:   res.StatusCode,
 11123  			Header: res.Header,
 11124  		})
 11125  	}
 11126  	if err != nil {
 11127  		return nil, err
 11128  	}
 11129  	defer googleapi.CloseBody(res)
 11130  	if err := googleapi.CheckResponse(res); err != nil {
 11131  		return nil, gensupport.WrapError(err)
 11132  	}
 11133  	ret := &GoogleLongrunningOperation{
 11134  		ServerResponse: googleapi.ServerResponse{
 11135  			Header:         res.Header,
 11136  			HTTPStatusCode: res.StatusCode,
 11137  		},
 11138  	}
 11139  	target := &ret
 11140  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11141  		return nil, err
 11142  	}
 11143  	return ret, nil
 11144  }
 11145  
 11146  type ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall struct {
 11147  	s                                                *Service
 11148  	product                                          string
 11149  	googlecloudretailv2removelocalinventoriesrequest *GoogleCloudRetailV2RemoveLocalInventoriesRequest
 11150  	urlParams_                                       gensupport.URLParams
 11151  	ctx_                                             context.Context
 11152  	header_                                          http.Header
 11153  }
 11154  
 11155  // RemoveLocalInventories: Remove local inventory information for a Product at
 11156  // a list of places at a removal timestamp. This process is asynchronous. If
 11157  // the request is valid, the removal will be enqueued and processed downstream.
 11158  // As a consequence, when a response is returned, removals are not immediately
 11159  // manifested in the Product queried by ProductService.GetProduct or
 11160  // ProductService.ListProducts. Local inventory information can only be removed
 11161  // using this method. ProductService.CreateProduct and
 11162  // ProductService.UpdateProduct has no effect on local inventories. The
 11163  // returned Operations will be obsolete after 1 day, and GetOperation API will
 11164  // return NOT_FOUND afterwards. If conflicting updates are issued, the
 11165  // Operations associated with the stale updates will not be marked as done
 11166  // until being obsolete.
 11167  //
 11168  //   - product: Full resource name of Product, such as
 11169  //     `projects/*/locations/global/catalogs/default_catalog/branches/default_bran
 11170  //     ch/products/some_product_id`. If the caller does not have permission to
 11171  //     access the Product, regardless of whether or not it exists, a
 11172  //     PERMISSION_DENIED error is returned.
 11173  func (r *ProjectsLocationsCatalogsBranchesProductsService) RemoveLocalInventories(product string, googlecloudretailv2removelocalinventoriesrequest *GoogleCloudRetailV2RemoveLocalInventoriesRequest) *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall {
 11174  	c := &ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11175  	c.product = product
 11176  	c.googlecloudretailv2removelocalinventoriesrequest = googlecloudretailv2removelocalinventoriesrequest
 11177  	return c
 11178  }
 11179  
 11180  // Fields allows partial responses to be retrieved. See
 11181  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11182  // details.
 11183  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall {
 11184  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11185  	return c
 11186  }
 11187  
 11188  // Context sets the context to be used in this call's Do method.
 11189  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall {
 11190  	c.ctx_ = ctx
 11191  	return c
 11192  }
 11193  
 11194  // Header returns a http.Header that can be modified by the caller to add
 11195  // headers to the request.
 11196  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Header() http.Header {
 11197  	if c.header_ == nil {
 11198  		c.header_ = make(http.Header)
 11199  	}
 11200  	return c.header_
 11201  }
 11202  
 11203  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) doRequest(alt string) (*http.Response, error) {
 11204  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11205  	var body io.Reader = nil
 11206  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2removelocalinventoriesrequest)
 11207  	if err != nil {
 11208  		return nil, err
 11209  	}
 11210  	c.urlParams_.Set("alt", alt)
 11211  	c.urlParams_.Set("prettyPrint", "false")
 11212  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+product}:removeLocalInventories")
 11213  	urls += "?" + c.urlParams_.Encode()
 11214  	req, err := http.NewRequest("POST", urls, body)
 11215  	if err != nil {
 11216  		return nil, err
 11217  	}
 11218  	req.Header = reqHeaders
 11219  	googleapi.Expand(req.URL, map[string]string{
 11220  		"product": c.product,
 11221  	})
 11222  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11223  }
 11224  
 11225  // Do executes the "retail.projects.locations.catalogs.branches.products.removeLocalInventories" call.
 11226  // Any non-2xx status code is an error. Response headers are in either
 11227  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 11228  // returned at all) in error.(*googleapi.Error).Header. Use
 11229  // googleapi.IsNotModified to check whether the returned error was because
 11230  // http.StatusNotModified was returned.
 11231  func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 11232  	gensupport.SetOptions(c.urlParams_, opts...)
 11233  	res, err := c.doRequest("json")
 11234  	if res != nil && res.StatusCode == http.StatusNotModified {
 11235  		if res.Body != nil {
 11236  			res.Body.Close()
 11237  		}
 11238  		return nil, gensupport.WrapError(&googleapi.Error{
 11239  			Code:   res.StatusCode,
 11240  			Header: res.Header,
 11241  		})
 11242  	}
 11243  	if err != nil {
 11244  		return nil, err
 11245  	}
 11246  	defer googleapi.CloseBody(res)
 11247  	if err := googleapi.CheckResponse(res); err != nil {
 11248  		return nil, gensupport.WrapError(err)
 11249  	}
 11250  	ret := &GoogleLongrunningOperation{
 11251  		ServerResponse: googleapi.ServerResponse{
 11252  			Header:         res.Header,
 11253  			HTTPStatusCode: res.StatusCode,
 11254  		},
 11255  	}
 11256  	target := &ret
 11257  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11258  		return nil, err
 11259  	}
 11260  	return ret, nil
 11261  }
 11262  
 11263  type ProjectsLocationsCatalogsBranchesProductsSetInventoryCall struct {
 11264  	s                                      *Service
 11265  	name                                   string
 11266  	googlecloudretailv2setinventoryrequest *GoogleCloudRetailV2SetInventoryRequest
 11267  	urlParams_                             gensupport.URLParams
 11268  	ctx_                                   context.Context
 11269  	header_                                http.Header
 11270  }
 11271  
 11272  // SetInventory: Updates inventory information for a Product while respecting
 11273  // the last update timestamps of each inventory field. This process is
 11274  // asynchronous and does not require the Product to exist before updating
 11275  // fulfillment information. If the request is valid, the update is enqueued and
 11276  // processed downstream. As a consequence, when a response is returned, updates
 11277  // are not immediately manifested in the Product queried by
 11278  // ProductService.GetProduct or ProductService.ListProducts. When inventory is
 11279  // updated with ProductService.CreateProduct and ProductService.UpdateProduct,
 11280  // the specified inventory field value(s) overwrite any existing value(s) while
 11281  // ignoring the last update time for this field. Furthermore, the last update
 11282  // times for the specified inventory fields are overwritten by the times of the
 11283  // ProductService.CreateProduct or ProductService.UpdateProduct request. If no
 11284  // inventory fields are set in CreateProductRequest.product, then any
 11285  // pre-existing inventory information for this product is used. If no inventory
 11286  // fields are set in SetInventoryRequest.set_mask, then any existing inventory
 11287  // information is preserved. Pre-existing inventory information can only be
 11288  // updated with ProductService.SetInventory,
 11289  // ProductService.AddFulfillmentPlaces, and
 11290  // ProductService.RemoveFulfillmentPlaces. The returned Operations is obsolete
 11291  // after one day, and the GetOperation API returns `NOT_FOUND` afterwards. If
 11292  // conflicting updates are issued, the Operations associated with the stale
 11293  // updates are not marked as done until they are obsolete.
 11294  //
 11295  //   - name: Immutable. Full resource name of the product, such as
 11296  //     `projects/*/locations/global/catalogs/default_catalog/branches/default_bran
 11297  //     ch/products/product_id`.
 11298  func (r *ProjectsLocationsCatalogsBranchesProductsService) SetInventory(name string, googlecloudretailv2setinventoryrequest *GoogleCloudRetailV2SetInventoryRequest) *ProjectsLocationsCatalogsBranchesProductsSetInventoryCall {
 11299  	c := &ProjectsLocationsCatalogsBranchesProductsSetInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11300  	c.name = name
 11301  	c.googlecloudretailv2setinventoryrequest = googlecloudretailv2setinventoryrequest
 11302  	return c
 11303  }
 11304  
 11305  // Fields allows partial responses to be retrieved. See
 11306  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11307  // details.
 11308  func (c *ProjectsLocationsCatalogsBranchesProductsSetInventoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsSetInventoryCall {
 11309  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11310  	return c
 11311  }
 11312  
 11313  // Context sets the context to be used in this call's Do method.
 11314  func (c *ProjectsLocationsCatalogsBranchesProductsSetInventoryCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsSetInventoryCall {
 11315  	c.ctx_ = ctx
 11316  	return c
 11317  }
 11318  
 11319  // Header returns a http.Header that can be modified by the caller to add
 11320  // headers to the request.
 11321  func (c *ProjectsLocationsCatalogsBranchesProductsSetInventoryCall) Header() http.Header {
 11322  	if c.header_ == nil {
 11323  		c.header_ = make(http.Header)
 11324  	}
 11325  	return c.header_
 11326  }
 11327  
 11328  func (c *ProjectsLocationsCatalogsBranchesProductsSetInventoryCall) doRequest(alt string) (*http.Response, error) {
 11329  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11330  	var body io.Reader = nil
 11331  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2setinventoryrequest)
 11332  	if err != nil {
 11333  		return nil, err
 11334  	}
 11335  	c.urlParams_.Set("alt", alt)
 11336  	c.urlParams_.Set("prettyPrint", "false")
 11337  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:setInventory")
 11338  	urls += "?" + c.urlParams_.Encode()
 11339  	req, err := http.NewRequest("POST", urls, body)
 11340  	if err != nil {
 11341  		return nil, err
 11342  	}
 11343  	req.Header = reqHeaders
 11344  	googleapi.Expand(req.URL, map[string]string{
 11345  		"name": c.name,
 11346  	})
 11347  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11348  }
 11349  
 11350  // Do executes the "retail.projects.locations.catalogs.branches.products.setInventory" call.
 11351  // Any non-2xx status code is an error. Response headers are in either
 11352  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 11353  // returned at all) in error.(*googleapi.Error).Header. Use
 11354  // googleapi.IsNotModified to check whether the returned error was because
 11355  // http.StatusNotModified was returned.
 11356  func (c *ProjectsLocationsCatalogsBranchesProductsSetInventoryCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 11357  	gensupport.SetOptions(c.urlParams_, opts...)
 11358  	res, err := c.doRequest("json")
 11359  	if res != nil && res.StatusCode == http.StatusNotModified {
 11360  		if res.Body != nil {
 11361  			res.Body.Close()
 11362  		}
 11363  		return nil, gensupport.WrapError(&googleapi.Error{
 11364  			Code:   res.StatusCode,
 11365  			Header: res.Header,
 11366  		})
 11367  	}
 11368  	if err != nil {
 11369  		return nil, err
 11370  	}
 11371  	defer googleapi.CloseBody(res)
 11372  	if err := googleapi.CheckResponse(res); err != nil {
 11373  		return nil, gensupport.WrapError(err)
 11374  	}
 11375  	ret := &GoogleLongrunningOperation{
 11376  		ServerResponse: googleapi.ServerResponse{
 11377  			Header:         res.Header,
 11378  			HTTPStatusCode: res.StatusCode,
 11379  		},
 11380  	}
 11381  	target := &ret
 11382  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11383  		return nil, err
 11384  	}
 11385  	return ret, nil
 11386  }
 11387  
 11388  type ProjectsLocationsCatalogsCompletionDataImportCall struct {
 11389  	s                                              *Service
 11390  	parent                                         string
 11391  	googlecloudretailv2importcompletiondatarequest *GoogleCloudRetailV2ImportCompletionDataRequest
 11392  	urlParams_                                     gensupport.URLParams
 11393  	ctx_                                           context.Context
 11394  	header_                                        http.Header
 11395  }
 11396  
 11397  // Import: Bulk import of processed completion dataset. Request processing is
 11398  // asynchronous. Partial updating is not supported. The operation is
 11399  // successfully finished only after the imported suggestions are indexed
 11400  // successfully and ready for serving. The process takes hours. This feature is
 11401  // only available for users who have Retail Search enabled. Enable Retail
 11402  // Search on Cloud Console before using this feature.
 11403  //
 11404  //   - parent: The catalog which the suggestions dataset belongs to. Format:
 11405  //     `projects/1234/locations/global/catalogs/default_catalog`.
 11406  func (r *ProjectsLocationsCatalogsCompletionDataService) Import(parent string, googlecloudretailv2importcompletiondatarequest *GoogleCloudRetailV2ImportCompletionDataRequest) *ProjectsLocationsCatalogsCompletionDataImportCall {
 11407  	c := &ProjectsLocationsCatalogsCompletionDataImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11408  	c.parent = parent
 11409  	c.googlecloudretailv2importcompletiondatarequest = googlecloudretailv2importcompletiondatarequest
 11410  	return c
 11411  }
 11412  
 11413  // Fields allows partial responses to be retrieved. See
 11414  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11415  // details.
 11416  func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCompletionDataImportCall {
 11417  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11418  	return c
 11419  }
 11420  
 11421  // Context sets the context to be used in this call's Do method.
 11422  func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCompletionDataImportCall {
 11423  	c.ctx_ = ctx
 11424  	return c
 11425  }
 11426  
 11427  // Header returns a http.Header that can be modified by the caller to add
 11428  // headers to the request.
 11429  func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Header() http.Header {
 11430  	if c.header_ == nil {
 11431  		c.header_ = make(http.Header)
 11432  	}
 11433  	return c.header_
 11434  }
 11435  
 11436  func (c *ProjectsLocationsCatalogsCompletionDataImportCall) doRequest(alt string) (*http.Response, error) {
 11437  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11438  	var body io.Reader = nil
 11439  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2importcompletiondatarequest)
 11440  	if err != nil {
 11441  		return nil, err
 11442  	}
 11443  	c.urlParams_.Set("alt", alt)
 11444  	c.urlParams_.Set("prettyPrint", "false")
 11445  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/completionData:import")
 11446  	urls += "?" + c.urlParams_.Encode()
 11447  	req, err := http.NewRequest("POST", urls, body)
 11448  	if err != nil {
 11449  		return nil, err
 11450  	}
 11451  	req.Header = reqHeaders
 11452  	googleapi.Expand(req.URL, map[string]string{
 11453  		"parent": c.parent,
 11454  	})
 11455  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11456  }
 11457  
 11458  // Do executes the "retail.projects.locations.catalogs.completionData.import" call.
 11459  // Any non-2xx status code is an error. Response headers are in either
 11460  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 11461  // returned at all) in error.(*googleapi.Error).Header. Use
 11462  // googleapi.IsNotModified to check whether the returned error was because
 11463  // http.StatusNotModified was returned.
 11464  func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 11465  	gensupport.SetOptions(c.urlParams_, opts...)
 11466  	res, err := c.doRequest("json")
 11467  	if res != nil && res.StatusCode == http.StatusNotModified {
 11468  		if res.Body != nil {
 11469  			res.Body.Close()
 11470  		}
 11471  		return nil, gensupport.WrapError(&googleapi.Error{
 11472  			Code:   res.StatusCode,
 11473  			Header: res.Header,
 11474  		})
 11475  	}
 11476  	if err != nil {
 11477  		return nil, err
 11478  	}
 11479  	defer googleapi.CloseBody(res)
 11480  	if err := googleapi.CheckResponse(res); err != nil {
 11481  		return nil, gensupport.WrapError(err)
 11482  	}
 11483  	ret := &GoogleLongrunningOperation{
 11484  		ServerResponse: googleapi.ServerResponse{
 11485  			Header:         res.Header,
 11486  			HTTPStatusCode: res.StatusCode,
 11487  		},
 11488  	}
 11489  	target := &ret
 11490  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11491  		return nil, err
 11492  	}
 11493  	return ret, nil
 11494  }
 11495  
 11496  type ProjectsLocationsCatalogsControlsCreateCall struct {
 11497  	s                          *Service
 11498  	parent                     string
 11499  	googlecloudretailv2control *GoogleCloudRetailV2Control
 11500  	urlParams_                 gensupport.URLParams
 11501  	ctx_                       context.Context
 11502  	header_                    http.Header
 11503  }
 11504  
 11505  // Create: Creates a Control. If the Control to create already exists, an
 11506  // ALREADY_EXISTS error is returned.
 11507  //
 11508  //   - parent: Full resource name of parent catalog. Format:
 11509  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`.
 11510  func (r *ProjectsLocationsCatalogsControlsService) Create(parent string, googlecloudretailv2control *GoogleCloudRetailV2Control) *ProjectsLocationsCatalogsControlsCreateCall {
 11511  	c := &ProjectsLocationsCatalogsControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11512  	c.parent = parent
 11513  	c.googlecloudretailv2control = googlecloudretailv2control
 11514  	return c
 11515  }
 11516  
 11517  // ControlId sets the optional parameter "controlId": Required. The ID to use
 11518  // for the Control, which will become the final component of the Control's
 11519  // resource name. This value should be 4-63 characters, and valid characters
 11520  // are /a-z-_/.
 11521  func (c *ProjectsLocationsCatalogsControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCatalogsControlsCreateCall {
 11522  	c.urlParams_.Set("controlId", controlId)
 11523  	return c
 11524  }
 11525  
 11526  // Fields allows partial responses to be retrieved. See
 11527  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11528  // details.
 11529  func (c *ProjectsLocationsCatalogsControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsControlsCreateCall {
 11530  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11531  	return c
 11532  }
 11533  
 11534  // Context sets the context to be used in this call's Do method.
 11535  func (c *ProjectsLocationsCatalogsControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsControlsCreateCall {
 11536  	c.ctx_ = ctx
 11537  	return c
 11538  }
 11539  
 11540  // Header returns a http.Header that can be modified by the caller to add
 11541  // headers to the request.
 11542  func (c *ProjectsLocationsCatalogsControlsCreateCall) Header() http.Header {
 11543  	if c.header_ == nil {
 11544  		c.header_ = make(http.Header)
 11545  	}
 11546  	return c.header_
 11547  }
 11548  
 11549  func (c *ProjectsLocationsCatalogsControlsCreateCall) doRequest(alt string) (*http.Response, error) {
 11550  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11551  	var body io.Reader = nil
 11552  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2control)
 11553  	if err != nil {
 11554  		return nil, err
 11555  	}
 11556  	c.urlParams_.Set("alt", alt)
 11557  	c.urlParams_.Set("prettyPrint", "false")
 11558  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/controls")
 11559  	urls += "?" + c.urlParams_.Encode()
 11560  	req, err := http.NewRequest("POST", urls, body)
 11561  	if err != nil {
 11562  		return nil, err
 11563  	}
 11564  	req.Header = reqHeaders
 11565  	googleapi.Expand(req.URL, map[string]string{
 11566  		"parent": c.parent,
 11567  	})
 11568  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11569  }
 11570  
 11571  // Do executes the "retail.projects.locations.catalogs.controls.create" call.
 11572  // Any non-2xx status code is an error. Response headers are in either
 11573  // *GoogleCloudRetailV2Control.ServerResponse.Header or (if a response was
 11574  // returned at all) in error.(*googleapi.Error).Header. Use
 11575  // googleapi.IsNotModified to check whether the returned error was because
 11576  // http.StatusNotModified was returned.
 11577  func (c *ProjectsLocationsCatalogsControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Control, error) {
 11578  	gensupport.SetOptions(c.urlParams_, opts...)
 11579  	res, err := c.doRequest("json")
 11580  	if res != nil && res.StatusCode == http.StatusNotModified {
 11581  		if res.Body != nil {
 11582  			res.Body.Close()
 11583  		}
 11584  		return nil, gensupport.WrapError(&googleapi.Error{
 11585  			Code:   res.StatusCode,
 11586  			Header: res.Header,
 11587  		})
 11588  	}
 11589  	if err != nil {
 11590  		return nil, err
 11591  	}
 11592  	defer googleapi.CloseBody(res)
 11593  	if err := googleapi.CheckResponse(res); err != nil {
 11594  		return nil, gensupport.WrapError(err)
 11595  	}
 11596  	ret := &GoogleCloudRetailV2Control{
 11597  		ServerResponse: googleapi.ServerResponse{
 11598  			Header:         res.Header,
 11599  			HTTPStatusCode: res.StatusCode,
 11600  		},
 11601  	}
 11602  	target := &ret
 11603  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11604  		return nil, err
 11605  	}
 11606  	return ret, nil
 11607  }
 11608  
 11609  type ProjectsLocationsCatalogsControlsDeleteCall struct {
 11610  	s          *Service
 11611  	name       string
 11612  	urlParams_ gensupport.URLParams
 11613  	ctx_       context.Context
 11614  	header_    http.Header
 11615  }
 11616  
 11617  // Delete: Deletes a Control. If the Control to delete does not exist, a
 11618  // NOT_FOUND error is returned.
 11619  //
 11620  //   - name: The resource name of the Control to delete. Format:
 11621  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/co
 11622  //     ntrols/{control_id}`.
 11623  func (r *ProjectsLocationsCatalogsControlsService) Delete(name string) *ProjectsLocationsCatalogsControlsDeleteCall {
 11624  	c := &ProjectsLocationsCatalogsControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11625  	c.name = name
 11626  	return c
 11627  }
 11628  
 11629  // Fields allows partial responses to be retrieved. See
 11630  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11631  // details.
 11632  func (c *ProjectsLocationsCatalogsControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsControlsDeleteCall {
 11633  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11634  	return c
 11635  }
 11636  
 11637  // Context sets the context to be used in this call's Do method.
 11638  func (c *ProjectsLocationsCatalogsControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsControlsDeleteCall {
 11639  	c.ctx_ = ctx
 11640  	return c
 11641  }
 11642  
 11643  // Header returns a http.Header that can be modified by the caller to add
 11644  // headers to the request.
 11645  func (c *ProjectsLocationsCatalogsControlsDeleteCall) Header() http.Header {
 11646  	if c.header_ == nil {
 11647  		c.header_ = make(http.Header)
 11648  	}
 11649  	return c.header_
 11650  }
 11651  
 11652  func (c *ProjectsLocationsCatalogsControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
 11653  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11654  	var body io.Reader = nil
 11655  	c.urlParams_.Set("alt", alt)
 11656  	c.urlParams_.Set("prettyPrint", "false")
 11657  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 11658  	urls += "?" + c.urlParams_.Encode()
 11659  	req, err := http.NewRequest("DELETE", urls, body)
 11660  	if err != nil {
 11661  		return nil, err
 11662  	}
 11663  	req.Header = reqHeaders
 11664  	googleapi.Expand(req.URL, map[string]string{
 11665  		"name": c.name,
 11666  	})
 11667  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11668  }
 11669  
 11670  // Do executes the "retail.projects.locations.catalogs.controls.delete" call.
 11671  // Any non-2xx status code is an error. Response headers are in either
 11672  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
 11673  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11674  // check whether the returned error was because http.StatusNotModified was
 11675  // returned.
 11676  func (c *ProjectsLocationsCatalogsControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
 11677  	gensupport.SetOptions(c.urlParams_, opts...)
 11678  	res, err := c.doRequest("json")
 11679  	if res != nil && res.StatusCode == http.StatusNotModified {
 11680  		if res.Body != nil {
 11681  			res.Body.Close()
 11682  		}
 11683  		return nil, gensupport.WrapError(&googleapi.Error{
 11684  			Code:   res.StatusCode,
 11685  			Header: res.Header,
 11686  		})
 11687  	}
 11688  	if err != nil {
 11689  		return nil, err
 11690  	}
 11691  	defer googleapi.CloseBody(res)
 11692  	if err := googleapi.CheckResponse(res); err != nil {
 11693  		return nil, gensupport.WrapError(err)
 11694  	}
 11695  	ret := &GoogleProtobufEmpty{
 11696  		ServerResponse: googleapi.ServerResponse{
 11697  			Header:         res.Header,
 11698  			HTTPStatusCode: res.StatusCode,
 11699  		},
 11700  	}
 11701  	target := &ret
 11702  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11703  		return nil, err
 11704  	}
 11705  	return ret, nil
 11706  }
 11707  
 11708  type ProjectsLocationsCatalogsControlsGetCall struct {
 11709  	s            *Service
 11710  	name         string
 11711  	urlParams_   gensupport.URLParams
 11712  	ifNoneMatch_ string
 11713  	ctx_         context.Context
 11714  	header_      http.Header
 11715  }
 11716  
 11717  // Get: Gets a Control.
 11718  //
 11719  //   - name: The resource name of the Control to get. Format:
 11720  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/co
 11721  //     ntrols/{control_id}`.
 11722  func (r *ProjectsLocationsCatalogsControlsService) Get(name string) *ProjectsLocationsCatalogsControlsGetCall {
 11723  	c := &ProjectsLocationsCatalogsControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11724  	c.name = name
 11725  	return c
 11726  }
 11727  
 11728  // Fields allows partial responses to be retrieved. See
 11729  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11730  // details.
 11731  func (c *ProjectsLocationsCatalogsControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsControlsGetCall {
 11732  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11733  	return c
 11734  }
 11735  
 11736  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11737  // object's ETag matches the given value. This is useful for getting updates
 11738  // only after the object has changed since the last request.
 11739  func (c *ProjectsLocationsCatalogsControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsControlsGetCall {
 11740  	c.ifNoneMatch_ = entityTag
 11741  	return c
 11742  }
 11743  
 11744  // Context sets the context to be used in this call's Do method.
 11745  func (c *ProjectsLocationsCatalogsControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsControlsGetCall {
 11746  	c.ctx_ = ctx
 11747  	return c
 11748  }
 11749  
 11750  // Header returns a http.Header that can be modified by the caller to add
 11751  // headers to the request.
 11752  func (c *ProjectsLocationsCatalogsControlsGetCall) Header() http.Header {
 11753  	if c.header_ == nil {
 11754  		c.header_ = make(http.Header)
 11755  	}
 11756  	return c.header_
 11757  }
 11758  
 11759  func (c *ProjectsLocationsCatalogsControlsGetCall) doRequest(alt string) (*http.Response, error) {
 11760  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11761  	if c.ifNoneMatch_ != "" {
 11762  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11763  	}
 11764  	var body io.Reader = nil
 11765  	c.urlParams_.Set("alt", alt)
 11766  	c.urlParams_.Set("prettyPrint", "false")
 11767  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 11768  	urls += "?" + c.urlParams_.Encode()
 11769  	req, err := http.NewRequest("GET", urls, body)
 11770  	if err != nil {
 11771  		return nil, err
 11772  	}
 11773  	req.Header = reqHeaders
 11774  	googleapi.Expand(req.URL, map[string]string{
 11775  		"name": c.name,
 11776  	})
 11777  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11778  }
 11779  
 11780  // Do executes the "retail.projects.locations.catalogs.controls.get" call.
 11781  // Any non-2xx status code is an error. Response headers are in either
 11782  // *GoogleCloudRetailV2Control.ServerResponse.Header or (if a response was
 11783  // returned at all) in error.(*googleapi.Error).Header. Use
 11784  // googleapi.IsNotModified to check whether the returned error was because
 11785  // http.StatusNotModified was returned.
 11786  func (c *ProjectsLocationsCatalogsControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Control, error) {
 11787  	gensupport.SetOptions(c.urlParams_, opts...)
 11788  	res, err := c.doRequest("json")
 11789  	if res != nil && res.StatusCode == http.StatusNotModified {
 11790  		if res.Body != nil {
 11791  			res.Body.Close()
 11792  		}
 11793  		return nil, gensupport.WrapError(&googleapi.Error{
 11794  			Code:   res.StatusCode,
 11795  			Header: res.Header,
 11796  		})
 11797  	}
 11798  	if err != nil {
 11799  		return nil, err
 11800  	}
 11801  	defer googleapi.CloseBody(res)
 11802  	if err := googleapi.CheckResponse(res); err != nil {
 11803  		return nil, gensupport.WrapError(err)
 11804  	}
 11805  	ret := &GoogleCloudRetailV2Control{
 11806  		ServerResponse: googleapi.ServerResponse{
 11807  			Header:         res.Header,
 11808  			HTTPStatusCode: res.StatusCode,
 11809  		},
 11810  	}
 11811  	target := &ret
 11812  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11813  		return nil, err
 11814  	}
 11815  	return ret, nil
 11816  }
 11817  
 11818  type ProjectsLocationsCatalogsControlsListCall struct {
 11819  	s            *Service
 11820  	parent       string
 11821  	urlParams_   gensupport.URLParams
 11822  	ifNoneMatch_ string
 11823  	ctx_         context.Context
 11824  	header_      http.Header
 11825  }
 11826  
 11827  // List: Lists all Controls by their parent Catalog.
 11828  //
 11829  //   - parent: The catalog resource name. Format:
 11830  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`.
 11831  func (r *ProjectsLocationsCatalogsControlsService) List(parent string) *ProjectsLocationsCatalogsControlsListCall {
 11832  	c := &ProjectsLocationsCatalogsControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11833  	c.parent = parent
 11834  	return c
 11835  }
 11836  
 11837  // Filter sets the optional parameter "filter": A filter to apply on the list
 11838  // results. Supported features: * List all the products under the parent branch
 11839  // if filter is unset. * List controls that are used in a single ServingConfig:
 11840  // 'serving_config = "boosted_home_page_cvr"'
 11841  func (c *ProjectsLocationsCatalogsControlsListCall) Filter(filter string) *ProjectsLocationsCatalogsControlsListCall {
 11842  	c.urlParams_.Set("filter", filter)
 11843  	return c
 11844  }
 11845  
 11846  // PageSize sets the optional parameter "pageSize": Maximum number of results
 11847  // to return. If unspecified, defaults to 50. Max allowed value is 1000.
 11848  func (c *ProjectsLocationsCatalogsControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsControlsListCall {
 11849  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 11850  	return c
 11851  }
 11852  
 11853  // PageToken sets the optional parameter "pageToken": A page token, received
 11854  // from a previous `ListControls` call. Provide this to retrieve the subsequent
 11855  // page.
 11856  func (c *ProjectsLocationsCatalogsControlsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsControlsListCall {
 11857  	c.urlParams_.Set("pageToken", pageToken)
 11858  	return c
 11859  }
 11860  
 11861  // Fields allows partial responses to be retrieved. See
 11862  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11863  // details.
 11864  func (c *ProjectsLocationsCatalogsControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsControlsListCall {
 11865  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11866  	return c
 11867  }
 11868  
 11869  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11870  // object's ETag matches the given value. This is useful for getting updates
 11871  // only after the object has changed since the last request.
 11872  func (c *ProjectsLocationsCatalogsControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsControlsListCall {
 11873  	c.ifNoneMatch_ = entityTag
 11874  	return c
 11875  }
 11876  
 11877  // Context sets the context to be used in this call's Do method.
 11878  func (c *ProjectsLocationsCatalogsControlsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsControlsListCall {
 11879  	c.ctx_ = ctx
 11880  	return c
 11881  }
 11882  
 11883  // Header returns a http.Header that can be modified by the caller to add
 11884  // headers to the request.
 11885  func (c *ProjectsLocationsCatalogsControlsListCall) Header() http.Header {
 11886  	if c.header_ == nil {
 11887  		c.header_ = make(http.Header)
 11888  	}
 11889  	return c.header_
 11890  }
 11891  
 11892  func (c *ProjectsLocationsCatalogsControlsListCall) doRequest(alt string) (*http.Response, error) {
 11893  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11894  	if c.ifNoneMatch_ != "" {
 11895  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11896  	}
 11897  	var body io.Reader = nil
 11898  	c.urlParams_.Set("alt", alt)
 11899  	c.urlParams_.Set("prettyPrint", "false")
 11900  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/controls")
 11901  	urls += "?" + c.urlParams_.Encode()
 11902  	req, err := http.NewRequest("GET", urls, body)
 11903  	if err != nil {
 11904  		return nil, err
 11905  	}
 11906  	req.Header = reqHeaders
 11907  	googleapi.Expand(req.URL, map[string]string{
 11908  		"parent": c.parent,
 11909  	})
 11910  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11911  }
 11912  
 11913  // Do executes the "retail.projects.locations.catalogs.controls.list" call.
 11914  // Any non-2xx status code is an error. Response headers are in either
 11915  // *GoogleCloudRetailV2ListControlsResponse.ServerResponse.Header or (if a
 11916  // response was returned at all) in error.(*googleapi.Error).Header. Use
 11917  // googleapi.IsNotModified to check whether the returned error was because
 11918  // http.StatusNotModified was returned.
 11919  func (c *ProjectsLocationsCatalogsControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ListControlsResponse, error) {
 11920  	gensupport.SetOptions(c.urlParams_, opts...)
 11921  	res, err := c.doRequest("json")
 11922  	if res != nil && res.StatusCode == http.StatusNotModified {
 11923  		if res.Body != nil {
 11924  			res.Body.Close()
 11925  		}
 11926  		return nil, gensupport.WrapError(&googleapi.Error{
 11927  			Code:   res.StatusCode,
 11928  			Header: res.Header,
 11929  		})
 11930  	}
 11931  	if err != nil {
 11932  		return nil, err
 11933  	}
 11934  	defer googleapi.CloseBody(res)
 11935  	if err := googleapi.CheckResponse(res); err != nil {
 11936  		return nil, gensupport.WrapError(err)
 11937  	}
 11938  	ret := &GoogleCloudRetailV2ListControlsResponse{
 11939  		ServerResponse: googleapi.ServerResponse{
 11940  			Header:         res.Header,
 11941  			HTTPStatusCode: res.StatusCode,
 11942  		},
 11943  	}
 11944  	target := &ret
 11945  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11946  		return nil, err
 11947  	}
 11948  	return ret, nil
 11949  }
 11950  
 11951  // Pages invokes f for each page of results.
 11952  // A non-nil error returned from f will halt the iteration.
 11953  // The provided context supersedes any context provided to the Context method.
 11954  func (c *ProjectsLocationsCatalogsControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2ListControlsResponse) error) error {
 11955  	c.ctx_ = ctx
 11956  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11957  	for {
 11958  		x, err := c.Do()
 11959  		if err != nil {
 11960  			return err
 11961  		}
 11962  		if err := f(x); err != nil {
 11963  			return err
 11964  		}
 11965  		if x.NextPageToken == "" {
 11966  			return nil
 11967  		}
 11968  		c.PageToken(x.NextPageToken)
 11969  	}
 11970  }
 11971  
 11972  type ProjectsLocationsCatalogsControlsPatchCall struct {
 11973  	s                          *Service
 11974  	name                       string
 11975  	googlecloudretailv2control *GoogleCloudRetailV2Control
 11976  	urlParams_                 gensupport.URLParams
 11977  	ctx_                       context.Context
 11978  	header_                    http.Header
 11979  }
 11980  
 11981  // Patch: Updates a Control. Control cannot be set to a different oneof field,
 11982  // if so an INVALID_ARGUMENT is returned. If the Control to update does not
 11983  // exist, a NOT_FOUND error is returned.
 11984  //
 11985  //   - name: Immutable. Fully qualified name
 11986  //     `projects/*/locations/global/catalogs/*/controls/*`.
 11987  func (r *ProjectsLocationsCatalogsControlsService) Patch(name string, googlecloudretailv2control *GoogleCloudRetailV2Control) *ProjectsLocationsCatalogsControlsPatchCall {
 11988  	c := &ProjectsLocationsCatalogsControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11989  	c.name = name
 11990  	c.googlecloudretailv2control = googlecloudretailv2control
 11991  	return c
 11992  }
 11993  
 11994  // UpdateMask sets the optional parameter "updateMask": Indicates which fields
 11995  // in the provided Control to update. The following are NOT supported: *
 11996  // Control.name If not set or empty, all supported fields are updated.
 11997  func (c *ProjectsLocationsCatalogsControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsControlsPatchCall {
 11998  	c.urlParams_.Set("updateMask", updateMask)
 11999  	return c
 12000  }
 12001  
 12002  // Fields allows partial responses to be retrieved. See
 12003  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12004  // details.
 12005  func (c *ProjectsLocationsCatalogsControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsControlsPatchCall {
 12006  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12007  	return c
 12008  }
 12009  
 12010  // Context sets the context to be used in this call's Do method.
 12011  func (c *ProjectsLocationsCatalogsControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsControlsPatchCall {
 12012  	c.ctx_ = ctx
 12013  	return c
 12014  }
 12015  
 12016  // Header returns a http.Header that can be modified by the caller to add
 12017  // headers to the request.
 12018  func (c *ProjectsLocationsCatalogsControlsPatchCall) Header() http.Header {
 12019  	if c.header_ == nil {
 12020  		c.header_ = make(http.Header)
 12021  	}
 12022  	return c.header_
 12023  }
 12024  
 12025  func (c *ProjectsLocationsCatalogsControlsPatchCall) doRequest(alt string) (*http.Response, error) {
 12026  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12027  	var body io.Reader = nil
 12028  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2control)
 12029  	if err != nil {
 12030  		return nil, err
 12031  	}
 12032  	c.urlParams_.Set("alt", alt)
 12033  	c.urlParams_.Set("prettyPrint", "false")
 12034  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 12035  	urls += "?" + c.urlParams_.Encode()
 12036  	req, err := http.NewRequest("PATCH", urls, body)
 12037  	if err != nil {
 12038  		return nil, err
 12039  	}
 12040  	req.Header = reqHeaders
 12041  	googleapi.Expand(req.URL, map[string]string{
 12042  		"name": c.name,
 12043  	})
 12044  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12045  }
 12046  
 12047  // Do executes the "retail.projects.locations.catalogs.controls.patch" call.
 12048  // Any non-2xx status code is an error. Response headers are in either
 12049  // *GoogleCloudRetailV2Control.ServerResponse.Header or (if a response was
 12050  // returned at all) in error.(*googleapi.Error).Header. Use
 12051  // googleapi.IsNotModified to check whether the returned error was because
 12052  // http.StatusNotModified was returned.
 12053  func (c *ProjectsLocationsCatalogsControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Control, error) {
 12054  	gensupport.SetOptions(c.urlParams_, opts...)
 12055  	res, err := c.doRequest("json")
 12056  	if res != nil && res.StatusCode == http.StatusNotModified {
 12057  		if res.Body != nil {
 12058  			res.Body.Close()
 12059  		}
 12060  		return nil, gensupport.WrapError(&googleapi.Error{
 12061  			Code:   res.StatusCode,
 12062  			Header: res.Header,
 12063  		})
 12064  	}
 12065  	if err != nil {
 12066  		return nil, err
 12067  	}
 12068  	defer googleapi.CloseBody(res)
 12069  	if err := googleapi.CheckResponse(res); err != nil {
 12070  		return nil, gensupport.WrapError(err)
 12071  	}
 12072  	ret := &GoogleCloudRetailV2Control{
 12073  		ServerResponse: googleapi.ServerResponse{
 12074  			Header:         res.Header,
 12075  			HTTPStatusCode: res.StatusCode,
 12076  		},
 12077  	}
 12078  	target := &ret
 12079  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12080  		return nil, err
 12081  	}
 12082  	return ret, nil
 12083  }
 12084  
 12085  type ProjectsLocationsCatalogsModelsCreateCall struct {
 12086  	s                        *Service
 12087  	parent                   string
 12088  	googlecloudretailv2model *GoogleCloudRetailV2Model
 12089  	urlParams_               gensupport.URLParams
 12090  	ctx_                     context.Context
 12091  	header_                  http.Header
 12092  }
 12093  
 12094  // Create: Creates a new model.
 12095  //
 12096  //   - parent: The parent resource under which to create the model. Format:
 12097  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`.
 12098  func (r *ProjectsLocationsCatalogsModelsService) Create(parent string, googlecloudretailv2model *GoogleCloudRetailV2Model) *ProjectsLocationsCatalogsModelsCreateCall {
 12099  	c := &ProjectsLocationsCatalogsModelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12100  	c.parent = parent
 12101  	c.googlecloudretailv2model = googlecloudretailv2model
 12102  	return c
 12103  }
 12104  
 12105  // DryRun sets the optional parameter "dryRun": Whether to run a dry run to
 12106  // validate the request (without actually creating the model).
 12107  func (c *ProjectsLocationsCatalogsModelsCreateCall) DryRun(dryRun bool) *ProjectsLocationsCatalogsModelsCreateCall {
 12108  	c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
 12109  	return c
 12110  }
 12111  
 12112  // Fields allows partial responses to be retrieved. See
 12113  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12114  // details.
 12115  func (c *ProjectsLocationsCatalogsModelsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsCreateCall {
 12116  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12117  	return c
 12118  }
 12119  
 12120  // Context sets the context to be used in this call's Do method.
 12121  func (c *ProjectsLocationsCatalogsModelsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsCreateCall {
 12122  	c.ctx_ = ctx
 12123  	return c
 12124  }
 12125  
 12126  // Header returns a http.Header that can be modified by the caller to add
 12127  // headers to the request.
 12128  func (c *ProjectsLocationsCatalogsModelsCreateCall) Header() http.Header {
 12129  	if c.header_ == nil {
 12130  		c.header_ = make(http.Header)
 12131  	}
 12132  	return c.header_
 12133  }
 12134  
 12135  func (c *ProjectsLocationsCatalogsModelsCreateCall) doRequest(alt string) (*http.Response, error) {
 12136  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12137  	var body io.Reader = nil
 12138  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2model)
 12139  	if err != nil {
 12140  		return nil, err
 12141  	}
 12142  	c.urlParams_.Set("alt", alt)
 12143  	c.urlParams_.Set("prettyPrint", "false")
 12144  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/models")
 12145  	urls += "?" + c.urlParams_.Encode()
 12146  	req, err := http.NewRequest("POST", urls, body)
 12147  	if err != nil {
 12148  		return nil, err
 12149  	}
 12150  	req.Header = reqHeaders
 12151  	googleapi.Expand(req.URL, map[string]string{
 12152  		"parent": c.parent,
 12153  	})
 12154  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12155  }
 12156  
 12157  // Do executes the "retail.projects.locations.catalogs.models.create" call.
 12158  // Any non-2xx status code is an error. Response headers are in either
 12159  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 12160  // returned at all) in error.(*googleapi.Error).Header. Use
 12161  // googleapi.IsNotModified to check whether the returned error was because
 12162  // http.StatusNotModified was returned.
 12163  func (c *ProjectsLocationsCatalogsModelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 12164  	gensupport.SetOptions(c.urlParams_, opts...)
 12165  	res, err := c.doRequest("json")
 12166  	if res != nil && res.StatusCode == http.StatusNotModified {
 12167  		if res.Body != nil {
 12168  			res.Body.Close()
 12169  		}
 12170  		return nil, gensupport.WrapError(&googleapi.Error{
 12171  			Code:   res.StatusCode,
 12172  			Header: res.Header,
 12173  		})
 12174  	}
 12175  	if err != nil {
 12176  		return nil, err
 12177  	}
 12178  	defer googleapi.CloseBody(res)
 12179  	if err := googleapi.CheckResponse(res); err != nil {
 12180  		return nil, gensupport.WrapError(err)
 12181  	}
 12182  	ret := &GoogleLongrunningOperation{
 12183  		ServerResponse: googleapi.ServerResponse{
 12184  			Header:         res.Header,
 12185  			HTTPStatusCode: res.StatusCode,
 12186  		},
 12187  	}
 12188  	target := &ret
 12189  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12190  		return nil, err
 12191  	}
 12192  	return ret, nil
 12193  }
 12194  
 12195  type ProjectsLocationsCatalogsModelsDeleteCall struct {
 12196  	s          *Service
 12197  	name       string
 12198  	urlParams_ gensupport.URLParams
 12199  	ctx_       context.Context
 12200  	header_    http.Header
 12201  }
 12202  
 12203  // Delete: Deletes an existing model.
 12204  //
 12205  //   - name: The resource name of the Model to delete. Format:
 12206  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mo
 12207  //     dels/{model_id}`.
 12208  func (r *ProjectsLocationsCatalogsModelsService) Delete(name string) *ProjectsLocationsCatalogsModelsDeleteCall {
 12209  	c := &ProjectsLocationsCatalogsModelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12210  	c.name = name
 12211  	return c
 12212  }
 12213  
 12214  // Fields allows partial responses to be retrieved. See
 12215  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12216  // details.
 12217  func (c *ProjectsLocationsCatalogsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsDeleteCall {
 12218  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12219  	return c
 12220  }
 12221  
 12222  // Context sets the context to be used in this call's Do method.
 12223  func (c *ProjectsLocationsCatalogsModelsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsDeleteCall {
 12224  	c.ctx_ = ctx
 12225  	return c
 12226  }
 12227  
 12228  // Header returns a http.Header that can be modified by the caller to add
 12229  // headers to the request.
 12230  func (c *ProjectsLocationsCatalogsModelsDeleteCall) Header() http.Header {
 12231  	if c.header_ == nil {
 12232  		c.header_ = make(http.Header)
 12233  	}
 12234  	return c.header_
 12235  }
 12236  
 12237  func (c *ProjectsLocationsCatalogsModelsDeleteCall) doRequest(alt string) (*http.Response, error) {
 12238  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12239  	var body io.Reader = nil
 12240  	c.urlParams_.Set("alt", alt)
 12241  	c.urlParams_.Set("prettyPrint", "false")
 12242  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 12243  	urls += "?" + c.urlParams_.Encode()
 12244  	req, err := http.NewRequest("DELETE", urls, body)
 12245  	if err != nil {
 12246  		return nil, err
 12247  	}
 12248  	req.Header = reqHeaders
 12249  	googleapi.Expand(req.URL, map[string]string{
 12250  		"name": c.name,
 12251  	})
 12252  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12253  }
 12254  
 12255  // Do executes the "retail.projects.locations.catalogs.models.delete" call.
 12256  // Any non-2xx status code is an error. Response headers are in either
 12257  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
 12258  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12259  // check whether the returned error was because http.StatusNotModified was
 12260  // returned.
 12261  func (c *ProjectsLocationsCatalogsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
 12262  	gensupport.SetOptions(c.urlParams_, opts...)
 12263  	res, err := c.doRequest("json")
 12264  	if res != nil && res.StatusCode == http.StatusNotModified {
 12265  		if res.Body != nil {
 12266  			res.Body.Close()
 12267  		}
 12268  		return nil, gensupport.WrapError(&googleapi.Error{
 12269  			Code:   res.StatusCode,
 12270  			Header: res.Header,
 12271  		})
 12272  	}
 12273  	if err != nil {
 12274  		return nil, err
 12275  	}
 12276  	defer googleapi.CloseBody(res)
 12277  	if err := googleapi.CheckResponse(res); err != nil {
 12278  		return nil, gensupport.WrapError(err)
 12279  	}
 12280  	ret := &GoogleProtobufEmpty{
 12281  		ServerResponse: googleapi.ServerResponse{
 12282  			Header:         res.Header,
 12283  			HTTPStatusCode: res.StatusCode,
 12284  		},
 12285  	}
 12286  	target := &ret
 12287  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12288  		return nil, err
 12289  	}
 12290  	return ret, nil
 12291  }
 12292  
 12293  type ProjectsLocationsCatalogsModelsGetCall struct {
 12294  	s            *Service
 12295  	name         string
 12296  	urlParams_   gensupport.URLParams
 12297  	ifNoneMatch_ string
 12298  	ctx_         context.Context
 12299  	header_      http.Header
 12300  }
 12301  
 12302  // Get: Gets a model.
 12303  //
 12304  //   - name: The resource name of the Model to get. Format:
 12305  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/model
 12306  //     s/{model_id}`.
 12307  func (r *ProjectsLocationsCatalogsModelsService) Get(name string) *ProjectsLocationsCatalogsModelsGetCall {
 12308  	c := &ProjectsLocationsCatalogsModelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12309  	c.name = name
 12310  	return c
 12311  }
 12312  
 12313  // Fields allows partial responses to be retrieved. See
 12314  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12315  // details.
 12316  func (c *ProjectsLocationsCatalogsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsGetCall {
 12317  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12318  	return c
 12319  }
 12320  
 12321  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12322  // object's ETag matches the given value. This is useful for getting updates
 12323  // only after the object has changed since the last request.
 12324  func (c *ProjectsLocationsCatalogsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsModelsGetCall {
 12325  	c.ifNoneMatch_ = entityTag
 12326  	return c
 12327  }
 12328  
 12329  // Context sets the context to be used in this call's Do method.
 12330  func (c *ProjectsLocationsCatalogsModelsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsGetCall {
 12331  	c.ctx_ = ctx
 12332  	return c
 12333  }
 12334  
 12335  // Header returns a http.Header that can be modified by the caller to add
 12336  // headers to the request.
 12337  func (c *ProjectsLocationsCatalogsModelsGetCall) Header() http.Header {
 12338  	if c.header_ == nil {
 12339  		c.header_ = make(http.Header)
 12340  	}
 12341  	return c.header_
 12342  }
 12343  
 12344  func (c *ProjectsLocationsCatalogsModelsGetCall) doRequest(alt string) (*http.Response, error) {
 12345  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12346  	if c.ifNoneMatch_ != "" {
 12347  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12348  	}
 12349  	var body io.Reader = nil
 12350  	c.urlParams_.Set("alt", alt)
 12351  	c.urlParams_.Set("prettyPrint", "false")
 12352  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 12353  	urls += "?" + c.urlParams_.Encode()
 12354  	req, err := http.NewRequest("GET", urls, body)
 12355  	if err != nil {
 12356  		return nil, err
 12357  	}
 12358  	req.Header = reqHeaders
 12359  	googleapi.Expand(req.URL, map[string]string{
 12360  		"name": c.name,
 12361  	})
 12362  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12363  }
 12364  
 12365  // Do executes the "retail.projects.locations.catalogs.models.get" call.
 12366  // Any non-2xx status code is an error. Response headers are in either
 12367  // *GoogleCloudRetailV2Model.ServerResponse.Header or (if a response was
 12368  // returned at all) in error.(*googleapi.Error).Header. Use
 12369  // googleapi.IsNotModified to check whether the returned error was because
 12370  // http.StatusNotModified was returned.
 12371  func (c *ProjectsLocationsCatalogsModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Model, error) {
 12372  	gensupport.SetOptions(c.urlParams_, opts...)
 12373  	res, err := c.doRequest("json")
 12374  	if res != nil && res.StatusCode == http.StatusNotModified {
 12375  		if res.Body != nil {
 12376  			res.Body.Close()
 12377  		}
 12378  		return nil, gensupport.WrapError(&googleapi.Error{
 12379  			Code:   res.StatusCode,
 12380  			Header: res.Header,
 12381  		})
 12382  	}
 12383  	if err != nil {
 12384  		return nil, err
 12385  	}
 12386  	defer googleapi.CloseBody(res)
 12387  	if err := googleapi.CheckResponse(res); err != nil {
 12388  		return nil, gensupport.WrapError(err)
 12389  	}
 12390  	ret := &GoogleCloudRetailV2Model{
 12391  		ServerResponse: googleapi.ServerResponse{
 12392  			Header:         res.Header,
 12393  			HTTPStatusCode: res.StatusCode,
 12394  		},
 12395  	}
 12396  	target := &ret
 12397  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12398  		return nil, err
 12399  	}
 12400  	return ret, nil
 12401  }
 12402  
 12403  type ProjectsLocationsCatalogsModelsListCall struct {
 12404  	s            *Service
 12405  	parent       string
 12406  	urlParams_   gensupport.URLParams
 12407  	ifNoneMatch_ string
 12408  	ctx_         context.Context
 12409  	header_      http.Header
 12410  }
 12411  
 12412  // List: Lists all the models linked to this event store.
 12413  //
 12414  //   - parent: The parent for which to list models. Format:
 12415  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`.
 12416  func (r *ProjectsLocationsCatalogsModelsService) List(parent string) *ProjectsLocationsCatalogsModelsListCall {
 12417  	c := &ProjectsLocationsCatalogsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12418  	c.parent = parent
 12419  	return c
 12420  }
 12421  
 12422  // PageSize sets the optional parameter "pageSize": Maximum number of results
 12423  // to return. If unspecified, defaults to 50. Max allowed value is 1000.
 12424  func (c *ProjectsLocationsCatalogsModelsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsModelsListCall {
 12425  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 12426  	return c
 12427  }
 12428  
 12429  // PageToken sets the optional parameter "pageToken": A page token, received
 12430  // from a previous `ListModels` call. Provide this to retrieve the subsequent
 12431  // page.
 12432  func (c *ProjectsLocationsCatalogsModelsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsModelsListCall {
 12433  	c.urlParams_.Set("pageToken", pageToken)
 12434  	return c
 12435  }
 12436  
 12437  // Fields allows partial responses to be retrieved. See
 12438  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12439  // details.
 12440  func (c *ProjectsLocationsCatalogsModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsListCall {
 12441  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12442  	return c
 12443  }
 12444  
 12445  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12446  // object's ETag matches the given value. This is useful for getting updates
 12447  // only after the object has changed since the last request.
 12448  func (c *ProjectsLocationsCatalogsModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsModelsListCall {
 12449  	c.ifNoneMatch_ = entityTag
 12450  	return c
 12451  }
 12452  
 12453  // Context sets the context to be used in this call's Do method.
 12454  func (c *ProjectsLocationsCatalogsModelsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsListCall {
 12455  	c.ctx_ = ctx
 12456  	return c
 12457  }
 12458  
 12459  // Header returns a http.Header that can be modified by the caller to add
 12460  // headers to the request.
 12461  func (c *ProjectsLocationsCatalogsModelsListCall) Header() http.Header {
 12462  	if c.header_ == nil {
 12463  		c.header_ = make(http.Header)
 12464  	}
 12465  	return c.header_
 12466  }
 12467  
 12468  func (c *ProjectsLocationsCatalogsModelsListCall) doRequest(alt string) (*http.Response, error) {
 12469  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12470  	if c.ifNoneMatch_ != "" {
 12471  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12472  	}
 12473  	var body io.Reader = nil
 12474  	c.urlParams_.Set("alt", alt)
 12475  	c.urlParams_.Set("prettyPrint", "false")
 12476  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/models")
 12477  	urls += "?" + c.urlParams_.Encode()
 12478  	req, err := http.NewRequest("GET", urls, body)
 12479  	if err != nil {
 12480  		return nil, err
 12481  	}
 12482  	req.Header = reqHeaders
 12483  	googleapi.Expand(req.URL, map[string]string{
 12484  		"parent": c.parent,
 12485  	})
 12486  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12487  }
 12488  
 12489  // Do executes the "retail.projects.locations.catalogs.models.list" call.
 12490  // Any non-2xx status code is an error. Response headers are in either
 12491  // *GoogleCloudRetailV2ListModelsResponse.ServerResponse.Header or (if a
 12492  // response was returned at all) in error.(*googleapi.Error).Header. Use
 12493  // googleapi.IsNotModified to check whether the returned error was because
 12494  // http.StatusNotModified was returned.
 12495  func (c *ProjectsLocationsCatalogsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ListModelsResponse, error) {
 12496  	gensupport.SetOptions(c.urlParams_, opts...)
 12497  	res, err := c.doRequest("json")
 12498  	if res != nil && res.StatusCode == http.StatusNotModified {
 12499  		if res.Body != nil {
 12500  			res.Body.Close()
 12501  		}
 12502  		return nil, gensupport.WrapError(&googleapi.Error{
 12503  			Code:   res.StatusCode,
 12504  			Header: res.Header,
 12505  		})
 12506  	}
 12507  	if err != nil {
 12508  		return nil, err
 12509  	}
 12510  	defer googleapi.CloseBody(res)
 12511  	if err := googleapi.CheckResponse(res); err != nil {
 12512  		return nil, gensupport.WrapError(err)
 12513  	}
 12514  	ret := &GoogleCloudRetailV2ListModelsResponse{
 12515  		ServerResponse: googleapi.ServerResponse{
 12516  			Header:         res.Header,
 12517  			HTTPStatusCode: res.StatusCode,
 12518  		},
 12519  	}
 12520  	target := &ret
 12521  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12522  		return nil, err
 12523  	}
 12524  	return ret, nil
 12525  }
 12526  
 12527  // Pages invokes f for each page of results.
 12528  // A non-nil error returned from f will halt the iteration.
 12529  // The provided context supersedes any context provided to the Context method.
 12530  func (c *ProjectsLocationsCatalogsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2ListModelsResponse) error) error {
 12531  	c.ctx_ = ctx
 12532  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12533  	for {
 12534  		x, err := c.Do()
 12535  		if err != nil {
 12536  			return err
 12537  		}
 12538  		if err := f(x); err != nil {
 12539  			return err
 12540  		}
 12541  		if x.NextPageToken == "" {
 12542  			return nil
 12543  		}
 12544  		c.PageToken(x.NextPageToken)
 12545  	}
 12546  }
 12547  
 12548  type ProjectsLocationsCatalogsModelsPatchCall struct {
 12549  	s                        *Service
 12550  	name                     string
 12551  	googlecloudretailv2model *GoogleCloudRetailV2Model
 12552  	urlParams_               gensupport.URLParams
 12553  	ctx_                     context.Context
 12554  	header_                  http.Header
 12555  }
 12556  
 12557  // Patch: Update of model metadata. Only fields that currently can be updated
 12558  // are: `filtering_option` and `periodic_tuning_state`. If other values are
 12559  // provided, this API method ignores them.
 12560  //
 12561  //   - name: The fully qualified resource name of the model. Format:
 12562  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mo
 12563  //     dels/{model_id}` catalog_id has char limit of 50. recommendation_model_id
 12564  //     has char limit of 40.
 12565  func (r *ProjectsLocationsCatalogsModelsService) Patch(name string, googlecloudretailv2model *GoogleCloudRetailV2Model) *ProjectsLocationsCatalogsModelsPatchCall {
 12566  	c := &ProjectsLocationsCatalogsModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12567  	c.name = name
 12568  	c.googlecloudretailv2model = googlecloudretailv2model
 12569  	return c
 12570  }
 12571  
 12572  // UpdateMask sets the optional parameter "updateMask": Indicates which fields
 12573  // in the provided 'model' to update. If not set, by default updates all
 12574  // fields.
 12575  func (c *ProjectsLocationsCatalogsModelsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsModelsPatchCall {
 12576  	c.urlParams_.Set("updateMask", updateMask)
 12577  	return c
 12578  }
 12579  
 12580  // Fields allows partial responses to be retrieved. See
 12581  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12582  // details.
 12583  func (c *ProjectsLocationsCatalogsModelsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsPatchCall {
 12584  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12585  	return c
 12586  }
 12587  
 12588  // Context sets the context to be used in this call's Do method.
 12589  func (c *ProjectsLocationsCatalogsModelsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsPatchCall {
 12590  	c.ctx_ = ctx
 12591  	return c
 12592  }
 12593  
 12594  // Header returns a http.Header that can be modified by the caller to add
 12595  // headers to the request.
 12596  func (c *ProjectsLocationsCatalogsModelsPatchCall) Header() http.Header {
 12597  	if c.header_ == nil {
 12598  		c.header_ = make(http.Header)
 12599  	}
 12600  	return c.header_
 12601  }
 12602  
 12603  func (c *ProjectsLocationsCatalogsModelsPatchCall) doRequest(alt string) (*http.Response, error) {
 12604  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12605  	var body io.Reader = nil
 12606  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2model)
 12607  	if err != nil {
 12608  		return nil, err
 12609  	}
 12610  	c.urlParams_.Set("alt", alt)
 12611  	c.urlParams_.Set("prettyPrint", "false")
 12612  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 12613  	urls += "?" + c.urlParams_.Encode()
 12614  	req, err := http.NewRequest("PATCH", urls, body)
 12615  	if err != nil {
 12616  		return nil, err
 12617  	}
 12618  	req.Header = reqHeaders
 12619  	googleapi.Expand(req.URL, map[string]string{
 12620  		"name": c.name,
 12621  	})
 12622  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12623  }
 12624  
 12625  // Do executes the "retail.projects.locations.catalogs.models.patch" call.
 12626  // Any non-2xx status code is an error. Response headers are in either
 12627  // *GoogleCloudRetailV2Model.ServerResponse.Header or (if a response was
 12628  // returned at all) in error.(*googleapi.Error).Header. Use
 12629  // googleapi.IsNotModified to check whether the returned error was because
 12630  // http.StatusNotModified was returned.
 12631  func (c *ProjectsLocationsCatalogsModelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Model, error) {
 12632  	gensupport.SetOptions(c.urlParams_, opts...)
 12633  	res, err := c.doRequest("json")
 12634  	if res != nil && res.StatusCode == http.StatusNotModified {
 12635  		if res.Body != nil {
 12636  			res.Body.Close()
 12637  		}
 12638  		return nil, gensupport.WrapError(&googleapi.Error{
 12639  			Code:   res.StatusCode,
 12640  			Header: res.Header,
 12641  		})
 12642  	}
 12643  	if err != nil {
 12644  		return nil, err
 12645  	}
 12646  	defer googleapi.CloseBody(res)
 12647  	if err := googleapi.CheckResponse(res); err != nil {
 12648  		return nil, gensupport.WrapError(err)
 12649  	}
 12650  	ret := &GoogleCloudRetailV2Model{
 12651  		ServerResponse: googleapi.ServerResponse{
 12652  			Header:         res.Header,
 12653  			HTTPStatusCode: res.StatusCode,
 12654  		},
 12655  	}
 12656  	target := &ret
 12657  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12658  		return nil, err
 12659  	}
 12660  	return ret, nil
 12661  }
 12662  
 12663  type ProjectsLocationsCatalogsModelsPauseCall struct {
 12664  	s                                    *Service
 12665  	name                                 string
 12666  	googlecloudretailv2pausemodelrequest *GoogleCloudRetailV2PauseModelRequest
 12667  	urlParams_                           gensupport.URLParams
 12668  	ctx_                                 context.Context
 12669  	header_                              http.Header
 12670  }
 12671  
 12672  // Pause: Pauses the training of an existing model.
 12673  //
 12674  //   - name: The name of the model to pause. Format:
 12675  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mo
 12676  //     dels/{model_id}`.
 12677  func (r *ProjectsLocationsCatalogsModelsService) Pause(name string, googlecloudretailv2pausemodelrequest *GoogleCloudRetailV2PauseModelRequest) *ProjectsLocationsCatalogsModelsPauseCall {
 12678  	c := &ProjectsLocationsCatalogsModelsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12679  	c.name = name
 12680  	c.googlecloudretailv2pausemodelrequest = googlecloudretailv2pausemodelrequest
 12681  	return c
 12682  }
 12683  
 12684  // Fields allows partial responses to be retrieved. See
 12685  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12686  // details.
 12687  func (c *ProjectsLocationsCatalogsModelsPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsPauseCall {
 12688  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12689  	return c
 12690  }
 12691  
 12692  // Context sets the context to be used in this call's Do method.
 12693  func (c *ProjectsLocationsCatalogsModelsPauseCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsPauseCall {
 12694  	c.ctx_ = ctx
 12695  	return c
 12696  }
 12697  
 12698  // Header returns a http.Header that can be modified by the caller to add
 12699  // headers to the request.
 12700  func (c *ProjectsLocationsCatalogsModelsPauseCall) Header() http.Header {
 12701  	if c.header_ == nil {
 12702  		c.header_ = make(http.Header)
 12703  	}
 12704  	return c.header_
 12705  }
 12706  
 12707  func (c *ProjectsLocationsCatalogsModelsPauseCall) doRequest(alt string) (*http.Response, error) {
 12708  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12709  	var body io.Reader = nil
 12710  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2pausemodelrequest)
 12711  	if err != nil {
 12712  		return nil, err
 12713  	}
 12714  	c.urlParams_.Set("alt", alt)
 12715  	c.urlParams_.Set("prettyPrint", "false")
 12716  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:pause")
 12717  	urls += "?" + c.urlParams_.Encode()
 12718  	req, err := http.NewRequest("POST", urls, body)
 12719  	if err != nil {
 12720  		return nil, err
 12721  	}
 12722  	req.Header = reqHeaders
 12723  	googleapi.Expand(req.URL, map[string]string{
 12724  		"name": c.name,
 12725  	})
 12726  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12727  }
 12728  
 12729  // Do executes the "retail.projects.locations.catalogs.models.pause" call.
 12730  // Any non-2xx status code is an error. Response headers are in either
 12731  // *GoogleCloudRetailV2Model.ServerResponse.Header or (if a response was
 12732  // returned at all) in error.(*googleapi.Error).Header. Use
 12733  // googleapi.IsNotModified to check whether the returned error was because
 12734  // http.StatusNotModified was returned.
 12735  func (c *ProjectsLocationsCatalogsModelsPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Model, error) {
 12736  	gensupport.SetOptions(c.urlParams_, opts...)
 12737  	res, err := c.doRequest("json")
 12738  	if res != nil && res.StatusCode == http.StatusNotModified {
 12739  		if res.Body != nil {
 12740  			res.Body.Close()
 12741  		}
 12742  		return nil, gensupport.WrapError(&googleapi.Error{
 12743  			Code:   res.StatusCode,
 12744  			Header: res.Header,
 12745  		})
 12746  	}
 12747  	if err != nil {
 12748  		return nil, err
 12749  	}
 12750  	defer googleapi.CloseBody(res)
 12751  	if err := googleapi.CheckResponse(res); err != nil {
 12752  		return nil, gensupport.WrapError(err)
 12753  	}
 12754  	ret := &GoogleCloudRetailV2Model{
 12755  		ServerResponse: googleapi.ServerResponse{
 12756  			Header:         res.Header,
 12757  			HTTPStatusCode: res.StatusCode,
 12758  		},
 12759  	}
 12760  	target := &ret
 12761  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12762  		return nil, err
 12763  	}
 12764  	return ret, nil
 12765  }
 12766  
 12767  type ProjectsLocationsCatalogsModelsResumeCall struct {
 12768  	s                                     *Service
 12769  	name                                  string
 12770  	googlecloudretailv2resumemodelrequest *GoogleCloudRetailV2ResumeModelRequest
 12771  	urlParams_                            gensupport.URLParams
 12772  	ctx_                                  context.Context
 12773  	header_                               http.Header
 12774  }
 12775  
 12776  // Resume: Resumes the training of an existing model.
 12777  //
 12778  //   - name: The name of the model to resume. Format:
 12779  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mo
 12780  //     dels/{model_id}`.
 12781  func (r *ProjectsLocationsCatalogsModelsService) Resume(name string, googlecloudretailv2resumemodelrequest *GoogleCloudRetailV2ResumeModelRequest) *ProjectsLocationsCatalogsModelsResumeCall {
 12782  	c := &ProjectsLocationsCatalogsModelsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12783  	c.name = name
 12784  	c.googlecloudretailv2resumemodelrequest = googlecloudretailv2resumemodelrequest
 12785  	return c
 12786  }
 12787  
 12788  // Fields allows partial responses to be retrieved. See
 12789  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12790  // details.
 12791  func (c *ProjectsLocationsCatalogsModelsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsResumeCall {
 12792  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12793  	return c
 12794  }
 12795  
 12796  // Context sets the context to be used in this call's Do method.
 12797  func (c *ProjectsLocationsCatalogsModelsResumeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsResumeCall {
 12798  	c.ctx_ = ctx
 12799  	return c
 12800  }
 12801  
 12802  // Header returns a http.Header that can be modified by the caller to add
 12803  // headers to the request.
 12804  func (c *ProjectsLocationsCatalogsModelsResumeCall) Header() http.Header {
 12805  	if c.header_ == nil {
 12806  		c.header_ = make(http.Header)
 12807  	}
 12808  	return c.header_
 12809  }
 12810  
 12811  func (c *ProjectsLocationsCatalogsModelsResumeCall) doRequest(alt string) (*http.Response, error) {
 12812  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12813  	var body io.Reader = nil
 12814  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2resumemodelrequest)
 12815  	if err != nil {
 12816  		return nil, err
 12817  	}
 12818  	c.urlParams_.Set("alt", alt)
 12819  	c.urlParams_.Set("prettyPrint", "false")
 12820  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:resume")
 12821  	urls += "?" + c.urlParams_.Encode()
 12822  	req, err := http.NewRequest("POST", urls, body)
 12823  	if err != nil {
 12824  		return nil, err
 12825  	}
 12826  	req.Header = reqHeaders
 12827  	googleapi.Expand(req.URL, map[string]string{
 12828  		"name": c.name,
 12829  	})
 12830  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12831  }
 12832  
 12833  // Do executes the "retail.projects.locations.catalogs.models.resume" call.
 12834  // Any non-2xx status code is an error. Response headers are in either
 12835  // *GoogleCloudRetailV2Model.ServerResponse.Header or (if a response was
 12836  // returned at all) in error.(*googleapi.Error).Header. Use
 12837  // googleapi.IsNotModified to check whether the returned error was because
 12838  // http.StatusNotModified was returned.
 12839  func (c *ProjectsLocationsCatalogsModelsResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2Model, error) {
 12840  	gensupport.SetOptions(c.urlParams_, opts...)
 12841  	res, err := c.doRequest("json")
 12842  	if res != nil && res.StatusCode == http.StatusNotModified {
 12843  		if res.Body != nil {
 12844  			res.Body.Close()
 12845  		}
 12846  		return nil, gensupport.WrapError(&googleapi.Error{
 12847  			Code:   res.StatusCode,
 12848  			Header: res.Header,
 12849  		})
 12850  	}
 12851  	if err != nil {
 12852  		return nil, err
 12853  	}
 12854  	defer googleapi.CloseBody(res)
 12855  	if err := googleapi.CheckResponse(res); err != nil {
 12856  		return nil, gensupport.WrapError(err)
 12857  	}
 12858  	ret := &GoogleCloudRetailV2Model{
 12859  		ServerResponse: googleapi.ServerResponse{
 12860  			Header:         res.Header,
 12861  			HTTPStatusCode: res.StatusCode,
 12862  		},
 12863  	}
 12864  	target := &ret
 12865  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12866  		return nil, err
 12867  	}
 12868  	return ret, nil
 12869  }
 12870  
 12871  type ProjectsLocationsCatalogsModelsTuneCall struct {
 12872  	s                                   *Service
 12873  	name                                string
 12874  	googlecloudretailv2tunemodelrequest *GoogleCloudRetailV2TuneModelRequest
 12875  	urlParams_                          gensupport.URLParams
 12876  	ctx_                                context.Context
 12877  	header_                             http.Header
 12878  }
 12879  
 12880  // Tune: Tunes an existing model.
 12881  //
 12882  //   - name: The resource name of the model to tune. Format:
 12883  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/mo
 12884  //     dels/{model_id}`.
 12885  func (r *ProjectsLocationsCatalogsModelsService) Tune(name string, googlecloudretailv2tunemodelrequest *GoogleCloudRetailV2TuneModelRequest) *ProjectsLocationsCatalogsModelsTuneCall {
 12886  	c := &ProjectsLocationsCatalogsModelsTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12887  	c.name = name
 12888  	c.googlecloudretailv2tunemodelrequest = googlecloudretailv2tunemodelrequest
 12889  	return c
 12890  }
 12891  
 12892  // Fields allows partial responses to be retrieved. See
 12893  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12894  // details.
 12895  func (c *ProjectsLocationsCatalogsModelsTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsModelsTuneCall {
 12896  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12897  	return c
 12898  }
 12899  
 12900  // Context sets the context to be used in this call's Do method.
 12901  func (c *ProjectsLocationsCatalogsModelsTuneCall) Context(ctx context.Context) *ProjectsLocationsCatalogsModelsTuneCall {
 12902  	c.ctx_ = ctx
 12903  	return c
 12904  }
 12905  
 12906  // Header returns a http.Header that can be modified by the caller to add
 12907  // headers to the request.
 12908  func (c *ProjectsLocationsCatalogsModelsTuneCall) Header() http.Header {
 12909  	if c.header_ == nil {
 12910  		c.header_ = make(http.Header)
 12911  	}
 12912  	return c.header_
 12913  }
 12914  
 12915  func (c *ProjectsLocationsCatalogsModelsTuneCall) doRequest(alt string) (*http.Response, error) {
 12916  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12917  	var body io.Reader = nil
 12918  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2tunemodelrequest)
 12919  	if err != nil {
 12920  		return nil, err
 12921  	}
 12922  	c.urlParams_.Set("alt", alt)
 12923  	c.urlParams_.Set("prettyPrint", "false")
 12924  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:tune")
 12925  	urls += "?" + c.urlParams_.Encode()
 12926  	req, err := http.NewRequest("POST", urls, body)
 12927  	if err != nil {
 12928  		return nil, err
 12929  	}
 12930  	req.Header = reqHeaders
 12931  	googleapi.Expand(req.URL, map[string]string{
 12932  		"name": c.name,
 12933  	})
 12934  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12935  }
 12936  
 12937  // Do executes the "retail.projects.locations.catalogs.models.tune" call.
 12938  // Any non-2xx status code is an error. Response headers are in either
 12939  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 12940  // returned at all) in error.(*googleapi.Error).Header. Use
 12941  // googleapi.IsNotModified to check whether the returned error was because
 12942  // http.StatusNotModified was returned.
 12943  func (c *ProjectsLocationsCatalogsModelsTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 12944  	gensupport.SetOptions(c.urlParams_, opts...)
 12945  	res, err := c.doRequest("json")
 12946  	if res != nil && res.StatusCode == http.StatusNotModified {
 12947  		if res.Body != nil {
 12948  			res.Body.Close()
 12949  		}
 12950  		return nil, gensupport.WrapError(&googleapi.Error{
 12951  			Code:   res.StatusCode,
 12952  			Header: res.Header,
 12953  		})
 12954  	}
 12955  	if err != nil {
 12956  		return nil, err
 12957  	}
 12958  	defer googleapi.CloseBody(res)
 12959  	if err := googleapi.CheckResponse(res); err != nil {
 12960  		return nil, gensupport.WrapError(err)
 12961  	}
 12962  	ret := &GoogleLongrunningOperation{
 12963  		ServerResponse: googleapi.ServerResponse{
 12964  			Header:         res.Header,
 12965  			HTTPStatusCode: res.StatusCode,
 12966  		},
 12967  	}
 12968  	target := &ret
 12969  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12970  		return nil, err
 12971  	}
 12972  	return ret, nil
 12973  }
 12974  
 12975  type ProjectsLocationsCatalogsOperationsGetCall struct {
 12976  	s            *Service
 12977  	name         string
 12978  	urlParams_   gensupport.URLParams
 12979  	ifNoneMatch_ string
 12980  	ctx_         context.Context
 12981  	header_      http.Header
 12982  }
 12983  
 12984  // Get: Gets the latest state of a long-running operation. Clients can use this
 12985  // method to poll the operation result at intervals as recommended by the API
 12986  // service.
 12987  //
 12988  // - name: The name of the operation resource.
 12989  func (r *ProjectsLocationsCatalogsOperationsService) Get(name string) *ProjectsLocationsCatalogsOperationsGetCall {
 12990  	c := &ProjectsLocationsCatalogsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12991  	c.name = name
 12992  	return c
 12993  }
 12994  
 12995  // Fields allows partial responses to be retrieved. See
 12996  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12997  // details.
 12998  func (c *ProjectsLocationsCatalogsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsOperationsGetCall {
 12999  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13000  	return c
 13001  }
 13002  
 13003  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13004  // object's ETag matches the given value. This is useful for getting updates
 13005  // only after the object has changed since the last request.
 13006  func (c *ProjectsLocationsCatalogsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsOperationsGetCall {
 13007  	c.ifNoneMatch_ = entityTag
 13008  	return c
 13009  }
 13010  
 13011  // Context sets the context to be used in this call's Do method.
 13012  func (c *ProjectsLocationsCatalogsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsOperationsGetCall {
 13013  	c.ctx_ = ctx
 13014  	return c
 13015  }
 13016  
 13017  // Header returns a http.Header that can be modified by the caller to add
 13018  // headers to the request.
 13019  func (c *ProjectsLocationsCatalogsOperationsGetCall) Header() http.Header {
 13020  	if c.header_ == nil {
 13021  		c.header_ = make(http.Header)
 13022  	}
 13023  	return c.header_
 13024  }
 13025  
 13026  func (c *ProjectsLocationsCatalogsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 13027  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13028  	if c.ifNoneMatch_ != "" {
 13029  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13030  	}
 13031  	var body io.Reader = nil
 13032  	c.urlParams_.Set("alt", alt)
 13033  	c.urlParams_.Set("prettyPrint", "false")
 13034  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 13035  	urls += "?" + c.urlParams_.Encode()
 13036  	req, err := http.NewRequest("GET", urls, body)
 13037  	if err != nil {
 13038  		return nil, err
 13039  	}
 13040  	req.Header = reqHeaders
 13041  	googleapi.Expand(req.URL, map[string]string{
 13042  		"name": c.name,
 13043  	})
 13044  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13045  }
 13046  
 13047  // Do executes the "retail.projects.locations.catalogs.operations.get" call.
 13048  // Any non-2xx status code is an error. Response headers are in either
 13049  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 13050  // returned at all) in error.(*googleapi.Error).Header. Use
 13051  // googleapi.IsNotModified to check whether the returned error was because
 13052  // http.StatusNotModified was returned.
 13053  func (c *ProjectsLocationsCatalogsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 13054  	gensupport.SetOptions(c.urlParams_, opts...)
 13055  	res, err := c.doRequest("json")
 13056  	if res != nil && res.StatusCode == http.StatusNotModified {
 13057  		if res.Body != nil {
 13058  			res.Body.Close()
 13059  		}
 13060  		return nil, gensupport.WrapError(&googleapi.Error{
 13061  			Code:   res.StatusCode,
 13062  			Header: res.Header,
 13063  		})
 13064  	}
 13065  	if err != nil {
 13066  		return nil, err
 13067  	}
 13068  	defer googleapi.CloseBody(res)
 13069  	if err := googleapi.CheckResponse(res); err != nil {
 13070  		return nil, gensupport.WrapError(err)
 13071  	}
 13072  	ret := &GoogleLongrunningOperation{
 13073  		ServerResponse: googleapi.ServerResponse{
 13074  			Header:         res.Header,
 13075  			HTTPStatusCode: res.StatusCode,
 13076  		},
 13077  	}
 13078  	target := &ret
 13079  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13080  		return nil, err
 13081  	}
 13082  	return ret, nil
 13083  }
 13084  
 13085  type ProjectsLocationsCatalogsOperationsListCall struct {
 13086  	s            *Service
 13087  	name         string
 13088  	urlParams_   gensupport.URLParams
 13089  	ifNoneMatch_ string
 13090  	ctx_         context.Context
 13091  	header_      http.Header
 13092  }
 13093  
 13094  // List: Lists operations that match the specified filter in the request. If
 13095  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
 13096  //
 13097  // - name: The name of the operation's parent resource.
 13098  func (r *ProjectsLocationsCatalogsOperationsService) List(name string) *ProjectsLocationsCatalogsOperationsListCall {
 13099  	c := &ProjectsLocationsCatalogsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13100  	c.name = name
 13101  	return c
 13102  }
 13103  
 13104  // Filter sets the optional parameter "filter": The standard list filter.
 13105  func (c *ProjectsLocationsCatalogsOperationsListCall) Filter(filter string) *ProjectsLocationsCatalogsOperationsListCall {
 13106  	c.urlParams_.Set("filter", filter)
 13107  	return c
 13108  }
 13109  
 13110  // PageSize sets the optional parameter "pageSize": The standard list page
 13111  // size.
 13112  func (c *ProjectsLocationsCatalogsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsOperationsListCall {
 13113  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 13114  	return c
 13115  }
 13116  
 13117  // PageToken sets the optional parameter "pageToken": The standard list page
 13118  // token.
 13119  func (c *ProjectsLocationsCatalogsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsOperationsListCall {
 13120  	c.urlParams_.Set("pageToken", pageToken)
 13121  	return c
 13122  }
 13123  
 13124  // Fields allows partial responses to be retrieved. See
 13125  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13126  // details.
 13127  func (c *ProjectsLocationsCatalogsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsOperationsListCall {
 13128  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13129  	return c
 13130  }
 13131  
 13132  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13133  // object's ETag matches the given value. This is useful for getting updates
 13134  // only after the object has changed since the last request.
 13135  func (c *ProjectsLocationsCatalogsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsOperationsListCall {
 13136  	c.ifNoneMatch_ = entityTag
 13137  	return c
 13138  }
 13139  
 13140  // Context sets the context to be used in this call's Do method.
 13141  func (c *ProjectsLocationsCatalogsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsOperationsListCall {
 13142  	c.ctx_ = ctx
 13143  	return c
 13144  }
 13145  
 13146  // Header returns a http.Header that can be modified by the caller to add
 13147  // headers to the request.
 13148  func (c *ProjectsLocationsCatalogsOperationsListCall) Header() http.Header {
 13149  	if c.header_ == nil {
 13150  		c.header_ = make(http.Header)
 13151  	}
 13152  	return c.header_
 13153  }
 13154  
 13155  func (c *ProjectsLocationsCatalogsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 13156  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13157  	if c.ifNoneMatch_ != "" {
 13158  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13159  	}
 13160  	var body io.Reader = nil
 13161  	c.urlParams_.Set("alt", alt)
 13162  	c.urlParams_.Set("prettyPrint", "false")
 13163  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
 13164  	urls += "?" + c.urlParams_.Encode()
 13165  	req, err := http.NewRequest("GET", urls, body)
 13166  	if err != nil {
 13167  		return nil, err
 13168  	}
 13169  	req.Header = reqHeaders
 13170  	googleapi.Expand(req.URL, map[string]string{
 13171  		"name": c.name,
 13172  	})
 13173  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13174  }
 13175  
 13176  // Do executes the "retail.projects.locations.catalogs.operations.list" call.
 13177  // Any non-2xx status code is an error. Response headers are in either
 13178  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
 13179  // response was returned at all) in error.(*googleapi.Error).Header. Use
 13180  // googleapi.IsNotModified to check whether the returned error was because
 13181  // http.StatusNotModified was returned.
 13182  func (c *ProjectsLocationsCatalogsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
 13183  	gensupport.SetOptions(c.urlParams_, opts...)
 13184  	res, err := c.doRequest("json")
 13185  	if res != nil && res.StatusCode == http.StatusNotModified {
 13186  		if res.Body != nil {
 13187  			res.Body.Close()
 13188  		}
 13189  		return nil, gensupport.WrapError(&googleapi.Error{
 13190  			Code:   res.StatusCode,
 13191  			Header: res.Header,
 13192  		})
 13193  	}
 13194  	if err != nil {
 13195  		return nil, err
 13196  	}
 13197  	defer googleapi.CloseBody(res)
 13198  	if err := googleapi.CheckResponse(res); err != nil {
 13199  		return nil, gensupport.WrapError(err)
 13200  	}
 13201  	ret := &GoogleLongrunningListOperationsResponse{
 13202  		ServerResponse: googleapi.ServerResponse{
 13203  			Header:         res.Header,
 13204  			HTTPStatusCode: res.StatusCode,
 13205  		},
 13206  	}
 13207  	target := &ret
 13208  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13209  		return nil, err
 13210  	}
 13211  	return ret, nil
 13212  }
 13213  
 13214  // Pages invokes f for each page of results.
 13215  // A non-nil error returned from f will halt the iteration.
 13216  // The provided context supersedes any context provided to the Context method.
 13217  func (c *ProjectsLocationsCatalogsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
 13218  	c.ctx_ = ctx
 13219  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 13220  	for {
 13221  		x, err := c.Do()
 13222  		if err != nil {
 13223  			return err
 13224  		}
 13225  		if err := f(x); err != nil {
 13226  			return err
 13227  		}
 13228  		if x.NextPageToken == "" {
 13229  			return nil
 13230  		}
 13231  		c.PageToken(x.NextPageToken)
 13232  	}
 13233  }
 13234  
 13235  type ProjectsLocationsCatalogsPlacementsPredictCall struct {
 13236  	s                                 *Service
 13237  	placement                         string
 13238  	googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest
 13239  	urlParams_                        gensupport.URLParams
 13240  	ctx_                              context.Context
 13241  	header_                           http.Header
 13242  }
 13243  
 13244  // Predict: Makes a recommendation prediction.
 13245  //
 13246  //   - placement: Full resource name of the format:
 13247  //     `{placement=projects/*/locations/global/catalogs/default_catalog/servingCon
 13248  //     figs/*}` or
 13249  //     `{placement=projects/*/locations/global/catalogs/default_catalog/placements
 13250  //     /*}`. We recommend using the `servingConfigs` resource. `placements` is a
 13251  //     legacy resource. The ID of the Recommendations AI serving config or
 13252  //     placement. Before you can request predictions from your model, you must
 13253  //     create at least one serving config or placement for it. For more
 13254  //     information, see [Manage serving configs]
 13255  //     (https://cloud.google.com/retail/docs/manage-configs). The full list of
 13256  //     available serving configs can be seen at
 13257  //     https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs.
 13258  func (r *ProjectsLocationsCatalogsPlacementsService) Predict(placement string, googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest) *ProjectsLocationsCatalogsPlacementsPredictCall {
 13259  	c := &ProjectsLocationsCatalogsPlacementsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13260  	c.placement = placement
 13261  	c.googlecloudretailv2predictrequest = googlecloudretailv2predictrequest
 13262  	return c
 13263  }
 13264  
 13265  // Fields allows partial responses to be retrieved. See
 13266  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13267  // details.
 13268  func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsPlacementsPredictCall {
 13269  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13270  	return c
 13271  }
 13272  
 13273  // Context sets the context to be used in this call's Do method.
 13274  func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsPlacementsPredictCall {
 13275  	c.ctx_ = ctx
 13276  	return c
 13277  }
 13278  
 13279  // Header returns a http.Header that can be modified by the caller to add
 13280  // headers to the request.
 13281  func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Header() http.Header {
 13282  	if c.header_ == nil {
 13283  		c.header_ = make(http.Header)
 13284  	}
 13285  	return c.header_
 13286  }
 13287  
 13288  func (c *ProjectsLocationsCatalogsPlacementsPredictCall) doRequest(alt string) (*http.Response, error) {
 13289  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13290  	var body io.Reader = nil
 13291  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2predictrequest)
 13292  	if err != nil {
 13293  		return nil, err
 13294  	}
 13295  	c.urlParams_.Set("alt", alt)
 13296  	c.urlParams_.Set("prettyPrint", "false")
 13297  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+placement}:predict")
 13298  	urls += "?" + c.urlParams_.Encode()
 13299  	req, err := http.NewRequest("POST", urls, body)
 13300  	if err != nil {
 13301  		return nil, err
 13302  	}
 13303  	req.Header = reqHeaders
 13304  	googleapi.Expand(req.URL, map[string]string{
 13305  		"placement": c.placement,
 13306  	})
 13307  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13308  }
 13309  
 13310  // Do executes the "retail.projects.locations.catalogs.placements.predict" call.
 13311  // Any non-2xx status code is an error. Response headers are in either
 13312  // *GoogleCloudRetailV2PredictResponse.ServerResponse.Header or (if a response
 13313  // was returned at all) in error.(*googleapi.Error).Header. Use
 13314  // googleapi.IsNotModified to check whether the returned error was because
 13315  // http.StatusNotModified was returned.
 13316  func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2PredictResponse, error) {
 13317  	gensupport.SetOptions(c.urlParams_, opts...)
 13318  	res, err := c.doRequest("json")
 13319  	if res != nil && res.StatusCode == http.StatusNotModified {
 13320  		if res.Body != nil {
 13321  			res.Body.Close()
 13322  		}
 13323  		return nil, gensupport.WrapError(&googleapi.Error{
 13324  			Code:   res.StatusCode,
 13325  			Header: res.Header,
 13326  		})
 13327  	}
 13328  	if err != nil {
 13329  		return nil, err
 13330  	}
 13331  	defer googleapi.CloseBody(res)
 13332  	if err := googleapi.CheckResponse(res); err != nil {
 13333  		return nil, gensupport.WrapError(err)
 13334  	}
 13335  	ret := &GoogleCloudRetailV2PredictResponse{
 13336  		ServerResponse: googleapi.ServerResponse{
 13337  			Header:         res.Header,
 13338  			HTTPStatusCode: res.StatusCode,
 13339  		},
 13340  	}
 13341  	target := &ret
 13342  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13343  		return nil, err
 13344  	}
 13345  	return ret, nil
 13346  }
 13347  
 13348  type ProjectsLocationsCatalogsPlacementsSearchCall struct {
 13349  	s                                *Service
 13350  	placement                        string
 13351  	googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest
 13352  	urlParams_                       gensupport.URLParams
 13353  	ctx_                             context.Context
 13354  	header_                          http.Header
 13355  }
 13356  
 13357  // Search: Performs a search. This feature is only available for users who have
 13358  // Retail Search enabled. Enable Retail Search on Cloud Console before using
 13359  // this feature.
 13360  //
 13361  //   - placement: The resource name of the Retail Search serving config, such as
 13362  //     `projects/*/locations/global/catalogs/default_catalog/servingConfigs/defaul
 13363  //     t_serving_config` or the name of the legacy placement resource, such as
 13364  //     `projects/*/locations/global/catalogs/default_catalog/placements/default_se
 13365  //     arch`. This field is used to identify the serving config name and the set
 13366  //     of models that are used to make the search.
 13367  func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall {
 13368  	c := &ProjectsLocationsCatalogsPlacementsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13369  	c.placement = placement
 13370  	c.googlecloudretailv2searchrequest = googlecloudretailv2searchrequest
 13371  	return c
 13372  }
 13373  
 13374  // Fields allows partial responses to be retrieved. See
 13375  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13376  // details.
 13377  func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsPlacementsSearchCall {
 13378  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13379  	return c
 13380  }
 13381  
 13382  // Context sets the context to be used in this call's Do method.
 13383  func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsPlacementsSearchCall {
 13384  	c.ctx_ = ctx
 13385  	return c
 13386  }
 13387  
 13388  // Header returns a http.Header that can be modified by the caller to add
 13389  // headers to the request.
 13390  func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Header() http.Header {
 13391  	if c.header_ == nil {
 13392  		c.header_ = make(http.Header)
 13393  	}
 13394  	return c.header_
 13395  }
 13396  
 13397  func (c *ProjectsLocationsCatalogsPlacementsSearchCall) doRequest(alt string) (*http.Response, error) {
 13398  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13399  	var body io.Reader = nil
 13400  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2searchrequest)
 13401  	if err != nil {
 13402  		return nil, err
 13403  	}
 13404  	c.urlParams_.Set("alt", alt)
 13405  	c.urlParams_.Set("prettyPrint", "false")
 13406  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+placement}:search")
 13407  	urls += "?" + c.urlParams_.Encode()
 13408  	req, err := http.NewRequest("POST", urls, body)
 13409  	if err != nil {
 13410  		return nil, err
 13411  	}
 13412  	req.Header = reqHeaders
 13413  	googleapi.Expand(req.URL, map[string]string{
 13414  		"placement": c.placement,
 13415  	})
 13416  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13417  }
 13418  
 13419  // Do executes the "retail.projects.locations.catalogs.placements.search" call.
 13420  // Any non-2xx status code is an error. Response headers are in either
 13421  // *GoogleCloudRetailV2SearchResponse.ServerResponse.Header or (if a response
 13422  // was returned at all) in error.(*googleapi.Error).Header. Use
 13423  // googleapi.IsNotModified to check whether the returned error was because
 13424  // http.StatusNotModified was returned.
 13425  func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2SearchResponse, error) {
 13426  	gensupport.SetOptions(c.urlParams_, opts...)
 13427  	res, err := c.doRequest("json")
 13428  	if res != nil && res.StatusCode == http.StatusNotModified {
 13429  		if res.Body != nil {
 13430  			res.Body.Close()
 13431  		}
 13432  		return nil, gensupport.WrapError(&googleapi.Error{
 13433  			Code:   res.StatusCode,
 13434  			Header: res.Header,
 13435  		})
 13436  	}
 13437  	if err != nil {
 13438  		return nil, err
 13439  	}
 13440  	defer googleapi.CloseBody(res)
 13441  	if err := googleapi.CheckResponse(res); err != nil {
 13442  		return nil, gensupport.WrapError(err)
 13443  	}
 13444  	ret := &GoogleCloudRetailV2SearchResponse{
 13445  		ServerResponse: googleapi.ServerResponse{
 13446  			Header:         res.Header,
 13447  			HTTPStatusCode: res.StatusCode,
 13448  		},
 13449  	}
 13450  	target := &ret
 13451  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13452  		return nil, err
 13453  	}
 13454  	return ret, nil
 13455  }
 13456  
 13457  // Pages invokes f for each page of results.
 13458  // A non-nil error returned from f will halt the iteration.
 13459  // The provided context supersedes any context provided to the Context method.
 13460  func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2SearchResponse) error) error {
 13461  	c.ctx_ = ctx
 13462  	defer func(pt string) { c.googlecloudretailv2searchrequest.PageToken = pt }(c.googlecloudretailv2searchrequest.PageToken)
 13463  	for {
 13464  		x, err := c.Do()
 13465  		if err != nil {
 13466  			return err
 13467  		}
 13468  		if err := f(x); err != nil {
 13469  			return err
 13470  		}
 13471  		if x.NextPageToken == "" {
 13472  			return nil
 13473  		}
 13474  		c.googlecloudretailv2searchrequest.PageToken = x.NextPageToken
 13475  	}
 13476  }
 13477  
 13478  type ProjectsLocationsCatalogsServingConfigsAddControlCall struct {
 13479  	s                                    *Service
 13480  	servingConfig                        string
 13481  	googlecloudretailv2addcontrolrequest *GoogleCloudRetailV2AddControlRequest
 13482  	urlParams_                           gensupport.URLParams
 13483  	ctx_                                 context.Context
 13484  	header_                              http.Header
 13485  }
 13486  
 13487  // AddControl: Enables a Control on the specified ServingConfig. The control is
 13488  // added in the last position of the list of controls it belongs to (e.g. if
 13489  // it's a facet spec control it will be applied in the last position of
 13490  // servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control
 13491  // has already been applied. Returns a FAILED_PRECONDITION error if the
 13492  // addition could exceed maximum number of control allowed for that type of
 13493  // control.
 13494  //
 13495  //   - servingConfig: The source ServingConfig resource name . Format:
 13496  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/se
 13497  //     rvingConfigs/{serving_config_id}`.
 13498  func (r *ProjectsLocationsCatalogsServingConfigsService) AddControl(servingConfig string, googlecloudretailv2addcontrolrequest *GoogleCloudRetailV2AddControlRequest) *ProjectsLocationsCatalogsServingConfigsAddControlCall {
 13499  	c := &ProjectsLocationsCatalogsServingConfigsAddControlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13500  	c.servingConfig = servingConfig
 13501  	c.googlecloudretailv2addcontrolrequest = googlecloudretailv2addcontrolrequest
 13502  	return c
 13503  }
 13504  
 13505  // Fields allows partial responses to be retrieved. See
 13506  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13507  // details.
 13508  func (c *ProjectsLocationsCatalogsServingConfigsAddControlCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsAddControlCall {
 13509  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13510  	return c
 13511  }
 13512  
 13513  // Context sets the context to be used in this call's Do method.
 13514  func (c *ProjectsLocationsCatalogsServingConfigsAddControlCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsAddControlCall {
 13515  	c.ctx_ = ctx
 13516  	return c
 13517  }
 13518  
 13519  // Header returns a http.Header that can be modified by the caller to add
 13520  // headers to the request.
 13521  func (c *ProjectsLocationsCatalogsServingConfigsAddControlCall) Header() http.Header {
 13522  	if c.header_ == nil {
 13523  		c.header_ = make(http.Header)
 13524  	}
 13525  	return c.header_
 13526  }
 13527  
 13528  func (c *ProjectsLocationsCatalogsServingConfigsAddControlCall) doRequest(alt string) (*http.Response, error) {
 13529  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13530  	var body io.Reader = nil
 13531  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2addcontrolrequest)
 13532  	if err != nil {
 13533  		return nil, err
 13534  	}
 13535  	c.urlParams_.Set("alt", alt)
 13536  	c.urlParams_.Set("prettyPrint", "false")
 13537  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+servingConfig}:addControl")
 13538  	urls += "?" + c.urlParams_.Encode()
 13539  	req, err := http.NewRequest("POST", urls, body)
 13540  	if err != nil {
 13541  		return nil, err
 13542  	}
 13543  	req.Header = reqHeaders
 13544  	googleapi.Expand(req.URL, map[string]string{
 13545  		"servingConfig": c.servingConfig,
 13546  	})
 13547  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13548  }
 13549  
 13550  // Do executes the "retail.projects.locations.catalogs.servingConfigs.addControl" call.
 13551  // Any non-2xx status code is an error. Response headers are in either
 13552  // *GoogleCloudRetailV2ServingConfig.ServerResponse.Header or (if a response
 13553  // was returned at all) in error.(*googleapi.Error).Header. Use
 13554  // googleapi.IsNotModified to check whether the returned error was because
 13555  // http.StatusNotModified was returned.
 13556  func (c *ProjectsLocationsCatalogsServingConfigsAddControlCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ServingConfig, error) {
 13557  	gensupport.SetOptions(c.urlParams_, opts...)
 13558  	res, err := c.doRequest("json")
 13559  	if res != nil && res.StatusCode == http.StatusNotModified {
 13560  		if res.Body != nil {
 13561  			res.Body.Close()
 13562  		}
 13563  		return nil, gensupport.WrapError(&googleapi.Error{
 13564  			Code:   res.StatusCode,
 13565  			Header: res.Header,
 13566  		})
 13567  	}
 13568  	if err != nil {
 13569  		return nil, err
 13570  	}
 13571  	defer googleapi.CloseBody(res)
 13572  	if err := googleapi.CheckResponse(res); err != nil {
 13573  		return nil, gensupport.WrapError(err)
 13574  	}
 13575  	ret := &GoogleCloudRetailV2ServingConfig{
 13576  		ServerResponse: googleapi.ServerResponse{
 13577  			Header:         res.Header,
 13578  			HTTPStatusCode: res.StatusCode,
 13579  		},
 13580  	}
 13581  	target := &ret
 13582  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13583  		return nil, err
 13584  	}
 13585  	return ret, nil
 13586  }
 13587  
 13588  type ProjectsLocationsCatalogsServingConfigsCreateCall struct {
 13589  	s                                *Service
 13590  	parent                           string
 13591  	googlecloudretailv2servingconfig *GoogleCloudRetailV2ServingConfig
 13592  	urlParams_                       gensupport.URLParams
 13593  	ctx_                             context.Context
 13594  	header_                          http.Header
 13595  }
 13596  
 13597  // Create: Creates a ServingConfig. A maximum of 100 ServingConfigs are allowed
 13598  // in a Catalog, otherwise a FAILED_PRECONDITION error is returned.
 13599  //
 13600  //   - parent: Full resource name of parent. Format:
 13601  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`.
 13602  func (r *ProjectsLocationsCatalogsServingConfigsService) Create(parent string, googlecloudretailv2servingconfig *GoogleCloudRetailV2ServingConfig) *ProjectsLocationsCatalogsServingConfigsCreateCall {
 13603  	c := &ProjectsLocationsCatalogsServingConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13604  	c.parent = parent
 13605  	c.googlecloudretailv2servingconfig = googlecloudretailv2servingconfig
 13606  	return c
 13607  }
 13608  
 13609  // ServingConfigId sets the optional parameter "servingConfigId": Required. The
 13610  // ID to use for the ServingConfig, which will become the final component of
 13611  // the ServingConfig's resource name. This value should be 4-63 characters, and
 13612  // valid characters are /a-z-_/.
 13613  func (c *ProjectsLocationsCatalogsServingConfigsCreateCall) ServingConfigId(servingConfigId string) *ProjectsLocationsCatalogsServingConfigsCreateCall {
 13614  	c.urlParams_.Set("servingConfigId", servingConfigId)
 13615  	return c
 13616  }
 13617  
 13618  // Fields allows partial responses to be retrieved. See
 13619  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13620  // details.
 13621  func (c *ProjectsLocationsCatalogsServingConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsCreateCall {
 13622  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13623  	return c
 13624  }
 13625  
 13626  // Context sets the context to be used in this call's Do method.
 13627  func (c *ProjectsLocationsCatalogsServingConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsCreateCall {
 13628  	c.ctx_ = ctx
 13629  	return c
 13630  }
 13631  
 13632  // Header returns a http.Header that can be modified by the caller to add
 13633  // headers to the request.
 13634  func (c *ProjectsLocationsCatalogsServingConfigsCreateCall) Header() http.Header {
 13635  	if c.header_ == nil {
 13636  		c.header_ = make(http.Header)
 13637  	}
 13638  	return c.header_
 13639  }
 13640  
 13641  func (c *ProjectsLocationsCatalogsServingConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
 13642  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13643  	var body io.Reader = nil
 13644  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2servingconfig)
 13645  	if err != nil {
 13646  		return nil, err
 13647  	}
 13648  	c.urlParams_.Set("alt", alt)
 13649  	c.urlParams_.Set("prettyPrint", "false")
 13650  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/servingConfigs")
 13651  	urls += "?" + c.urlParams_.Encode()
 13652  	req, err := http.NewRequest("POST", urls, body)
 13653  	if err != nil {
 13654  		return nil, err
 13655  	}
 13656  	req.Header = reqHeaders
 13657  	googleapi.Expand(req.URL, map[string]string{
 13658  		"parent": c.parent,
 13659  	})
 13660  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13661  }
 13662  
 13663  // Do executes the "retail.projects.locations.catalogs.servingConfigs.create" call.
 13664  // Any non-2xx status code is an error. Response headers are in either
 13665  // *GoogleCloudRetailV2ServingConfig.ServerResponse.Header or (if a response
 13666  // was returned at all) in error.(*googleapi.Error).Header. Use
 13667  // googleapi.IsNotModified to check whether the returned error was because
 13668  // http.StatusNotModified was returned.
 13669  func (c *ProjectsLocationsCatalogsServingConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ServingConfig, error) {
 13670  	gensupport.SetOptions(c.urlParams_, opts...)
 13671  	res, err := c.doRequest("json")
 13672  	if res != nil && res.StatusCode == http.StatusNotModified {
 13673  		if res.Body != nil {
 13674  			res.Body.Close()
 13675  		}
 13676  		return nil, gensupport.WrapError(&googleapi.Error{
 13677  			Code:   res.StatusCode,
 13678  			Header: res.Header,
 13679  		})
 13680  	}
 13681  	if err != nil {
 13682  		return nil, err
 13683  	}
 13684  	defer googleapi.CloseBody(res)
 13685  	if err := googleapi.CheckResponse(res); err != nil {
 13686  		return nil, gensupport.WrapError(err)
 13687  	}
 13688  	ret := &GoogleCloudRetailV2ServingConfig{
 13689  		ServerResponse: googleapi.ServerResponse{
 13690  			Header:         res.Header,
 13691  			HTTPStatusCode: res.StatusCode,
 13692  		},
 13693  	}
 13694  	target := &ret
 13695  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13696  		return nil, err
 13697  	}
 13698  	return ret, nil
 13699  }
 13700  
 13701  type ProjectsLocationsCatalogsServingConfigsDeleteCall struct {
 13702  	s          *Service
 13703  	name       string
 13704  	urlParams_ gensupport.URLParams
 13705  	ctx_       context.Context
 13706  	header_    http.Header
 13707  }
 13708  
 13709  // Delete: Deletes a ServingConfig. Returns a NotFound error if the
 13710  // ServingConfig does not exist.
 13711  //
 13712  //   - name: The resource name of the ServingConfig to delete. Format:
 13713  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/se
 13714  //     rvingConfigs/{serving_config_id}`.
 13715  func (r *ProjectsLocationsCatalogsServingConfigsService) Delete(name string) *ProjectsLocationsCatalogsServingConfigsDeleteCall {
 13716  	c := &ProjectsLocationsCatalogsServingConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13717  	c.name = name
 13718  	return c
 13719  }
 13720  
 13721  // Fields allows partial responses to be retrieved. See
 13722  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13723  // details.
 13724  func (c *ProjectsLocationsCatalogsServingConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsDeleteCall {
 13725  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13726  	return c
 13727  }
 13728  
 13729  // Context sets the context to be used in this call's Do method.
 13730  func (c *ProjectsLocationsCatalogsServingConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsDeleteCall {
 13731  	c.ctx_ = ctx
 13732  	return c
 13733  }
 13734  
 13735  // Header returns a http.Header that can be modified by the caller to add
 13736  // headers to the request.
 13737  func (c *ProjectsLocationsCatalogsServingConfigsDeleteCall) Header() http.Header {
 13738  	if c.header_ == nil {
 13739  		c.header_ = make(http.Header)
 13740  	}
 13741  	return c.header_
 13742  }
 13743  
 13744  func (c *ProjectsLocationsCatalogsServingConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
 13745  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13746  	var body io.Reader = nil
 13747  	c.urlParams_.Set("alt", alt)
 13748  	c.urlParams_.Set("prettyPrint", "false")
 13749  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 13750  	urls += "?" + c.urlParams_.Encode()
 13751  	req, err := http.NewRequest("DELETE", urls, body)
 13752  	if err != nil {
 13753  		return nil, err
 13754  	}
 13755  	req.Header = reqHeaders
 13756  	googleapi.Expand(req.URL, map[string]string{
 13757  		"name": c.name,
 13758  	})
 13759  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13760  }
 13761  
 13762  // Do executes the "retail.projects.locations.catalogs.servingConfigs.delete" call.
 13763  // Any non-2xx status code is an error. Response headers are in either
 13764  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
 13765  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13766  // check whether the returned error was because http.StatusNotModified was
 13767  // returned.
 13768  func (c *ProjectsLocationsCatalogsServingConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
 13769  	gensupport.SetOptions(c.urlParams_, opts...)
 13770  	res, err := c.doRequest("json")
 13771  	if res != nil && res.StatusCode == http.StatusNotModified {
 13772  		if res.Body != nil {
 13773  			res.Body.Close()
 13774  		}
 13775  		return nil, gensupport.WrapError(&googleapi.Error{
 13776  			Code:   res.StatusCode,
 13777  			Header: res.Header,
 13778  		})
 13779  	}
 13780  	if err != nil {
 13781  		return nil, err
 13782  	}
 13783  	defer googleapi.CloseBody(res)
 13784  	if err := googleapi.CheckResponse(res); err != nil {
 13785  		return nil, gensupport.WrapError(err)
 13786  	}
 13787  	ret := &GoogleProtobufEmpty{
 13788  		ServerResponse: googleapi.ServerResponse{
 13789  			Header:         res.Header,
 13790  			HTTPStatusCode: res.StatusCode,
 13791  		},
 13792  	}
 13793  	target := &ret
 13794  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13795  		return nil, err
 13796  	}
 13797  	return ret, nil
 13798  }
 13799  
 13800  type ProjectsLocationsCatalogsServingConfigsGetCall struct {
 13801  	s            *Service
 13802  	name         string
 13803  	urlParams_   gensupport.URLParams
 13804  	ifNoneMatch_ string
 13805  	ctx_         context.Context
 13806  	header_      http.Header
 13807  }
 13808  
 13809  // Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig
 13810  // does not exist.
 13811  //
 13812  //   - name: The resource name of the ServingConfig to get. Format:
 13813  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/se
 13814  //     rvingConfigs/{serving_config_id}`.
 13815  func (r *ProjectsLocationsCatalogsServingConfigsService) Get(name string) *ProjectsLocationsCatalogsServingConfigsGetCall {
 13816  	c := &ProjectsLocationsCatalogsServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13817  	c.name = name
 13818  	return c
 13819  }
 13820  
 13821  // Fields allows partial responses to be retrieved. See
 13822  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13823  // details.
 13824  func (c *ProjectsLocationsCatalogsServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsGetCall {
 13825  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13826  	return c
 13827  }
 13828  
 13829  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13830  // object's ETag matches the given value. This is useful for getting updates
 13831  // only after the object has changed since the last request.
 13832  func (c *ProjectsLocationsCatalogsServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsServingConfigsGetCall {
 13833  	c.ifNoneMatch_ = entityTag
 13834  	return c
 13835  }
 13836  
 13837  // Context sets the context to be used in this call's Do method.
 13838  func (c *ProjectsLocationsCatalogsServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsGetCall {
 13839  	c.ctx_ = ctx
 13840  	return c
 13841  }
 13842  
 13843  // Header returns a http.Header that can be modified by the caller to add
 13844  // headers to the request.
 13845  func (c *ProjectsLocationsCatalogsServingConfigsGetCall) Header() http.Header {
 13846  	if c.header_ == nil {
 13847  		c.header_ = make(http.Header)
 13848  	}
 13849  	return c.header_
 13850  }
 13851  
 13852  func (c *ProjectsLocationsCatalogsServingConfigsGetCall) doRequest(alt string) (*http.Response, error) {
 13853  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13854  	if c.ifNoneMatch_ != "" {
 13855  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13856  	}
 13857  	var body io.Reader = nil
 13858  	c.urlParams_.Set("alt", alt)
 13859  	c.urlParams_.Set("prettyPrint", "false")
 13860  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 13861  	urls += "?" + c.urlParams_.Encode()
 13862  	req, err := http.NewRequest("GET", urls, body)
 13863  	if err != nil {
 13864  		return nil, err
 13865  	}
 13866  	req.Header = reqHeaders
 13867  	googleapi.Expand(req.URL, map[string]string{
 13868  		"name": c.name,
 13869  	})
 13870  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13871  }
 13872  
 13873  // Do executes the "retail.projects.locations.catalogs.servingConfigs.get" call.
 13874  // Any non-2xx status code is an error. Response headers are in either
 13875  // *GoogleCloudRetailV2ServingConfig.ServerResponse.Header or (if a response
 13876  // was returned at all) in error.(*googleapi.Error).Header. Use
 13877  // googleapi.IsNotModified to check whether the returned error was because
 13878  // http.StatusNotModified was returned.
 13879  func (c *ProjectsLocationsCatalogsServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ServingConfig, error) {
 13880  	gensupport.SetOptions(c.urlParams_, opts...)
 13881  	res, err := c.doRequest("json")
 13882  	if res != nil && res.StatusCode == http.StatusNotModified {
 13883  		if res.Body != nil {
 13884  			res.Body.Close()
 13885  		}
 13886  		return nil, gensupport.WrapError(&googleapi.Error{
 13887  			Code:   res.StatusCode,
 13888  			Header: res.Header,
 13889  		})
 13890  	}
 13891  	if err != nil {
 13892  		return nil, err
 13893  	}
 13894  	defer googleapi.CloseBody(res)
 13895  	if err := googleapi.CheckResponse(res); err != nil {
 13896  		return nil, gensupport.WrapError(err)
 13897  	}
 13898  	ret := &GoogleCloudRetailV2ServingConfig{
 13899  		ServerResponse: googleapi.ServerResponse{
 13900  			Header:         res.Header,
 13901  			HTTPStatusCode: res.StatusCode,
 13902  		},
 13903  	}
 13904  	target := &ret
 13905  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13906  		return nil, err
 13907  	}
 13908  	return ret, nil
 13909  }
 13910  
 13911  type ProjectsLocationsCatalogsServingConfigsListCall struct {
 13912  	s            *Service
 13913  	parent       string
 13914  	urlParams_   gensupport.URLParams
 13915  	ifNoneMatch_ string
 13916  	ctx_         context.Context
 13917  	header_      http.Header
 13918  }
 13919  
 13920  // List: Lists all ServingConfigs linked to this catalog.
 13921  //
 13922  //   - parent: The catalog resource name. Format:
 13923  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`.
 13924  func (r *ProjectsLocationsCatalogsServingConfigsService) List(parent string) *ProjectsLocationsCatalogsServingConfigsListCall {
 13925  	c := &ProjectsLocationsCatalogsServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13926  	c.parent = parent
 13927  	return c
 13928  }
 13929  
 13930  // PageSize sets the optional parameter "pageSize": Maximum number of results
 13931  // to return. If unspecified, defaults to 100. If a value greater than 100 is
 13932  // provided, at most 100 results are returned.
 13933  func (c *ProjectsLocationsCatalogsServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsServingConfigsListCall {
 13934  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 13935  	return c
 13936  }
 13937  
 13938  // PageToken sets the optional parameter "pageToken": A page token, received
 13939  // from a previous `ListServingConfigs` call. Provide this to retrieve the
 13940  // subsequent page.
 13941  func (c *ProjectsLocationsCatalogsServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsServingConfigsListCall {
 13942  	c.urlParams_.Set("pageToken", pageToken)
 13943  	return c
 13944  }
 13945  
 13946  // Fields allows partial responses to be retrieved. See
 13947  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13948  // details.
 13949  func (c *ProjectsLocationsCatalogsServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsListCall {
 13950  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13951  	return c
 13952  }
 13953  
 13954  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13955  // object's ETag matches the given value. This is useful for getting updates
 13956  // only after the object has changed since the last request.
 13957  func (c *ProjectsLocationsCatalogsServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsServingConfigsListCall {
 13958  	c.ifNoneMatch_ = entityTag
 13959  	return c
 13960  }
 13961  
 13962  // Context sets the context to be used in this call's Do method.
 13963  func (c *ProjectsLocationsCatalogsServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsListCall {
 13964  	c.ctx_ = ctx
 13965  	return c
 13966  }
 13967  
 13968  // Header returns a http.Header that can be modified by the caller to add
 13969  // headers to the request.
 13970  func (c *ProjectsLocationsCatalogsServingConfigsListCall) Header() http.Header {
 13971  	if c.header_ == nil {
 13972  		c.header_ = make(http.Header)
 13973  	}
 13974  	return c.header_
 13975  }
 13976  
 13977  func (c *ProjectsLocationsCatalogsServingConfigsListCall) doRequest(alt string) (*http.Response, error) {
 13978  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13979  	if c.ifNoneMatch_ != "" {
 13980  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13981  	}
 13982  	var body io.Reader = nil
 13983  	c.urlParams_.Set("alt", alt)
 13984  	c.urlParams_.Set("prettyPrint", "false")
 13985  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/servingConfigs")
 13986  	urls += "?" + c.urlParams_.Encode()
 13987  	req, err := http.NewRequest("GET", urls, body)
 13988  	if err != nil {
 13989  		return nil, err
 13990  	}
 13991  	req.Header = reqHeaders
 13992  	googleapi.Expand(req.URL, map[string]string{
 13993  		"parent": c.parent,
 13994  	})
 13995  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13996  }
 13997  
 13998  // Do executes the "retail.projects.locations.catalogs.servingConfigs.list" call.
 13999  // Any non-2xx status code is an error. Response headers are in either
 14000  // *GoogleCloudRetailV2ListServingConfigsResponse.ServerResponse.Header or (if
 14001  // a response was returned at all) in error.(*googleapi.Error).Header. Use
 14002  // googleapi.IsNotModified to check whether the returned error was because
 14003  // http.StatusNotModified was returned.
 14004  func (c *ProjectsLocationsCatalogsServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ListServingConfigsResponse, error) {
 14005  	gensupport.SetOptions(c.urlParams_, opts...)
 14006  	res, err := c.doRequest("json")
 14007  	if res != nil && res.StatusCode == http.StatusNotModified {
 14008  		if res.Body != nil {
 14009  			res.Body.Close()
 14010  		}
 14011  		return nil, gensupport.WrapError(&googleapi.Error{
 14012  			Code:   res.StatusCode,
 14013  			Header: res.Header,
 14014  		})
 14015  	}
 14016  	if err != nil {
 14017  		return nil, err
 14018  	}
 14019  	defer googleapi.CloseBody(res)
 14020  	if err := googleapi.CheckResponse(res); err != nil {
 14021  		return nil, gensupport.WrapError(err)
 14022  	}
 14023  	ret := &GoogleCloudRetailV2ListServingConfigsResponse{
 14024  		ServerResponse: googleapi.ServerResponse{
 14025  			Header:         res.Header,
 14026  			HTTPStatusCode: res.StatusCode,
 14027  		},
 14028  	}
 14029  	target := &ret
 14030  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14031  		return nil, err
 14032  	}
 14033  	return ret, nil
 14034  }
 14035  
 14036  // Pages invokes f for each page of results.
 14037  // A non-nil error returned from f will halt the iteration.
 14038  // The provided context supersedes any context provided to the Context method.
 14039  func (c *ProjectsLocationsCatalogsServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2ListServingConfigsResponse) error) error {
 14040  	c.ctx_ = ctx
 14041  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 14042  	for {
 14043  		x, err := c.Do()
 14044  		if err != nil {
 14045  			return err
 14046  		}
 14047  		if err := f(x); err != nil {
 14048  			return err
 14049  		}
 14050  		if x.NextPageToken == "" {
 14051  			return nil
 14052  		}
 14053  		c.PageToken(x.NextPageToken)
 14054  	}
 14055  }
 14056  
 14057  type ProjectsLocationsCatalogsServingConfigsPatchCall struct {
 14058  	s                                *Service
 14059  	name                             string
 14060  	googlecloudretailv2servingconfig *GoogleCloudRetailV2ServingConfig
 14061  	urlParams_                       gensupport.URLParams
 14062  	ctx_                             context.Context
 14063  	header_                          http.Header
 14064  }
 14065  
 14066  // Patch: Updates a ServingConfig.
 14067  //
 14068  //   - name: Immutable. Fully qualified name
 14069  //     `projects/*/locations/global/catalogs/*/servingConfig/*`.
 14070  func (r *ProjectsLocationsCatalogsServingConfigsService) Patch(name string, googlecloudretailv2servingconfig *GoogleCloudRetailV2ServingConfig) *ProjectsLocationsCatalogsServingConfigsPatchCall {
 14071  	c := &ProjectsLocationsCatalogsServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14072  	c.name = name
 14073  	c.googlecloudretailv2servingconfig = googlecloudretailv2servingconfig
 14074  	return c
 14075  }
 14076  
 14077  // UpdateMask sets the optional parameter "updateMask": Indicates which fields
 14078  // in the provided ServingConfig to update. The following are NOT supported: *
 14079  // ServingConfig.name If not set, all supported fields are updated.
 14080  func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsServingConfigsPatchCall {
 14081  	c.urlParams_.Set("updateMask", updateMask)
 14082  	return c
 14083  }
 14084  
 14085  // Fields allows partial responses to be retrieved. See
 14086  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14087  // details.
 14088  func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsPatchCall {
 14089  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14090  	return c
 14091  }
 14092  
 14093  // Context sets the context to be used in this call's Do method.
 14094  func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsPatchCall {
 14095  	c.ctx_ = ctx
 14096  	return c
 14097  }
 14098  
 14099  // Header returns a http.Header that can be modified by the caller to add
 14100  // headers to the request.
 14101  func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) Header() http.Header {
 14102  	if c.header_ == nil {
 14103  		c.header_ = make(http.Header)
 14104  	}
 14105  	return c.header_
 14106  }
 14107  
 14108  func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
 14109  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14110  	var body io.Reader = nil
 14111  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2servingconfig)
 14112  	if err != nil {
 14113  		return nil, err
 14114  	}
 14115  	c.urlParams_.Set("alt", alt)
 14116  	c.urlParams_.Set("prettyPrint", "false")
 14117  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 14118  	urls += "?" + c.urlParams_.Encode()
 14119  	req, err := http.NewRequest("PATCH", urls, body)
 14120  	if err != nil {
 14121  		return nil, err
 14122  	}
 14123  	req.Header = reqHeaders
 14124  	googleapi.Expand(req.URL, map[string]string{
 14125  		"name": c.name,
 14126  	})
 14127  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14128  }
 14129  
 14130  // Do executes the "retail.projects.locations.catalogs.servingConfigs.patch" call.
 14131  // Any non-2xx status code is an error. Response headers are in either
 14132  // *GoogleCloudRetailV2ServingConfig.ServerResponse.Header or (if a response
 14133  // was returned at all) in error.(*googleapi.Error).Header. Use
 14134  // googleapi.IsNotModified to check whether the returned error was because
 14135  // http.StatusNotModified was returned.
 14136  func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ServingConfig, error) {
 14137  	gensupport.SetOptions(c.urlParams_, opts...)
 14138  	res, err := c.doRequest("json")
 14139  	if res != nil && res.StatusCode == http.StatusNotModified {
 14140  		if res.Body != nil {
 14141  			res.Body.Close()
 14142  		}
 14143  		return nil, gensupport.WrapError(&googleapi.Error{
 14144  			Code:   res.StatusCode,
 14145  			Header: res.Header,
 14146  		})
 14147  	}
 14148  	if err != nil {
 14149  		return nil, err
 14150  	}
 14151  	defer googleapi.CloseBody(res)
 14152  	if err := googleapi.CheckResponse(res); err != nil {
 14153  		return nil, gensupport.WrapError(err)
 14154  	}
 14155  	ret := &GoogleCloudRetailV2ServingConfig{
 14156  		ServerResponse: googleapi.ServerResponse{
 14157  			Header:         res.Header,
 14158  			HTTPStatusCode: res.StatusCode,
 14159  		},
 14160  	}
 14161  	target := &ret
 14162  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14163  		return nil, err
 14164  	}
 14165  	return ret, nil
 14166  }
 14167  
 14168  type ProjectsLocationsCatalogsServingConfigsPredictCall struct {
 14169  	s                                 *Service
 14170  	placement                         string
 14171  	googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest
 14172  	urlParams_                        gensupport.URLParams
 14173  	ctx_                              context.Context
 14174  	header_                           http.Header
 14175  }
 14176  
 14177  // Predict: Makes a recommendation prediction.
 14178  //
 14179  //   - placement: Full resource name of the format:
 14180  //     `{placement=projects/*/locations/global/catalogs/default_catalog/servingCon
 14181  //     figs/*}` or
 14182  //     `{placement=projects/*/locations/global/catalogs/default_catalog/placements
 14183  //     /*}`. We recommend using the `servingConfigs` resource. `placements` is a
 14184  //     legacy resource. The ID of the Recommendations AI serving config or
 14185  //     placement. Before you can request predictions from your model, you must
 14186  //     create at least one serving config or placement for it. For more
 14187  //     information, see [Manage serving configs]
 14188  //     (https://cloud.google.com/retail/docs/manage-configs). The full list of
 14189  //     available serving configs can be seen at
 14190  //     https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs.
 14191  func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall {
 14192  	c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14193  	c.placement = placement
 14194  	c.googlecloudretailv2predictrequest = googlecloudretailv2predictrequest
 14195  	return c
 14196  }
 14197  
 14198  // Fields allows partial responses to be retrieved. See
 14199  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14200  // details.
 14201  func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsPredictCall {
 14202  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14203  	return c
 14204  }
 14205  
 14206  // Context sets the context to be used in this call's Do method.
 14207  func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsPredictCall {
 14208  	c.ctx_ = ctx
 14209  	return c
 14210  }
 14211  
 14212  // Header returns a http.Header that can be modified by the caller to add
 14213  // headers to the request.
 14214  func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Header() http.Header {
 14215  	if c.header_ == nil {
 14216  		c.header_ = make(http.Header)
 14217  	}
 14218  	return c.header_
 14219  }
 14220  
 14221  func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) doRequest(alt string) (*http.Response, error) {
 14222  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14223  	var body io.Reader = nil
 14224  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2predictrequest)
 14225  	if err != nil {
 14226  		return nil, err
 14227  	}
 14228  	c.urlParams_.Set("alt", alt)
 14229  	c.urlParams_.Set("prettyPrint", "false")
 14230  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+placement}:predict")
 14231  	urls += "?" + c.urlParams_.Encode()
 14232  	req, err := http.NewRequest("POST", urls, body)
 14233  	if err != nil {
 14234  		return nil, err
 14235  	}
 14236  	req.Header = reqHeaders
 14237  	googleapi.Expand(req.URL, map[string]string{
 14238  		"placement": c.placement,
 14239  	})
 14240  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14241  }
 14242  
 14243  // Do executes the "retail.projects.locations.catalogs.servingConfigs.predict" call.
 14244  // Any non-2xx status code is an error. Response headers are in either
 14245  // *GoogleCloudRetailV2PredictResponse.ServerResponse.Header or (if a response
 14246  // was returned at all) in error.(*googleapi.Error).Header. Use
 14247  // googleapi.IsNotModified to check whether the returned error was because
 14248  // http.StatusNotModified was returned.
 14249  func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2PredictResponse, error) {
 14250  	gensupport.SetOptions(c.urlParams_, opts...)
 14251  	res, err := c.doRequest("json")
 14252  	if res != nil && res.StatusCode == http.StatusNotModified {
 14253  		if res.Body != nil {
 14254  			res.Body.Close()
 14255  		}
 14256  		return nil, gensupport.WrapError(&googleapi.Error{
 14257  			Code:   res.StatusCode,
 14258  			Header: res.Header,
 14259  		})
 14260  	}
 14261  	if err != nil {
 14262  		return nil, err
 14263  	}
 14264  	defer googleapi.CloseBody(res)
 14265  	if err := googleapi.CheckResponse(res); err != nil {
 14266  		return nil, gensupport.WrapError(err)
 14267  	}
 14268  	ret := &GoogleCloudRetailV2PredictResponse{
 14269  		ServerResponse: googleapi.ServerResponse{
 14270  			Header:         res.Header,
 14271  			HTTPStatusCode: res.StatusCode,
 14272  		},
 14273  	}
 14274  	target := &ret
 14275  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14276  		return nil, err
 14277  	}
 14278  	return ret, nil
 14279  }
 14280  
 14281  type ProjectsLocationsCatalogsServingConfigsRemoveControlCall struct {
 14282  	s                                       *Service
 14283  	servingConfig                           string
 14284  	googlecloudretailv2removecontrolrequest *GoogleCloudRetailV2RemoveControlRequest
 14285  	urlParams_                              gensupport.URLParams
 14286  	ctx_                                    context.Context
 14287  	header_                                 http.Header
 14288  }
 14289  
 14290  // RemoveControl: Disables a Control on the specified ServingConfig. The
 14291  // control is removed from the ServingConfig. Returns a NOT_FOUND error if the
 14292  // Control is not enabled for the ServingConfig.
 14293  //
 14294  //   - servingConfig: The source ServingConfig resource name . Format:
 14295  //     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/se
 14296  //     rvingConfigs/{serving_config_id}`.
 14297  func (r *ProjectsLocationsCatalogsServingConfigsService) RemoveControl(servingConfig string, googlecloudretailv2removecontrolrequest *GoogleCloudRetailV2RemoveControlRequest) *ProjectsLocationsCatalogsServingConfigsRemoveControlCall {
 14298  	c := &ProjectsLocationsCatalogsServingConfigsRemoveControlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14299  	c.servingConfig = servingConfig
 14300  	c.googlecloudretailv2removecontrolrequest = googlecloudretailv2removecontrolrequest
 14301  	return c
 14302  }
 14303  
 14304  // Fields allows partial responses to be retrieved. See
 14305  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14306  // details.
 14307  func (c *ProjectsLocationsCatalogsServingConfigsRemoveControlCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsRemoveControlCall {
 14308  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14309  	return c
 14310  }
 14311  
 14312  // Context sets the context to be used in this call's Do method.
 14313  func (c *ProjectsLocationsCatalogsServingConfigsRemoveControlCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsRemoveControlCall {
 14314  	c.ctx_ = ctx
 14315  	return c
 14316  }
 14317  
 14318  // Header returns a http.Header that can be modified by the caller to add
 14319  // headers to the request.
 14320  func (c *ProjectsLocationsCatalogsServingConfigsRemoveControlCall) Header() http.Header {
 14321  	if c.header_ == nil {
 14322  		c.header_ = make(http.Header)
 14323  	}
 14324  	return c.header_
 14325  }
 14326  
 14327  func (c *ProjectsLocationsCatalogsServingConfigsRemoveControlCall) doRequest(alt string) (*http.Response, error) {
 14328  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14329  	var body io.Reader = nil
 14330  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2removecontrolrequest)
 14331  	if err != nil {
 14332  		return nil, err
 14333  	}
 14334  	c.urlParams_.Set("alt", alt)
 14335  	c.urlParams_.Set("prettyPrint", "false")
 14336  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+servingConfig}:removeControl")
 14337  	urls += "?" + c.urlParams_.Encode()
 14338  	req, err := http.NewRequest("POST", urls, body)
 14339  	if err != nil {
 14340  		return nil, err
 14341  	}
 14342  	req.Header = reqHeaders
 14343  	googleapi.Expand(req.URL, map[string]string{
 14344  		"servingConfig": c.servingConfig,
 14345  	})
 14346  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14347  }
 14348  
 14349  // Do executes the "retail.projects.locations.catalogs.servingConfigs.removeControl" call.
 14350  // Any non-2xx status code is an error. Response headers are in either
 14351  // *GoogleCloudRetailV2ServingConfig.ServerResponse.Header or (if a response
 14352  // was returned at all) in error.(*googleapi.Error).Header. Use
 14353  // googleapi.IsNotModified to check whether the returned error was because
 14354  // http.StatusNotModified was returned.
 14355  func (c *ProjectsLocationsCatalogsServingConfigsRemoveControlCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2ServingConfig, error) {
 14356  	gensupport.SetOptions(c.urlParams_, opts...)
 14357  	res, err := c.doRequest("json")
 14358  	if res != nil && res.StatusCode == http.StatusNotModified {
 14359  		if res.Body != nil {
 14360  			res.Body.Close()
 14361  		}
 14362  		return nil, gensupport.WrapError(&googleapi.Error{
 14363  			Code:   res.StatusCode,
 14364  			Header: res.Header,
 14365  		})
 14366  	}
 14367  	if err != nil {
 14368  		return nil, err
 14369  	}
 14370  	defer googleapi.CloseBody(res)
 14371  	if err := googleapi.CheckResponse(res); err != nil {
 14372  		return nil, gensupport.WrapError(err)
 14373  	}
 14374  	ret := &GoogleCloudRetailV2ServingConfig{
 14375  		ServerResponse: googleapi.ServerResponse{
 14376  			Header:         res.Header,
 14377  			HTTPStatusCode: res.StatusCode,
 14378  		},
 14379  	}
 14380  	target := &ret
 14381  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14382  		return nil, err
 14383  	}
 14384  	return ret, nil
 14385  }
 14386  
 14387  type ProjectsLocationsCatalogsServingConfigsSearchCall struct {
 14388  	s                                *Service
 14389  	placement                        string
 14390  	googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest
 14391  	urlParams_                       gensupport.URLParams
 14392  	ctx_                             context.Context
 14393  	header_                          http.Header
 14394  }
 14395  
 14396  // Search: Performs a search. This feature is only available for users who have
 14397  // Retail Search enabled. Enable Retail Search on Cloud Console before using
 14398  // this feature.
 14399  //
 14400  //   - placement: The resource name of the Retail Search serving config, such as
 14401  //     `projects/*/locations/global/catalogs/default_catalog/servingConfigs/defaul
 14402  //     t_serving_config` or the name of the legacy placement resource, such as
 14403  //     `projects/*/locations/global/catalogs/default_catalog/placements/default_se
 14404  //     arch`. This field is used to identify the serving config name and the set
 14405  //     of models that are used to make the search.
 14406  func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall {
 14407  	c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14408  	c.placement = placement
 14409  	c.googlecloudretailv2searchrequest = googlecloudretailv2searchrequest
 14410  	return c
 14411  }
 14412  
 14413  // Fields allows partial responses to be retrieved. See
 14414  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14415  // details.
 14416  func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsSearchCall {
 14417  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14418  	return c
 14419  }
 14420  
 14421  // Context sets the context to be used in this call's Do method.
 14422  func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsSearchCall {
 14423  	c.ctx_ = ctx
 14424  	return c
 14425  }
 14426  
 14427  // Header returns a http.Header that can be modified by the caller to add
 14428  // headers to the request.
 14429  func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Header() http.Header {
 14430  	if c.header_ == nil {
 14431  		c.header_ = make(http.Header)
 14432  	}
 14433  	return c.header_
 14434  }
 14435  
 14436  func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) {
 14437  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14438  	var body io.Reader = nil
 14439  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2searchrequest)
 14440  	if err != nil {
 14441  		return nil, err
 14442  	}
 14443  	c.urlParams_.Set("alt", alt)
 14444  	c.urlParams_.Set("prettyPrint", "false")
 14445  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+placement}:search")
 14446  	urls += "?" + c.urlParams_.Encode()
 14447  	req, err := http.NewRequest("POST", urls, body)
 14448  	if err != nil {
 14449  		return nil, err
 14450  	}
 14451  	req.Header = reqHeaders
 14452  	googleapi.Expand(req.URL, map[string]string{
 14453  		"placement": c.placement,
 14454  	})
 14455  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14456  }
 14457  
 14458  // Do executes the "retail.projects.locations.catalogs.servingConfigs.search" call.
 14459  // Any non-2xx status code is an error. Response headers are in either
 14460  // *GoogleCloudRetailV2SearchResponse.ServerResponse.Header or (if a response
 14461  // was returned at all) in error.(*googleapi.Error).Header. Use
 14462  // googleapi.IsNotModified to check whether the returned error was because
 14463  // http.StatusNotModified was returned.
 14464  func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2SearchResponse, error) {
 14465  	gensupport.SetOptions(c.urlParams_, opts...)
 14466  	res, err := c.doRequest("json")
 14467  	if res != nil && res.StatusCode == http.StatusNotModified {
 14468  		if res.Body != nil {
 14469  			res.Body.Close()
 14470  		}
 14471  		return nil, gensupport.WrapError(&googleapi.Error{
 14472  			Code:   res.StatusCode,
 14473  			Header: res.Header,
 14474  		})
 14475  	}
 14476  	if err != nil {
 14477  		return nil, err
 14478  	}
 14479  	defer googleapi.CloseBody(res)
 14480  	if err := googleapi.CheckResponse(res); err != nil {
 14481  		return nil, gensupport.WrapError(err)
 14482  	}
 14483  	ret := &GoogleCloudRetailV2SearchResponse{
 14484  		ServerResponse: googleapi.ServerResponse{
 14485  			Header:         res.Header,
 14486  			HTTPStatusCode: res.StatusCode,
 14487  		},
 14488  	}
 14489  	target := &ret
 14490  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14491  		return nil, err
 14492  	}
 14493  	return ret, nil
 14494  }
 14495  
 14496  // Pages invokes f for each page of results.
 14497  // A non-nil error returned from f will halt the iteration.
 14498  // The provided context supersedes any context provided to the Context method.
 14499  func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2SearchResponse) error) error {
 14500  	c.ctx_ = ctx
 14501  	defer func(pt string) { c.googlecloudretailv2searchrequest.PageToken = pt }(c.googlecloudretailv2searchrequest.PageToken)
 14502  	for {
 14503  		x, err := c.Do()
 14504  		if err != nil {
 14505  			return err
 14506  		}
 14507  		if err := f(x); err != nil {
 14508  			return err
 14509  		}
 14510  		if x.NextPageToken == "" {
 14511  			return nil
 14512  		}
 14513  		c.googlecloudretailv2searchrequest.PageToken = x.NextPageToken
 14514  	}
 14515  }
 14516  
 14517  type ProjectsLocationsCatalogsUserEventsCollectCall struct {
 14518  	s            *Service
 14519  	parent       string
 14520  	urlParams_   gensupport.URLParams
 14521  	ifNoneMatch_ string
 14522  	ctx_         context.Context
 14523  	header_      http.Header
 14524  }
 14525  
 14526  // Collect: Writes a single user event from the browser. This uses a GET
 14527  // request to due to browser restriction of POST-ing to a 3rd party domain.
 14528  // This method is used only by the Retail API JavaScript pixel and Google Tag
 14529  // Manager. Users should not call this method directly.
 14530  //
 14531  //   - parent: The parent catalog name, such as
 14532  //     `projects/1234/locations/global/catalogs/default_catalog`.
 14533  func (r *ProjectsLocationsCatalogsUserEventsService) Collect(parent string) *ProjectsLocationsCatalogsUserEventsCollectCall {
 14534  	c := &ProjectsLocationsCatalogsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14535  	c.parent = parent
 14536  	return c
 14537  }
 14538  
 14539  // Ets sets the optional parameter "ets": The event timestamp in milliseconds.
 14540  // This prevents browser caching of otherwise identical get requests. The name
 14541  // is abbreviated to reduce the payload bytes.
 14542  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCatalogsUserEventsCollectCall {
 14543  	c.urlParams_.Set("ets", fmt.Sprint(ets))
 14544  	return c
 14545  }
 14546  
 14547  // PrebuiltRule sets the optional parameter "prebuiltRule": The prebuilt rule
 14548  // name that can convert a specific type of raw_json. For example: "ga4_bq"
 14549  // rule for the GA4 user event schema.
 14550  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) PrebuiltRule(prebuiltRule string) *ProjectsLocationsCatalogsUserEventsCollectCall {
 14551  	c.urlParams_.Set("prebuiltRule", prebuiltRule)
 14552  	return c
 14553  }
 14554  
 14555  // RawJson sets the optional parameter "rawJson": An arbitrary serialized JSON
 14556  // string that contains necessary information that can comprise a user event.
 14557  // When this field is specified, the user_event field will be ignored. Note:
 14558  // line-delimited JSON is not supported, a single JSON only.
 14559  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) RawJson(rawJson string) *ProjectsLocationsCatalogsUserEventsCollectCall {
 14560  	c.urlParams_.Set("rawJson", rawJson)
 14561  	return c
 14562  }
 14563  
 14564  // Uri sets the optional parameter "uri": The URL including cgi-parameters but
 14565  // excluding the hash fragment with a length limit of 5,000 characters. This is
 14566  // often more useful than the referer URL, because many browsers only send the
 14567  // domain for 3rd party requests.
 14568  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCatalogsUserEventsCollectCall {
 14569  	c.urlParams_.Set("uri", uri)
 14570  	return c
 14571  }
 14572  
 14573  // UserEvent sets the optional parameter "userEvent": Required. URL encoded
 14574  // UserEvent proto with a length limit of 2,000,000 characters.
 14575  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCatalogsUserEventsCollectCall {
 14576  	c.urlParams_.Set("userEvent", userEvent)
 14577  	return c
 14578  }
 14579  
 14580  // Fields allows partial responses to be retrieved. See
 14581  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14582  // details.
 14583  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUserEventsCollectCall {
 14584  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14585  	return c
 14586  }
 14587  
 14588  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14589  // object's ETag matches the given value. This is useful for getting updates
 14590  // only after the object has changed since the last request.
 14591  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsUserEventsCollectCall {
 14592  	c.ifNoneMatch_ = entityTag
 14593  	return c
 14594  }
 14595  
 14596  // Context sets the context to be used in this call's Do method.
 14597  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsCollectCall {
 14598  	c.ctx_ = ctx
 14599  	return c
 14600  }
 14601  
 14602  // Header returns a http.Header that can be modified by the caller to add
 14603  // headers to the request.
 14604  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Header() http.Header {
 14605  	if c.header_ == nil {
 14606  		c.header_ = make(http.Header)
 14607  	}
 14608  	return c.header_
 14609  }
 14610  
 14611  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) doRequest(alt string) (*http.Response, error) {
 14612  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14613  	if c.ifNoneMatch_ != "" {
 14614  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 14615  	}
 14616  	var body io.Reader = nil
 14617  	c.urlParams_.Set("alt", alt)
 14618  	c.urlParams_.Set("prettyPrint", "false")
 14619  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/userEvents:collect")
 14620  	urls += "?" + c.urlParams_.Encode()
 14621  	req, err := http.NewRequest("GET", urls, body)
 14622  	if err != nil {
 14623  		return nil, err
 14624  	}
 14625  	req.Header = reqHeaders
 14626  	googleapi.Expand(req.URL, map[string]string{
 14627  		"parent": c.parent,
 14628  	})
 14629  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14630  }
 14631  
 14632  // Do executes the "retail.projects.locations.catalogs.userEvents.collect" call.
 14633  // Any non-2xx status code is an error. Response headers are in either
 14634  // *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at
 14635  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14636  // check whether the returned error was because http.StatusNotModified was
 14637  // returned.
 14638  func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) {
 14639  	gensupport.SetOptions(c.urlParams_, opts...)
 14640  	res, err := c.doRequest("json")
 14641  	if res != nil && res.StatusCode == http.StatusNotModified {
 14642  		if res.Body != nil {
 14643  			res.Body.Close()
 14644  		}
 14645  		return nil, gensupport.WrapError(&googleapi.Error{
 14646  			Code:   res.StatusCode,
 14647  			Header: res.Header,
 14648  		})
 14649  	}
 14650  	if err != nil {
 14651  		return nil, err
 14652  	}
 14653  	defer googleapi.CloseBody(res)
 14654  	if err := googleapi.CheckResponse(res); err != nil {
 14655  		return nil, gensupport.WrapError(err)
 14656  	}
 14657  	ret := &GoogleApiHttpBody{
 14658  		ServerResponse: googleapi.ServerResponse{
 14659  			Header:         res.Header,
 14660  			HTTPStatusCode: res.StatusCode,
 14661  		},
 14662  	}
 14663  	target := &ret
 14664  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14665  		return nil, err
 14666  	}
 14667  	return ret, nil
 14668  }
 14669  
 14670  type ProjectsLocationsCatalogsUserEventsImportCall struct {
 14671  	s                                          *Service
 14672  	parent                                     string
 14673  	googlecloudretailv2importusereventsrequest *GoogleCloudRetailV2ImportUserEventsRequest
 14674  	urlParams_                                 gensupport.URLParams
 14675  	ctx_                                       context.Context
 14676  	header_                                    http.Header
 14677  }
 14678  
 14679  // Import: Bulk import of User events. Request processing might be synchronous.
 14680  // Events that already exist are skipped. Use this method for backfilling
 14681  // historical user events. `Operation.response` is of type `ImportResponse`.
 14682  // Note that it is possible for a subset of the items to be successfully
 14683  // inserted. `Operation.metadata` is of type `ImportMetadata`.
 14684  //
 14685  // - parent: `projects/1234/locations/global/catalogs/default_catalog`.
 14686  func (r *ProjectsLocationsCatalogsUserEventsService) Import(parent string, googlecloudretailv2importusereventsrequest *GoogleCloudRetailV2ImportUserEventsRequest) *ProjectsLocationsCatalogsUserEventsImportCall {
 14687  	c := &ProjectsLocationsCatalogsUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14688  	c.parent = parent
 14689  	c.googlecloudretailv2importusereventsrequest = googlecloudretailv2importusereventsrequest
 14690  	return c
 14691  }
 14692  
 14693  // Fields allows partial responses to be retrieved. See
 14694  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14695  // details.
 14696  func (c *ProjectsLocationsCatalogsUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUserEventsImportCall {
 14697  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14698  	return c
 14699  }
 14700  
 14701  // Context sets the context to be used in this call's Do method.
 14702  func (c *ProjectsLocationsCatalogsUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsImportCall {
 14703  	c.ctx_ = ctx
 14704  	return c
 14705  }
 14706  
 14707  // Header returns a http.Header that can be modified by the caller to add
 14708  // headers to the request.
 14709  func (c *ProjectsLocationsCatalogsUserEventsImportCall) Header() http.Header {
 14710  	if c.header_ == nil {
 14711  		c.header_ = make(http.Header)
 14712  	}
 14713  	return c.header_
 14714  }
 14715  
 14716  func (c *ProjectsLocationsCatalogsUserEventsImportCall) doRequest(alt string) (*http.Response, error) {
 14717  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14718  	var body io.Reader = nil
 14719  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2importusereventsrequest)
 14720  	if err != nil {
 14721  		return nil, err
 14722  	}
 14723  	c.urlParams_.Set("alt", alt)
 14724  	c.urlParams_.Set("prettyPrint", "false")
 14725  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/userEvents:import")
 14726  	urls += "?" + c.urlParams_.Encode()
 14727  	req, err := http.NewRequest("POST", urls, body)
 14728  	if err != nil {
 14729  		return nil, err
 14730  	}
 14731  	req.Header = reqHeaders
 14732  	googleapi.Expand(req.URL, map[string]string{
 14733  		"parent": c.parent,
 14734  	})
 14735  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14736  }
 14737  
 14738  // Do executes the "retail.projects.locations.catalogs.userEvents.import" call.
 14739  // Any non-2xx status code is an error. Response headers are in either
 14740  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 14741  // returned at all) in error.(*googleapi.Error).Header. Use
 14742  // googleapi.IsNotModified to check whether the returned error was because
 14743  // http.StatusNotModified was returned.
 14744  func (c *ProjectsLocationsCatalogsUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 14745  	gensupport.SetOptions(c.urlParams_, opts...)
 14746  	res, err := c.doRequest("json")
 14747  	if res != nil && res.StatusCode == http.StatusNotModified {
 14748  		if res.Body != nil {
 14749  			res.Body.Close()
 14750  		}
 14751  		return nil, gensupport.WrapError(&googleapi.Error{
 14752  			Code:   res.StatusCode,
 14753  			Header: res.Header,
 14754  		})
 14755  	}
 14756  	if err != nil {
 14757  		return nil, err
 14758  	}
 14759  	defer googleapi.CloseBody(res)
 14760  	if err := googleapi.CheckResponse(res); err != nil {
 14761  		return nil, gensupport.WrapError(err)
 14762  	}
 14763  	ret := &GoogleLongrunningOperation{
 14764  		ServerResponse: googleapi.ServerResponse{
 14765  			Header:         res.Header,
 14766  			HTTPStatusCode: res.StatusCode,
 14767  		},
 14768  	}
 14769  	target := &ret
 14770  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14771  		return nil, err
 14772  	}
 14773  	return ret, nil
 14774  }
 14775  
 14776  type ProjectsLocationsCatalogsUserEventsPurgeCall struct {
 14777  	s                                         *Service
 14778  	parent                                    string
 14779  	googlecloudretailv2purgeusereventsrequest *GoogleCloudRetailV2PurgeUserEventsRequest
 14780  	urlParams_                                gensupport.URLParams
 14781  	ctx_                                      context.Context
 14782  	header_                                   http.Header
 14783  }
 14784  
 14785  // Purge: Deletes permanently all user events specified by the filter provided.
 14786  // Depending on the number of events specified by the filter, this operation
 14787  // could take hours or days to complete. To test a filter, use the list command
 14788  // first.
 14789  //
 14790  //   - parent: The resource name of the catalog under which the events are
 14791  //     created. The format is
 14792  //     `projects/${projectId}/locations/global/catalogs/${catalogId}`.
 14793  func (r *ProjectsLocationsCatalogsUserEventsService) Purge(parent string, googlecloudretailv2purgeusereventsrequest *GoogleCloudRetailV2PurgeUserEventsRequest) *ProjectsLocationsCatalogsUserEventsPurgeCall {
 14794  	c := &ProjectsLocationsCatalogsUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14795  	c.parent = parent
 14796  	c.googlecloudretailv2purgeusereventsrequest = googlecloudretailv2purgeusereventsrequest
 14797  	return c
 14798  }
 14799  
 14800  // Fields allows partial responses to be retrieved. See
 14801  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14802  // details.
 14803  func (c *ProjectsLocationsCatalogsUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUserEventsPurgeCall {
 14804  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14805  	return c
 14806  }
 14807  
 14808  // Context sets the context to be used in this call's Do method.
 14809  func (c *ProjectsLocationsCatalogsUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsPurgeCall {
 14810  	c.ctx_ = ctx
 14811  	return c
 14812  }
 14813  
 14814  // Header returns a http.Header that can be modified by the caller to add
 14815  // headers to the request.
 14816  func (c *ProjectsLocationsCatalogsUserEventsPurgeCall) Header() http.Header {
 14817  	if c.header_ == nil {
 14818  		c.header_ = make(http.Header)
 14819  	}
 14820  	return c.header_
 14821  }
 14822  
 14823  func (c *ProjectsLocationsCatalogsUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) {
 14824  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14825  	var body io.Reader = nil
 14826  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2purgeusereventsrequest)
 14827  	if err != nil {
 14828  		return nil, err
 14829  	}
 14830  	c.urlParams_.Set("alt", alt)
 14831  	c.urlParams_.Set("prettyPrint", "false")
 14832  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/userEvents:purge")
 14833  	urls += "?" + c.urlParams_.Encode()
 14834  	req, err := http.NewRequest("POST", urls, body)
 14835  	if err != nil {
 14836  		return nil, err
 14837  	}
 14838  	req.Header = reqHeaders
 14839  	googleapi.Expand(req.URL, map[string]string{
 14840  		"parent": c.parent,
 14841  	})
 14842  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14843  }
 14844  
 14845  // Do executes the "retail.projects.locations.catalogs.userEvents.purge" call.
 14846  // Any non-2xx status code is an error. Response headers are in either
 14847  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 14848  // returned at all) in error.(*googleapi.Error).Header. Use
 14849  // googleapi.IsNotModified to check whether the returned error was because
 14850  // http.StatusNotModified was returned.
 14851  func (c *ProjectsLocationsCatalogsUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 14852  	gensupport.SetOptions(c.urlParams_, opts...)
 14853  	res, err := c.doRequest("json")
 14854  	if res != nil && res.StatusCode == http.StatusNotModified {
 14855  		if res.Body != nil {
 14856  			res.Body.Close()
 14857  		}
 14858  		return nil, gensupport.WrapError(&googleapi.Error{
 14859  			Code:   res.StatusCode,
 14860  			Header: res.Header,
 14861  		})
 14862  	}
 14863  	if err != nil {
 14864  		return nil, err
 14865  	}
 14866  	defer googleapi.CloseBody(res)
 14867  	if err := googleapi.CheckResponse(res); err != nil {
 14868  		return nil, gensupport.WrapError(err)
 14869  	}
 14870  	ret := &GoogleLongrunningOperation{
 14871  		ServerResponse: googleapi.ServerResponse{
 14872  			Header:         res.Header,
 14873  			HTTPStatusCode: res.StatusCode,
 14874  		},
 14875  	}
 14876  	target := &ret
 14877  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14878  		return nil, err
 14879  	}
 14880  	return ret, nil
 14881  }
 14882  
 14883  type ProjectsLocationsCatalogsUserEventsRejoinCall struct {
 14884  	s                                          *Service
 14885  	parent                                     string
 14886  	googlecloudretailv2rejoinusereventsrequest *GoogleCloudRetailV2RejoinUserEventsRequest
 14887  	urlParams_                                 gensupport.URLParams
 14888  	ctx_                                       context.Context
 14889  	header_                                    http.Header
 14890  }
 14891  
 14892  // Rejoin: Starts a user-event rejoin operation with latest product catalog.
 14893  // Events are not annotated with detailed product information for products that
 14894  // are missing from the catalog when the user event is ingested. These events
 14895  // are stored as unjoined events with limited usage on training and serving.
 14896  // You can use this method to start a join operation on specified events with
 14897  // the latest version of product catalog. You can also use this method to
 14898  // correct events joined with the wrong product catalog. A rejoin operation can
 14899  // take hours or days to complete.
 14900  //
 14901  //   - parent: The parent catalog resource name, such as
 14902  //     `projects/1234/locations/global/catalogs/default_catalog`.
 14903  func (r *ProjectsLocationsCatalogsUserEventsService) Rejoin(parent string, googlecloudretailv2rejoinusereventsrequest *GoogleCloudRetailV2RejoinUserEventsRequest) *ProjectsLocationsCatalogsUserEventsRejoinCall {
 14904  	c := &ProjectsLocationsCatalogsUserEventsRejoinCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14905  	c.parent = parent
 14906  	c.googlecloudretailv2rejoinusereventsrequest = googlecloudretailv2rejoinusereventsrequest
 14907  	return c
 14908  }
 14909  
 14910  // Fields allows partial responses to be retrieved. See
 14911  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14912  // details.
 14913  func (c *ProjectsLocationsCatalogsUserEventsRejoinCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUserEventsRejoinCall {
 14914  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14915  	return c
 14916  }
 14917  
 14918  // Context sets the context to be used in this call's Do method.
 14919  func (c *ProjectsLocationsCatalogsUserEventsRejoinCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsRejoinCall {
 14920  	c.ctx_ = ctx
 14921  	return c
 14922  }
 14923  
 14924  // Header returns a http.Header that can be modified by the caller to add
 14925  // headers to the request.
 14926  func (c *ProjectsLocationsCatalogsUserEventsRejoinCall) Header() http.Header {
 14927  	if c.header_ == nil {
 14928  		c.header_ = make(http.Header)
 14929  	}
 14930  	return c.header_
 14931  }
 14932  
 14933  func (c *ProjectsLocationsCatalogsUserEventsRejoinCall) doRequest(alt string) (*http.Response, error) {
 14934  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14935  	var body io.Reader = nil
 14936  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2rejoinusereventsrequest)
 14937  	if err != nil {
 14938  		return nil, err
 14939  	}
 14940  	c.urlParams_.Set("alt", alt)
 14941  	c.urlParams_.Set("prettyPrint", "false")
 14942  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/userEvents:rejoin")
 14943  	urls += "?" + c.urlParams_.Encode()
 14944  	req, err := http.NewRequest("POST", urls, body)
 14945  	if err != nil {
 14946  		return nil, err
 14947  	}
 14948  	req.Header = reqHeaders
 14949  	googleapi.Expand(req.URL, map[string]string{
 14950  		"parent": c.parent,
 14951  	})
 14952  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14953  }
 14954  
 14955  // Do executes the "retail.projects.locations.catalogs.userEvents.rejoin" call.
 14956  // Any non-2xx status code is an error. Response headers are in either
 14957  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 14958  // returned at all) in error.(*googleapi.Error).Header. Use
 14959  // googleapi.IsNotModified to check whether the returned error was because
 14960  // http.StatusNotModified was returned.
 14961  func (c *ProjectsLocationsCatalogsUserEventsRejoinCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 14962  	gensupport.SetOptions(c.urlParams_, opts...)
 14963  	res, err := c.doRequest("json")
 14964  	if res != nil && res.StatusCode == http.StatusNotModified {
 14965  		if res.Body != nil {
 14966  			res.Body.Close()
 14967  		}
 14968  		return nil, gensupport.WrapError(&googleapi.Error{
 14969  			Code:   res.StatusCode,
 14970  			Header: res.Header,
 14971  		})
 14972  	}
 14973  	if err != nil {
 14974  		return nil, err
 14975  	}
 14976  	defer googleapi.CloseBody(res)
 14977  	if err := googleapi.CheckResponse(res); err != nil {
 14978  		return nil, gensupport.WrapError(err)
 14979  	}
 14980  	ret := &GoogleLongrunningOperation{
 14981  		ServerResponse: googleapi.ServerResponse{
 14982  			Header:         res.Header,
 14983  			HTTPStatusCode: res.StatusCode,
 14984  		},
 14985  	}
 14986  	target := &ret
 14987  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14988  		return nil, err
 14989  	}
 14990  	return ret, nil
 14991  }
 14992  
 14993  type ProjectsLocationsCatalogsUserEventsWriteCall struct {
 14994  	s                            *Service
 14995  	parent                       string
 14996  	googlecloudretailv2userevent *GoogleCloudRetailV2UserEvent
 14997  	urlParams_                   gensupport.URLParams
 14998  	ctx_                         context.Context
 14999  	header_                      http.Header
 15000  }
 15001  
 15002  // Write: Writes a single user event.
 15003  //
 15004  //   - parent: The parent catalog resource name, such as
 15005  //     `projects/1234/locations/global/catalogs/default_catalog`.
 15006  func (r *ProjectsLocationsCatalogsUserEventsService) Write(parent string, googlecloudretailv2userevent *GoogleCloudRetailV2UserEvent) *ProjectsLocationsCatalogsUserEventsWriteCall {
 15007  	c := &ProjectsLocationsCatalogsUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15008  	c.parent = parent
 15009  	c.googlecloudretailv2userevent = googlecloudretailv2userevent
 15010  	return c
 15011  }
 15012  
 15013  // WriteAsync sets the optional parameter "writeAsync": If set to true, the
 15014  // user event will be written asynchronously after validation, and the API will
 15015  // respond without waiting for the write. Therefore, silent failures can occur
 15016  // even if the API returns success. In case of silent failures, error messages
 15017  // can be found in Stackdriver logs.
 15018  func (c *ProjectsLocationsCatalogsUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCatalogsUserEventsWriteCall {
 15019  	c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync))
 15020  	return c
 15021  }
 15022  
 15023  // Fields allows partial responses to be retrieved. See
 15024  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15025  // details.
 15026  func (c *ProjectsLocationsCatalogsUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUserEventsWriteCall {
 15027  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15028  	return c
 15029  }
 15030  
 15031  // Context sets the context to be used in this call's Do method.
 15032  func (c *ProjectsLocationsCatalogsUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsWriteCall {
 15033  	c.ctx_ = ctx
 15034  	return c
 15035  }
 15036  
 15037  // Header returns a http.Header that can be modified by the caller to add
 15038  // headers to the request.
 15039  func (c *ProjectsLocationsCatalogsUserEventsWriteCall) Header() http.Header {
 15040  	if c.header_ == nil {
 15041  		c.header_ = make(http.Header)
 15042  	}
 15043  	return c.header_
 15044  }
 15045  
 15046  func (c *ProjectsLocationsCatalogsUserEventsWriteCall) doRequest(alt string) (*http.Response, error) {
 15047  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 15048  	var body io.Reader = nil
 15049  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2userevent)
 15050  	if err != nil {
 15051  		return nil, err
 15052  	}
 15053  	c.urlParams_.Set("alt", alt)
 15054  	c.urlParams_.Set("prettyPrint", "false")
 15055  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/userEvents:write")
 15056  	urls += "?" + c.urlParams_.Encode()
 15057  	req, err := http.NewRequest("POST", urls, body)
 15058  	if err != nil {
 15059  		return nil, err
 15060  	}
 15061  	req.Header = reqHeaders
 15062  	googleapi.Expand(req.URL, map[string]string{
 15063  		"parent": c.parent,
 15064  	})
 15065  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15066  }
 15067  
 15068  // Do executes the "retail.projects.locations.catalogs.userEvents.write" call.
 15069  // Any non-2xx status code is an error. Response headers are in either
 15070  // *GoogleCloudRetailV2UserEvent.ServerResponse.Header or (if a response was
 15071  // returned at all) in error.(*googleapi.Error).Header. Use
 15072  // googleapi.IsNotModified to check whether the returned error was because
 15073  // http.StatusNotModified was returned.
 15074  func (c *ProjectsLocationsCatalogsUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2UserEvent, error) {
 15075  	gensupport.SetOptions(c.urlParams_, opts...)
 15076  	res, err := c.doRequest("json")
 15077  	if res != nil && res.StatusCode == http.StatusNotModified {
 15078  		if res.Body != nil {
 15079  			res.Body.Close()
 15080  		}
 15081  		return nil, gensupport.WrapError(&googleapi.Error{
 15082  			Code:   res.StatusCode,
 15083  			Header: res.Header,
 15084  		})
 15085  	}
 15086  	if err != nil {
 15087  		return nil, err
 15088  	}
 15089  	defer googleapi.CloseBody(res)
 15090  	if err := googleapi.CheckResponse(res); err != nil {
 15091  		return nil, gensupport.WrapError(err)
 15092  	}
 15093  	ret := &GoogleCloudRetailV2UserEvent{
 15094  		ServerResponse: googleapi.ServerResponse{
 15095  			Header:         res.Header,
 15096  			HTTPStatusCode: res.StatusCode,
 15097  		},
 15098  	}
 15099  	target := &ret
 15100  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15101  		return nil, err
 15102  	}
 15103  	return ret, nil
 15104  }
 15105  
 15106  type ProjectsLocationsOperationsGetCall struct {
 15107  	s            *Service
 15108  	name         string
 15109  	urlParams_   gensupport.URLParams
 15110  	ifNoneMatch_ string
 15111  	ctx_         context.Context
 15112  	header_      http.Header
 15113  }
 15114  
 15115  // Get: Gets the latest state of a long-running operation. Clients can use this
 15116  // method to poll the operation result at intervals as recommended by the API
 15117  // service.
 15118  //
 15119  // - name: The name of the operation resource.
 15120  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
 15121  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15122  	c.name = name
 15123  	return c
 15124  }
 15125  
 15126  // Fields allows partial responses to be retrieved. See
 15127  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15128  // details.
 15129  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
 15130  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15131  	return c
 15132  }
 15133  
 15134  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15135  // object's ETag matches the given value. This is useful for getting updates
 15136  // only after the object has changed since the last request.
 15137  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
 15138  	c.ifNoneMatch_ = entityTag
 15139  	return c
 15140  }
 15141  
 15142  // Context sets the context to be used in this call's Do method.
 15143  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
 15144  	c.ctx_ = ctx
 15145  	return c
 15146  }
 15147  
 15148  // Header returns a http.Header that can be modified by the caller to add
 15149  // headers to the request.
 15150  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
 15151  	if c.header_ == nil {
 15152  		c.header_ = make(http.Header)
 15153  	}
 15154  	return c.header_
 15155  }
 15156  
 15157  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 15158  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15159  	if c.ifNoneMatch_ != "" {
 15160  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15161  	}
 15162  	var body io.Reader = nil
 15163  	c.urlParams_.Set("alt", alt)
 15164  	c.urlParams_.Set("prettyPrint", "false")
 15165  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 15166  	urls += "?" + c.urlParams_.Encode()
 15167  	req, err := http.NewRequest("GET", urls, body)
 15168  	if err != nil {
 15169  		return nil, err
 15170  	}
 15171  	req.Header = reqHeaders
 15172  	googleapi.Expand(req.URL, map[string]string{
 15173  		"name": c.name,
 15174  	})
 15175  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15176  }
 15177  
 15178  // Do executes the "retail.projects.locations.operations.get" call.
 15179  // Any non-2xx status code is an error. Response headers are in either
 15180  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 15181  // returned at all) in error.(*googleapi.Error).Header. Use
 15182  // googleapi.IsNotModified to check whether the returned error was because
 15183  // http.StatusNotModified was returned.
 15184  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 15185  	gensupport.SetOptions(c.urlParams_, opts...)
 15186  	res, err := c.doRequest("json")
 15187  	if res != nil && res.StatusCode == http.StatusNotModified {
 15188  		if res.Body != nil {
 15189  			res.Body.Close()
 15190  		}
 15191  		return nil, gensupport.WrapError(&googleapi.Error{
 15192  			Code:   res.StatusCode,
 15193  			Header: res.Header,
 15194  		})
 15195  	}
 15196  	if err != nil {
 15197  		return nil, err
 15198  	}
 15199  	defer googleapi.CloseBody(res)
 15200  	if err := googleapi.CheckResponse(res); err != nil {
 15201  		return nil, gensupport.WrapError(err)
 15202  	}
 15203  	ret := &GoogleLongrunningOperation{
 15204  		ServerResponse: googleapi.ServerResponse{
 15205  			Header:         res.Header,
 15206  			HTTPStatusCode: res.StatusCode,
 15207  		},
 15208  	}
 15209  	target := &ret
 15210  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15211  		return nil, err
 15212  	}
 15213  	return ret, nil
 15214  }
 15215  
 15216  type ProjectsLocationsOperationsListCall struct {
 15217  	s            *Service
 15218  	name         string
 15219  	urlParams_   gensupport.URLParams
 15220  	ifNoneMatch_ string
 15221  	ctx_         context.Context
 15222  	header_      http.Header
 15223  }
 15224  
 15225  // List: Lists operations that match the specified filter in the request. If
 15226  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
 15227  //
 15228  // - name: The name of the operation's parent resource.
 15229  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
 15230  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15231  	c.name = name
 15232  	return c
 15233  }
 15234  
 15235  // Filter sets the optional parameter "filter": The standard list filter.
 15236  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
 15237  	c.urlParams_.Set("filter", filter)
 15238  	return c
 15239  }
 15240  
 15241  // PageSize sets the optional parameter "pageSize": The standard list page
 15242  // size.
 15243  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
 15244  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 15245  	return c
 15246  }
 15247  
 15248  // PageToken sets the optional parameter "pageToken": The standard list page
 15249  // token.
 15250  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
 15251  	c.urlParams_.Set("pageToken", pageToken)
 15252  	return c
 15253  }
 15254  
 15255  // Fields allows partial responses to be retrieved. See
 15256  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15257  // details.
 15258  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
 15259  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15260  	return c
 15261  }
 15262  
 15263  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15264  // object's ETag matches the given value. This is useful for getting updates
 15265  // only after the object has changed since the last request.
 15266  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
 15267  	c.ifNoneMatch_ = entityTag
 15268  	return c
 15269  }
 15270  
 15271  // Context sets the context to be used in this call's Do method.
 15272  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
 15273  	c.ctx_ = ctx
 15274  	return c
 15275  }
 15276  
 15277  // Header returns a http.Header that can be modified by the caller to add
 15278  // headers to the request.
 15279  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
 15280  	if c.header_ == nil {
 15281  		c.header_ = make(http.Header)
 15282  	}
 15283  	return c.header_
 15284  }
 15285  
 15286  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 15287  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15288  	if c.ifNoneMatch_ != "" {
 15289  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15290  	}
 15291  	var body io.Reader = nil
 15292  	c.urlParams_.Set("alt", alt)
 15293  	c.urlParams_.Set("prettyPrint", "false")
 15294  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
 15295  	urls += "?" + c.urlParams_.Encode()
 15296  	req, err := http.NewRequest("GET", urls, body)
 15297  	if err != nil {
 15298  		return nil, err
 15299  	}
 15300  	req.Header = reqHeaders
 15301  	googleapi.Expand(req.URL, map[string]string{
 15302  		"name": c.name,
 15303  	})
 15304  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15305  }
 15306  
 15307  // Do executes the "retail.projects.locations.operations.list" call.
 15308  // Any non-2xx status code is an error. Response headers are in either
 15309  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
 15310  // response was returned at all) in error.(*googleapi.Error).Header. Use
 15311  // googleapi.IsNotModified to check whether the returned error was because
 15312  // http.StatusNotModified was returned.
 15313  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
 15314  	gensupport.SetOptions(c.urlParams_, opts...)
 15315  	res, err := c.doRequest("json")
 15316  	if res != nil && res.StatusCode == http.StatusNotModified {
 15317  		if res.Body != nil {
 15318  			res.Body.Close()
 15319  		}
 15320  		return nil, gensupport.WrapError(&googleapi.Error{
 15321  			Code:   res.StatusCode,
 15322  			Header: res.Header,
 15323  		})
 15324  	}
 15325  	if err != nil {
 15326  		return nil, err
 15327  	}
 15328  	defer googleapi.CloseBody(res)
 15329  	if err := googleapi.CheckResponse(res); err != nil {
 15330  		return nil, gensupport.WrapError(err)
 15331  	}
 15332  	ret := &GoogleLongrunningListOperationsResponse{
 15333  		ServerResponse: googleapi.ServerResponse{
 15334  			Header:         res.Header,
 15335  			HTTPStatusCode: res.StatusCode,
 15336  		},
 15337  	}
 15338  	target := &ret
 15339  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15340  		return nil, err
 15341  	}
 15342  	return ret, nil
 15343  }
 15344  
 15345  // Pages invokes f for each page of results.
 15346  // A non-nil error returned from f will halt the iteration.
 15347  // The provided context supersedes any context provided to the Context method.
 15348  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
 15349  	c.ctx_ = ctx
 15350  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 15351  	for {
 15352  		x, err := c.Do()
 15353  		if err != nil {
 15354  			return err
 15355  		}
 15356  		if err := f(x); err != nil {
 15357  			return err
 15358  		}
 15359  		if x.NextPageToken == "" {
 15360  			return nil
 15361  		}
 15362  		c.PageToken(x.NextPageToken)
 15363  	}
 15364  }
 15365  
 15366  type ProjectsOperationsGetCall struct {
 15367  	s            *Service
 15368  	name         string
 15369  	urlParams_   gensupport.URLParams
 15370  	ifNoneMatch_ string
 15371  	ctx_         context.Context
 15372  	header_      http.Header
 15373  }
 15374  
 15375  // Get: Gets the latest state of a long-running operation. Clients can use this
 15376  // method to poll the operation result at intervals as recommended by the API
 15377  // service.
 15378  //
 15379  // - name: The name of the operation resource.
 15380  func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
 15381  	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15382  	c.name = name
 15383  	return c
 15384  }
 15385  
 15386  // Fields allows partial responses to be retrieved. See
 15387  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15388  // details.
 15389  func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
 15390  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15391  	return c
 15392  }
 15393  
 15394  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15395  // object's ETag matches the given value. This is useful for getting updates
 15396  // only after the object has changed since the last request.
 15397  func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
 15398  	c.ifNoneMatch_ = entityTag
 15399  	return c
 15400  }
 15401  
 15402  // Context sets the context to be used in this call's Do method.
 15403  func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
 15404  	c.ctx_ = ctx
 15405  	return c
 15406  }
 15407  
 15408  // Header returns a http.Header that can be modified by the caller to add
 15409  // headers to the request.
 15410  func (c *ProjectsOperationsGetCall) Header() http.Header {
 15411  	if c.header_ == nil {
 15412  		c.header_ = make(http.Header)
 15413  	}
 15414  	return c.header_
 15415  }
 15416  
 15417  func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 15418  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15419  	if c.ifNoneMatch_ != "" {
 15420  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15421  	}
 15422  	var body io.Reader = nil
 15423  	c.urlParams_.Set("alt", alt)
 15424  	c.urlParams_.Set("prettyPrint", "false")
 15425  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 15426  	urls += "?" + c.urlParams_.Encode()
 15427  	req, err := http.NewRequest("GET", urls, body)
 15428  	if err != nil {
 15429  		return nil, err
 15430  	}
 15431  	req.Header = reqHeaders
 15432  	googleapi.Expand(req.URL, map[string]string{
 15433  		"name": c.name,
 15434  	})
 15435  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15436  }
 15437  
 15438  // Do executes the "retail.projects.operations.get" call.
 15439  // Any non-2xx status code is an error. Response headers are in either
 15440  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 15441  // returned at all) in error.(*googleapi.Error).Header. Use
 15442  // googleapi.IsNotModified to check whether the returned error was because
 15443  // http.StatusNotModified was returned.
 15444  func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 15445  	gensupport.SetOptions(c.urlParams_, opts...)
 15446  	res, err := c.doRequest("json")
 15447  	if res != nil && res.StatusCode == http.StatusNotModified {
 15448  		if res.Body != nil {
 15449  			res.Body.Close()
 15450  		}
 15451  		return nil, gensupport.WrapError(&googleapi.Error{
 15452  			Code:   res.StatusCode,
 15453  			Header: res.Header,
 15454  		})
 15455  	}
 15456  	if err != nil {
 15457  		return nil, err
 15458  	}
 15459  	defer googleapi.CloseBody(res)
 15460  	if err := googleapi.CheckResponse(res); err != nil {
 15461  		return nil, gensupport.WrapError(err)
 15462  	}
 15463  	ret := &GoogleLongrunningOperation{
 15464  		ServerResponse: googleapi.ServerResponse{
 15465  			Header:         res.Header,
 15466  			HTTPStatusCode: res.StatusCode,
 15467  		},
 15468  	}
 15469  	target := &ret
 15470  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15471  		return nil, err
 15472  	}
 15473  	return ret, nil
 15474  }
 15475  
 15476  type ProjectsOperationsListCall struct {
 15477  	s            *Service
 15478  	name         string
 15479  	urlParams_   gensupport.URLParams
 15480  	ifNoneMatch_ string
 15481  	ctx_         context.Context
 15482  	header_      http.Header
 15483  }
 15484  
 15485  // List: Lists operations that match the specified filter in the request. If
 15486  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
 15487  //
 15488  // - name: The name of the operation's parent resource.
 15489  func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall {
 15490  	c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15491  	c.name = name
 15492  	return c
 15493  }
 15494  
 15495  // Filter sets the optional parameter "filter": The standard list filter.
 15496  func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall {
 15497  	c.urlParams_.Set("filter", filter)
 15498  	return c
 15499  }
 15500  
 15501  // PageSize sets the optional parameter "pageSize": The standard list page
 15502  // size.
 15503  func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall {
 15504  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 15505  	return c
 15506  }
 15507  
 15508  // PageToken sets the optional parameter "pageToken": The standard list page
 15509  // token.
 15510  func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall {
 15511  	c.urlParams_.Set("pageToken", pageToken)
 15512  	return c
 15513  }
 15514  
 15515  // Fields allows partial responses to be retrieved. See
 15516  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15517  // details.
 15518  func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall {
 15519  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15520  	return c
 15521  }
 15522  
 15523  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15524  // object's ETag matches the given value. This is useful for getting updates
 15525  // only after the object has changed since the last request.
 15526  func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall {
 15527  	c.ifNoneMatch_ = entityTag
 15528  	return c
 15529  }
 15530  
 15531  // Context sets the context to be used in this call's Do method.
 15532  func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall {
 15533  	c.ctx_ = ctx
 15534  	return c
 15535  }
 15536  
 15537  // Header returns a http.Header that can be modified by the caller to add
 15538  // headers to the request.
 15539  func (c *ProjectsOperationsListCall) Header() http.Header {
 15540  	if c.header_ == nil {
 15541  		c.header_ = make(http.Header)
 15542  	}
 15543  	return c.header_
 15544  }
 15545  
 15546  func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 15547  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15548  	if c.ifNoneMatch_ != "" {
 15549  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15550  	}
 15551  	var body io.Reader = nil
 15552  	c.urlParams_.Set("alt", alt)
 15553  	c.urlParams_.Set("prettyPrint", "false")
 15554  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
 15555  	urls += "?" + c.urlParams_.Encode()
 15556  	req, err := http.NewRequest("GET", urls, body)
 15557  	if err != nil {
 15558  		return nil, err
 15559  	}
 15560  	req.Header = reqHeaders
 15561  	googleapi.Expand(req.URL, map[string]string{
 15562  		"name": c.name,
 15563  	})
 15564  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15565  }
 15566  
 15567  // Do executes the "retail.projects.operations.list" call.
 15568  // Any non-2xx status code is an error. Response headers are in either
 15569  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
 15570  // response was returned at all) in error.(*googleapi.Error).Header. Use
 15571  // googleapi.IsNotModified to check whether the returned error was because
 15572  // http.StatusNotModified was returned.
 15573  func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
 15574  	gensupport.SetOptions(c.urlParams_, opts...)
 15575  	res, err := c.doRequest("json")
 15576  	if res != nil && res.StatusCode == http.StatusNotModified {
 15577  		if res.Body != nil {
 15578  			res.Body.Close()
 15579  		}
 15580  		return nil, gensupport.WrapError(&googleapi.Error{
 15581  			Code:   res.StatusCode,
 15582  			Header: res.Header,
 15583  		})
 15584  	}
 15585  	if err != nil {
 15586  		return nil, err
 15587  	}
 15588  	defer googleapi.CloseBody(res)
 15589  	if err := googleapi.CheckResponse(res); err != nil {
 15590  		return nil, gensupport.WrapError(err)
 15591  	}
 15592  	ret := &GoogleLongrunningListOperationsResponse{
 15593  		ServerResponse: googleapi.ServerResponse{
 15594  			Header:         res.Header,
 15595  			HTTPStatusCode: res.StatusCode,
 15596  		},
 15597  	}
 15598  	target := &ret
 15599  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15600  		return nil, err
 15601  	}
 15602  	return ret, nil
 15603  }
 15604  
 15605  // Pages invokes f for each page of results.
 15606  // A non-nil error returned from f will halt the iteration.
 15607  // The provided context supersedes any context provided to the Context method.
 15608  func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
 15609  	c.ctx_ = ctx
 15610  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 15611  	for {
 15612  		x, err := c.Do()
 15613  		if err != nil {
 15614  			return err
 15615  		}
 15616  		if err := f(x); err != nil {
 15617  			return err
 15618  		}
 15619  		if x.NextPageToken == "" {
 15620  			return nil
 15621  		}
 15622  		c.PageToken(x.NextPageToken)
 15623  	}
 15624  }
 15625  

View as plain text