Skip to main content

AnalyzeContentRequest

Struct AnalyzeContentRequest 

Source
#[non_exhaustive]
pub struct AnalyzeContentRequest { pub participant: String, pub reply_audio_config: Option<OutputAudioConfig>, pub query_params: Option<QueryParameters>, pub assist_query_params: Option<AssistQueryParameters>, pub cx_parameters: Option<Struct>, pub request_id: String, pub input: Option<Input>, /* private fields */ }
Available on crate feature participants only.
Expand description

The request message for Participants.AnalyzeContent.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§participant: String

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

§reply_audio_config: Option<OutputAudioConfig>

Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling AnalyzeContent. If this configuration is not supplied, speech synthesis is disabled.

§query_params: Option<QueryParameters>

Parameters for a Dialogflow virtual-agent query.

§assist_query_params: Option<AssistQueryParameters>

Parameters for a human assist query.

§cx_parameters: Option<Struct>

Additional parameters to be put into Dialogflow CX session parameters. To remove a parameter from the session, clients should explicitly set the parameter value to null.

Note: this field should only be used if you are connecting to a Dialogflow CX agent.

§request_id: String

A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a request_id is provided.

§input: Option<Input>

Required. The input content.

Implementations§

Source§

impl AnalyzeContentRequest

Source

pub fn new() -> Self

Source

pub fn set_participant<T: Into<String>>(self, v: T) -> Self

Sets the value of participant.

§Example
let x = AnalyzeContentRequest::new().set_participant("example");
Source

pub fn set_reply_audio_config<T>(self, v: T) -> Self

Sets the value of reply_audio_config.

§Example
use google_cloud_dialogflow_v2::model::OutputAudioConfig;
let x = AnalyzeContentRequest::new().set_reply_audio_config(OutputAudioConfig::default()/* use setters */);
Source

pub fn set_or_clear_reply_audio_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of reply_audio_config.

§Example
use google_cloud_dialogflow_v2::model::OutputAudioConfig;
let x = AnalyzeContentRequest::new().set_or_clear_reply_audio_config(Some(OutputAudioConfig::default()/* use setters */));
let x = AnalyzeContentRequest::new().set_or_clear_reply_audio_config(None::<OutputAudioConfig>);
Source

pub fn set_query_params<T>(self, v: T) -> Self

Sets the value of query_params.

§Example
use google_cloud_dialogflow_v2::model::QueryParameters;
let x = AnalyzeContentRequest::new().set_query_params(QueryParameters::default()/* use setters */);
Source

pub fn set_or_clear_query_params<T>(self, v: Option<T>) -> Self

Sets or clears the value of query_params.

§Example
use google_cloud_dialogflow_v2::model::QueryParameters;
let x = AnalyzeContentRequest::new().set_or_clear_query_params(Some(QueryParameters::default()/* use setters */));
let x = AnalyzeContentRequest::new().set_or_clear_query_params(None::<QueryParameters>);
Source

pub fn set_assist_query_params<T>(self, v: T) -> Self

Sets the value of assist_query_params.

§Example
use google_cloud_dialogflow_v2::model::AssistQueryParameters;
let x = AnalyzeContentRequest::new().set_assist_query_params(AssistQueryParameters::default()/* use setters */);
Source

pub fn set_or_clear_assist_query_params<T>(self, v: Option<T>) -> Self

Sets or clears the value of assist_query_params.

§Example
use google_cloud_dialogflow_v2::model::AssistQueryParameters;
let x = AnalyzeContentRequest::new().set_or_clear_assist_query_params(Some(AssistQueryParameters::default()/* use setters */));
let x = AnalyzeContentRequest::new().set_or_clear_assist_query_params(None::<AssistQueryParameters>);
Source

pub fn set_cx_parameters<T>(self, v: T) -> Self
where T: Into<Struct>,

Sets the value of cx_parameters.

§Example
use wkt::Struct;
let x = AnalyzeContentRequest::new().set_cx_parameters(Struct::default()/* use setters */);
Source

pub fn set_or_clear_cx_parameters<T>(self, v: Option<T>) -> Self
where T: Into<Struct>,

Sets or clears the value of cx_parameters.

