Struct google_api_proto::google::cloud::dialogflow::cx::v3::Match
source · pub struct Match {
pub intent: Option<Intent>,
pub event: String,
pub parameters: Option<Struct>,
pub resolved_input: String,
pub match_type: i32,
pub confidence: f32,
}
Expand description
Represents one match result of [MatchIntent][].
Fields§
§intent: Option<Intent>
The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query.
Some, not all fields are filled in this message, including but not limited
to: name
and display_name
. Only filled for
[INTENT
][google.cloud.dialogflow.cx.v3.Match.MatchType] match type.
event: String
The event that matched the query. Filled for
[EVENT
][google.cloud.dialogflow.cx.v3.Match.MatchType],
[NO_MATCH
][google.cloud.dialogflow.cx.v3.Match.MatchType] and
[NO_INPUT
][google.cloud.dialogflow.cx.v3.Match.MatchType] match types.
parameters: Option<Struct>
The collection of parameters extracted from the query.
Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:
- MapKey type: string
- MapKey value: parameter name
- MapValue type: If parameter’s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
- MapValue value: If parameter’s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
resolved_input: String
Final text input which was matched during MatchIntent. This value can be different from original input sent in request because of spelling correction or other processing.
match_type: i32
Type of this [Match][google.cloud.dialogflow.cx.v3.Match].
confidence: f32
The confidence of this match. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation.
Implementations§
source§impl Match
impl Match
sourcepub fn match_type(&self) -> MatchType
pub fn match_type(&self) -> MatchType
Returns the enum value of match_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_match_type(&mut self, value: MatchType)
pub fn set_match_type(&mut self, value: MatchType)
Sets match_type
to the provided enum value.
Trait Implementations§
source§impl Message for Match
impl Message for Match
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 Match
impl PartialEq for Match
impl StructuralPartialEq for Match
Auto Trait Implementations§
impl Freeze for Match
impl RefUnwindSafe for Match
impl Send for Match
impl Sync for Match
impl Unpin for Match
impl UnwindSafe for Match
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