Struct google_api_proto::google::actions::sdk::v2::interactionmodel::Slot
source · pub struct Slot {
pub name: String,
pub type: Option<ClassReference>,
pub required: bool,
pub prompt_settings: Option<PromptSettings>,
pub commit_behavior: Option<CommitBehavior>,
pub config: Option<Value>,
pub default_value: Option<DefaultValue>,
}
Expand description
Configuration for a slot. Slots are single units of data that can be filled through natural language (ie. intent parameters), session parameters, and other sources.
Fields§
§name: String
Required. Name of the slot.
type: Option<ClassReference>
Required. Declares the data type of this slot.
required: bool
Optional. Indicates whether the slot is required to be filled before advancing. Required slots that are not filled will trigger a customizable prompt to the user.
prompt_settings: Option<PromptSettings>
Optional. Registers Prompts for different stages of slot filling.
commit_behavior: Option<CommitBehavior>
Optional. Commit behavior associated with the slot.
config: Option<Value>
Optional. Additional configuration associated with the slot which is used for filling the slot. The format of the config is specific to the type of the slot. Resource references to user or session parameter can be added to this config. This config is needed for filling slots related to transactions and user engagement.
Example:
For a slot of type actions.type.CompletePurchaseValue, the following
config proposes a digital good order with a reference to a client defined
session parameter userSelectedSkuId
:
{
"@type": "type.googleapis.com/
google.actions.transactions.v3.CompletePurchaseValueSpec",
"skuId": {
"skuType": "SKU_TYPE_IN_APP",
"id": "$session.params.userSelectedSkuId",
"packageName": "com.example.company"
}
}
default_value: Option<DefaultValue>
Optional. Configuration to populate a default value for this slot.
Trait Implementations§
source§impl Message for Slot
impl Message for Slot
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 Slot
impl PartialEq for Slot
impl StructuralPartialEq for Slot
Auto Trait Implementations§
impl Freeze for Slot
impl RefUnwindSafe for Slot
impl Send for Slot
impl Sync for Slot
impl Unpin for Slot
impl UnwindSafe for Slot
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