Struct google_api_proto::google::cloud::retail::v2alpha::ServingConfig
source · pub struct ServingConfig {Show 20 fields
pub name: String,
pub display_name: String,
pub model_id: String,
pub price_reranking_level: String,
pub facet_control_ids: Vec<String>,
pub dynamic_facet_spec: Option<DynamicFacetSpec>,
pub boost_control_ids: Vec<String>,
pub filter_control_ids: Vec<String>,
pub redirect_control_ids: Vec<String>,
pub twoway_synonyms_control_ids: Vec<String>,
pub oneway_synonyms_control_ids: Vec<String>,
pub do_not_associate_control_ids: Vec<String>,
pub replacement_control_ids: Vec<String>,
pub ignore_control_ids: Vec<String>,
pub diversity_level: String,
pub diversity_type: i32,
pub enable_category_filter_level: String,
pub ignore_recs_denylist: bool,
pub personalization_spec: Option<PersonalizationSpec>,
pub solution_types: Vec<i32>,
}
Expand description
Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions).
Fields§
§name: String
Immutable. Fully qualified name
projects/*/locations/global/catalogs/*/servingConfig/*
display_name: String
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.
model_id: String
The id of the model in the same [Catalog][google.cloud.retail.v2alpha.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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
price_reranking_level: String
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
facet_control_ids: Vec<String>
Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of [Control][google.cloud.retail.v2alpha.Control] resources with only the Facet control set. These controls are assumed to be in the same [Catalog][google.cloud.retail.v2alpha.Catalog] as the [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.
Can only be set if [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
dynamic_facet_spec: Option<DynamicFacetSpec>
The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated.
Can only be set if [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
boost_control_ids: Vec<String>
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][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] and [SearchRequest.boost_spec][google.cloud.retail.v2alpha.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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
filter_control_ids: Vec<String>
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
redirect_control_ids: Vec<String>
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
twoway_synonyms_control_ids: Vec<String>
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
oneway_synonyms_control_ids: Vec<String>
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
do_not_associate_control_ids: Vec<String>
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
replacement_control_ids: Vec<String>
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
ignore_control_ids: Vec<String>
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
diversity_level: String
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
diversity_type: i32
What kind of diversity to use - data driven or rule based. If unset, the server behavior defaults to [RULE_BASED_DIVERSITY][google.cloud.retail.v2alpha.ServingConfig.DiversityType.RULE_BASED_DIVERSITY].
enable_category_filter_level: String
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][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
ignore_recs_denylist: bool
When the flag is enabled, the products in the denylist will not be filtered out in the recommendation filtering results.
personalization_spec: Option<PersonalizationSpec>
The specification for personalization spec.
Can only be set if [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
Notice that if both [ServingConfig.personalization_spec][google.cloud.retail.v2alpha.ServingConfig.personalization_spec] and [SearchRequest.personalization_spec][google.cloud.retail.v2alpha.SearchRequest.personalization_spec] are set. [SearchRequest.personalization_spec][google.cloud.retail.v2alpha.SearchRequest.personalization_spec] will override [ServingConfig.personalization_spec][google.cloud.retail.v2alpha.ServingConfig.personalization_spec].
solution_types: Vec<i32>
Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.
Implementations§
source§impl ServingConfig
impl ServingConfig
sourcepub fn solution_types(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<SolutionType>>
pub fn solution_types( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<SolutionType>>
Returns an iterator which yields the valid enum values contained in solution_types
.
sourcepub fn push_solution_types(&mut self, value: SolutionType)
pub fn push_solution_types(&mut self, value: SolutionType)
Appends the provided enum value to solution_types
.
sourcepub fn diversity_type(&self) -> DiversityType
pub fn diversity_type(&self) -> DiversityType
Returns the enum value of diversity_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_diversity_type(&mut self, value: DiversityType)
pub fn set_diversity_type(&mut self, value: DiversityType)
Sets diversity_type
to the provided enum value.
Trait Implementations§
source§impl Clone for ServingConfig
impl Clone for ServingConfig
source§fn clone(&self) -> ServingConfig
fn clone(&self) -> ServingConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ServingConfig
impl Debug for ServingConfig
source§impl Default for ServingConfig
impl Default for ServingConfig
source§impl Message for ServingConfig
impl Message for ServingConfig
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for ServingConfig
impl PartialEq for ServingConfig
source§fn eq(&self, other: &ServingConfig) -> bool
fn eq(&self, other: &ServingConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ServingConfig
Auto Trait Implementations§
impl Freeze for ServingConfig
impl RefUnwindSafe for ServingConfig
impl Send for ServingConfig
impl Sync for ServingConfig
impl Unpin for ServingConfig
impl UnwindSafe for ServingConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request