#[non_exhaustive]pub struct CreateKnowledgeBaseRequest {
pub parent: String,
pub knowledge_base: Option<KnowledgeBase>,
/* private fields */
}Available on crate feature
knowledge-bases only.Expand description
Request message for KnowledgeBases.CreateKnowledgeBase.
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 project to create a knowledge base for.
Format: projects/<Project ID>/locations/<Location ID>.
knowledge_base: Option<KnowledgeBase>Required. The knowledge base to create.
Implementations§
Source§impl CreateKnowledgeBaseRequest
impl CreateKnowledgeBaseRequest
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_knowledge_base<T>(self, v: T) -> Selfwhere
T: Into<KnowledgeBase>,
pub fn set_knowledge_base<T>(self, v: T) -> Selfwhere
T: Into<KnowledgeBase>,
Sets the value of knowledge_base.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::KnowledgeBase;
let x = CreateKnowledgeBaseRequest::new().set_knowledge_base(KnowledgeBase::default()/* use setters */);Sourcepub fn set_or_clear_knowledge_base<T>(self, v: Option<T>) -> Selfwhere
T: Into<KnowledgeBase>,
pub fn set_or_clear_knowledge_base<T>(self, v: Option<T>) -> Selfwhere
T: Into<KnowledgeBase>,
Sets or clears the value of knowledge_base.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::KnowledgeBase;
let x = CreateKnowledgeBaseRequest::new().set_or_clear_knowledge_base(Some(KnowledgeBase::default()/* use setters */));
let x = CreateKnowledgeBaseRequest::new().set_or_clear_knowledge_base(None::<KnowledgeBase>);Trait Implementations§
Source§impl Clone for CreateKnowledgeBaseRequest
impl Clone for CreateKnowledgeBaseRequest
Source§fn clone(&self) -> CreateKnowledgeBaseRequest
fn clone(&self) -> CreateKnowledgeBaseRequest
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 CreateKnowledgeBaseRequest
impl Debug for CreateKnowledgeBaseRequest
Source§impl Default for CreateKnowledgeBaseRequest
impl Default for CreateKnowledgeBaseRequest
Source§fn default() -> CreateKnowledgeBaseRequest
fn default() -> CreateKnowledgeBaseRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateKnowledgeBaseRequest
impl Message for CreateKnowledgeBaseRequest
impl StructuralPartialEq for CreateKnowledgeBaseRequest
Auto Trait Implementations§
impl Freeze for CreateKnowledgeBaseRequest
impl RefUnwindSafe for CreateKnowledgeBaseRequest
impl Send for CreateKnowledgeBaseRequest
impl Sync for CreateKnowledgeBaseRequest
impl Unpin for CreateKnowledgeBaseRequest
impl UnwindSafe for CreateKnowledgeBaseRequest
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