#[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 ingested_context_references: HashMap<String, ContextReference>,
/* 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.
ingested_context_references: HashMap<String, ContextReference>Output only. The context reference updates provided by external systems.
Implementations§
Source§impl Conversation
impl Conversation
pub fn new() -> Self
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("example");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_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 */),
]);Trait Implementations§
Source§impl Clone for Conversation
impl Clone for Conversation
Source§fn clone(&self) -> Conversation
fn clone(&self) -> Conversation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more