public final class CommitRequest extends GeneratedMessageV3 implements CommitRequestOrBuilder
The request for Datastore.Commit.
Protobuf type google.datastore.v1.CommitRequest
Static Fields
MODE_FIELD_NUMBER
public static final int MODE_FIELD_NUMBER
Field Value
MUTATIONS_FIELD_NUMBER
public static final int MUTATIONS_FIELD_NUMBER
Field Value
PROJECT_ID_FIELD_NUMBER
public static final int PROJECT_ID_FIELD_NUMBER
Field Value
TRANSACTION_FIELD_NUMBER
public static final int TRANSACTION_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static CommitRequest getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static CommitRequest.Builder newBuilder()
Returns
newBuilder(CommitRequest prototype)
public static CommitRequest.Builder newBuilder(CommitRequest prototype)
Parameter
Returns
public static CommitRequest parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static CommitRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static CommitRequest parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CommitRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static CommitRequest parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CommitRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CommitRequest parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static CommitRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CommitRequest parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static CommitRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static CommitRequest parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CommitRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<CommitRequest> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public CommitRequest getDefaultInstanceForType()
Returns
getMode()
public CommitRequest.Mode getMode()
The type of commit to perform. Defaults to TRANSACTIONAL
.
.google.datastore.v1.CommitRequest.Mode mode = 5;
Returns
getModeValue()
public int getModeValue()
The type of commit to perform. Defaults to TRANSACTIONAL
.
.google.datastore.v1.CommitRequest.Mode mode = 5;
Returns
Type | Description |
int | The enum numeric value on the wire for mode.
|
getMutations(int index)
public Mutation getMutations(int index)
The mutations to perform.
When mode is TRANSACTIONAL
, mutations affecting a single entity are
applied in order. The following sequences of mutations affecting a single
entity are not permitted in a single Commit
request:
insert
followed by insert
update
followed by insert
upsert
followed by insert
delete
followed by update
When mode is NON_TRANSACTIONAL
, no two mutations may affect a single
entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Parameter
Returns
getMutationsCount()
public int getMutationsCount()
The mutations to perform.
When mode is TRANSACTIONAL
, mutations affecting a single entity are
applied in order. The following sequences of mutations affecting a single
entity are not permitted in a single Commit
request:
insert
followed by insert
update
followed by insert
upsert
followed by insert
delete
followed by update
When mode is NON_TRANSACTIONAL
, no two mutations may affect a single
entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Returns
getMutationsList()
public List<Mutation> getMutationsList()
The mutations to perform.
When mode is TRANSACTIONAL
, mutations affecting a single entity are
applied in order. The following sequences of mutations affecting a single
entity are not permitted in a single Commit
request:
insert
followed by insert
update
followed by insert
upsert
followed by insert
delete
followed by update
When mode is NON_TRANSACTIONAL
, no two mutations may affect a single
entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Returns
getMutationsOrBuilder(int index)
public MutationOrBuilder getMutationsOrBuilder(int index)
The mutations to perform.
When mode is TRANSACTIONAL
, mutations affecting a single entity are
applied in order. The following sequences of mutations affecting a single
entity are not permitted in a single Commit
request:
insert
followed by insert
update
followed by insert
upsert
followed by insert
delete
followed by update
When mode is NON_TRANSACTIONAL
, no two mutations may affect a single
entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Parameter
Returns
getMutationsOrBuilderList()
public List<? extends MutationOrBuilder> getMutationsOrBuilderList()
The mutations to perform.
When mode is TRANSACTIONAL
, mutations affecting a single entity are
applied in order. The following sequences of mutations affecting a single
entity are not permitted in a single Commit
request:
insert
followed by insert
update
followed by insert
upsert
followed by insert
delete
followed by update
When mode is NON_TRANSACTIONAL
, no two mutations may affect a single
entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Returns
Type | Description |
List<? extends com.google.datastore.v1.MutationOrBuilder> | |
getParserForType()
public Parser<CommitRequest> getParserForType()
Returns
Overrides
getProjectId()
public String getProjectId()
Required. The ID of the project against which to make the request.
string project_id = 8 [(.google.api.field_behavior) = REQUIRED];
Returns
Type | Description |
String | The projectId.
|
getProjectIdBytes()
public ByteString getProjectIdBytes()
Required. The ID of the project against which to make the request.
string project_id = 8 [(.google.api.field_behavior) = REQUIRED];
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getTransaction()
public ByteString getTransaction()
The identifier of the transaction associated with the commit. A
transaction identifier is returned by a call to
Datastore.BeginTransaction.
bytes transaction = 1;
Returns
getTransactionSelectorCase()
public CommitRequest.TransactionSelectorCase getTransactionSelectorCase()
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasTransaction()
public boolean hasTransaction()
The identifier of the transaction associated with the commit. A
transaction identifier is returned by a call to
Datastore.BeginTransaction.
bytes transaction = 1;
Returns
Type | Description |
boolean | Whether the transaction field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public CommitRequest.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CommitRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public CommitRequest.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions