Class: Google::Cloud::Firestore::V1::WriteRequest
- Inherits:
-
Object
- Object
- Google::Cloud::Firestore::V1::WriteRequest
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/firestore/v1/firestore.rb
Overview
The request for 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.
Defined Under Namespace
Classes: LabelsEntry
Instance Attribute Summary collapse
-
#database ⇒ ::String
Required.
-
#labels ⇒ ::Google::Protobuf::Map{::String => ::String}
Labels associated with this write request.
-
#stream_id ⇒ ::String
The ID of the write stream to resume.
-
#stream_token ⇒ ::String
A stream token that was previously sent by the server.
-
#writes ⇒ ::Array<::Google::Cloud::Firestore::V1::Write>
The writes to apply.
Instance Attribute Details
#database ⇒ ::String
Returns Required. The database name. In the format:
projects/{project_id}/databases/{database_id}
.
This is only required in the first message.
496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'proto_docs/google/firestore/v1/firestore.rb', line 496 class WriteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#labels ⇒ ::Google::Protobuf::Map{::String => ::String}
Returns Labels associated with this write request.
496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'proto_docs/google/firestore/v1/firestore.rb', line 496 class WriteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#stream_id ⇒ ::String
Returns 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.
496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'proto_docs/google/firestore/v1/firestore.rb', line 496 class WriteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#stream_token ⇒ ::String
Returns A stream token that was previously sent by the server.
The client should set this field to the token from the most recent 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.
496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'proto_docs/google/firestore/v1/firestore.rb', line 496 class WriteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#writes ⇒ ::Array<::Google::Cloud::Firestore::V1::Write>
Returns 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.
496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'proto_docs/google/firestore/v1/firestore.rb', line 496 class WriteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |