#[non_exhaustive]pub struct CreateConversationRequest {
pub parent: String,
pub conversation: Option<Conversation>,
pub conversation_id: String,
/* private fields */
}Available on crate feature
conversations only.Expand description
The request message for Conversations.CreateConversation.
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.parent: StringRequired. Resource identifier of the project creating the conversation.
Format: projects/<Project ID>/locations/<Location ID>.
conversation: Option<Conversation>Required. The conversation to create.
conversation_id: StringOptional. Identifier of the conversation. Generally it’s auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you.
The conversation ID must be compliant with the regression formula
[a-zA-Z][a-zA-Z0-9_-]* with the characters length in range of [3,64].
If the field is provided, the caller is responsible for
- the uniqueness of the ID, otherwise the request will be rejected.
- the consistency for whether to use custom ID or not under a project to better ensure uniqueness.
Implementations§
Source§impl CreateConversationRequest
impl CreateConversationRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_conversation<T>(self, v: T) -> Selfwhere
T: Into<Conversation>,
pub fn set_conversation<T>(self, v: T) -> Selfwhere
T: Into<Conversation>,
Sets the value of conversation.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::Conversation;
let x = CreateConversationRequest::new().set_conversation(Conversation::default()/* use setters */);Sourcepub fn set_or_clear_conversation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Conversation>,
pub fn set_or_clear_conversation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Conversation>,
Sets or clears the value of conversation.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::Conversation;
let x = CreateConversationRequest::new().set_or_clear_conversation(Some(Conversation::default()/* use setters */));
let x = CreateConversationRequest::new().set_or_clear_conversation(None::<Conversation>);Sourcepub fn set_conversation_id<T: Into<String>>(self, v: T) -> Self
pub fn set_conversation_id<T: Into<String>>(self, v: T) -> Self
Sets the value of conversation_id.
§Example
ⓘ
let x = CreateConversationRequest::new().set_conversation_id("example");Trait Implementations§
Source§impl Clone for CreateConversationRequest
impl Clone for CreateConversationRequest
Source§fn clone(&self) -> CreateConversationRequest
fn clone(&self) -> CreateConversationRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateConversationRequest
impl Debug for CreateConversationRequest
Source§impl Default for CreateConversationRequest
impl Default for CreateConversationRequest
Source§fn default() -> CreateConversationRequest
fn default() -> CreateConversationRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateConversationRequest
impl Message for CreateConversationRequest
impl StructuralPartialEq for CreateConversationRequest
Auto Trait Implementations§
impl Freeze for CreateConversationRequest
impl RefUnwindSafe for CreateConversationRequest
impl Send for CreateConversationRequest
impl Sync for CreateConversationRequest
impl Unpin for CreateConversationRequest
impl UnwindSafe for CreateConversationRequest
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
Mutably borrows from an owned value. Read more