public static final class CommitRequest.Builder extends GeneratedMessageV3.Builder<CommitRequest.Builder> implements CommitRequestOrBuilder
The request for Datastore.Commit.
Protobuf type google.datastore.v1.CommitRequest
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > CommitRequest.BuilderImplements
CommitRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllMutations(Iterable<? extends Mutation> values)
public CommitRequest.Builder addAllMutations(Iterable<? extends Mutation> values)
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
values | Iterable<? extends com.google.datastore.v1.Mutation> |
Type | Description |
CommitRequest.Builder |
addMutations(Mutation value)
public CommitRequest.Builder addMutations(Mutation value)
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
value | Mutation |
Type | Description |
CommitRequest.Builder |
addMutations(Mutation.Builder builderForValue)
public CommitRequest.Builder addMutations(Mutation.Builder builderForValue)
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
builderForValue | Mutation.Builder |
Type | Description |
CommitRequest.Builder |
addMutations(int index, Mutation value)
public CommitRequest.Builder addMutations(int index, Mutation value)
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
index | int |
value | Mutation |
Type | Description |
CommitRequest.Builder |
addMutations(int index, Mutation.Builder builderForValue)
public CommitRequest.Builder addMutations(int index, Mutation.Builder builderForValue)
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
index | int |
builderForValue | Mutation.Builder |
Type | Description |
CommitRequest.Builder |
addMutationsBuilder()
public Mutation.Builder addMutationsBuilder()
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Type | Description |
Mutation.Builder |
addMutationsBuilder(int index)
public Mutation.Builder addMutationsBuilder(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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
index | int |
Type | Description |
Mutation.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CommitRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
CommitRequest.Builder |
build()
public CommitRequest build()
Type | Description |
CommitRequest |
buildPartial()
public CommitRequest buildPartial()
Type | Description |
CommitRequest |
clear()
public CommitRequest.Builder clear()
Type | Description |
CommitRequest.Builder |
clearField(Descriptors.FieldDescriptor field)
public CommitRequest.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
CommitRequest.Builder |
clearMode()
public CommitRequest.Builder clearMode()
The type of commit to perform. Defaults to TRANSACTIONAL
.
.google.datastore.v1.CommitRequest.Mode mode = 5;
Type | Description |
CommitRequest.Builder | This builder for chaining. |
clearMutations()
public CommitRequest.Builder clearMutations()
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Type | Description |
CommitRequest.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public CommitRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
CommitRequest.Builder |
clearProjectId()
public CommitRequest.Builder clearProjectId()
Required. The ID of the project against which to make the request.
string project_id = 8 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
CommitRequest.Builder | This builder for chaining. |
clearTransaction()
public CommitRequest.Builder clearTransaction()
The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.
bytes transaction = 1;
Type | Description |
CommitRequest.Builder | This builder for chaining. |
clearTransactionSelector()
public CommitRequest.Builder clearTransactionSelector()
Type | Description |
CommitRequest.Builder |
clone()
public CommitRequest.Builder clone()
Type | Description |
CommitRequest.Builder |
getDefaultInstanceForType()
public CommitRequest getDefaultInstanceForType()
Type | Description |
CommitRequest |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getMode()
public CommitRequest.Mode getMode()
The type of commit to perform. Defaults to TRANSACTIONAL
.
.google.datastore.v1.CommitRequest.Mode mode = 5;
Type | Description |
CommitRequest.Mode | The mode. |
getModeValue()
public int getModeValue()
The type of commit to perform. Defaults to TRANSACTIONAL
.
.google.datastore.v1.CommitRequest.Mode mode = 5;
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
index | int |
Type | Description |
Mutation |
getMutationsBuilder(int index)
public Mutation.Builder getMutationsBuilder(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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
index | int |
Type | Description |
Mutation.Builder |
getMutationsBuilderList()
public List<Mutation.Builder> getMutationsBuilderList()
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Type | Description |
List<Builder> |
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Type | Description |
int |
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Type | Description |
List<Mutation> |
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
index | int |
Type | Description |
MutationOrBuilder |
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Type | Description |
List<? extends com.google.datastore.v1.MutationOrBuilder> |
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];
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];
Type | Description |
ByteString | The bytes for projectId. |
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;
Type | Description |
ByteString | The transaction. |
getTransactionSelectorCase()
public CommitRequest.TransactionSelectorCase getTransactionSelectorCase()
Type | Description |
CommitRequest.TransactionSelectorCase |
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;
Type | Description |
boolean | Whether the transaction field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(CommitRequest other)
public CommitRequest.Builder mergeFrom(CommitRequest other)
Name | Description |
other | CommitRequest |
Type | Description |
CommitRequest.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CommitRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
CommitRequest.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public CommitRequest.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
CommitRequest.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CommitRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
CommitRequest.Builder |
removeMutations(int index)
public CommitRequest.Builder removeMutations(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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
index | int |
Type | Description |
CommitRequest.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public CommitRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
CommitRequest.Builder |
setMode(CommitRequest.Mode value)
public CommitRequest.Builder setMode(CommitRequest.Mode value)
The type of commit to perform. Defaults to TRANSACTIONAL
.
.google.datastore.v1.CommitRequest.Mode mode = 5;
Name | Description |
value | CommitRequest.Mode The mode to set. |
Type | Description |
CommitRequest.Builder | This builder for chaining. |
setModeValue(int value)
public CommitRequest.Builder setModeValue(int value)
The type of commit to perform. Defaults to TRANSACTIONAL
.
.google.datastore.v1.CommitRequest.Mode mode = 5;
Name | Description |
value | int The enum numeric value on the wire for mode to set. |
Type | Description |
CommitRequest.Builder | This builder for chaining. |
setMutations(int index, Mutation value)
public CommitRequest.Builder setMutations(int index, Mutation value)
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
index | int |
value | Mutation |
Type | Description |
CommitRequest.Builder |
setMutations(int index, Mutation.Builder builderForValue)
public CommitRequest.Builder setMutations(int index, Mutation.Builder builderForValue)
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 byinsert
update
followed byinsert
upsert
followed byinsert
delete
followed byupdate
When mode isNON_TRANSACTIONAL
, no two mutations may affect a single entity.
repeated .google.datastore.v1.Mutation mutations = 6;
Name | Description |
index | int |
builderForValue | Mutation.Builder |
Type | Description |
CommitRequest.Builder |
setProjectId(String value)
public CommitRequest.Builder setProjectId(String value)
Required. The ID of the project against which to make the request.
string project_id = 8 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | String The projectId to set. |
Type | Description |
CommitRequest.Builder | This builder for chaining. |
setProjectIdBytes(ByteString value)
public CommitRequest.Builder setProjectIdBytes(ByteString value)
Required. The ID of the project against which to make the request.
string project_id = 8 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | ByteString The bytes for projectId to set. |
Type | Description |
CommitRequest.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CommitRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
CommitRequest.Builder |
setTransaction(ByteString value)
public CommitRequest.Builder setTransaction(ByteString value)
The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.
bytes transaction = 1;
Name | Description |
value | ByteString The transaction to set. |
Type | Description |
CommitRequest.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final CommitRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
CommitRequest.Builder |