Struct google_api_proto::google::firestore::v1beta1::WriteRequest
source · pub struct WriteRequest {
pub database: String,
pub stream_id: String,
pub writes: Vec<Write>,
pub stream_token: Bytes,
pub labels: BTreeMap<String, String>,
}
Expand description
The request for [Firestore.Write][google.firestore.v1beta1.Firestore.Write].
The first request creates a stream, or resumes an existing one from a token.
When creating a new stream, the server replies with a response containing only an ID and a token, to use in the next request.
When resuming a stream, the server first streams any responses later than the given token, then a response containing only an up-to-date token, to use in the next request.
Fields§
§database: String
Required. The database name. In the format:
projects/{project_id}/databases/{database_id}
.
This is only required in the first message.
stream_id: String
The ID of the write stream to resume. This may only be set in the first message. When left empty, a new write stream will be created.
writes: Vec<Write>
The writes to apply.
Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
stream_token: Bytes
A stream token that was previously sent by the server.
The client should set this field to the token from the most recent [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has received responses up to this token. After sending this token, earlier tokens may not be used anymore.
The server may close the stream if there are too many unacknowledged responses.
Leave this field unset when creating a new stream. To resume a stream at
a specific point, set this field and the stream_id
field.
Leave this field unset when creating a new stream.
labels: BTreeMap<String, String>
Labels associated with this write request.
Trait Implementations§
source§impl Clone for WriteRequest
impl Clone for WriteRequest
source§fn clone(&self) -> WriteRequest
fn clone(&self) -> WriteRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WriteRequest
impl Debug for WriteRequest
source§impl Default for WriteRequest
impl Default for WriteRequest
source§impl Message for WriteRequest
impl Message for WriteRequest
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 WriteRequest
impl PartialEq for WriteRequest
source§fn eq(&self, other: &WriteRequest) -> bool
fn eq(&self, other: &WriteRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for WriteRequest
Auto Trait Implementations§
impl !Freeze for WriteRequest
impl RefUnwindSafe for WriteRequest
impl Send for WriteRequest
impl Sync for WriteRequest
impl Unpin for WriteRequest
impl UnwindSafe for WriteRequest
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