Struct google_api_proto::google::cloud::discoveryengine::v1alpha::serving_config::MediaConfig
source · pub struct MediaConfig {
pub demotion_event_type: String,
pub content_freshness_cutoff_days: i32,
pub demote_content_watched: Option<DemoteContentWatched>,
}
Expand description
Specifies the configurations needed for Media Discovery. Currently we support:
demote_content_watched
: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result.promote_fresh_content
: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
Fields§
§demotion_event_type: String
Specifies the event type used for demoting recommendation result. Currently supported values:
view-item
: Item viewed.media-play
: Start/resume watching a video, playing a song, etc.media-complete
: Finished or stopped midway through a video, song, etc.
If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
content_freshness_cutoff_days: i32
Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
demote_content_watched: Option<DemoteContentWatched>
Specify the threshold for demoting watched content, the threshold can be
either percentage or minutes value.
This must be set for media-complete
event type.
Trait Implementations§
source§impl Clone for MediaConfig
impl Clone for MediaConfig
source§fn clone(&self) -> MediaConfig
fn clone(&self) -> MediaConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MediaConfig
impl Debug for MediaConfig
source§impl Default for MediaConfig
impl Default for MediaConfig
source§impl Message for MediaConfig
impl Message for MediaConfig
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for MediaConfig
impl PartialEq for MediaConfig
source§fn eq(&self, other: &MediaConfig) -> bool
fn eq(&self, other: &MediaConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MediaConfig
Auto Trait Implementations§
impl Freeze for MediaConfig
impl RefUnwindSafe for MediaConfig
impl Send for MediaConfig
impl Sync for MediaConfig
impl Unpin for MediaConfig
impl UnwindSafe for MediaConfig
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
Mutably borrows from an owned value. Read more
§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>
Wrap the input message
T
in a tonic::Request