UNPKG

googleapis

Version:
1,000 lines (999 loc) 368 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace retail_v2 { export interface Options extends GlobalOptions { version: 'v2'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Retail API * * Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud. * * @example * ```js * const {google} = require('googleapis'); * const retail = google.retail('v2'); * ``` */ export class Retail { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; \} service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); \} Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); \} Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. */ export interface Schema$GoogleApiHttpBody { /** * The HTTP Content-Type header value specifying the content type of the body. */ contentType?: string | null; /** * The HTTP request/response body as raw binary. */ data?: string | null; /** * Application specific response metadata. Must be set in the first response for streaming APIs. */ extensions?: Array<{ [key: string]: any; }> | null; } /** * A description of the context in which an error occurred. */ export interface Schema$GoogleCloudRetailLoggingErrorContext { /** * The HTTP request which was processed when the error was triggered. */ httpRequest?: Schema$GoogleCloudRetailLoggingHttpRequestContext; /** * The location in the source code where the decision was made to report the error, usually the place where it was logged. */ reportLocation?: Schema$GoogleCloudRetailLoggingSourceLocation; } /** * An error log which is reported to the Error Reporting system. This proto a superset of google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent. */ export interface Schema$GoogleCloudRetailLoggingErrorLog { /** * A description of the context in which the error occurred. */ context?: Schema$GoogleCloudRetailLoggingErrorContext; /** * The error payload that is populated on LRO import APIs. */ importPayload?: Schema$GoogleCloudRetailLoggingImportErrorContext; /** * A message describing the error. */ message?: string | null; /** * The API request payload, represented as a protocol buffer. Most API request types are supported. For example: "type.googleapis.com/google.cloud.retail.v2.ProductService.CreateProductRequest" "type.googleapis.com/google.cloud.retail.v2.UserEventService.WriteUserEventRequest" */ requestPayload?: { [key: string]: any; } | null; /** * The API response payload, represented as a protocol buffer. This is used to log some "soft errors", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported and no PII is included: "google.cloud.retail.v2.PredictionService.Predict" "google.cloud.retail.v2.UserEventService.WriteUserEvent" "google.cloud.retail.v2.UserEventService.CollectUserEvent" */ responsePayload?: { [key: string]: any; } | null; /** * The service context in which this error has occurred. */ serviceContext?: Schema$GoogleCloudRetailLoggingServiceContext; /** * The RPC status associated with the error log. */ status?: Schema$GoogleRpcStatus; } /** * HTTP request data that is related to a reported error. */ export interface Schema$GoogleCloudRetailLoggingHttpRequestContext { /** * The HTTP response status code for the request. */ responseStatusCode?: number | null; } /** * The error payload that is populated on LRO import APIs, including "google.cloud.retail.v2.ProductService.ImportProducts" and "google.cloud.retail.v2.EventService.ImportUserEvents". */ export interface Schema$GoogleCloudRetailLoggingImportErrorContext { /** * The detailed content which caused the error on importing a catalog item. */ catalogItem?: string | null; /** * Cloud Storage file path of the import source. Can be set for batch operation error. */ gcsPath?: string | null; /** * Line number of the content in file. Should be empty for permission or batch operation error. */ lineNumber?: string | null; /** * The operation resource name of the LRO. */ operationName?: string | null; /** * The detailed content which caused the error on importing a product. */ product?: string | null; /** * The detailed content which caused the error on importing a user event. */ userEvent?: string | null; } /** * Describes a running service that sends errors. */ export interface Schema$GoogleCloudRetailLoggingServiceContext { /** * An identifier of the service. For example, "retail.googleapis.com". */ service?: string | null; } /** * Indicates a location in the source code of the service for which errors are reported. */ export interface Schema$GoogleCloudRetailLoggingSourceLocation { /** * Human-readable name of a function or method. For example, "google.cloud.retail.v2.UserEventService.ImportUserEvents". */ functionName?: string | null; } /** * Request for CatalogService.AddCatalogAttribute method. */ export interface Schema$GoogleCloudRetailV2AddCatalogAttributeRequest { /** * Required. The CatalogAttribute to add. */ catalogAttribute?: Schema$GoogleCloudRetailV2CatalogAttribute; } /** * Request for AddControl method. */ export interface Schema$GoogleCloudRetailV2AddControlRequest { /** * Required. The id of the control to apply. Assumed to be in the same catalog as the serving config - if id is not found a NOT_FOUND error is returned. */ controlId?: string | null; } /** * Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2AddFulfillmentPlacesMetadata { } /** * Request message for ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2AddFulfillmentPlacesRequest { /** * The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used. */ addTime?: string | null; /** * If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found. */ allowMissing?: boolean | null; /** * Required. The IDs for this type, such as the store IDs for "pickup-in-store" or the region IDs for "same-day-delivery" to be added for this type. Duplicate IDs will be automatically ignored. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. If the total number of place IDs exceeds 2000 for this type after adding, then the update will be rejected. */ placeIds?: string[] | null; /** * Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type. */ type?: string | null; } /** * Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2AddFulfillmentPlacesResponse { } /** * Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2AddLocalInventoriesMetadata { } /** * Request message for ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2AddLocalInventoriesRequest { /** * Indicates which inventory fields in the provided list of LocalInventory to update. The field is updated to the provided value. If a field is set while the place does not have a previous local inventory, the local inventory at that store is created. If a field is set while the value of that field is not provided, the original field value, if it exists, is deleted. If the mask is not set or set with empty paths, all inventory fields will be updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored. */ addMask?: string | null; /** * The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used. */ addTime?: string | null; /** * If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found. */ allowMissing?: boolean | null; /** * Required. A list of inventory information at difference places. Each place is identified by its place ID. At most 3000 inventories are allowed per request. */ localInventories?: Schema$GoogleCloudRetailV2LocalInventory[]; } /** * Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2AddLocalInventoriesResponse { } /** * Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata { } /** * Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse { } /** * Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2alphaAddLocalInventoriesMetadata { } /** * Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2alphaAddLocalInventoriesResponse { } /** * A BigQuery output result. */ export interface Schema$GoogleCloudRetailV2alphaBigQueryOutputResult { /** * The ID of a BigQuery Dataset. */ datasetId?: string | null; /** * The ID of a BigQuery Table. */ tableId?: string | null; } /** * Common metadata related to the progress of the operations. */ export interface Schema$GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata { /** * Operation create time. */ createTime?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Metadata associated with a create operation. */ export interface Schema$GoogleCloudRetailV2alphaCreateModelMetadata { /** * The resource name of the model that this create applies to. Format: `projects/{project_number\}/locations/{location_id\}/catalogs/{catalog_id\}/models/{model_id\}` */ model?: string | null; } /** * Metadata related to the EnrollSolution method. This will be returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudRetailV2alphaEnrollSolutionMetadata { } /** * Response for EnrollSolution method. */ export interface Schema$GoogleCloudRetailV2alphaEnrollSolutionResponse { /** * Retail API solution that the project has enrolled. */ enrolledSolution?: string | null; } /** * Configuration of destination for Export related errors. */ export interface Schema$GoogleCloudRetailV2alphaExportErrorsConfig { /** * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string | null; } /** * Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudRetailV2alphaExportMetadata { /** * Operation create time. */ createTime?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudRetailV2alphaExportProductsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * This field is never set. */ errorsConfig?: Schema$GoogleCloudRetailV2alphaExportErrorsConfig; /** * Output result indicating where the data were exported to. */ outputResult?: Schema$GoogleCloudRetailV2alphaOutputResult; } /** * Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudRetailV2alphaExportUserEventsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * This field is never set. */ errorsConfig?: Schema$GoogleCloudRetailV2alphaExportErrorsConfig; /** * Output result indicating where the data were exported to. */ outputResult?: Schema$GoogleCloudRetailV2alphaOutputResult; } /** * A Gcs output result. */ export interface Schema$GoogleCloudRetailV2alphaGcsOutputResult { /** * The uri of Gcs output */ outputUri?: string | null; } /** * Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful. */ export interface Schema$GoogleCloudRetailV2alphaImportCompletionDataResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; } /** * Configuration of destination for Import related errors. */ export interface Schema$GoogleCloudRetailV2alphaImportErrorsConfig { /** * Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string | null; } /** * Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudRetailV2alphaImportMetadata { /** * Operation create time. */ createTime?: string | null; /** * Count of entries that encountered errors while processing. */ failureCount?: string | null; /** * Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project\}/topics/{topic\}`. */ notificationPubsubTopic?: string | null; /** * Deprecated. This field is never set. */ requestId?: string | null; /** * Count of entries that were processed successfully. */ successCount?: string | null; /** * Metadata related to transform user events. */ transformedUserEventsMetadata?: Schema$GoogleCloudRetailV2alphaTransformedUserEventsMetadata; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudRetailV2alphaImportProductsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * Echoes the destination for the complete errors in the request if set. */ errorsConfig?: Schema$GoogleCloudRetailV2alphaImportErrorsConfig; } /** * Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudRetailV2alphaImportUserEventsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * Echoes the destination for the complete errors if this field was set in the request. */ errorsConfig?: Schema$GoogleCloudRetailV2alphaImportErrorsConfig; /** * Aggregated statistics of user event import status. */ importSummary?: Schema$GoogleCloudRetailV2alphaUserEventImportSummary; } /** * Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch. */ export interface Schema$GoogleCloudRetailV2alphaMerchantCenterAccountLink { /** * Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID. */ branchId?: string | null; /** * Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds. */ feedFilters?: Schema$GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter[]; /** * The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`. */ feedLabel?: string | null; /** * Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/x/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`. */ id?: string | null; /** * Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`. */ languageCode?: string | null; /** * Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA. */ merchantCenterAccountId?: string | null; /** * Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/x/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`. */ name?: string | null; /** * Output only. Google Cloud project ID. */ projectId?: string | null; /** * Optional. An optional arbitrary string that could be used as a tag for tracking link source. */ source?: string | null; /** * Output only. Represents the state of the link. */ state?: string | null; } /** * Merchant Center Feed filter criterion. */ export interface Schema$GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter { /** * Merchant Center primary feed ID. */ primaryFeedId?: string | null; /** * Merchant Center primary feed name. The name is used for the display purposes only. */ primaryFeedName?: string | null; } /** * Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API. */ export interface Schema$GoogleCloudRetailV2alphaModel { /** * Output only. Timestamp the Recommendation Model was created at. */ createTime?: string | null; /** * Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training. */ dataState?: string | null; /** * Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters. */ displayName?: string | null; /** * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model. */ filteringOption?: string | null; /** * Output only. The timestamp when the latest successful tune finished. */ lastTuneTime?: string | null; /** * Optional. Additional model features config. */ modelFeaturesConfig?: Schema$GoogleCloudRetailV2alphaModelModelFeaturesConfig; /** * Required. The fully qualified resource name of the model. Format: `projects/{project_number\}/locations/{location_id\}/catalogs/{catalog_id\}/models/{model_id\}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40. */ name?: string | null; /** * Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` =\> `ctr` `others-you-may-like` =\> `ctr` `frequently-bought-together` =\> `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs. */ optimizationObjective?: string | null; /** * Optional. The page optimization config. */ pageOptimizationConfig?: Schema$GoogleCloudRetailV2alphaModelPageOptimizationConfig; /** * Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`. */ periodicTuningState?: string | null; /** * Output only. The list of valid serving configs associated with the PageOptimizationConfig. */ servingConfigLists?: Schema$GoogleCloudRetailV2alphaModelServingConfigList[]; /** * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`. */ servingState?: string | null; /** * Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before. */ trainingState?: string | null; /** * Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on. */ tuningOperation?: string | null; /** * Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs. */ type?: string | null; /** * Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated. */ updateTime?: string | null; } /** * Additional configs for the frequently-bought-together model type. */ export interface Schema$GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig { /** * Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS. */ contextProductsType?: string | null; } /** * Additional model features config. */ export interface Schema$GoogleCloudRetailV2alphaModelModelFeaturesConfig { /** * Additional configs for frequently-bought-together models. */ frequentlyBoughtTogetherConfig?: Schema$GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig; } /** * The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configs to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey. */ export interface Schema$GoogleCloudRetailV2alphaModelPageOptimizationConfig { /** * Required. The type of UserEvent this page optimization is shown for. Each page has an associated event type - this will be the corresponding event type for the page that the page optimization model is used on. Supported types: * `add-to-cart`: Products being added to cart. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed * `category-page-view`: Homepage viewed * `shopping-cart-page-view`: User viewing a shopping cart. `home-page-view` only allows models with type `recommended-for-you`. All other page_optimization_event_type allow all Model.types. */ pageOptimizationEventType?: string | null; /** * Required. A list of panel configurations. Limit = 5. */ panels?: Schema$GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel[]; /** * Optional. How to restrict results across panels e.g. can the same ServingConfig be shown on multiple panels at once. If unspecified, default to `UNIQUE_MODEL_RESTRICTION`. */ restriction?: string | null; } /** * A candidate to consider for a given panel. Currently only ServingConfig are valid candidates. */ export interface Schema$GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate { /** * This has to be a valid ServingConfig identifier. For example, for a ServingConfig with full name: `projects/x/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`, this would be `my_candidate_config`. */ servingConfigId?: string | null; } /** * An individual panel with a list of ServingConfigs to consider for it. */ export interface Schema$GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel { /** * Required. The candidates to consider on the panel. */ candidates?: Schema$GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate[]; /** * Required. The default candidate. If the model fails at serving time, we fall back to the default. */ defaultCandidate?: Schema$GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate; /** * Optional. The name to display for the panel. */ displayName?: string | null; } /** * Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations. */ export interface Schema$GoogleCloudRetailV2alphaModelServingConfigList { /** * Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`. */ servingConfigIds?: string[] | null; } /** * Output result that stores the information about where the exported data is stored. */ export interface Schema$GoogleCloudRetailV2alphaOutputResult { /** * The BigQuery location where the result is stored. */ bigqueryResult?: Schema$GoogleCloudRetailV2alphaBigQueryOutputResult[]; /** * The Google Cloud Storage location where the result is stored. */ gcsResult?: Schema$GoogleCloudRetailV2alphaGcsOutputResult[]; } /** * Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudRetailV2alphaPurgeMetadata { } /** * Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudRetailV2alphaPurgeProductsMetadata { /** * Operation create time. */ createTime?: string | null; /** * Count of entries that encountered errors while processing. */ failureCount?: string | null; /** * Count of entries that were deleted successfully. */ successCount?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. */ export interface Schema$GoogleCloudRetailV2alphaPurgeProductsResponse { /** * The total count of products purged as a result of the operation. */ purgeCount?: string | null; /** * A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random. */ purgeSample?: string[] | null; } /** * Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. */ export interface Schema$GoogleCloudRetailV2alphaPurgeUserEventsResponse { /** * The total count of events purged as a result of the operation. */ purgedEventsCount?: string | null; } /** * Metadata for `RejoinUserEvents` method. */ export interface Schema$GoogleCloudRetailV2alphaRejoinUserEventsMetadata { } /** * Response message for `RejoinUserEvents` method. */ export interface Schema$GoogleCloudRetailV2alphaRejoinUserEventsResponse { /** * Number of user events that were joined with latest product catalog. */ rejoinedUserEventsCount?: string | null; } /** * Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata { } /** * Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse { } /** * Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method. */ export interface Schema$GoogleCloudRetailV2alphaRemoveLocalInventoriesMetadata { } /** * Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method. */ export interface Schema$GoogleCloudRetailV2alphaRemoveLocalInventoriesResponse { } /** * Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method. */ export interface Schema$GoogleCloudRetailV2alphaSetInventoryMetadata { } /** * Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method. */ export interface Schema$GoogleCloudRetailV2alphaSetInventoryResponse { } /** * Metadata related to transform user events operation. */ export interface Schema$GoogleCloudRetailV2alphaTransformedUserEventsMetadata { /** * Count of entries in the source user events BigQuery table. */ sourceEventsCount?: string | null; /** * Count of entries in the transformed user events BigQuery table, which could be different from the actually imported number of user events. */ transformedEventsCount?: string | null; } /** * Metadata associated with a tune operation. */ export interface Schema$GoogleCloudRetailV2alphaTuneModelMetadata { /** * The resource name of the model that this tune applies to. Format: `projects/{project_number\}/locations/{location_id\}/catalogs/{catalog_id\}/models/{model_id\}` */ model?: string | null; } /** * Response associated with a tune operation. */ export interface Schema$GoogleCloudRetailV2alphaTuneModelResponse { } /** * A summary of import result. The UserEventImportSummary summarizes the import status for user events. */ export interface Schema$GoogleCloudRetailV2alphaUserEventImportSummary { /** * Count of user events imported with complete existing catalog information. */ joinedEventsCount?: string | null; /** * Count of user events imported, but with catalog information not found in the imported catalog. */ unjoinedEventsCount?: string | null; } /** * Catalog level attribute config. */ export interface Schema$GoogleCloudRetailV2AttributesConfig { /** * Output only. The AttributeConfigLevel used for this catalog. */ attributeConfigLevel?: string | null; /** * Enable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute. The key is catalog attribute's name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. The maximum number of catalog attributes allowed in a request is 1000. */ catalogAttributes?: { [key: string]: Schema$GoogleCloudRetailV2CatalogAttribute; } | null; /** * Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/x/locations/x/catalogs/x/attributesConfig` */ name?: string | null; } /** * An intended audience of the Product for whom it's sold. */ export interface Schema$GoogleCloudRetailV2Audience { /** * The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). */ ageGroups?: string[] | null; /** * The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). */ genders?: string[] | null; } /** * Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata { } /** * Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2betaAddFulfillmentPlacesResponse { } /** * Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2betaAddLocalInventoriesMetadata { } /** * Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2betaAddLocalInventoriesResponse { } /** * A BigQuery output result. */ export interface Schema$GoogleCloudRetailV2betaBigQueryOutputResult { /** * The ID of a BigQuery Dataset. */ datasetId?: string | null; /** * The ID of a BigQuery Table. */ tableId?: string | null; } /** * Common metadata related to the progress of the operations. */ export interface Schema$GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata { /** * Operation create time. */ createTime?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Metadata associated with a create operation. */ export interface Schema$GoogleCloudRetailV2betaCreateModelMetadata { /** * The resource name of the model that this create applies to. Format: `projects/{project_number\}/locations/{location_id\}/catalogs/{catalog_id\}/models/{model_id\}` */ model?: string | null; } /** * Configuration of destination for Export related errors. */ export interface Schema$GoogleCloudRetailV2betaExportErrorsConfig { /** * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string | null; } /** * Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudRetailV2betaExportMetadata { /** * Operation create time. */ createTime?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudRetailV2betaExportProductsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * This field is never set. */ errorsConfig?: Schema$GoogleCloudRetailV2betaExportErrorsConfig; /** * Output result indicating where the data were exported to. */ outputResult?: Schema$GoogleCloudRetailV2betaOutputResult; } /** * Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudRetailV2betaExportUserEventsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * This field is never set. */ errorsConfig?: Schema$GoogleCloudRetailV2betaExportErrorsConfig; /** * Output result indicating where the data were exported to. */ outputResult?: Schema$GoogleCloudRetailV2betaOutputResult; } /** * A Gcs output result. */ export interface Schema$GoogleCloudRetailV2betaGcsOutputResult { /** * The uri of Gcs output */ outputUri?: string | null; } /** * Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful. */ export interface Schema$GoogleCloudRetailV2betaImportCompletionDataResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; } /** * Configuration of destination for Import related errors. */