#[non_exhaustive]pub struct Conversation {
pub name: String,
pub lifecycle_state: LifecycleState,
pub conversation_profile: String,
pub phone_number: Option<ConversationPhoneNumber>,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub conversation_stage: ConversationStage,
pub telephony_connection_info: Option<TelephonyConnectionInfo>,
pub initial_conversation_profile: Option<ConversationProfile>,
pub ingested_context_references: HashMap<String, ContextReference>,
pub initial_generator_contexts: HashMap<String, GeneratorContext>,
/* private fields */
}conversations only.Expand description
Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. Identifier. The unique identifier of this conversation.
Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.
lifecycle_state: LifecycleStateOutput only. The current state of the Conversation.
conversation_profile: StringRequired. The Conversation Profile to be used to configure this
Conversation. This field cannot be updated.
Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.
phone_number: Option<ConversationPhoneNumber>Output only. It will not be empty if the conversation is to be connected over telephony.
start_time: Option<Timestamp>Output only. The time the conversation was started.
end_time: Option<Timestamp>Output only. The time the conversation was finished.
conversation_stage: ConversationStageOptional. The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation.
If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE.
If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.
telephony_connection_info: Option<TelephonyConnectionInfo>Output only. The telephony connection information.
initial_conversation_profile: Option<ConversationProfile>Optional. Output only. The initial conversation profile to be used to configure this conversation, which is a copy of the conversation profile config read at conversation creation time.
ingested_context_references: HashMap<String, ContextReference>Output only. The context reference updates provided by external systems.
initial_generator_contexts: HashMap<String, GeneratorContext>Output only. A map with generator name as key and generator context as value.
Implementations§
Source§impl Conversation
impl Conversation
Sourcepub fn set_lifecycle_state<T: Into<LifecycleState>>(self, v: T) -> Self
pub fn set_lifecycle_state<T: Into<LifecycleState>>(self, v: T) -> Self
Sets the value of lifecycle_state.
§Example
use google_cloud_dialogflow_v2::model::conversation::LifecycleState;
let x0 = Conversation::new().set_lifecycle_state(LifecycleState::InProgress);
let x1 = Conversation::new().set_lifecycle_state(LifecycleState::Completed);Sourcepub fn set_conversation_profile<T: Into<String>>(self, v: T) -> Self
pub fn set_conversation_profile<T: Into<String>>(self, v: T) -> Self
Sets the value of conversation_profile.
§Example
let x = Conversation::new().set_conversation_profile(format!("projects/{project_id}/conversationProfiles/{conversation_profile_id}"));Sourcepub fn set_phone_number<T>(self, v: T) -> Selfwhere
T: Into<ConversationPhoneNumber>,
pub fn set_phone_number<T>(self, v: T) -> Selfwhere
T: Into<ConversationPhoneNumber>,
Sets the value of phone_number.
§Example
use google_cloud_dialogflow_v2::model::ConversationPhoneNumber;
let x = Conversation::new().set_phone_number(ConversationPhoneNumber::default()/* use setters */);Sourcepub fn set_or_clear_phone_number<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConversationPhoneNumber>,
pub fn set_or_clear_phone_number<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConversationPhoneNumber>,
Sets or clears the value of phone_number.
§Example
use google_cloud_dialogflow_v2::model::ConversationPhoneNumber;
let x = Conversation::new().set_or_clear_phone_number(Some(ConversationPhoneNumber::default()/* use setters */));
let x = Conversation::new().set_or_clear_phone_number(None::<ConversationPhoneNumber>);Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
use wkt::Timestamp;
let x = Conversation::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
use wkt::Timestamp;
let x = Conversation::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = Conversation::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_conversation_stage<T: Into<ConversationStage>>(self, v: T) -> Self
pub fn set_conversation_stage<T: Into<ConversationStage>>(self, v: T) -> Self
Sets the value of conversation_stage.
§Example
use google_cloud_dialogflow_v2::model::conversation::ConversationStage;
let x0 = Conversation::new().set_conversation_stage(ConversationStage::VirtualAgentStage);
let x1 = Conversation::new().set_conversation_stage(ConversationStage::HumanAssistStage);Sourcepub fn set_telephony_connection_info<T>(self, v: T) -> Selfwhere
T: Into<TelephonyConnectionInfo>,
pub fn set_telephony_connection_info<T>(self, v: T) -> Selfwhere
T: Into<TelephonyConnectionInfo>,
Sets the value of telephony_connection_info.
§Example
use google_cloud_dialogflow_v2::model::conversation::TelephonyConnectionInfo;
let x = Conversation::new().set_telephony_connection_info(TelephonyConnectionInfo::default()/* use setters */);Sourcepub fn set_or_clear_telephony_connection_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<TelephonyConnectionInfo>,
pub fn set_or_clear_telephony_connection_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<TelephonyConnectionInfo>,
Sets or clears the value of telephony_connection_info.
§Example
use google_cloud_dialogflow_v2::model::conversation::TelephonyConnectionInfo;
let x = Conversation::new().set_or_clear_telephony_connection_info(Some(TelephonyConnectionInfo::default()/* use setters */));
let x = Conversation::new().set_or_clear_telephony_connection_info(None::<TelephonyConnectionInfo>);Sourcepub fn set_initial_conversation_profile<T>(self, v: T) -> Selfwhere
T: Into<ConversationProfile>,
pub fn set_initial_conversation_profile<T>(self, v: T) -> Selfwhere
T: Into<ConversationProfile>,
Sets the value of initial_conversation_profile.
§Example
use google_cloud_dialogflow_v2::model::ConversationProfile;
let x = Conversation::new().set_initial_conversation_profile(ConversationProfile::default()/* use setters */);Sourcepub fn set_or_clear_initial_conversation_profile<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConversationProfile>,
pub fn set_or_clear_initial_conversation_profile<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConversationProfile>,
Sets or clears the value of initial_conversation_profile.
§Example
use google_cloud_dialogflow_v2::model::ConversationProfile;
let x = Conversation::new().set_or_clear_initial_conversation_profile(Some(ConversationProfile::default()/* use setters */));
let x = Conversation::new().set_or_clear_initial_conversation_profile(None::<ConversationProfile>);Sourcepub fn set_ingested_context_references<T, K, V>(self, v: T) -> Self
pub fn set_ingested_context_references<T, K, V>(self, v: T) -> Self
Sets the value of ingested_context_references.
§Example
use google_cloud_dialogflow_v2::model::conversation::ContextReference;
let x = Conversation::new().set_ingested_context_references([
("key0", ContextReference::default()/* use setters */),
("key1", ContextReference::default()/* use (different) setters */),
]);Sourcepub fn set_initial_generator_contexts<T, K, V>(self, v: T) -> Self
pub fn set_initial_generator_contexts<T, K, V>(self, v: T) -> Self
Sets the value of initial_generator_contexts.
§Example
use google_cloud_dialogflow_v2::model::conversation::GeneratorContext;
let x = Conversation::new().set_initial_generator_contexts([
("key0", GeneratorContext::default()/* use setters */),
("key1", GeneratorContext::default()/* use (different) setters */),
]);Trait Implementations§
Source§impl Clone for Conversation
impl Clone for Conversation
Source§fn clone(&self) -> Conversation
fn clone(&self) -> Conversation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Conversation
impl Debug for Conversation
Source§impl Default for Conversation
impl Default for Conversation
Source§fn default() -> Conversation
fn default() -> Conversation
Source§impl Message for Conversation
impl Message for Conversation
Source§impl PartialEq for Conversation
impl PartialEq for Conversation
impl StructuralPartialEq for Conversation
Auto Trait Implementations§
impl Freeze for Conversation
impl RefUnwindSafe for Conversation
impl Send for Conversation
impl Sync for Conversation
impl Unpin for Conversation
impl UnsafeUnpin for Conversation
impl UnwindSafe for Conversation
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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