Struct googapis::google::firestore::v1::WriteRequest [−][src]
pub struct WriteRequest {
pub database: String,
pub stream_id: String,
pub writes: Vec<Write>,
pub stream_token: Vec<u8>,
pub labels: HashMap<String, String>,
}
Expand description
The request for [Firestore.Write][google.firestore.v1.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: Vec<u8>
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.v1.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: HashMap<String, String>
Labels associated with this write request.
Trait Implementations
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
Returns the encoded length of the message without a length delimiter.
Encodes the message to a buffer. Read more
Encodes the message to a newly allocated buffer.
Encodes the message with a length-delimiter to a buffer. Read more
Encodes the message with a length-delimiter to a newly allocated buffer.
Decodes an instance of the message from a buffer. Read more
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
Decodes a length-delimited instance of the message from the buffer.
Decodes an instance of the message from a buffer, and merges it into self
. Read more
Decodes a length-delimited instance of the message from buffer, and
merges it into self
. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for WriteRequest
impl Send for WriteRequest
impl Sync for WriteRequest
impl Unpin for WriteRequest
impl UnwindSafe for WriteRequest
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more