#[non_exhaustive]pub struct WriteObjectSpec {
pub resource: Option<Object>,
pub predefined_acl: String,
pub if_generation_match: Option<i64>,
pub if_generation_not_match: Option<i64>,
pub if_metageneration_match: Option<i64>,
pub if_metageneration_not_match: Option<i64>,
pub object_size: Option<i64>,
pub appendable: Option<bool>,
/* private fields */
}Expand description
Describes an attempt to insert an object, possibly over multiple requests.
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.resource: Option<Object>Required. Destination object, including its name and its metadata.
predefined_acl: StringOptional. Apply a predefined set of access controls to this object.
Valid values are authenticatedRead, bucketOwnerFullControl,
bucketOwnerRead, private, projectPrivate, or publicRead.
if_generation_match: Option<i64>Makes the operation conditional on whether the object’s current
generation matches the given value. Setting to 0 makes the operation
succeed only if there are no live versions of the object.
if_generation_not_match: Option<i64>Makes the operation conditional on whether the object’s live
generation does not match the given value. If no live object exists, the
precondition fails. Setting to 0 makes the operation succeed only if
there is a live version of the object.
if_metageneration_match: Option<i64>Makes the operation conditional on whether the object’s current metageneration matches the given value.
if_metageneration_not_match: Option<i64>Makes the operation conditional on whether the object’s current metageneration does not match the given value.
object_size: Option<i64>The expected final object size being uploaded.
If this value is set, closing the stream after writing fewer or more than
object_size bytes results in an OUT_OF_RANGE error.
This situation is considered a client error, and if such an error occurs you must start the upload over from scratch, this time sending the correct number of bytes.
appendable: Option<bool>If true, the object is created in appendable mode.
This field might only be set when using BidiWriteObject.
Implementations§
Source§impl WriteObjectSpec
impl WriteObjectSpec
pub fn new() -> Self
Sourcepub fn set_resource<T>(self, v: T) -> Self
pub fn set_resource<T>(self, v: T) -> Self
Sets the value of resource.
Sourcepub fn set_or_clear_resource<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_resource<T>(self, v: Option<T>) -> Self
Sets or clears the value of resource.
Sourcepub fn set_predefined_acl<T: Into<String>>(self, v: T) -> Self
pub fn set_predefined_acl<T: Into<String>>(self, v: T) -> Self
Sets the value of predefined_acl.
Sourcepub fn set_if_generation_match<T>(self, v: T) -> Self
pub fn set_if_generation_match<T>(self, v: T) -> Self
Sets the value of if_generation_match.
Sourcepub fn set_or_clear_if_generation_match<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_if_generation_match<T>(self, v: Option<T>) -> Self
Sets or clears the value of if_generation_match.
Sourcepub fn set_if_generation_not_match<T>(self, v: T) -> Self
pub fn set_if_generation_not_match<T>(self, v: T) -> Self
Sets the value of if_generation_not_match.
Sourcepub fn set_or_clear_if_generation_not_match<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_if_generation_not_match<T>(self, v: Option<T>) -> Self
Sets or clears the value of if_generation_not_match.
Sourcepub fn set_if_metageneration_match<T>(self, v: T) -> Self
pub fn set_if_metageneration_match<T>(self, v: T) -> Self
Sets the value of if_metageneration_match.
Sourcepub fn set_or_clear_if_metageneration_match<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_if_metageneration_match<T>(self, v: Option<T>) -> Self
Sets or clears the value of if_metageneration_match.
Sourcepub fn set_if_metageneration_not_match<T>(self, v: T) -> Self
pub fn set_if_metageneration_not_match<T>(self, v: T) -> Self
Sets the value of if_metageneration_not_match.
Sourcepub fn set_or_clear_if_metageneration_not_match<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_if_metageneration_not_match<T>(self, v: Option<T>) -> Self
Sets or clears the value of if_metageneration_not_match.
Sourcepub fn set_object_size<T>(self, v: T) -> Self
pub fn set_object_size<T>(self, v: T) -> Self
Sets the value of object_size.
Sourcepub fn set_or_clear_object_size<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_object_size<T>(self, v: Option<T>) -> Self
Sets or clears the value of object_size.
Sourcepub fn set_appendable<T>(self, v: T) -> Self
pub fn set_appendable<T>(self, v: T) -> Self
Sets the value of appendable.
Sourcepub fn set_or_clear_appendable<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_appendable<T>(self, v: Option<T>) -> Self
Sets or clears the value of appendable.
Trait Implementations§
Source§impl Clone for WriteObjectSpec
impl Clone for WriteObjectSpec
Source§fn clone(&self) -> WriteObjectSpec
fn clone(&self) -> WriteObjectSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WriteObjectSpec
impl Debug for WriteObjectSpec
Source§impl Default for WriteObjectSpec
impl Default for WriteObjectSpec
Source§fn default() -> WriteObjectSpec
fn default() -> WriteObjectSpec
Source§impl Message for WriteObjectSpec
impl Message for WriteObjectSpec
Source§impl PartialEq for WriteObjectSpec
impl PartialEq for WriteObjectSpec
impl StructuralPartialEq for WriteObjectSpec
Auto Trait Implementations§
impl !Freeze for WriteObjectSpec
impl RefUnwindSafe for WriteObjectSpec
impl Send for WriteObjectSpec
impl Sync for WriteObjectSpec
impl Unpin for WriteObjectSpec
impl UnwindSafe for WriteObjectSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request