Updates a ServingConfig.

Scopes

You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: retail2 --scope <scope> projects locations-catalogs-serving-configs-patch ...

Required Scalar Argument

  • <name> (string)
    • Immutable. Fully qualified name projects/*/locations/global/catalogs/*/servingConfig/*

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

GoogleCloudRetailV2ServingConfig:
  boost-control-ids: [string]
  display-name: string
  diversity-level: string
  diversity-type: string
  do-not-associate-control-ids: [string]
  dynamic-facet-spec:
    mode: string
  enable-category-filter-level: string
  facet-control-ids: [string]
  filter-control-ids: [string]
  ignore-control-ids: [string]
  model-id: string
  name: string
  oneway-synonyms-control-ids: [string]
  personalization-spec:
    mode: string
  price-reranking-level: string
  redirect-control-ids: [string]
  replacement-control-ids: [string]
  solution-types: [string]
  twoway-synonyms-control-ids: [string]

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . boost-control-ids=voluptua.
    • Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.
  • display-name=consetetur
    • Required. The human readable serving config display name. Used in Retail UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
  • diversity-level=dolor
    • How much diversity to use in recommendation model results e.g. medium-diversity or high-diversity. Currently supported values: * no-diversity * low-diversity * medium-diversity * high-diversity * auto-diversity If not specified, we choose default based on recommendation model type. Default value: no-diversity. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
  • diversity-type=amet
    • What kind of diversity to use - data driven or rule based. If unset, the server behavior defaults to RULE_BASED_DIVERSITY.
  • do-not-associate-control-ids=et
    • Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. - Order does not matter. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.
  • dynamic-facet-spec mode=aliquyam

    • Mode of the DynamicFacet feature. Defaults to Mode.DISABLED if it's unset.
  • .. enable-category-filter-level=ipsum

    • Whether to add additional category filters on the similar-items model. If not specified, we enable it by default. Allowed values are: * no-category-match: No additional filtering of original results from the model and the customer's filters. * relaxed-category-match: Only keep results with categories that match at least one item categories in the PredictRequests's context item. * If customer also sends filters in the PredictRequest, then the results will satisfy both conditions (user given and category match). Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
  • facet-control-ids=gubergren
    • Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.
  • filter-control-ids=invidunt
    • Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.
  • ignore-control-ids=sea
    • Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. - Order does not matter. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.
  • model-id=duo
    • The id of the model in the same Catalog to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.
  • name=sea
    • Immutable. Fully qualified name projects/*/locations/global/catalogs/*/servingConfig/*
  • oneway-synonyms-control-ids=stet
    • Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.
  • personalization-spec mode=sadipscing

    • Defaults to Mode.AUTO.
  • .. price-reranking-level=no

    • How much price ranking we want in serving results. Price reranking causes product items with a similar recommendation probability to be ordered by price, with the highest-priced items first. This setting could result in a decrease in click-through and conversion rates. Allowed values are: * no-price-reranking * low-price-reranking * medium-price-reranking * high-price-reranking If not specified, we choose default based on model type. Default value: no-price-reranking. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
  • redirect-control-ids=tempor
    • Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.
  • replacement-control-ids=ipsum
    • Condition replacement specifications. - Applied according to the order in the list. - A previously replaced term can not be re-replaced. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.
  • solution-types=sea
    • Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.
    • Each invocation of this argument appends the given value to the array.
  • twoway-synonyms-control-ids=sit
    • Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
    • Each invocation of this argument appends the given value to the array.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p update-mask=string
    • Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=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.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • 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.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").