#[non_exhaustive]pub struct CreateIntentRequest {
pub parent: String,
pub intent: Option<Intent>,
pub language_code: String,
pub intent_view: IntentView,
/* 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 a intent for.
Format: projects/<Project ID>/agent.
intent: Option<Intent>Required. The intent to create.
language_code: StringOptional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
intent_view: IntentViewOptional. The resource view to apply to the returned intent.
Implementations§
Source§impl CreateIntentRequest
impl CreateIntentRequest
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_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");Sourcepub fn set_intent_view<T: Into<IntentView>>(self, v: T) -> Self
pub fn set_intent_view<T: Into<IntentView>>(self, v: T) -> Self
Sets the value of intent_view.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::IntentView;
let x0 = CreateIntentRequest::new().set_intent_view(IntentView::Full);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 · 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
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 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