com.google.datastore.v1.CommitResponse Maven / Gradle / Ivy
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/datastore.proto
package com.google.datastore.v1;
/**
*
*
*
* The response for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
*
*
* Protobuf type {@code google.datastore.v1.CommitResponse}
*/
public final class CommitResponse extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.datastore.v1.CommitResponse)
CommitResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CommitResponse.newBuilder() to construct.
private CommitResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CommitResponse() {
mutationResults_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new CommitResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.datastore.v1.DatastoreProto
.internal_static_google_datastore_v1_CommitResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.datastore.v1.DatastoreProto
.internal_static_google_datastore_v1_CommitResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.datastore.v1.CommitResponse.class,
com.google.datastore.v1.CommitResponse.Builder.class);
}
public static final int MUTATION_RESULTS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List mutationResults_;
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
@java.lang.Override
public java.util.List getMutationResultsList() {
return mutationResults_;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
@java.lang.Override
public java.util.List extends com.google.datastore.v1.MutationResultOrBuilder>
getMutationResultsOrBuilderList() {
return mutationResults_;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
@java.lang.Override
public int getMutationResultsCount() {
return mutationResults_.size();
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
@java.lang.Override
public com.google.datastore.v1.MutationResult getMutationResults(int index) {
return mutationResults_.get(index);
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
@java.lang.Override
public com.google.datastore.v1.MutationResultOrBuilder getMutationResultsOrBuilder(int index) {
return mutationResults_.get(index);
}
public static final int INDEX_UPDATES_FIELD_NUMBER = 4;
private int indexUpdates_ = 0;
/**
*
*
*
* The number of index entries updated during the commit, or zero if none were
* updated.
*
*
* int32 index_updates = 4;
*
* @return The indexUpdates.
*/
@java.lang.Override
public int getIndexUpdates() {
return indexUpdates_;
}
public static final int COMMIT_TIME_FIELD_NUMBER = 8;
private com.google.protobuf.Timestamp commitTime_;
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*
* @return Whether the commitTime field is set.
*/
@java.lang.Override
public boolean hasCommitTime() {
return commitTime_ != null;
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*
* @return The commitTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCommitTime() {
return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_;
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() {
return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < mutationResults_.size(); i++) {
output.writeMessage(3, mutationResults_.get(i));
}
if (indexUpdates_ != 0) {
output.writeInt32(4, indexUpdates_);
}
if (commitTime_ != null) {
output.writeMessage(8, getCommitTime());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < mutationResults_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, mutationResults_.get(i));
}
if (indexUpdates_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, indexUpdates_);
}
if (commitTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCommitTime());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.datastore.v1.CommitResponse)) {
return super.equals(obj);
}
com.google.datastore.v1.CommitResponse other = (com.google.datastore.v1.CommitResponse) obj;
if (!getMutationResultsList().equals(other.getMutationResultsList())) return false;
if (getIndexUpdates() != other.getIndexUpdates()) return false;
if (hasCommitTime() != other.hasCommitTime()) return false;
if (hasCommitTime()) {
if (!getCommitTime().equals(other.getCommitTime())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getMutationResultsCount() > 0) {
hash = (37 * hash) + MUTATION_RESULTS_FIELD_NUMBER;
hash = (53 * hash) + getMutationResultsList().hashCode();
}
hash = (37 * hash) + INDEX_UPDATES_FIELD_NUMBER;
hash = (53 * hash) + getIndexUpdates();
if (hasCommitTime()) {
hash = (37 * hash) + COMMIT_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCommitTime().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.datastore.v1.CommitResponse parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.datastore.v1.CommitResponse parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.datastore.v1.CommitResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.datastore.v1.CommitResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.datastore.v1.CommitResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.datastore.v1.CommitResponse parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.datastore.v1.CommitResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.datastore.v1.CommitResponse parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.datastore.v1.CommitResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.datastore.v1.CommitResponse parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.datastore.v1.CommitResponse parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.datastore.v1.CommitResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.datastore.v1.CommitResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The response for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
*
*
* Protobuf type {@code google.datastore.v1.CommitResponse}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.datastore.v1.CommitResponse)
com.google.datastore.v1.CommitResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.datastore.v1.DatastoreProto
.internal_static_google_datastore_v1_CommitResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.datastore.v1.DatastoreProto
.internal_static_google_datastore_v1_CommitResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.datastore.v1.CommitResponse.class,
com.google.datastore.v1.CommitResponse.Builder.class);
}
// Construct using com.google.datastore.v1.CommitResponse.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (mutationResultsBuilder_ == null) {
mutationResults_ = java.util.Collections.emptyList();
} else {
mutationResults_ = null;
mutationResultsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
indexUpdates_ = 0;
commitTime_ = null;
if (commitTimeBuilder_ != null) {
commitTimeBuilder_.dispose();
commitTimeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.datastore.v1.DatastoreProto
.internal_static_google_datastore_v1_CommitResponse_descriptor;
}
@java.lang.Override
public com.google.datastore.v1.CommitResponse getDefaultInstanceForType() {
return com.google.datastore.v1.CommitResponse.getDefaultInstance();
}
@java.lang.Override
public com.google.datastore.v1.CommitResponse build() {
com.google.datastore.v1.CommitResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.datastore.v1.CommitResponse buildPartial() {
com.google.datastore.v1.CommitResponse result =
new com.google.datastore.v1.CommitResponse(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.datastore.v1.CommitResponse result) {
if (mutationResultsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
mutationResults_ = java.util.Collections.unmodifiableList(mutationResults_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.mutationResults_ = mutationResults_;
} else {
result.mutationResults_ = mutationResultsBuilder_.build();
}
}
private void buildPartial0(com.google.datastore.v1.CommitResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.indexUpdates_ = indexUpdates_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.commitTime_ = commitTimeBuilder_ == null ? commitTime_ : commitTimeBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.datastore.v1.CommitResponse) {
return mergeFrom((com.google.datastore.v1.CommitResponse) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.datastore.v1.CommitResponse other) {
if (other == com.google.datastore.v1.CommitResponse.getDefaultInstance()) return this;
if (mutationResultsBuilder_ == null) {
if (!other.mutationResults_.isEmpty()) {
if (mutationResults_.isEmpty()) {
mutationResults_ = other.mutationResults_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureMutationResultsIsMutable();
mutationResults_.addAll(other.mutationResults_);
}
onChanged();
}
} else {
if (!other.mutationResults_.isEmpty()) {
if (mutationResultsBuilder_.isEmpty()) {
mutationResultsBuilder_.dispose();
mutationResultsBuilder_ = null;
mutationResults_ = other.mutationResults_;
bitField0_ = (bitField0_ & ~0x00000001);
mutationResultsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getMutationResultsFieldBuilder()
: null;
} else {
mutationResultsBuilder_.addAllMessages(other.mutationResults_);
}
}
}
if (other.getIndexUpdates() != 0) {
setIndexUpdates(other.getIndexUpdates());
}
if (other.hasCommitTime()) {
mergeCommitTime(other.getCommitTime());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 26:
{
com.google.datastore.v1.MutationResult m =
input.readMessage(
com.google.datastore.v1.MutationResult.parser(), extensionRegistry);
if (mutationResultsBuilder_ == null) {
ensureMutationResultsIsMutable();
mutationResults_.add(m);
} else {
mutationResultsBuilder_.addMessage(m);
}
break;
} // case 26
case 32:
{
indexUpdates_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 32
case 66:
{
input.readMessage(getCommitTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 66
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List mutationResults_ =
java.util.Collections.emptyList();
private void ensureMutationResultsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
mutationResults_ =
new java.util.ArrayList(mutationResults_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.datastore.v1.MutationResult,
com.google.datastore.v1.MutationResult.Builder,
com.google.datastore.v1.MutationResultOrBuilder>
mutationResultsBuilder_;
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public java.util.List getMutationResultsList() {
if (mutationResultsBuilder_ == null) {
return java.util.Collections.unmodifiableList(mutationResults_);
} else {
return mutationResultsBuilder_.getMessageList();
}
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public int getMutationResultsCount() {
if (mutationResultsBuilder_ == null) {
return mutationResults_.size();
} else {
return mutationResultsBuilder_.getCount();
}
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public com.google.datastore.v1.MutationResult getMutationResults(int index) {
if (mutationResultsBuilder_ == null) {
return mutationResults_.get(index);
} else {
return mutationResultsBuilder_.getMessage(index);
}
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public Builder setMutationResults(int index, com.google.datastore.v1.MutationResult value) {
if (mutationResultsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMutationResultsIsMutable();
mutationResults_.set(index, value);
onChanged();
} else {
mutationResultsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public Builder setMutationResults(
int index, com.google.datastore.v1.MutationResult.Builder builderForValue) {
if (mutationResultsBuilder_ == null) {
ensureMutationResultsIsMutable();
mutationResults_.set(index, builderForValue.build());
onChanged();
} else {
mutationResultsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public Builder addMutationResults(com.google.datastore.v1.MutationResult value) {
if (mutationResultsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMutationResultsIsMutable();
mutationResults_.add(value);
onChanged();
} else {
mutationResultsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public Builder addMutationResults(int index, com.google.datastore.v1.MutationResult value) {
if (mutationResultsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMutationResultsIsMutable();
mutationResults_.add(index, value);
onChanged();
} else {
mutationResultsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public Builder addMutationResults(
com.google.datastore.v1.MutationResult.Builder builderForValue) {
if (mutationResultsBuilder_ == null) {
ensureMutationResultsIsMutable();
mutationResults_.add(builderForValue.build());
onChanged();
} else {
mutationResultsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public Builder addMutationResults(
int index, com.google.datastore.v1.MutationResult.Builder builderForValue) {
if (mutationResultsBuilder_ == null) {
ensureMutationResultsIsMutable();
mutationResults_.add(index, builderForValue.build());
onChanged();
} else {
mutationResultsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public Builder addAllMutationResults(
java.lang.Iterable extends com.google.datastore.v1.MutationResult> values) {
if (mutationResultsBuilder_ == null) {
ensureMutationResultsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mutationResults_);
onChanged();
} else {
mutationResultsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public Builder clearMutationResults() {
if (mutationResultsBuilder_ == null) {
mutationResults_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
mutationResultsBuilder_.clear();
}
return this;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public Builder removeMutationResults(int index) {
if (mutationResultsBuilder_ == null) {
ensureMutationResultsIsMutable();
mutationResults_.remove(index);
onChanged();
} else {
mutationResultsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public com.google.datastore.v1.MutationResult.Builder getMutationResultsBuilder(int index) {
return getMutationResultsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public com.google.datastore.v1.MutationResultOrBuilder getMutationResultsOrBuilder(int index) {
if (mutationResultsBuilder_ == null) {
return mutationResults_.get(index);
} else {
return mutationResultsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public java.util.List extends com.google.datastore.v1.MutationResultOrBuilder>
getMutationResultsOrBuilderList() {
if (mutationResultsBuilder_ != null) {
return mutationResultsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(mutationResults_);
}
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public com.google.datastore.v1.MutationResult.Builder addMutationResultsBuilder() {
return getMutationResultsFieldBuilder()
.addBuilder(com.google.datastore.v1.MutationResult.getDefaultInstance());
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public com.google.datastore.v1.MutationResult.Builder addMutationResultsBuilder(int index) {
return getMutationResultsFieldBuilder()
.addBuilder(index, com.google.datastore.v1.MutationResult.getDefaultInstance());
}
/**
*
*
*
* The result of performing the mutations.
* The i-th mutation result corresponds to the i-th mutation in the request.
*
*
* repeated .google.datastore.v1.MutationResult mutation_results = 3;
*/
public java.util.List
getMutationResultsBuilderList() {
return getMutationResultsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.datastore.v1.MutationResult,
com.google.datastore.v1.MutationResult.Builder,
com.google.datastore.v1.MutationResultOrBuilder>
getMutationResultsFieldBuilder() {
if (mutationResultsBuilder_ == null) {
mutationResultsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.datastore.v1.MutationResult,
com.google.datastore.v1.MutationResult.Builder,
com.google.datastore.v1.MutationResultOrBuilder>(
mutationResults_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
mutationResults_ = null;
}
return mutationResultsBuilder_;
}
private int indexUpdates_;
/**
*
*
*
* The number of index entries updated during the commit, or zero if none were
* updated.
*
*
* int32 index_updates = 4;
*
* @return The indexUpdates.
*/
@java.lang.Override
public int getIndexUpdates() {
return indexUpdates_;
}
/**
*
*
*
* The number of index entries updated during the commit, or zero if none were
* updated.
*
*
* int32 index_updates = 4;
*
* @param value The indexUpdates to set.
* @return This builder for chaining.
*/
public Builder setIndexUpdates(int value) {
indexUpdates_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The number of index entries updated during the commit, or zero if none were
* updated.
*
*
* int32 index_updates = 4;
*
* @return This builder for chaining.
*/
public Builder clearIndexUpdates() {
bitField0_ = (bitField0_ & ~0x00000002);
indexUpdates_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp commitTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
commitTimeBuilder_;
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*
* @return Whether the commitTime field is set.
*/
public boolean hasCommitTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*
* @return The commitTime.
*/
public com.google.protobuf.Timestamp getCommitTime() {
if (commitTimeBuilder_ == null) {
return commitTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: commitTime_;
} else {
return commitTimeBuilder_.getMessage();
}
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*/
public Builder setCommitTime(com.google.protobuf.Timestamp value) {
if (commitTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
commitTime_ = value;
} else {
commitTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*/
public Builder setCommitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (commitTimeBuilder_ == null) {
commitTime_ = builderForValue.build();
} else {
commitTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*/
public Builder mergeCommitTime(com.google.protobuf.Timestamp value) {
if (commitTimeBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& commitTime_ != null
&& commitTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCommitTimeBuilder().mergeFrom(value);
} else {
commitTime_ = value;
}
} else {
commitTimeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*/
public Builder clearCommitTime() {
bitField0_ = (bitField0_ & ~0x00000004);
commitTime_ = null;
if (commitTimeBuilder_ != null) {
commitTimeBuilder_.dispose();
commitTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*/
public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getCommitTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*/
public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() {
if (commitTimeBuilder_ != null) {
return commitTimeBuilder_.getMessageOrBuilder();
} else {
return commitTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: commitTime_;
}
}
/**
*
*
*
* The transaction commit timestamp. Not set for non-transactional commits.
*
*
* .google.protobuf.Timestamp commit_time = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getCommitTimeFieldBuilder() {
if (commitTimeBuilder_ == null) {
commitTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getCommitTime(), getParentForChildren(), isClean());
commitTime_ = null;
}
return commitTimeBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.datastore.v1.CommitResponse)
}
// @@protoc_insertion_point(class_scope:google.datastore.v1.CommitResponse)
private static final com.google.datastore.v1.CommitResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.datastore.v1.CommitResponse();
}
public static com.google.datastore.v1.CommitResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CommitResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.datastore.v1.CommitResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy