#[non_exhaustive]pub struct CreateIntentRequest {
pub parent: String,
pub intent: Option<Intent>,
pub language_code: String,
/* private fields */
}Available on crate feature
intents only.Expand description
The request message for Intents.CreateIntent.
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. The agent to create an intent for.
Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>.
intent: Option<Intent>Required. The intent to create.
language_code: StringThe language of the following fields in intent:
Intent.training_phrases.parts.text
If not specified, the agent’s default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
Implementations§
Source§impl CreateIntentRequest
impl CreateIntentRequest
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_intent<T>(self, v: T) -> Self
pub fn set_intent<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_intent<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_intent<T>(self, v: Option<T>) -> Self
Sourcepub fn set_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of language_code.
§Example
ⓘ
let x = CreateIntentRequest::new().set_language_code("example");Trait Implementations§
Source§impl Clone for CreateIntentRequest
impl Clone for CreateIntentRequest
Source§fn clone(&self) -> CreateIntentRequest
fn clone(&self) -> CreateIntentRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateIntentRequest
impl Debug for CreateIntentRequest
Source§impl Default for CreateIntentRequest
impl Default for CreateIntentRequest
Source§fn default() -> CreateIntentRequest
fn default() -> CreateIntentRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateIntentRequest
impl Message for CreateIntentRequest
Source§impl PartialEq for CreateIntentRequest
impl PartialEq for CreateIntentRequest
Source§fn eq(&self, other: &CreateIntentRequest) -> bool
fn eq(&self, other: &CreateIntentRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateIntentRequest
Auto Trait Implementations§
impl Freeze for CreateIntentRequest
impl RefUnwindSafe for CreateIntentRequest
impl Send for CreateIntentRequest
impl Sync for CreateIntentRequest
impl Unpin for CreateIntentRequest
impl UnsafeUnpin for CreateIntentRequest
impl UnwindSafe for CreateIntentRequest
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