#[non_exhaustive]pub struct PutObjectHold {
pub temporary_hold: HoldStatus,
pub event_based_hold: HoldStatus,
/* private fields */
}Expand description
Describes options to update object hold.
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.temporary_hold: HoldStatusRequired. Updates object temporary holds state. When object temporary hold is set, object cannot be deleted or replaced.
event_based_hold: HoldStatusRequired. Updates object event based holds state. When object event based hold is set, object cannot be deleted or replaced. Resets object’s time in the bucket for the purposes of the retention period.
Implementations§
Source§impl PutObjectHold
impl PutObjectHold
pub fn new() -> Self
Sourcepub fn set_temporary_hold<T: Into<HoldStatus>>(self, v: T) -> Self
pub fn set_temporary_hold<T: Into<HoldStatus>>(self, v: T) -> Self
Sets the value of temporary_hold.
§Example
ⓘ
use google_cloud_storagebatchoperations_v1::model::put_object_hold::HoldStatus;
let x0 = PutObjectHold::new().set_temporary_hold(HoldStatus::Set);
let x1 = PutObjectHold::new().set_temporary_hold(HoldStatus::Unset);Sourcepub fn set_event_based_hold<T: Into<HoldStatus>>(self, v: T) -> Self
pub fn set_event_based_hold<T: Into<HoldStatus>>(self, v: T) -> Self
Sets the value of event_based_hold.
§Example
ⓘ
use google_cloud_storagebatchoperations_v1::model::put_object_hold::HoldStatus;
let x0 = PutObjectHold::new().set_event_based_hold(HoldStatus::Set);
let x1 = PutObjectHold::new().set_event_based_hold(HoldStatus::Unset);Trait Implementations§
Source§impl Clone for PutObjectHold
impl Clone for PutObjectHold
Source§fn clone(&self) -> PutObjectHold
fn clone(&self) -> PutObjectHold
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 PutObjectHold
impl Debug for PutObjectHold
Source§impl Default for PutObjectHold
impl Default for PutObjectHold
Source§fn default() -> PutObjectHold
fn default() -> PutObjectHold
Returns the “default value” for a type. Read more
Source§impl Message for PutObjectHold
impl Message for PutObjectHold
Source§impl PartialEq for PutObjectHold
impl PartialEq for PutObjectHold
impl StructuralPartialEq for PutObjectHold
Auto Trait Implementations§
impl Freeze for PutObjectHold
impl RefUnwindSafe for PutObjectHold
impl Send for PutObjectHold
impl Sync for PutObjectHold
impl Unpin for PutObjectHold
impl UnwindSafe for PutObjectHold
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