#[non_exhaustive]pub struct CreateEntityTypeRequest {
pub parent: String,
pub entity_type: Option<EntityType>,
pub language_code: String,
/* private fields */
}Available on crate feature
entity-types only.Expand description
The request message for EntityTypes.CreateEntityType.
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 entity type for.
Format: projects/<Project ID>/agent.
entity_type: Option<EntityType>Required. The entity type 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.
Implementations§
Source§impl CreateEntityTypeRequest
impl CreateEntityTypeRequest
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_entity_type<T>(self, v: T) -> Selfwhere
T: Into<EntityType>,
pub fn set_entity_type<T>(self, v: T) -> Selfwhere
T: Into<EntityType>,
Sets the value of entity_type.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::EntityType;
let x = CreateEntityTypeRequest::new().set_entity_type(EntityType::default()/* use setters */);Sourcepub fn set_or_clear_entity_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<EntityType>,
pub fn set_or_clear_entity_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<EntityType>,
Sets or clears the value of entity_type.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::EntityType;
let x = CreateEntityTypeRequest::new().set_or_clear_entity_type(Some(EntityType::default()/* use setters */));
let x = CreateEntityTypeRequest::new().set_or_clear_entity_type(None::<EntityType>);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 = CreateEntityTypeRequest::new().set_language_code("example");Trait Implementations§
Source§impl Clone for CreateEntityTypeRequest
impl Clone for CreateEntityTypeRequest
Source§fn clone(&self) -> CreateEntityTypeRequest
fn clone(&self) -> CreateEntityTypeRequest
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 CreateEntityTypeRequest
impl Debug for CreateEntityTypeRequest
Source§impl Default for CreateEntityTypeRequest
impl Default for CreateEntityTypeRequest
Source§fn default() -> CreateEntityTypeRequest
fn default() -> CreateEntityTypeRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateEntityTypeRequest
impl Message for CreateEntityTypeRequest
Source§impl PartialEq for CreateEntityTypeRequest
impl PartialEq for CreateEntityTypeRequest
impl StructuralPartialEq for CreateEntityTypeRequest
Auto Trait Implementations§
impl Freeze for CreateEntityTypeRequest
impl RefUnwindSafe for CreateEntityTypeRequest
impl Send for CreateEntityTypeRequest
impl Sync for CreateEntityTypeRequest
impl Unpin for CreateEntityTypeRequest
impl UnwindSafe for CreateEntityTypeRequest
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