Struct google_api_proto::google::cloud::discoveryengine::v1alpha::Control
source · pub struct Control {
pub name: String,
pub display_name: String,
pub associated_serving_config_ids: Vec<String>,
pub solution_type: i32,
pub use_cases: Vec<i32>,
pub conditions: Vec<Condition>,
pub action: Option<Action>,
}
Expand description
Defines a conditioned behavior to employ during serving.
Must be attached to a
[ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] to be
considered at serving time. Permitted actions dependent on SolutionType
.
Fields§
§name: String
Immutable. Fully qualified name
projects/*/locations/global/dataStore/*/controls/*
display_name: String
Required. Human readable name. The identifier used in UI views.
Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.
associated_serving_config_ids: Vec<String>
Output only. List of all [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] IDs this control is attached to. May take up to 10 minutes to update after changes.
solution_type: i32
Required. Immutable. What solution the control belongs to.
Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.
use_cases: Vec<i32>
Specifies the use case for the control. Affects what condition fields can be set. Only applies to [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. Currently only allow one use case per control. Must be set when solution_type is [SolutionType.SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
conditions: Vec<Condition>
Determines when the associated action will trigger.
Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.
action: Option<Action>
Actions are restricted by Vertical and Solution
Required.
Implementations§
source§impl Control
impl Control
sourcepub fn solution_type(&self) -> SolutionType
pub fn solution_type(&self) -> SolutionType
Returns the enum value of solution_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_solution_type(&mut self, value: SolutionType)
pub fn set_solution_type(&mut self, value: SolutionType)
Sets solution_type
to the provided enum value.
sourcepub fn use_cases(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<SearchUseCase>>
pub fn use_cases( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<SearchUseCase>>
Returns an iterator which yields the valid enum values contained in use_cases
.
sourcepub fn push_use_cases(&mut self, value: SearchUseCase)
pub fn push_use_cases(&mut self, value: SearchUseCase)
Appends the provided enum value to use_cases
.
Trait Implementations§
source§impl Message for Control
impl Message for Control
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 Control
impl PartialEq for Control
impl StructuralPartialEq for Control
Auto Trait Implementations§
impl Freeze for Control
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnwindSafe for Control
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