#[non_exhaustive]pub struct UpdateDocumentRequest {
pub document: Option<Document>,
pub allow_missing: bool,
pub update_mask: Option<FieldMask>,
/* private fields */
}Available on crate feature
document-service only.Expand description
Request message for DocumentService.UpdateDocument method.
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.document: Option<Document>Required. The document to update/create.
If the caller does not have permission to update the
Document, regardless of whether
or not it exists, a PERMISSION_DENIED error is returned.
If the Document to update does
not exist and
allow_missing
is not set, a NOT_FOUND error is returned.
allow_missing: bool§update_mask: Option<FieldMask>Indicates which fields in the provided imported ‘document’ to update. If not set, by default updates all fields.
Implementations§
Source§impl UpdateDocumentRequest
impl UpdateDocumentRequest
pub fn new() -> 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_allow_missing<T: Into<bool>>(self, v: T) -> Self
pub fn set_allow_missing<T: Into<bool>>(self, v: T) -> Self
Sets the value of allow_missing.
§Example
ⓘ
let x = UpdateDocumentRequest::new().set_allow_missing(true);Sourcepub fn set_update_mask<T>(self, v: T) -> Self
pub fn set_update_mask<T>(self, v: T) -> Self
Sets the value of update_mask.
§Example
ⓘ
use wkt::FieldMask;
let x = UpdateDocumentRequest::new().set_update_mask(FieldMask::default()/* use setters */);Sourcepub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_mask.
§Example
ⓘ
use wkt::FieldMask;
let x = UpdateDocumentRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
let x = UpdateDocumentRequest::new().set_or_clear_update_mask(None::<FieldMask>);Trait Implementations§
Source§impl Clone for UpdateDocumentRequest
impl Clone for UpdateDocumentRequest
Source§fn clone(&self) -> UpdateDocumentRequest
fn clone(&self) -> UpdateDocumentRequest
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 UpdateDocumentRequest
impl Debug for UpdateDocumentRequest
Source§impl Default for UpdateDocumentRequest
impl Default for UpdateDocumentRequest
Source§fn default() -> UpdateDocumentRequest
fn default() -> UpdateDocumentRequest
Returns the “default value” for a type. Read more
Source§impl Message for UpdateDocumentRequest
impl Message for UpdateDocumentRequest
Source§impl PartialEq for UpdateDocumentRequest
impl PartialEq for UpdateDocumentRequest
impl StructuralPartialEq for UpdateDocumentRequest
Auto Trait Implementations§
impl !Freeze for UpdateDocumentRequest
impl RefUnwindSafe for UpdateDocumentRequest
impl Send for UpdateDocumentRequest
impl Sync for UpdateDocumentRequest
impl Unpin for UpdateDocumentRequest
impl UnwindSafe for UpdateDocumentRequest
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