#[non_exhaustive]pub struct CreateDocumentRequest {
pub parent: String,
pub document: Option<Document>,
pub document_id: String,
/* private fields */
}document-service only.Expand description
Request message for DocumentService.CreateDocument method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The parent resource name, such as
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}.
document: Option<Document>Required. The Document to create.
document_id: StringRequired. The ID to use for the Document, which becomes the final component of the Document.name.
If the caller does not have permission to create the
Document, regardless of whether
or not it exists, a PERMISSION_DENIED error is returned.
This field must be unique among all
Documents with the same
parent.
Otherwise, an ALREADY_EXISTS error is returned.
This field must conform to RFC-1034
standard with a length limit of 128 characters. Otherwise, an
INVALID_ARGUMENT error is returned.
Implementations§
Source§impl CreateDocumentRequest
impl CreateDocumentRequest
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_document<T>(self, v: T) -> Self
pub fn set_document<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_document<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_document<T>(self, v: Option<T>) -> Self
Sourcepub fn set_document_id<T: Into<String>>(self, v: T) -> Self
pub fn set_document_id<T: Into<String>>(self, v: T) -> Self
Sets the value of document_id.
§Example
let x = CreateDocumentRequest::new().set_document_id("example");Trait Implementations§
Source§impl Clone for CreateDocumentRequest
impl Clone for CreateDocumentRequest
Source§fn clone(&self) -> CreateDocumentRequest
fn clone(&self) -> CreateDocumentRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more