Struct google_api_proto::google::cloud::discoveryengine::v1alpha::engine::MediaRecommendationEngineConfig
source · pub struct MediaRecommendationEngineConfig {
pub type: String,
pub optimization_objective: String,
pub optimization_objective_config: Option<OptimizationObjectiveConfig>,
pub training_state: i32,
}
Expand description
Additional config specs for a Media Recommendation engine.
Fields§
§type: String
Required. The type of engine. e.g., recommended-for-you
.
This field together with [optimization_objective][Engine.optimization_objective] describe engine metadata to use to control engine training and serving.
Currently supported values: recommended-for-you
, others-you-may-like
,
more-like-this
, most-popular-items
.
optimization_objective: String
The optimization objective. e.g., cvr
.
This field together with [optimization_objective][google.cloud.discoveryengine.v1alpha.Engine.MediaRecommendationEngineConfig.type] describe engine metadata to use to control engine training and serving.
Currently supported
values: ctr
, cvr
.
If not specified, we choose default based on engine type. Default depends on type of recommendation:
recommended-for-you
=> ctr
others-you-may-like
=> ctr
optimization_objective_config: Option<OptimizationObjectiveConfig>
Name and value of the custom threshold for cvr optimization_objective.
For target_field watch-time
, target_field_value must be an integer
value indicating the media progress time in seconds between (0, 86400]
(excludes 0, includes 86400) (e.g., 90).
For target_field watch-percentage
, the target_field_value must be a
valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
0.5).
training_state: i32
The training state that the engine 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
engine in order to control cost. If not specified: the default value for
CreateEngine
method is TRAINING
. The default value for
UpdateEngine
method is to keep the state the same as before.
Implementations§
source§impl MediaRecommendationEngineConfig
impl MediaRecommendationEngineConfig
sourcepub fn training_state(&self) -> TrainingState
pub fn training_state(&self) -> TrainingState
Returns the enum value of training_state
, or the default if the field is set to an invalid enum value.
sourcepub fn set_training_state(&mut self, value: TrainingState)
pub fn set_training_state(&mut self, value: TrainingState)
Sets training_state
to the provided enum value.
Trait Implementations§
source§impl Clone for MediaRecommendationEngineConfig
impl Clone for MediaRecommendationEngineConfig
source§fn clone(&self) -> MediaRecommendationEngineConfig
fn clone(&self) -> MediaRecommendationEngineConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Message for MediaRecommendationEngineConfig
impl Message for MediaRecommendationEngineConfig
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 MediaRecommendationEngineConfig
impl PartialEq for MediaRecommendationEngineConfig
source§fn eq(&self, other: &MediaRecommendationEngineConfig) -> bool
fn eq(&self, other: &MediaRecommendationEngineConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MediaRecommendationEngineConfig
Auto Trait Implementations§
impl Freeze for MediaRecommendationEngineConfig
impl RefUnwindSafe for MediaRecommendationEngineConfig
impl Send for MediaRecommendationEngineConfig
impl Sync for MediaRecommendationEngineConfig
impl Unpin for MediaRecommendationEngineConfig
impl UnwindSafe for MediaRecommendationEngineConfig
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