public final class WriteRequest extends GeneratedMessageV3 implements WriteRequestOrBuilder
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.
Protobuf type google.firestore.v1.WriteRequest
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
DATABASE_FIELD_NUMBER
public static final int DATABASE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
STREAM_ID_FIELD_NUMBER
public static final int STREAM_ID_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
STREAM_TOKEN_FIELD_NUMBER
public static final int STREAM_TOKEN_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
WRITES_FIELD_NUMBER
public static final int WRITES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static WriteRequest getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static WriteRequest.Builder newBuilder()
newBuilder(WriteRequest prototype)
public static WriteRequest.Builder newBuilder(WriteRequest prototype)
public static WriteRequest parseDelimitedFrom(InputStream input)
public static WriteRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static WriteRequest parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static WriteRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static WriteRequest parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static WriteRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static WriteRequest parseFrom(CodedInputStream input)
public static WriteRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static WriteRequest parseFrom(InputStream input)
public static WriteRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static WriteRequest parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static WriteRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<WriteRequest> parser()
Methods
containsLabels(String key)
public boolean containsLabels(String key)
Labels associated with this write request.
map<string, string> labels = 5;
Parameter |
---|
Name | Description |
key | String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDatabase()
public String getDatabase()
Required. The database name. In the format:
projects/{project_id}/databases/{database_id}
.
This is only required in the first message.
string database = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
String | The database.
|
getDatabaseBytes()
public ByteString getDatabaseBytes()
Required. The database name. In the format:
projects/{project_id}/databases/{database_id}
.
This is only required in the first message.
string database = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
ByteString | The bytes for database.
|
getDefaultInstanceForType()
public WriteRequest getDefaultInstanceForType()
getLabels()
public Map<String,String> getLabels()
getLabelsCount()
public int getLabelsCount()
Labels associated with this write request.
map<string, string> labels = 5;
Returns |
---|
Type | Description |
int | |
getLabelsMap()
public Map<String,String> getLabelsMap()
Labels associated with this write request.
map<string, string> labels = 5;
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Labels associated with this write request.
map<string, string> labels = 5;
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Labels associated with this write request.
map<string, string> labels = 5;
Parameter |
---|
Name | Description |
key | String
|
getParserForType()
public Parser<WriteRequest> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getStreamId()
public String getStreamId()
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.
string stream_id = 2;
Returns |
---|
Type | Description |
String | The streamId.
|
getStreamIdBytes()
public ByteString getStreamIdBytes()
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.
string stream_id = 2;
Returns |
---|
Type | Description |
ByteString | The bytes for streamId.
|
getStreamToken()
public ByteString getStreamToken()
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.
bytes stream_token = 4;
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Overrides
getWrites(int index)
public Write getWrites(int index)
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.
repeated .google.firestore.v1.Write writes = 3;
Parameter |
---|
Name | Description |
index | int
|
Returns |
---|
Type | Description |
Write | |
getWritesCount()
public int getWritesCount()
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.
repeated .google.firestore.v1.Write writes = 3;
Returns |
---|
Type | Description |
int | |
getWritesList()
public List<Write> getWritesList()
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.
repeated .google.firestore.v1.Write writes = 3;
getWritesOrBuilder(int index)
public WriteOrBuilder getWritesOrBuilder(int index)
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.
repeated .google.firestore.v1.Write writes = 3;
Parameter |
---|
Name | Description |
index | int
|
getWritesOrBuilderList()
public List<? extends WriteOrBuilder> getWritesOrBuilderList()
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.
repeated .google.firestore.v1.Write writes = 3;
Returns |
---|
Type | Description |
List<? extends com.google.firestore.v1.WriteOrBuilder> | |
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public WriteRequest.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected WriteRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public WriteRequest.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides