Struct google_api_proto::google::storage::v2::BidiWriteObjectRequest
source · pub struct BidiWriteObjectRequest {
pub write_offset: i64,
pub object_checksums: Option<ObjectChecksums>,
pub state_lookup: bool,
pub flush: bool,
pub finish_write: bool,
pub common_object_request_params: Option<CommonObjectRequestParams>,
pub first_message: Option<FirstMessage>,
pub data: Option<Data>,
}
Expand description
Request message for BidiWriteObject.
Fields§
§write_offset: i64
Required. The offset from the beginning of the object at which the data should be written.
In the first WriteObjectRequest
of a WriteObject()
action, it
indicates the initial offset for the Write()
call. The value must be
equal to the persisted_size
that a call to QueryWriteStatus()
would
return (0 if this is the first write to the object).
On subsequent calls, this value must be no larger than the sum of the
first write_offset
and the sizes of all data
chunks sent previously on
this stream.
An invalid value will cause an error.
object_checksums: Option<ObjectChecksums>
Checksums for the complete object. If the checksums computed by the service don’t match the specified checksums the call will fail. May only be provided in the first or last request (either with first_message, or finish_write set).
state_lookup: bool
For each BidiWriteObjectRequest where state_lookup is true
or the client
closes the stream, the service will send a BidiWriteObjectResponse
containing the current persisted size. The persisted size sent in responses
covers all the bytes the server has persisted thus far and can be used to
decide what data is safe for the client to drop. Note that the object’s
current size reported by the BidiWriteObjectResponse may lag behind the
number of bytes written by the client. This field is ignored if
finish_write
is set to true.
flush: bool
Persists data written on the stream, up to and including the current
message, to permanent storage. This option should be used sparingly as it
may reduce performance. Ongoing writes will periodically be persisted on
the server even when flush
is not set. This field is ignored if
finish_write
is set to true since there’s no need to checkpoint or flush
if this message completes the write.
finish_write: bool
If true
, this indicates that the write is complete. Sending any
WriteObjectRequest
s subsequent to one in which finish_write
is true
will cause an error.
For a non-resumable write (where the upload_id was not set in the first
message), it is an error not to set this field in the final message of the
stream.
common_object_request_params: Option<CommonObjectRequestParams>
A set of parameters common to Storage API requests concerning an object.
first_message: Option<FirstMessage>
The first message of each stream should set one of the following.
data: Option<Data>
A portion of the data for the object.
Trait Implementations§
source§impl Clone for BidiWriteObjectRequest
impl Clone for BidiWriteObjectRequest
source§fn clone(&self) -> BidiWriteObjectRequest
fn clone(&self) -> BidiWriteObjectRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BidiWriteObjectRequest
impl Debug for BidiWriteObjectRequest
source§impl Default for BidiWriteObjectRequest
impl Default for BidiWriteObjectRequest
source§impl Message for BidiWriteObjectRequest
impl Message for BidiWriteObjectRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for BidiWriteObjectRequest
impl PartialEq for BidiWriteObjectRequest
source§fn eq(&self, other: &BidiWriteObjectRequest) -> bool
fn eq(&self, other: &BidiWriteObjectRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BidiWriteObjectRequest
Auto Trait Implementations§
impl !Freeze for BidiWriteObjectRequest
impl RefUnwindSafe for BidiWriteObjectRequest
impl Send for BidiWriteObjectRequest
impl Sync for BidiWriteObjectRequest
impl Unpin for BidiWriteObjectRequest
impl UnwindSafe for BidiWriteObjectRequest
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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