/** * * * <pre> * The mutations to be executed when this transaction commits. All * mutations are applied atomically, in the order they appear in * this list. * </pre> * * <code>repeated .google.spanner.v1.Mutation mutations = 4;</code> */ public Builder clearMutations() { if (mutationsBuilder_ == null) { mutations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { mutationsBuilder_.clear(); } return this; } /**
/** * * * <pre> * The mutations to be executed when this transaction commits. All * mutations are applied atomically, in the order they appear in * this list. * </pre> * * <code>repeated .google.spanner.v1.Mutation mutations = 4;</code> */ public Builder addMutations(com.google.spanner.v1.Mutation value) { if (mutationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMutationsIsMutable(); mutations_.add(value); onChanged(); } else { mutationsBuilder_.addMessage(value); } return this; } /**
onChanged(); } else { singleUseTransactionBuilder_.setMessage(value);
transactionCase_ = 0; transaction_ = null; onChanged();
transaction_ = value; onChanged(); } else { if (transactionCase_ == 3) {
/** * * * <pre> * Execute mutations in a temporary transaction. Note that unlike * commit of a previously-started transaction, commit with a * temporary transaction is non-idempotent. That is, if the * `CommitRequest` is sent to Cloud Spanner more than once (for * instance, due to retries in the application, or in the * transport library), it is possible that the mutations are * executed more than once. If this is undesirable, use * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and * [Commit][google.spanner.v1.Spanner.Commit] instead. * </pre> * * <code>.google.spanner.v1.TransactionOptions single_use_transaction = 3;</code> */ public Builder setSingleUseTransaction( com.google.spanner.v1.TransactionOptions.Builder builderForValue) { if (singleUseTransactionBuilder_ == null) { transaction_ = builderForValue.build(); onChanged(); } else { singleUseTransactionBuilder_.setMessage(builderForValue.build()); } transactionCase_ = 3; return this; } /**
/** * * * <pre> * The mutations to be executed when this transaction commits. All * mutations are applied atomically, in the order they appear in * this list. * </pre> * * <code>repeated .google.spanner.v1.Mutation mutations = 4;</code> */ public Builder addMutations(int index, com.google.spanner.v1.Mutation value) { if (mutationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMutationsIsMutable(); mutations_.add(index, value); onChanged(); } else { mutationsBuilder_.addMessage(index, value); } return this; } /**
/** * * * <pre> * The mutations to be executed when this transaction commits. All * mutations are applied atomically, in the order they appear in * this list. * </pre> * * <code>repeated .google.spanner.v1.Mutation mutations = 4;</code> */ public Builder setMutations(int index, com.google.spanner.v1.Mutation value) { if (mutationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMutationsIsMutable(); mutations_.set(index, value); onChanged(); } else { mutationsBuilder_.setMessage(index, value); } return this; } /**
/** * * * <pre> * The mutations to be executed when this transaction commits. All * mutations are applied atomically, in the order they appear in * this list. * </pre> * * <code>repeated .google.spanner.v1.Mutation mutations = 4;</code> */ public Builder addAllMutations( java.lang.Iterable<? extends com.google.spanner.v1.Mutation> values) { if (mutationsBuilder_ == null) { ensureMutationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mutations_); onChanged(); } else { mutationsBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * The mutations to be executed when this transaction commits. All * mutations are applied atomically, in the order they appear in * this list. * </pre> * * <code>repeated .google.spanner.v1.Mutation mutations = 4;</code> */ public Builder addMutations(com.google.spanner.v1.Mutation.Builder builderForValue) { if (mutationsBuilder_ == null) { ensureMutationsIsMutable(); mutations_.add(builderForValue.build()); onChanged(); } else { mutationsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The mutations to be executed when this transaction commits. All * mutations are applied atomically, in the order they appear in * this list. * </pre> * * <code>repeated .google.spanner.v1.Mutation mutations = 4;</code> */ public Builder setMutations(int index, com.google.spanner.v1.Mutation.Builder builderForValue) { if (mutationsBuilder_ == null) { ensureMutationsIsMutable(); mutations_.set(index, builderForValue.build()); onChanged(); } else { mutationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * The mutations to be executed when this transaction commits. All * mutations are applied atomically, in the order they appear in * this list. * </pre> * * <code>repeated .google.spanner.v1.Mutation mutations = 4;</code> */ public Builder removeMutations(int index) { if (mutationsBuilder_ == null) { ensureMutationsIsMutable(); mutations_.remove(index); onChanged(); } else { mutationsBuilder_.remove(index); } return this; } /**
/** * * * <pre> * The mutations to be executed when this transaction commits. All * mutations are applied atomically, in the order they appear in * this list. * </pre> * * <code>repeated .google.spanner.v1.Mutation mutations = 4;</code> */ public Builder addMutations(int index, com.google.spanner.v1.Mutation.Builder builderForValue) { if (mutationsBuilder_ == null) { ensureMutationsIsMutable(); mutations_.add(index, builderForValue.build()); onChanged(); } else { mutationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Commit a previously-started transaction. * </pre> * * <code>bytes transaction_id = 2;</code> */ public Builder setTransactionId(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } transactionCase_ = 2; transaction_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. The session in which the transaction to be committed is running. * </pre> * * <code>string session = 1;</code> */ public Builder setSession(java.lang.String value) { if (value == null) { throw new NullPointerException(); } session_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. The session in which the transaction to be committed is running. * </pre> * * <code>string session = 1;</code> */ public Builder setSessionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); session_ = value; onChanged(); return this; }
/** * * * <pre> * Commit a previously-started transaction. * </pre> * * <code>bytes transaction_id = 2;</code> */ public Builder clearTransactionId() { if (transactionCase_ == 2) { transactionCase_ = 0; transaction_ = null; onChanged(); } return this; }
/** * * * <pre> * Required. The session in which the transaction to be committed is running. * </pre> * * <code>string session = 1;</code> */ public Builder clearSession() { session_ = getDefaultInstance().getSession(); onChanged(); return this; } /**
public Builder clearTransaction() { transactionCase_ = 0; transaction_ = null; onChanged(); return this; }