Class: Google::Apis::FirestoreV1beta1::WriteRequest
- Inherits:
-
Object
- Object
- Google::Apis::FirestoreV1beta1::WriteRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firestore_v1beta1/classes.rb,
lib/google/apis/firestore_v1beta1/representations.rb,
lib/google/apis/firestore_v1beta1/representations.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.
Instance Attribute Summary collapse
-
#labels ⇒ Hash<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::Apis::FirestoreV1beta1::Write>
The writes to apply.
Instance Method Summary collapse
-
#initialize(**args) ⇒ WriteRequest
constructor
A new instance of WriteRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ WriteRequest
Returns a new instance of WriteRequest.
2439 2440 2441 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2439 def initialize(**args) update!(**args) end |
Instance Attribute Details
#labels ⇒ Hash<String,String>
Labels associated with this write request.
Corresponds to the JSON property labels
2411 2412 2413 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2411 def labels @labels end |
#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.
Corresponds to the JSON property streamId
2417 2418 2419 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2417 def stream_id @stream_id end |
#stream_token ⇒ String
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.
Corresponds to the JSON property streamToken
NOTE: Values are automatically base64 encoded/decoded in the client library.
2430 2431 2432 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2430 def stream_token @stream_token end |
#writes ⇒ Array<Google::Apis::FirestoreV1beta1::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.
Corresponds to the JSON property writes
2437 2438 2439 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2437 def writes @writes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2444 2445 2446 2447 2448 2449 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2444 def update!(**args) @labels = args[:labels] if args.key?(:labels) @stream_id = args[:stream_id] if args.key?(:stream_id) @stream_token = args[:stream_token] if args.key?(:stream_token) @writes = args[:writes] if args.key?(:writes) end |