§Example
use wkt::Struct;
let x = AnalyzeContentRequest::new().set_or_clear_cx_parameters(Some(Struct::default()/* use setters */));
let x = AnalyzeContentRequest::new().set_or_clear_cx_parameters(None::<Struct>);
Source

pub fn set_request_id<T: Into<String>>(self, v: T) -> Self

Sets the value of request_id.

§Example
let x = AnalyzeContentRequest::new().set_request_id("example");
Source

pub fn set_input<T: Into<Option<Input>>>(self, v: T) -> Self

Sets the value of input.

Note that all the setters affecting input are mutually exclusive.

§Example
use google_cloud_dialogflow_v2::model::TextInput;
let x = AnalyzeContentRequest::new().set_input(Some(
    google_cloud_dialogflow_v2::model::analyze_content_request::Input::TextInput(TextInput::default().into())));
Source

pub fn text_input(&self) -> Option<&Box<TextInput>>

The value of input if it holds a TextInput, None if the field is not set or holds a different branch.

Source

pub fn set_text_input<T: Into<Box<TextInput>>>(self, v: T) -> Self

Sets the value of input to hold a TextInput.

Note that all the setters affecting input are mutually exclusive.

§Example
use google_cloud_dialogflow_v2::model::TextInput;
let x = AnalyzeContentRequest::new().set_text_input(TextInput::default()/* use setters */);
assert!(x.text_input().is_some());
assert!(x.audio_input().is_none());
assert!(x.event_input().is_none());
assert!(x.suggestion_input().is_none());
Source

pub fn audio_input(&self) -> Option<&Box<AudioInput>>

The value of input if it holds a AudioInput, None if the field is not set or holds a different branch.

Source

pub fn set_audio_input<T: Into<Box<AudioInput>>>(self, v: T) -> Self

Sets the value of input to hold a AudioInput.

Note that all the setters affecting input are mutually exclusive.

§Example
use google_cloud_dialogflow_v2::model::AudioInput;
let x = AnalyzeContentRequest::new().set_audio_input(AudioInput::default()/* use setters */);
assert!(x.audio_input().is_some());
assert!(x.text_input().is_none());
assert!(x.event_input().is_none());
assert!(x.suggestion_input().is_none());
Source

pub fn event_input(&self) -> Option<&Box<EventInput>>

The value of input if it holds a EventInput, None if the field is not set or holds a different branch.

Source

pub fn set_event_input<T: Into<Box<EventInput>>>(self, v: T) -> Self

Sets the value of input to hold a EventInput.

Note that all the setters affecting input are mutually exclusive.

§Example
use google_cloud_dialogflow_v2::model::EventInput;
let x = AnalyzeContentRequest::new().set_event_input(EventInput::default()/* use setters */);
assert!(x.event_input().is_some());
assert!(x.text_input().is_none());
assert!(x.audio_input().is_none());
assert!(x.suggestion_input().is_none());
Source

pub fn suggestion_input(&self) -> Option<&Box<SuggestionInput>>

The value of input if it holds a SuggestionInput, None if the field is not set or holds a different branch.

Source

pub fn set_suggestion_input<T: Into<Box<SuggestionInput>>>(self, v: T) -> Self

Sets the value of input to hold a SuggestionInput.

Note that all the setters affecting input are mutually exclusive.

§Example
use google_cloud_dialogflow_v2::model::SuggestionInput;
let x = AnalyzeContentRequest::new().set_suggestion_input(SuggestionInput::default()/* use setters */);
assert!(x.suggestion_input().is_some());
assert!(x.text_input().is_none());
assert!(x.audio_input().is_none());
assert!(x.event_input().is_none());

Trait Implementations§

Source§

impl Clone for AnalyzeContentRequest

Source§

fn clone(&self) -> AnalyzeContentRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AnalyzeContentRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AnalyzeContentRequest

Source§

fn default() -> AnalyzeContentRequest

Returns the “default value” for a type. Read more
Source§

impl Message for AnalyzeContentRequest

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for AnalyzeContentRequest

Source§

fn eq(&self, other: &AnalyzeContentRequest) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for AnalyzeContentRequest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,