All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions Maven / Gradle / Ivy

There is a newer version: 1.1.6
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/spanner/v1/transaction.proto

package nl.topicus.jdbc.shaded.com.google.spanner.v1;

/**
 * 
 * # Transactions
 * Each session can have at most one active transaction at a time. After the
 * active transaction is completed, the session can immediately be
 * re-used for the next transaction. It is not necessary to create a
 * new session for each transaction.
 * # Transaction Modes
 * Cloud Spanner supports two transaction modes:
 *   1. Locking read-write. This type of transaction is the only way
 *      to write data into Cloud Spanner. These transactions rely on
 *      pessimistic locking and, if necessary, two-phase commit.
 *      Locking read-write transactions may abort, requiring the
 *      application to retry.
 *   2. Snapshot read-only. This transaction type provides guaranteed
 *      consistency across several reads, but does not allow
 *      writes. Snapshot read-only transactions can be configured to
 *      read at timestamps in the past. Snapshot read-only
 *      transactions do not need to be committed.
 * For transactions that only read, snapshot read-only transactions
 * provide simpler semantics and are almost always faster. In
 * particular, read-only transactions do not take locks, so they do
 * not conflict with read-write transactions. As a consequence of not
 * taking locks, they also do not abort, so retry loops are not needed.
 * Transactions may only read/write data in a single database. They
 * may, however, read/write data in different tables within that
 * database.
 * ## Locking Read-Write Transactions
 * Locking transactions may be used to atomically read-modify-write
 * data anywhere in a database. This type of transaction is externally
 * consistent.
 * Clients should attempt to minimize the amount of time a transaction
 * is active. Faster transactions commit with higher probability
 * and cause less contention. Cloud Spanner attempts to keep read locks
 * active as long as the transaction continues to do reads, and the
 * transaction has not been terminated by
 * [Commit][google.spanner.v1.Spanner.Commit] or
 * [Rollback][google.spanner.v1.Spanner.Rollback].  Long periods of
 * inactivity at the client may cause Cloud Spanner to release a
 * transaction's locks and abort it.
 * Reads performed within a transaction acquire locks on the data
 * being read. Writes can only be done at commit time, after all reads
 * have been completed.
 * Conceptually, a read-write transaction consists of zero or more
 * reads or SQL queries followed by
 * [Commit][google.spanner.v1.Spanner.Commit]. At any time before
 * [Commit][google.spanner.v1.Spanner.Commit], the client can send a
 * [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the
 * transaction.
 * ### Semantics
 * Cloud Spanner can commit the transaction if all read locks it acquired
 * are still valid at commit time, and it is able to acquire write
 * locks for all writes. Cloud Spanner can abort the transaction for any
 * reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
 * that the transaction has not modified any user data in Cloud Spanner.
 * Unless the transaction commits, Cloud Spanner makes no guarantees about
 * how long the transaction's locks were held for. It is an error to
 * use Cloud Spanner locks for any sort of mutual exclusion other than
 * between Cloud Spanner transactions themselves.
 * ### Retrying Aborted Transactions
 * When a transaction aborts, the application can choose to retry the
 * whole transaction again. To maximize the chances of successfully
 * committing the retry, the client should execute the retry in the
 * same session as the original attempt. The original session's lock
 * priority increases with each consecutive abort, meaning that each
 * attempt has a slightly better chance of success than the previous.
 * Under some circumstances (e.g., many transactions attempting to
 * modify the same row(s)), a transaction can abort many times in a
 * short period before successfully committing. Thus, it is not a good
 * idea to cap the number of retries a transaction can attempt;
 * instead, it is better to limit the total amount of wall time spent
 * retrying.
 * ### Idle Transactions
 * A transaction is considered idle if it has no outstanding reads or
 * SQL queries and has not started a read or SQL query within the last 10
 * seconds. Idle transactions can be aborted by Cloud Spanner so that they
 * don't hold on to locks indefinitely. In that case, the commit will
 * fail with error `ABORTED`.
 * If this behavior is undesirable, periodically executing a simple
 * SQL query in the transaction (e.g., `SELECT 1`) prevents the
 * transaction from becoming idle.
 * ## Snapshot Read-Only Transactions
 * Snapshot read-only transactions provides a simpler method than
 * locking read-write transactions for doing several consistent
 * reads. However, this type of transaction does not support writes.
 * Snapshot transactions do not take locks. Instead, they work by
 * choosing a Cloud Spanner timestamp, then executing all reads at that
 * timestamp. Since they do not acquire locks, they do not block
 * concurrent read-write transactions.
 * Unlike locking read-write transactions, snapshot read-only
 * transactions never abort. They can fail if the chosen read
 * timestamp is garbage collected; however, the default garbage
 * collection policy is generous enough that most applications do not
 * need to worry about this in practice.
 * Snapshot read-only transactions do not need to call
 * [Commit][google.spanner.v1.Spanner.Commit] or
 * [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not
 * permitted to do so).
 * To execute a snapshot transaction, the client specifies a timestamp
 * bound, which tells Cloud Spanner how to choose a read timestamp.
 * The types of timestamp bound are:
 *   - Strong (the default).
 *   - Bounded staleness.
 *   - Exact staleness.
 * If the Cloud Spanner database to be read is geographically distributed,
 * stale read-only transactions can execute more quickly than strong
 * or read-write transaction, because they are able to execute far
 * from the leader replica.
 * Each type of timestamp bound is discussed in detail below.
 * ### Strong
 * Strong reads are guaranteed to see the effects of all transactions
 * that have committed before the start of the read. Furthermore, all
 * rows yielded by a single read are consistent with each other -- if
 * any part of the read observes a transaction, all parts of the read
 * see the transaction.
 * Strong reads are not repeatable: two consecutive strong read-only
 * transactions might return inconsistent results if there are
 * concurrent writes. If consistency across reads is required, the
 * reads should be executed within a transaction or at an exact read
 * timestamp.
 * See [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong].
 * ### Exact Staleness
 * These timestamp bounds execute reads at a user-specified
 * timestamp. Reads at a timestamp are guaranteed to see a consistent
 * prefix of the global transaction history: they observe
 * modifications done by all transactions with a commit timestamp <=
 * the read timestamp, and observe none of the modifications done by
 * transactions with a larger commit timestamp. They will block until
 * all conflicting transactions that may be assigned commit timestamps
 * <= the read timestamp have finished.
 * The timestamp can either be expressed as an absolute Cloud Spanner commit
 * timestamp or a staleness relative to the current time.
 * These modes do not require a "negotiation phase" to pick a
 * timestamp. As a result, they execute slightly faster than the
 * equivalent boundedly stale concurrency modes. On the other hand,
 * boundedly stale reads usually return fresher results.
 * See [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] and
 * [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness].
 * ### Bounded Staleness
 * Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
 * subject to a user-provided staleness bound. Cloud Spanner chooses the
 * newest timestamp within the staleness bound that allows execution
 * of the reads at the closest available replica without blocking.
 * All rows yielded are consistent with each other -- if any part of
 * the read observes a transaction, all parts of the read see the
 * transaction. Boundedly stale reads are not repeatable: two stale
 * reads, even if they use the same staleness bound, can execute at
 * different timestamps and thus return inconsistent results.
 * Boundedly stale reads execute in two phases: the first phase
 * negotiates a timestamp among all replicas needed to serve the
 * read. In the second phase, reads are executed at the negotiated
 * timestamp.
 * As a result of the two phase execution, bounded staleness reads are
 * usually a little slower than comparable exact staleness
 * reads. However, they are typically able to return fresher
 * results, and are more likely to execute at the closest replica.
 * Because the timestamp negotiation requires up-front knowledge of
 * which rows will be read, it can only be used with single-use
 * read-only transactions.
 * See [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] and
 * [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp].
 * ### Old Read Timestamps and Garbage Collection
 * Cloud Spanner continuously garbage collects deleted and overwritten data
 * in the background to reclaim storage space. This process is known
 * as "version GC". By default, version GC reclaims versions after they
 * are one hour old. Because of this, Cloud Spanner cannot perform reads
 * at read timestamps more than one hour in the past. This
 * restriction also applies to in-progress reads and/or SQL queries whose
 * timestamp become too old while executing. Reads and SQL queries with
 * too-old read timestamps fail with the error `FAILED_PRECONDITION`.
 * 
* * Protobuf type {@code google.spanner.v1.TransactionOptions} */ public final class TransactionOptions extends nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.spanner.v1.TransactionOptions) TransactionOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use TransactionOptions.newBuilder() to construct. private TransactionOptions(nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TransactionOptions() { } @java.lang.Override public final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TransactionOptions( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.Builder unknownFields = nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.Builder subBuilder = null; if (modeCase_ == 1) { subBuilder = ((nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_).toBuilder(); } mode_ = input.readMessage(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_); mode_ = subBuilder.buildPartial(); } modeCase_ = 1; break; } case 18: { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.Builder subBuilder = null; if (modeCase_ == 2) { subBuilder = ((nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_).toBuilder(); } mode_ = input.readMessage(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_); mode_ = subBuilder.buildPartial(); } modeCase_ = 2; break; } } } } catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_descriptor; } protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.class, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.Builder.class); } public interface ReadWriteOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.TransactionOptions.ReadWrite) nl.topicus.jdbc.shaded.com.google.protobuf.MessageOrBuilder { } /** *
   * Message type to initiate a read-write transaction. Currently this
   * transaction type has no options.
   * 
* * Protobuf type {@code google.spanner.v1.TransactionOptions.ReadWrite} */ public static final class ReadWrite extends nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.spanner.v1.TransactionOptions.ReadWrite) ReadWriteOrBuilder { private static final long serialVersionUID = 0L; // Use ReadWrite.newBuilder() to construct. private ReadWrite(nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ReadWrite() { } @java.lang.Override public final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ReadWrite( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { this(); nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.Builder unknownFields = nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadWrite_descriptor; } protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadWrite_fieldAccessorTable .ensureFieldAccessorsInitialized( nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.class, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.Builder.class); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream output) throws java.io.IOException { unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite)) { return super.equals(obj); } nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite other = (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) obj; boolean result = true; result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( java.nio.ByteBuffer data) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( java.nio.ByteBuffer data, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom(byte[] data) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( byte[] data, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom(java.io.InputStream input) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( java.io.InputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseDelimitedFrom( java.io.InputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * Message type to initiate a read-write transaction. Currently this
     * transaction type has no options.
     * 
* * Protobuf type {@code google.spanner.v1.TransactionOptions.ReadWrite} */ public static final class Builder extends nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.TransactionOptions.ReadWrite) nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder { public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadWrite_descriptor; } protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadWrite_fieldAccessorTable .ensureFieldAccessorsInitialized( nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.class, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.Builder.class); } // Construct using nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); return this; } public nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadWrite_descriptor; } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite getDefaultInstanceForType() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite build() { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite buildPartial() { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite result = new nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite(this); onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.protobuf.Message other) { if (other instanceof nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) { return mergeFrom((nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite other) { if (other == nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance()) return this; this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } public final Builder setUnknownFields( final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.spanner.v1.TransactionOptions.ReadWrite) } // @@protoc_insertion_point(class_scope:google.spanner.v1.TransactionOptions.ReadWrite) private static final nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite(); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite getDefaultInstance() { return DEFAULT_INSTANCE; } private static final nl.topicus.jdbc.shaded.com.google.protobuf.Parser PARSER = new nl.topicus.jdbc.shaded.com.google.protobuf.AbstractParser() { public ReadWrite parsePartialFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return new ReadWrite(input, extensionRegistry); } }; public static nl.topicus.jdbc.shaded.com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public nl.topicus.jdbc.shaded.com.google.protobuf.Parser getParserForType() { return PARSER; } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ReadOnlyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.TransactionOptions.ReadOnly) nl.topicus.jdbc.shaded.com.google.protobuf.MessageOrBuilder { /** *
     * Read at a timestamp where all previously committed transactions
     * are visible.
     * 
* * bool strong = 1; */ boolean getStrong(); /** *
     * Executes all reads at a timestamp >= `min_read_timestamp`.
     * This is useful for requesting fresher data than some previous
     * read, or data that is fresh enough to observe the effects of some
     * previously committed transaction whose timestamp is known.
     * Note that this option can only be used in single-use transactions.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ boolean hasMinReadTimestamp(); /** *
     * Executes all reads at a timestamp >= `min_read_timestamp`.
     * This is useful for requesting fresher data than some previous
     * read, or data that is fresh enough to observe the effects of some
     * previously committed transaction whose timestamp is known.
     * Note that this option can only be used in single-use transactions.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp getMinReadTimestamp(); /** *
     * Executes all reads at a timestamp >= `min_read_timestamp`.
     * This is useful for requesting fresher data than some previous
     * read, or data that is fresh enough to observe the effects of some
     * previously committed transaction whose timestamp is known.
     * Note that this option can only be used in single-use transactions.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder getMinReadTimestampOrBuilder(); /** *
     * Read data at a timestamp >= `NOW - max_staleness`
     * seconds. Guarantees that all writes that have committed more
     * than the specified number of seconds ago are visible. Because
     * Cloud Spanner chooses the exact timestamp, this mode works even if
     * the client's local clock is substantially skewed from Cloud Spanner
     * commit timestamps.
     * Useful for reading the freshest data available at a nearby
     * replica, while bounding the possible staleness if the local
     * replica has fallen behind.
     * Note that this option can only be used in single-use
     * transactions.
     * 
* * .google.protobuf.Duration max_staleness = 3; */ boolean hasMaxStaleness(); /** *
     * Read data at a timestamp >= `NOW - max_staleness`
     * seconds. Guarantees that all writes that have committed more
     * than the specified number of seconds ago are visible. Because
     * Cloud Spanner chooses the exact timestamp, this mode works even if
     * the client's local clock is substantially skewed from Cloud Spanner
     * commit timestamps.
     * Useful for reading the freshest data available at a nearby
     * replica, while bounding the possible staleness if the local
     * replica has fallen behind.
     * Note that this option can only be used in single-use
     * transactions.
     * 
* * .google.protobuf.Duration max_staleness = 3; */ nl.topicus.jdbc.shaded.com.google.protobuf.Duration getMaxStaleness(); /** *
     * Read data at a timestamp >= `NOW - max_staleness`
     * seconds. Guarantees that all writes that have committed more
     * than the specified number of seconds ago are visible. Because
     * Cloud Spanner chooses the exact timestamp, this mode works even if
     * the client's local clock is substantially skewed from Cloud Spanner
     * commit timestamps.
     * Useful for reading the freshest data available at a nearby
     * replica, while bounding the possible staleness if the local
     * replica has fallen behind.
     * Note that this option can only be used in single-use
     * transactions.
     * 
* * .google.protobuf.Duration max_staleness = 3; */ nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder getMaxStalenessOrBuilder(); /** *
     * Executes all reads at the given timestamp. Unlike other modes,
     * reads at a specific timestamp are repeatable; the same read at
     * the same timestamp always returns the same data. If the
     * timestamp is in the future, the read will block until the
     * specified timestamp, modulo the read's deadline.
     * Useful for large scale consistent reads such as mapreduces, or
     * for coordinating many reads against a consistent snapshot of the
     * data.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ boolean hasReadTimestamp(); /** *
     * Executes all reads at the given timestamp. Unlike other modes,
     * reads at a specific timestamp are repeatable; the same read at
     * the same timestamp always returns the same data. If the
     * timestamp is in the future, the read will block until the
     * specified timestamp, modulo the read's deadline.
     * Useful for large scale consistent reads such as mapreduces, or
     * for coordinating many reads against a consistent snapshot of the
     * data.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp getReadTimestamp(); /** *
     * Executes all reads at the given timestamp. Unlike other modes,
     * reads at a specific timestamp are repeatable; the same read at
     * the same timestamp always returns the same data. If the
     * timestamp is in the future, the read will block until the
     * specified timestamp, modulo the read's deadline.
     * Useful for large scale consistent reads such as mapreduces, or
     * for coordinating many reads against a consistent snapshot of the
     * data.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder(); /** *
     * Executes all reads at a timestamp that is `exact_staleness`
     * old. The timestamp is chosen soon after the read is started.
     * Guarantees that all writes that have committed more than the
     * specified number of seconds ago are visible. Because Cloud Spanner
     * chooses the exact timestamp, this mode works even if the client's
     * local clock is substantially skewed from Cloud Spanner commit
     * timestamps.
     * Useful for reading at nearby replicas without the distributed
     * timestamp negotiation overhead of `max_staleness`.
     * 
* * .google.protobuf.Duration exact_staleness = 5; */ boolean hasExactStaleness(); /** *
     * Executes all reads at a timestamp that is `exact_staleness`
     * old. The timestamp is chosen soon after the read is started.
     * Guarantees that all writes that have committed more than the
     * specified number of seconds ago are visible. Because Cloud Spanner
     * chooses the exact timestamp, this mode works even if the client's
     * local clock is substantially skewed from Cloud Spanner commit
     * timestamps.
     * Useful for reading at nearby replicas without the distributed
     * timestamp negotiation overhead of `max_staleness`.
     * 
* * .google.protobuf.Duration exact_staleness = 5; */ nl.topicus.jdbc.shaded.com.google.protobuf.Duration getExactStaleness(); /** *
     * Executes all reads at a timestamp that is `exact_staleness`
     * old. The timestamp is chosen soon after the read is started.
     * Guarantees that all writes that have committed more than the
     * specified number of seconds ago are visible. Because Cloud Spanner
     * chooses the exact timestamp, this mode works even if the client's
     * local clock is substantially skewed from Cloud Spanner commit
     * timestamps.
     * Useful for reading at nearby replicas without the distributed
     * timestamp negotiation overhead of `max_staleness`.
     * 
* * .google.protobuf.Duration exact_staleness = 5; */ nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder getExactStalenessOrBuilder(); /** *
     * If true, the Cloud Spanner-selected read timestamp is included in
     * the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
     * 
* * bool return_read_timestamp = 6; */ boolean getReturnReadTimestamp(); public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.TimestampBoundCase getTimestampBoundCase(); } /** *
   * Message type to initiate a read-only transaction.
   * 
* * Protobuf type {@code google.spanner.v1.TransactionOptions.ReadOnly} */ public static final class ReadOnly extends nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.spanner.v1.TransactionOptions.ReadOnly) ReadOnlyOrBuilder { private static final long serialVersionUID = 0L; // Use ReadOnly.newBuilder() to construct. private ReadOnly(nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ReadOnly() { returnReadTimestamp_ = false; } @java.lang.Override public final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ReadOnly( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.Builder unknownFields = nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { timestampBoundCase_ = 1; timestampBound_ = input.readBool(); break; } case 18: { nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder subBuilder = null; if (timestampBoundCase_ == 2) { subBuilder = ((nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_).toBuilder(); } timestampBound_ = input.readMessage(nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_); timestampBound_ = subBuilder.buildPartial(); } timestampBoundCase_ = 2; break; } case 26: { nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder subBuilder = null; if (timestampBoundCase_ == 3) { subBuilder = ((nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_).toBuilder(); } timestampBound_ = input.readMessage(nl.topicus.jdbc.shaded.com.google.protobuf.Duration.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_); timestampBound_ = subBuilder.buildPartial(); } timestampBoundCase_ = 3; break; } case 34: { nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder subBuilder = null; if (timestampBoundCase_ == 4) { subBuilder = ((nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_).toBuilder(); } timestampBound_ = input.readMessage(nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_); timestampBound_ = subBuilder.buildPartial(); } timestampBoundCase_ = 4; break; } case 42: { nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder subBuilder = null; if (timestampBoundCase_ == 5) { subBuilder = ((nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_).toBuilder(); } timestampBound_ = input.readMessage(nl.topicus.jdbc.shaded.com.google.protobuf.Duration.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_); timestampBound_ = subBuilder.buildPartial(); } timestampBoundCase_ = 5; break; } case 48: { returnReadTimestamp_ = input.readBool(); break; } } } } catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadOnly_descriptor; } protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadOnly_fieldAccessorTable .ensureFieldAccessorsInitialized( nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.class, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.Builder.class); } private int timestampBoundCase_ = 0; private java.lang.Object timestampBound_; public enum TimestampBoundCase implements nl.topicus.jdbc.shaded.com.google.protobuf.Internal.EnumLite { STRONG(1), MIN_READ_TIMESTAMP(2), MAX_STALENESS(3), READ_TIMESTAMP(4), EXACT_STALENESS(5), TIMESTAMPBOUND_NOT_SET(0); private final int value; private TimestampBoundCase(int value) { this.value = value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static TimestampBoundCase valueOf(int value) { return forNumber(value); } public static TimestampBoundCase forNumber(int value) { switch (value) { case 1: return STRONG; case 2: return MIN_READ_TIMESTAMP; case 3: return MAX_STALENESS; case 4: return READ_TIMESTAMP; case 5: return EXACT_STALENESS; case 0: return TIMESTAMPBOUND_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public TimestampBoundCase getTimestampBoundCase() { return TimestampBoundCase.forNumber( timestampBoundCase_); } public static final int STRONG_FIELD_NUMBER = 1; /** *
     * Read at a timestamp where all previously committed transactions
     * are visible.
     * 
* * bool strong = 1; */ public boolean getStrong() { if (timestampBoundCase_ == 1) { return (java.lang.Boolean) timestampBound_; } return false; } public static final int MIN_READ_TIMESTAMP_FIELD_NUMBER = 2; /** *
     * Executes all reads at a timestamp >= `min_read_timestamp`.
     * This is useful for requesting fresher data than some previous
     * read, or data that is fresh enough to observe the effects of some
     * previously committed transaction whose timestamp is known.
     * Note that this option can only be used in single-use transactions.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public boolean hasMinReadTimestamp() { return timestampBoundCase_ == 2; } /** *
     * Executes all reads at a timestamp >= `min_read_timestamp`.
     * This is useful for requesting fresher data than some previous
     * read, or data that is fresh enough to observe the effects of some
     * previously committed transaction whose timestamp is known.
     * Note that this option can only be used in single-use transactions.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp getMinReadTimestamp() { if (timestampBoundCase_ == 2) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } /** *
     * Executes all reads at a timestamp >= `min_read_timestamp`.
     * This is useful for requesting fresher data than some previous
     * read, or data that is fresh enough to observe the effects of some
     * previously committed transaction whose timestamp is known.
     * Note that this option can only be used in single-use transactions.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder getMinReadTimestampOrBuilder() { if (timestampBoundCase_ == 2) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } public static final int MAX_STALENESS_FIELD_NUMBER = 3; /** *
     * Read data at a timestamp >= `NOW - max_staleness`
     * seconds. Guarantees that all writes that have committed more
     * than the specified number of seconds ago are visible. Because
     * Cloud Spanner chooses the exact timestamp, this mode works even if
     * the client's local clock is substantially skewed from Cloud Spanner
     * commit timestamps.
     * Useful for reading the freshest data available at a nearby
     * replica, while bounding the possible staleness if the local
     * replica has fallen behind.
     * Note that this option can only be used in single-use
     * transactions.
     * 
* * .google.protobuf.Duration max_staleness = 3; */ public boolean hasMaxStaleness() { return timestampBoundCase_ == 3; } /** *
     * Read data at a timestamp >= `NOW - max_staleness`
     * seconds. Guarantees that all writes that have committed more
     * than the specified number of seconds ago are visible. Because
     * Cloud Spanner chooses the exact timestamp, this mode works even if
     * the client's local clock is substantially skewed from Cloud Spanner
     * commit timestamps.
     * Useful for reading the freshest data available at a nearby
     * replica, while bounding the possible staleness if the local
     * replica has fallen behind.
     * Note that this option can only be used in single-use
     * transactions.
     * 
* * .google.protobuf.Duration max_staleness = 3; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Duration getMaxStaleness() { if (timestampBoundCase_ == 3) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } /** *
     * Read data at a timestamp >= `NOW - max_staleness`
     * seconds. Guarantees that all writes that have committed more
     * than the specified number of seconds ago are visible. Because
     * Cloud Spanner chooses the exact timestamp, this mode works even if
     * the client's local clock is substantially skewed from Cloud Spanner
     * commit timestamps.
     * Useful for reading the freshest data available at a nearby
     * replica, while bounding the possible staleness if the local
     * replica has fallen behind.
     * Note that this option can only be used in single-use
     * transactions.
     * 
* * .google.protobuf.Duration max_staleness = 3; */ public nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder getMaxStalenessOrBuilder() { if (timestampBoundCase_ == 3) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } public static final int READ_TIMESTAMP_FIELD_NUMBER = 4; /** *
     * Executes all reads at the given timestamp. Unlike other modes,
     * reads at a specific timestamp are repeatable; the same read at
     * the same timestamp always returns the same data. If the
     * timestamp is in the future, the read will block until the
     * specified timestamp, modulo the read's deadline.
     * Useful for large scale consistent reads such as mapreduces, or
     * for coordinating many reads against a consistent snapshot of the
     * data.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public boolean hasReadTimestamp() { return timestampBoundCase_ == 4; } /** *
     * Executes all reads at the given timestamp. Unlike other modes,
     * reads at a specific timestamp are repeatable; the same read at
     * the same timestamp always returns the same data. If the
     * timestamp is in the future, the read will block until the
     * specified timestamp, modulo the read's deadline.
     * Useful for large scale consistent reads such as mapreduces, or
     * for coordinating many reads against a consistent snapshot of the
     * data.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp getReadTimestamp() { if (timestampBoundCase_ == 4) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } /** *
     * Executes all reads at the given timestamp. Unlike other modes,
     * reads at a specific timestamp are repeatable; the same read at
     * the same timestamp always returns the same data. If the
     * timestamp is in the future, the read will block until the
     * specified timestamp, modulo the read's deadline.
     * Useful for large scale consistent reads such as mapreduces, or
     * for coordinating many reads against a consistent snapshot of the
     * data.
     * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
     * Example: `"2014-10-02T15:01:23.045123456Z"`.
     * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder() { if (timestampBoundCase_ == 4) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } public static final int EXACT_STALENESS_FIELD_NUMBER = 5; /** *
     * Executes all reads at a timestamp that is `exact_staleness`
     * old. The timestamp is chosen soon after the read is started.
     * Guarantees that all writes that have committed more than the
     * specified number of seconds ago are visible. Because Cloud Spanner
     * chooses the exact timestamp, this mode works even if the client's
     * local clock is substantially skewed from Cloud Spanner commit
     * timestamps.
     * Useful for reading at nearby replicas without the distributed
     * timestamp negotiation overhead of `max_staleness`.
     * 
* * .google.protobuf.Duration exact_staleness = 5; */ public boolean hasExactStaleness() { return timestampBoundCase_ == 5; } /** *
     * Executes all reads at a timestamp that is `exact_staleness`
     * old. The timestamp is chosen soon after the read is started.
     * Guarantees that all writes that have committed more than the
     * specified number of seconds ago are visible. Because Cloud Spanner
     * chooses the exact timestamp, this mode works even if the client's
     * local clock is substantially skewed from Cloud Spanner commit
     * timestamps.
     * Useful for reading at nearby replicas without the distributed
     * timestamp negotiation overhead of `max_staleness`.
     * 
* * .google.protobuf.Duration exact_staleness = 5; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Duration getExactStaleness() { if (timestampBoundCase_ == 5) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } /** *
     * Executes all reads at a timestamp that is `exact_staleness`
     * old. The timestamp is chosen soon after the read is started.
     * Guarantees that all writes that have committed more than the
     * specified number of seconds ago are visible. Because Cloud Spanner
     * chooses the exact timestamp, this mode works even if the client's
     * local clock is substantially skewed from Cloud Spanner commit
     * timestamps.
     * Useful for reading at nearby replicas without the distributed
     * timestamp negotiation overhead of `max_staleness`.
     * 
* * .google.protobuf.Duration exact_staleness = 5; */ public nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder getExactStalenessOrBuilder() { if (timestampBoundCase_ == 5) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } public static final int RETURN_READ_TIMESTAMP_FIELD_NUMBER = 6; private boolean returnReadTimestamp_; /** *
     * If true, the Cloud Spanner-selected read timestamp is included in
     * the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
     * 
* * bool return_read_timestamp = 6; */ public boolean getReturnReadTimestamp() { return returnReadTimestamp_; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (timestampBoundCase_ == 1) { output.writeBool( 1, (boolean)((java.lang.Boolean) timestampBound_)); } if (timestampBoundCase_ == 2) { output.writeMessage(2, (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_); } if (timestampBoundCase_ == 3) { output.writeMessage(3, (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_); } if (timestampBoundCase_ == 4) { output.writeMessage(4, (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_); } if (timestampBoundCase_ == 5) { output.writeMessage(5, (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_); } if (returnReadTimestamp_ != false) { output.writeBool(6, returnReadTimestamp_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (timestampBoundCase_ == 1) { size += nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream .computeBoolSize( 1, (boolean)((java.lang.Boolean) timestampBound_)); } if (timestampBoundCase_ == 2) { size += nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream .computeMessageSize(2, (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_); } if (timestampBoundCase_ == 3) { size += nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream .computeMessageSize(3, (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_); } if (timestampBoundCase_ == 4) { size += nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream .computeMessageSize(4, (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_); } if (timestampBoundCase_ == 5) { size += nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream .computeMessageSize(5, (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_); } if (returnReadTimestamp_ != false) { size += nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream .computeBoolSize(6, returnReadTimestamp_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly)) { return super.equals(obj); } nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly other = (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) obj; boolean result = true; result = result && (getReturnReadTimestamp() == other.getReturnReadTimestamp()); result = result && getTimestampBoundCase().equals( other.getTimestampBoundCase()); if (!result) return false; switch (timestampBoundCase_) { case 1: result = result && (getStrong() == other.getStrong()); break; case 2: result = result && getMinReadTimestamp() .equals(other.getMinReadTimestamp()); break; case 3: result = result && getMaxStaleness() .equals(other.getMaxStaleness()); break; case 4: result = result && getReadTimestamp() .equals(other.getReadTimestamp()); break; case 5: result = result && getExactStaleness() .equals(other.getExactStaleness()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + RETURN_READ_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + nl.topicus.jdbc.shaded.com.google.protobuf.Internal.hashBoolean( getReturnReadTimestamp()); switch (timestampBoundCase_) { case 1: hash = (37 * hash) + STRONG_FIELD_NUMBER; hash = (53 * hash) + nl.topicus.jdbc.shaded.com.google.protobuf.Internal.hashBoolean( getStrong()); break; case 2: hash = (37 * hash) + MIN_READ_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getMinReadTimestamp().hashCode(); break; case 3: hash = (37 * hash) + MAX_STALENESS_FIELD_NUMBER; hash = (53 * hash) + getMaxStaleness().hashCode(); break; case 4: hash = (37 * hash) + READ_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getReadTimestamp().hashCode(); break; case 5: hash = (37 * hash) + EXACT_STALENESS_FIELD_NUMBER; hash = (53 * hash) + getExactStaleness().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( java.nio.ByteBuffer data) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( java.nio.ByteBuffer data, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom(byte[] data) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( byte[] data, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom(java.io.InputStream input) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( java.io.InputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseDelimitedFrom( java.io.InputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * Message type to initiate a read-only transaction.
     * 
* * Protobuf type {@code google.spanner.v1.TransactionOptions.ReadOnly} */ public static final class Builder extends nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.TransactionOptions.ReadOnly) nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder { public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadOnly_descriptor; } protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadOnly_fieldAccessorTable .ensureFieldAccessorsInitialized( nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.class, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.Builder.class); } // Construct using nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); returnReadTimestamp_ = false; timestampBoundCase_ = 0; timestampBound_ = null; return this; } public nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_ReadOnly_descriptor; } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly getDefaultInstanceForType() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly build() { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly buildPartial() { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly result = new nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly(this); if (timestampBoundCase_ == 1) { result.timestampBound_ = timestampBound_; } if (timestampBoundCase_ == 2) { if (minReadTimestampBuilder_ == null) { result.timestampBound_ = timestampBound_; } else { result.timestampBound_ = minReadTimestampBuilder_.build(); } } if (timestampBoundCase_ == 3) { if (maxStalenessBuilder_ == null) { result.timestampBound_ = timestampBound_; } else { result.timestampBound_ = maxStalenessBuilder_.build(); } } if (timestampBoundCase_ == 4) { if (readTimestampBuilder_ == null) { result.timestampBound_ = timestampBound_; } else { result.timestampBound_ = readTimestampBuilder_.build(); } } if (timestampBoundCase_ == 5) { if (exactStalenessBuilder_ == null) { result.timestampBound_ = timestampBound_; } else { result.timestampBound_ = exactStalenessBuilder_.build(); } } result.returnReadTimestamp_ = returnReadTimestamp_; result.timestampBoundCase_ = timestampBoundCase_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.protobuf.Message other) { if (other instanceof nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) { return mergeFrom((nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly other) { if (other == nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance()) return this; if (other.getReturnReadTimestamp() != false) { setReturnReadTimestamp(other.getReturnReadTimestamp()); } switch (other.getTimestampBoundCase()) { case STRONG: { setStrong(other.getStrong()); break; } case MIN_READ_TIMESTAMP: { mergeMinReadTimestamp(other.getMinReadTimestamp()); break; } case MAX_STALENESS: { mergeMaxStaleness(other.getMaxStaleness()); break; } case READ_TIMESTAMP: { mergeReadTimestamp(other.getReadTimestamp()); break; } case EXACT_STALENESS: { mergeExactStaleness(other.getExactStaleness()); break; } case TIMESTAMPBOUND_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int timestampBoundCase_ = 0; private java.lang.Object timestampBound_; public TimestampBoundCase getTimestampBoundCase() { return TimestampBoundCase.forNumber( timestampBoundCase_); } public Builder clearTimestampBound() { timestampBoundCase_ = 0; timestampBound_ = null; onChanged(); return this; } /** *
       * Read at a timestamp where all previously committed transactions
       * are visible.
       * 
* * bool strong = 1; */ public boolean getStrong() { if (timestampBoundCase_ == 1) { return (java.lang.Boolean) timestampBound_; } return false; } /** *
       * Read at a timestamp where all previously committed transactions
       * are visible.
       * 
* * bool strong = 1; */ public Builder setStrong(boolean value) { timestampBoundCase_ = 1; timestampBound_ = value; onChanged(); return this; } /** *
       * Read at a timestamp where all previously committed transactions
       * are visible.
       * 
* * bool strong = 1; */ public Builder clearStrong() { if (timestampBoundCase_ == 1) { timestampBoundCase_ = 0; timestampBound_ = null; onChanged(); } return this; } private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp, nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder> minReadTimestampBuilder_; /** *
       * Executes all reads at a timestamp >= `min_read_timestamp`.
       * This is useful for requesting fresher data than some previous
       * read, or data that is fresh enough to observe the effects of some
       * previously committed transaction whose timestamp is known.
       * Note that this option can only be used in single-use transactions.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public boolean hasMinReadTimestamp() { return timestampBoundCase_ == 2; } /** *
       * Executes all reads at a timestamp >= `min_read_timestamp`.
       * This is useful for requesting fresher data than some previous
       * read, or data that is fresh enough to observe the effects of some
       * previously committed transaction whose timestamp is known.
       * Note that this option can only be used in single-use transactions.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp getMinReadTimestamp() { if (minReadTimestampBuilder_ == null) { if (timestampBoundCase_ == 2) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } else { if (timestampBoundCase_ == 2) { return minReadTimestampBuilder_.getMessage(); } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } } /** *
       * Executes all reads at a timestamp >= `min_read_timestamp`.
       * This is useful for requesting fresher data than some previous
       * read, or data that is fresh enough to observe the effects of some
       * previously committed transaction whose timestamp is known.
       * Note that this option can only be used in single-use transactions.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public Builder setMinReadTimestamp(nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp value) { if (minReadTimestampBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timestampBound_ = value; onChanged(); } else { minReadTimestampBuilder_.setMessage(value); } timestampBoundCase_ = 2; return this; } /** *
       * Executes all reads at a timestamp >= `min_read_timestamp`.
       * This is useful for requesting fresher data than some previous
       * read, or data that is fresh enough to observe the effects of some
       * previously committed transaction whose timestamp is known.
       * Note that this option can only be used in single-use transactions.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public Builder setMinReadTimestamp( nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder builderForValue) { if (minReadTimestampBuilder_ == null) { timestampBound_ = builderForValue.build(); onChanged(); } else { minReadTimestampBuilder_.setMessage(builderForValue.build()); } timestampBoundCase_ = 2; return this; } /** *
       * Executes all reads at a timestamp >= `min_read_timestamp`.
       * This is useful for requesting fresher data than some previous
       * read, or data that is fresh enough to observe the effects of some
       * previously committed transaction whose timestamp is known.
       * Note that this option can only be used in single-use transactions.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public Builder mergeMinReadTimestamp(nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp value) { if (minReadTimestampBuilder_ == null) { if (timestampBoundCase_ == 2 && timestampBound_ != nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance()) { timestampBound_ = nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.newBuilder((nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_) .mergeFrom(value).buildPartial(); } else { timestampBound_ = value; } onChanged(); } else { if (timestampBoundCase_ == 2) { minReadTimestampBuilder_.mergeFrom(value); } minReadTimestampBuilder_.setMessage(value); } timestampBoundCase_ = 2; return this; } /** *
       * Executes all reads at a timestamp >= `min_read_timestamp`.
       * This is useful for requesting fresher data than some previous
       * read, or data that is fresh enough to observe the effects of some
       * previously committed transaction whose timestamp is known.
       * Note that this option can only be used in single-use transactions.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public Builder clearMinReadTimestamp() { if (minReadTimestampBuilder_ == null) { if (timestampBoundCase_ == 2) { timestampBoundCase_ = 0; timestampBound_ = null; onChanged(); } } else { if (timestampBoundCase_ == 2) { timestampBoundCase_ = 0; timestampBound_ = null; } minReadTimestampBuilder_.clear(); } return this; } /** *
       * Executes all reads at a timestamp >= `min_read_timestamp`.
       * This is useful for requesting fresher data than some previous
       * read, or data that is fresh enough to observe the effects of some
       * previously committed transaction whose timestamp is known.
       * Note that this option can only be used in single-use transactions.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder getMinReadTimestampBuilder() { return getMinReadTimestampFieldBuilder().getBuilder(); } /** *
       * Executes all reads at a timestamp >= `min_read_timestamp`.
       * This is useful for requesting fresher data than some previous
       * read, or data that is fresh enough to observe the effects of some
       * previously committed transaction whose timestamp is known.
       * Note that this option can only be used in single-use transactions.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ public nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder getMinReadTimestampOrBuilder() { if ((timestampBoundCase_ == 2) && (minReadTimestampBuilder_ != null)) { return minReadTimestampBuilder_.getMessageOrBuilder(); } else { if (timestampBoundCase_ == 2) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } } /** *
       * Executes all reads at a timestamp >= `min_read_timestamp`.
       * This is useful for requesting fresher data than some previous
       * read, or data that is fresh enough to observe the effects of some
       * previously committed transaction whose timestamp is known.
       * Note that this option can only be used in single-use transactions.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp min_read_timestamp = 2; */ private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp, nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder> getMinReadTimestampFieldBuilder() { if (minReadTimestampBuilder_ == null) { if (!(timestampBoundCase_ == 2)) { timestampBound_ = nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } minReadTimestampBuilder_ = new nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp, nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder>( (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_, getParentForChildren(), isClean()); timestampBound_ = null; } timestampBoundCase_ = 2; onChanged();; return minReadTimestampBuilder_; } private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Duration, nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder> maxStalenessBuilder_; /** *
       * Read data at a timestamp >= `NOW - max_staleness`
       * seconds. Guarantees that all writes that have committed more
       * than the specified number of seconds ago are visible. Because
       * Cloud Spanner chooses the exact timestamp, this mode works even if
       * the client's local clock is substantially skewed from Cloud Spanner
       * commit timestamps.
       * Useful for reading the freshest data available at a nearby
       * replica, while bounding the possible staleness if the local
       * replica has fallen behind.
       * Note that this option can only be used in single-use
       * transactions.
       * 
* * .google.protobuf.Duration max_staleness = 3; */ public boolean hasMaxStaleness() { return timestampBoundCase_ == 3; } /** *
       * Read data at a timestamp >= `NOW - max_staleness`
       * seconds. Guarantees that all writes that have committed more
       * than the specified number of seconds ago are visible. Because
       * Cloud Spanner chooses the exact timestamp, this mode works even if
       * the client's local clock is substantially skewed from Cloud Spanner
       * commit timestamps.
       * Useful for reading the freshest data available at a nearby
       * replica, while bounding the possible staleness if the local
       * replica has fallen behind.
       * Note that this option can only be used in single-use
       * transactions.
       * 
* * .google.protobuf.Duration max_staleness = 3; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Duration getMaxStaleness() { if (maxStalenessBuilder_ == null) { if (timestampBoundCase_ == 3) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } else { if (timestampBoundCase_ == 3) { return maxStalenessBuilder_.getMessage(); } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } } /** *
       * Read data at a timestamp >= `NOW - max_staleness`
       * seconds. Guarantees that all writes that have committed more
       * than the specified number of seconds ago are visible. Because
       * Cloud Spanner chooses the exact timestamp, this mode works even if
       * the client's local clock is substantially skewed from Cloud Spanner
       * commit timestamps.
       * Useful for reading the freshest data available at a nearby
       * replica, while bounding the possible staleness if the local
       * replica has fallen behind.
       * Note that this option can only be used in single-use
       * transactions.
       * 
* * .google.protobuf.Duration max_staleness = 3; */ public Builder setMaxStaleness(nl.topicus.jdbc.shaded.com.google.protobuf.Duration value) { if (maxStalenessBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timestampBound_ = value; onChanged(); } else { maxStalenessBuilder_.setMessage(value); } timestampBoundCase_ = 3; return this; } /** *
       * Read data at a timestamp >= `NOW - max_staleness`
       * seconds. Guarantees that all writes that have committed more
       * than the specified number of seconds ago are visible. Because
       * Cloud Spanner chooses the exact timestamp, this mode works even if
       * the client's local clock is substantially skewed from Cloud Spanner
       * commit timestamps.
       * Useful for reading the freshest data available at a nearby
       * replica, while bounding the possible staleness if the local
       * replica has fallen behind.
       * Note that this option can only be used in single-use
       * transactions.
       * 
* * .google.protobuf.Duration max_staleness = 3; */ public Builder setMaxStaleness( nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder builderForValue) { if (maxStalenessBuilder_ == null) { timestampBound_ = builderForValue.build(); onChanged(); } else { maxStalenessBuilder_.setMessage(builderForValue.build()); } timestampBoundCase_ = 3; return this; } /** *
       * Read data at a timestamp >= `NOW - max_staleness`
       * seconds. Guarantees that all writes that have committed more
       * than the specified number of seconds ago are visible. Because
       * Cloud Spanner chooses the exact timestamp, this mode works even if
       * the client's local clock is substantially skewed from Cloud Spanner
       * commit timestamps.
       * Useful for reading the freshest data available at a nearby
       * replica, while bounding the possible staleness if the local
       * replica has fallen behind.
       * Note that this option can only be used in single-use
       * transactions.
       * 
* * .google.protobuf.Duration max_staleness = 3; */ public Builder mergeMaxStaleness(nl.topicus.jdbc.shaded.com.google.protobuf.Duration value) { if (maxStalenessBuilder_ == null) { if (timestampBoundCase_ == 3 && timestampBound_ != nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance()) { timestampBound_ = nl.topicus.jdbc.shaded.com.google.protobuf.Duration.newBuilder((nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_) .mergeFrom(value).buildPartial(); } else { timestampBound_ = value; } onChanged(); } else { if (timestampBoundCase_ == 3) { maxStalenessBuilder_.mergeFrom(value); } maxStalenessBuilder_.setMessage(value); } timestampBoundCase_ = 3; return this; } /** *
       * Read data at a timestamp >= `NOW - max_staleness`
       * seconds. Guarantees that all writes that have committed more
       * than the specified number of seconds ago are visible. Because
       * Cloud Spanner chooses the exact timestamp, this mode works even if
       * the client's local clock is substantially skewed from Cloud Spanner
       * commit timestamps.
       * Useful for reading the freshest data available at a nearby
       * replica, while bounding the possible staleness if the local
       * replica has fallen behind.
       * Note that this option can only be used in single-use
       * transactions.
       * 
* * .google.protobuf.Duration max_staleness = 3; */ public Builder clearMaxStaleness() { if (maxStalenessBuilder_ == null) { if (timestampBoundCase_ == 3) { timestampBoundCase_ = 0; timestampBound_ = null; onChanged(); } } else { if (timestampBoundCase_ == 3) { timestampBoundCase_ = 0; timestampBound_ = null; } maxStalenessBuilder_.clear(); } return this; } /** *
       * Read data at a timestamp >= `NOW - max_staleness`
       * seconds. Guarantees that all writes that have committed more
       * than the specified number of seconds ago are visible. Because
       * Cloud Spanner chooses the exact timestamp, this mode works even if
       * the client's local clock is substantially skewed from Cloud Spanner
       * commit timestamps.
       * Useful for reading the freshest data available at a nearby
       * replica, while bounding the possible staleness if the local
       * replica has fallen behind.
       * Note that this option can only be used in single-use
       * transactions.
       * 
* * .google.protobuf.Duration max_staleness = 3; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder getMaxStalenessBuilder() { return getMaxStalenessFieldBuilder().getBuilder(); } /** *
       * Read data at a timestamp >= `NOW - max_staleness`
       * seconds. Guarantees that all writes that have committed more
       * than the specified number of seconds ago are visible. Because
       * Cloud Spanner chooses the exact timestamp, this mode works even if
       * the client's local clock is substantially skewed from Cloud Spanner
       * commit timestamps.
       * Useful for reading the freshest data available at a nearby
       * replica, while bounding the possible staleness if the local
       * replica has fallen behind.
       * Note that this option can only be used in single-use
       * transactions.
       * 
* * .google.protobuf.Duration max_staleness = 3; */ public nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder getMaxStalenessOrBuilder() { if ((timestampBoundCase_ == 3) && (maxStalenessBuilder_ != null)) { return maxStalenessBuilder_.getMessageOrBuilder(); } else { if (timestampBoundCase_ == 3) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } } /** *
       * Read data at a timestamp >= `NOW - max_staleness`
       * seconds. Guarantees that all writes that have committed more
       * than the specified number of seconds ago are visible. Because
       * Cloud Spanner chooses the exact timestamp, this mode works even if
       * the client's local clock is substantially skewed from Cloud Spanner
       * commit timestamps.
       * Useful for reading the freshest data available at a nearby
       * replica, while bounding the possible staleness if the local
       * replica has fallen behind.
       * Note that this option can only be used in single-use
       * transactions.
       * 
* * .google.protobuf.Duration max_staleness = 3; */ private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Duration, nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder> getMaxStalenessFieldBuilder() { if (maxStalenessBuilder_ == null) { if (!(timestampBoundCase_ == 3)) { timestampBound_ = nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } maxStalenessBuilder_ = new nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Duration, nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder>( (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_, getParentForChildren(), isClean()); timestampBound_ = null; } timestampBoundCase_ = 3; onChanged();; return maxStalenessBuilder_; } private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp, nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder> readTimestampBuilder_; /** *
       * Executes all reads at the given timestamp. Unlike other modes,
       * reads at a specific timestamp are repeatable; the same read at
       * the same timestamp always returns the same data. If the
       * timestamp is in the future, the read will block until the
       * specified timestamp, modulo the read's deadline.
       * Useful for large scale consistent reads such as mapreduces, or
       * for coordinating many reads against a consistent snapshot of the
       * data.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public boolean hasReadTimestamp() { return timestampBoundCase_ == 4; } /** *
       * Executes all reads at the given timestamp. Unlike other modes,
       * reads at a specific timestamp are repeatable; the same read at
       * the same timestamp always returns the same data. If the
       * timestamp is in the future, the read will block until the
       * specified timestamp, modulo the read's deadline.
       * Useful for large scale consistent reads such as mapreduces, or
       * for coordinating many reads against a consistent snapshot of the
       * data.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp getReadTimestamp() { if (readTimestampBuilder_ == null) { if (timestampBoundCase_ == 4) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } else { if (timestampBoundCase_ == 4) { return readTimestampBuilder_.getMessage(); } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } } /** *
       * Executes all reads at the given timestamp. Unlike other modes,
       * reads at a specific timestamp are repeatable; the same read at
       * the same timestamp always returns the same data. If the
       * timestamp is in the future, the read will block until the
       * specified timestamp, modulo the read's deadline.
       * Useful for large scale consistent reads such as mapreduces, or
       * for coordinating many reads against a consistent snapshot of the
       * data.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public Builder setReadTimestamp(nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp value) { if (readTimestampBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timestampBound_ = value; onChanged(); } else { readTimestampBuilder_.setMessage(value); } timestampBoundCase_ = 4; return this; } /** *
       * Executes all reads at the given timestamp. Unlike other modes,
       * reads at a specific timestamp are repeatable; the same read at
       * the same timestamp always returns the same data. If the
       * timestamp is in the future, the read will block until the
       * specified timestamp, modulo the read's deadline.
       * Useful for large scale consistent reads such as mapreduces, or
       * for coordinating many reads against a consistent snapshot of the
       * data.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public Builder setReadTimestamp( nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder builderForValue) { if (readTimestampBuilder_ == null) { timestampBound_ = builderForValue.build(); onChanged(); } else { readTimestampBuilder_.setMessage(builderForValue.build()); } timestampBoundCase_ = 4; return this; } /** *
       * Executes all reads at the given timestamp. Unlike other modes,
       * reads at a specific timestamp are repeatable; the same read at
       * the same timestamp always returns the same data. If the
       * timestamp is in the future, the read will block until the
       * specified timestamp, modulo the read's deadline.
       * Useful for large scale consistent reads such as mapreduces, or
       * for coordinating many reads against a consistent snapshot of the
       * data.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public Builder mergeReadTimestamp(nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp value) { if (readTimestampBuilder_ == null) { if (timestampBoundCase_ == 4 && timestampBound_ != nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance()) { timestampBound_ = nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.newBuilder((nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_) .mergeFrom(value).buildPartial(); } else { timestampBound_ = value; } onChanged(); } else { if (timestampBoundCase_ == 4) { readTimestampBuilder_.mergeFrom(value); } readTimestampBuilder_.setMessage(value); } timestampBoundCase_ = 4; return this; } /** *
       * Executes all reads at the given timestamp. Unlike other modes,
       * reads at a specific timestamp are repeatable; the same read at
       * the same timestamp always returns the same data. If the
       * timestamp is in the future, the read will block until the
       * specified timestamp, modulo the read's deadline.
       * Useful for large scale consistent reads such as mapreduces, or
       * for coordinating many reads against a consistent snapshot of the
       * data.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public Builder clearReadTimestamp() { if (readTimestampBuilder_ == null) { if (timestampBoundCase_ == 4) { timestampBoundCase_ = 0; timestampBound_ = null; onChanged(); } } else { if (timestampBoundCase_ == 4) { timestampBoundCase_ = 0; timestampBound_ = null; } readTimestampBuilder_.clear(); } return this; } /** *
       * Executes all reads at the given timestamp. Unlike other modes,
       * reads at a specific timestamp are repeatable; the same read at
       * the same timestamp always returns the same data. If the
       * timestamp is in the future, the read will block until the
       * specified timestamp, modulo the read's deadline.
       * Useful for large scale consistent reads such as mapreduces, or
       * for coordinating many reads against a consistent snapshot of the
       * data.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder getReadTimestampBuilder() { return getReadTimestampFieldBuilder().getBuilder(); } /** *
       * Executes all reads at the given timestamp. Unlike other modes,
       * reads at a specific timestamp are repeatable; the same read at
       * the same timestamp always returns the same data. If the
       * timestamp is in the future, the read will block until the
       * specified timestamp, modulo the read's deadline.
       * Useful for large scale consistent reads such as mapreduces, or
       * for coordinating many reads against a consistent snapshot of the
       * data.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ public nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder() { if ((timestampBoundCase_ == 4) && (readTimestampBuilder_ != null)) { return readTimestampBuilder_.getMessageOrBuilder(); } else { if (timestampBoundCase_ == 4) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } } /** *
       * Executes all reads at the given timestamp. Unlike other modes,
       * reads at a specific timestamp are repeatable; the same read at
       * the same timestamp always returns the same data. If the
       * timestamp is in the future, the read will block until the
       * specified timestamp, modulo the read's deadline.
       * Useful for large scale consistent reads such as mapreduces, or
       * for coordinating many reads against a consistent snapshot of the
       * data.
       * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
       * Example: `"2014-10-02T15:01:23.045123456Z"`.
       * 
* * .google.protobuf.Timestamp read_timestamp = 4; */ private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp, nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder> getReadTimestampFieldBuilder() { if (readTimestampBuilder_ == null) { if (!(timestampBoundCase_ == 4)) { timestampBound_ = nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.getDefaultInstance(); } readTimestampBuilder_ = new nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp, nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.TimestampOrBuilder>( (nl.topicus.jdbc.shaded.com.google.protobuf.Timestamp) timestampBound_, getParentForChildren(), isClean()); timestampBound_ = null; } timestampBoundCase_ = 4; onChanged();; return readTimestampBuilder_; } private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Duration, nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder> exactStalenessBuilder_; /** *
       * Executes all reads at a timestamp that is `exact_staleness`
       * old. The timestamp is chosen soon after the read is started.
       * Guarantees that all writes that have committed more than the
       * specified number of seconds ago are visible. Because Cloud Spanner
       * chooses the exact timestamp, this mode works even if the client's
       * local clock is substantially skewed from Cloud Spanner commit
       * timestamps.
       * Useful for reading at nearby replicas without the distributed
       * timestamp negotiation overhead of `max_staleness`.
       * 
* * .google.protobuf.Duration exact_staleness = 5; */ public boolean hasExactStaleness() { return timestampBoundCase_ == 5; } /** *
       * Executes all reads at a timestamp that is `exact_staleness`
       * old. The timestamp is chosen soon after the read is started.
       * Guarantees that all writes that have committed more than the
       * specified number of seconds ago are visible. Because Cloud Spanner
       * chooses the exact timestamp, this mode works even if the client's
       * local clock is substantially skewed from Cloud Spanner commit
       * timestamps.
       * Useful for reading at nearby replicas without the distributed
       * timestamp negotiation overhead of `max_staleness`.
       * 
* * .google.protobuf.Duration exact_staleness = 5; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Duration getExactStaleness() { if (exactStalenessBuilder_ == null) { if (timestampBoundCase_ == 5) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } else { if (timestampBoundCase_ == 5) { return exactStalenessBuilder_.getMessage(); } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } } /** *
       * Executes all reads at a timestamp that is `exact_staleness`
       * old. The timestamp is chosen soon after the read is started.
       * Guarantees that all writes that have committed more than the
       * specified number of seconds ago are visible. Because Cloud Spanner
       * chooses the exact timestamp, this mode works even if the client's
       * local clock is substantially skewed from Cloud Spanner commit
       * timestamps.
       * Useful for reading at nearby replicas without the distributed
       * timestamp negotiation overhead of `max_staleness`.
       * 
* * .google.protobuf.Duration exact_staleness = 5; */ public Builder setExactStaleness(nl.topicus.jdbc.shaded.com.google.protobuf.Duration value) { if (exactStalenessBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timestampBound_ = value; onChanged(); } else { exactStalenessBuilder_.setMessage(value); } timestampBoundCase_ = 5; return this; } /** *
       * Executes all reads at a timestamp that is `exact_staleness`
       * old. The timestamp is chosen soon after the read is started.
       * Guarantees that all writes that have committed more than the
       * specified number of seconds ago are visible. Because Cloud Spanner
       * chooses the exact timestamp, this mode works even if the client's
       * local clock is substantially skewed from Cloud Spanner commit
       * timestamps.
       * Useful for reading at nearby replicas without the distributed
       * timestamp negotiation overhead of `max_staleness`.
       * 
* * .google.protobuf.Duration exact_staleness = 5; */ public Builder setExactStaleness( nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder builderForValue) { if (exactStalenessBuilder_ == null) { timestampBound_ = builderForValue.build(); onChanged(); } else { exactStalenessBuilder_.setMessage(builderForValue.build()); } timestampBoundCase_ = 5; return this; } /** *
       * Executes all reads at a timestamp that is `exact_staleness`
       * old. The timestamp is chosen soon after the read is started.
       * Guarantees that all writes that have committed more than the
       * specified number of seconds ago are visible. Because Cloud Spanner
       * chooses the exact timestamp, this mode works even if the client's
       * local clock is substantially skewed from Cloud Spanner commit
       * timestamps.
       * Useful for reading at nearby replicas without the distributed
       * timestamp negotiation overhead of `max_staleness`.
       * 
* * .google.protobuf.Duration exact_staleness = 5; */ public Builder mergeExactStaleness(nl.topicus.jdbc.shaded.com.google.protobuf.Duration value) { if (exactStalenessBuilder_ == null) { if (timestampBoundCase_ == 5 && timestampBound_ != nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance()) { timestampBound_ = nl.topicus.jdbc.shaded.com.google.protobuf.Duration.newBuilder((nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_) .mergeFrom(value).buildPartial(); } else { timestampBound_ = value; } onChanged(); } else { if (timestampBoundCase_ == 5) { exactStalenessBuilder_.mergeFrom(value); } exactStalenessBuilder_.setMessage(value); } timestampBoundCase_ = 5; return this; } /** *
       * Executes all reads at a timestamp that is `exact_staleness`
       * old. The timestamp is chosen soon after the read is started.
       * Guarantees that all writes that have committed more than the
       * specified number of seconds ago are visible. Because Cloud Spanner
       * chooses the exact timestamp, this mode works even if the client's
       * local clock is substantially skewed from Cloud Spanner commit
       * timestamps.
       * Useful for reading at nearby replicas without the distributed
       * timestamp negotiation overhead of `max_staleness`.
       * 
* * .google.protobuf.Duration exact_staleness = 5; */ public Builder clearExactStaleness() { if (exactStalenessBuilder_ == null) { if (timestampBoundCase_ == 5) { timestampBoundCase_ = 0; timestampBound_ = null; onChanged(); } } else { if (timestampBoundCase_ == 5) { timestampBoundCase_ = 0; timestampBound_ = null; } exactStalenessBuilder_.clear(); } return this; } /** *
       * Executes all reads at a timestamp that is `exact_staleness`
       * old. The timestamp is chosen soon after the read is started.
       * Guarantees that all writes that have committed more than the
       * specified number of seconds ago are visible. Because Cloud Spanner
       * chooses the exact timestamp, this mode works even if the client's
       * local clock is substantially skewed from Cloud Spanner commit
       * timestamps.
       * Useful for reading at nearby replicas without the distributed
       * timestamp negotiation overhead of `max_staleness`.
       * 
* * .google.protobuf.Duration exact_staleness = 5; */ public nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder getExactStalenessBuilder() { return getExactStalenessFieldBuilder().getBuilder(); } /** *
       * Executes all reads at a timestamp that is `exact_staleness`
       * old. The timestamp is chosen soon after the read is started.
       * Guarantees that all writes that have committed more than the
       * specified number of seconds ago are visible. Because Cloud Spanner
       * chooses the exact timestamp, this mode works even if the client's
       * local clock is substantially skewed from Cloud Spanner commit
       * timestamps.
       * Useful for reading at nearby replicas without the distributed
       * timestamp negotiation overhead of `max_staleness`.
       * 
* * .google.protobuf.Duration exact_staleness = 5; */ public nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder getExactStalenessOrBuilder() { if ((timestampBoundCase_ == 5) && (exactStalenessBuilder_ != null)) { return exactStalenessBuilder_.getMessageOrBuilder(); } else { if (timestampBoundCase_ == 5) { return (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_; } return nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } } /** *
       * Executes all reads at a timestamp that is `exact_staleness`
       * old. The timestamp is chosen soon after the read is started.
       * Guarantees that all writes that have committed more than the
       * specified number of seconds ago are visible. Because Cloud Spanner
       * chooses the exact timestamp, this mode works even if the client's
       * local clock is substantially skewed from Cloud Spanner commit
       * timestamps.
       * Useful for reading at nearby replicas without the distributed
       * timestamp negotiation overhead of `max_staleness`.
       * 
* * .google.protobuf.Duration exact_staleness = 5; */ private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Duration, nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder> getExactStalenessFieldBuilder() { if (exactStalenessBuilder_ == null) { if (!(timestampBoundCase_ == 5)) { timestampBound_ = nl.topicus.jdbc.shaded.com.google.protobuf.Duration.getDefaultInstance(); } exactStalenessBuilder_ = new nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.protobuf.Duration, nl.topicus.jdbc.shaded.com.google.protobuf.Duration.Builder, nl.topicus.jdbc.shaded.com.google.protobuf.DurationOrBuilder>( (nl.topicus.jdbc.shaded.com.google.protobuf.Duration) timestampBound_, getParentForChildren(), isClean()); timestampBound_ = null; } timestampBoundCase_ = 5; onChanged();; return exactStalenessBuilder_; } private boolean returnReadTimestamp_ ; /** *
       * If true, the Cloud Spanner-selected read timestamp is included in
       * the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
       * 
* * bool return_read_timestamp = 6; */ public boolean getReturnReadTimestamp() { return returnReadTimestamp_; } /** *
       * If true, the Cloud Spanner-selected read timestamp is included in
       * the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
       * 
* * bool return_read_timestamp = 6; */ public Builder setReturnReadTimestamp(boolean value) { returnReadTimestamp_ = value; onChanged(); return this; } /** *
       * If true, the Cloud Spanner-selected read timestamp is included in
       * the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
       * 
* * bool return_read_timestamp = 6; */ public Builder clearReturnReadTimestamp() { returnReadTimestamp_ = false; onChanged(); return this; } public final Builder setUnknownFields( final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.spanner.v1.TransactionOptions.ReadOnly) } // @@protoc_insertion_point(class_scope:google.spanner.v1.TransactionOptions.ReadOnly) private static final nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly(); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly getDefaultInstance() { return DEFAULT_INSTANCE; } private static final nl.topicus.jdbc.shaded.com.google.protobuf.Parser PARSER = new nl.topicus.jdbc.shaded.com.google.protobuf.AbstractParser() { public ReadOnly parsePartialFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return new ReadOnly(input, extensionRegistry); } }; public static nl.topicus.jdbc.shaded.com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public nl.topicus.jdbc.shaded.com.google.protobuf.Parser getParserForType() { return PARSER; } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int modeCase_ = 0; private java.lang.Object mode_; public enum ModeCase implements nl.topicus.jdbc.shaded.com.google.protobuf.Internal.EnumLite { READ_WRITE(1), READ_ONLY(2), MODE_NOT_SET(0); private final int value; private ModeCase(int value) { this.value = value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ModeCase valueOf(int value) { return forNumber(value); } public static ModeCase forNumber(int value) { switch (value) { case 1: return READ_WRITE; case 2: return READ_ONLY; case 0: return MODE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ModeCase getModeCase() { return ModeCase.forNumber( modeCase_); } public static final int READ_WRITE_FIELD_NUMBER = 1; /** *
   * Transaction may write.
   * Authorization to begin a read-write transaction requires
   * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
   * on the `session` resource.
   * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public boolean hasReadWrite() { return modeCase_ == 1; } /** *
   * Transaction may write.
   * Authorization to begin a read-write transaction requires
   * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
   * on the `session` resource.
   * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite getReadWrite() { if (modeCase_ == 1) { return (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_; } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } /** *
   * Transaction may write.
   * Authorization to begin a read-write transaction requires
   * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
   * on the `session` resource.
   * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder getReadWriteOrBuilder() { if (modeCase_ == 1) { return (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_; } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } public static final int READ_ONLY_FIELD_NUMBER = 2; /** *
   * Transaction will not write.
   * Authorization to begin a read-only transaction requires
   * `spanner.databases.beginReadOnlyTransaction` permission
   * on the `session` resource.
   * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public boolean hasReadOnly() { return modeCase_ == 2; } /** *
   * Transaction will not write.
   * Authorization to begin a read-only transaction requires
   * `spanner.databases.beginReadOnlyTransaction` permission
   * on the `session` resource.
   * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly getReadOnly() { if (modeCase_ == 2) { return (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_; } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } /** *
   * Transaction will not write.
   * Authorization to begin a read-only transaction requires
   * `spanner.databases.beginReadOnlyTransaction` permission
   * on the `session` resource.
   * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder() { if (modeCase_ == 2) { return (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_; } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (modeCase_ == 1) { output.writeMessage(1, (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_); } if (modeCase_ == 2) { output.writeMessage(2, (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (modeCase_ == 1) { size += nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream .computeMessageSize(1, (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_); } if (modeCase_ == 2) { size += nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream .computeMessageSize(2, (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions)) { return super.equals(obj); } nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions other = (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions) obj; boolean result = true; result = result && getModeCase().equals( other.getModeCase()); if (!result) return false; switch (modeCase_) { case 1: result = result && getReadWrite() .equals(other.getReadWrite()); break; case 2: result = result && getReadOnly() .equals(other.getReadOnly()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); switch (modeCase_) { case 1: hash = (37 * hash) + READ_WRITE_FIELD_NUMBER; hash = (53 * hash) + getReadWrite().hashCode(); break; case 2: hash = (37 * hash) + READ_ONLY_FIELD_NUMBER; hash = (53 * hash) + getReadOnly().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom( java.nio.ByteBuffer data) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom( java.nio.ByteBuffer data, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom(byte[] data) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom( byte[] data, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom(java.io.InputStream input) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom( java.io.InputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseDelimitedFrom( java.io.InputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parseFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * # Transactions
   * Each session can have at most one active transaction at a time. After the
   * active transaction is completed, the session can immediately be
   * re-used for the next transaction. It is not necessary to create a
   * new session for each transaction.
   * # Transaction Modes
   * Cloud Spanner supports two transaction modes:
   *   1. Locking read-write. This type of transaction is the only way
   *      to write data into Cloud Spanner. These transactions rely on
   *      pessimistic locking and, if necessary, two-phase commit.
   *      Locking read-write transactions may abort, requiring the
   *      application to retry.
   *   2. Snapshot read-only. This transaction type provides guaranteed
   *      consistency across several reads, but does not allow
   *      writes. Snapshot read-only transactions can be configured to
   *      read at timestamps in the past. Snapshot read-only
   *      transactions do not need to be committed.
   * For transactions that only read, snapshot read-only transactions
   * provide simpler semantics and are almost always faster. In
   * particular, read-only transactions do not take locks, so they do
   * not conflict with read-write transactions. As a consequence of not
   * taking locks, they also do not abort, so retry loops are not needed.
   * Transactions may only read/write data in a single database. They
   * may, however, read/write data in different tables within that
   * database.
   * ## Locking Read-Write Transactions
   * Locking transactions may be used to atomically read-modify-write
   * data anywhere in a database. This type of transaction is externally
   * consistent.
   * Clients should attempt to minimize the amount of time a transaction
   * is active. Faster transactions commit with higher probability
   * and cause less contention. Cloud Spanner attempts to keep read locks
   * active as long as the transaction continues to do reads, and the
   * transaction has not been terminated by
   * [Commit][google.spanner.v1.Spanner.Commit] or
   * [Rollback][google.spanner.v1.Spanner.Rollback].  Long periods of
   * inactivity at the client may cause Cloud Spanner to release a
   * transaction's locks and abort it.
   * Reads performed within a transaction acquire locks on the data
   * being read. Writes can only be done at commit time, after all reads
   * have been completed.
   * Conceptually, a read-write transaction consists of zero or more
   * reads or SQL queries followed by
   * [Commit][google.spanner.v1.Spanner.Commit]. At any time before
   * [Commit][google.spanner.v1.Spanner.Commit], the client can send a
   * [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the
   * transaction.
   * ### Semantics
   * Cloud Spanner can commit the transaction if all read locks it acquired
   * are still valid at commit time, and it is able to acquire write
   * locks for all writes. Cloud Spanner can abort the transaction for any
   * reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
   * that the transaction has not modified any user data in Cloud Spanner.
   * Unless the transaction commits, Cloud Spanner makes no guarantees about
   * how long the transaction's locks were held for. It is an error to
   * use Cloud Spanner locks for any sort of mutual exclusion other than
   * between Cloud Spanner transactions themselves.
   * ### Retrying Aborted Transactions
   * When a transaction aborts, the application can choose to retry the
   * whole transaction again. To maximize the chances of successfully
   * committing the retry, the client should execute the retry in the
   * same session as the original attempt. The original session's lock
   * priority increases with each consecutive abort, meaning that each
   * attempt has a slightly better chance of success than the previous.
   * Under some circumstances (e.g., many transactions attempting to
   * modify the same row(s)), a transaction can abort many times in a
   * short period before successfully committing. Thus, it is not a good
   * idea to cap the number of retries a transaction can attempt;
   * instead, it is better to limit the total amount of wall time spent
   * retrying.
   * ### Idle Transactions
   * A transaction is considered idle if it has no outstanding reads or
   * SQL queries and has not started a read or SQL query within the last 10
   * seconds. Idle transactions can be aborted by Cloud Spanner so that they
   * don't hold on to locks indefinitely. In that case, the commit will
   * fail with error `ABORTED`.
   * If this behavior is undesirable, periodically executing a simple
   * SQL query in the transaction (e.g., `SELECT 1`) prevents the
   * transaction from becoming idle.
   * ## Snapshot Read-Only Transactions
   * Snapshot read-only transactions provides a simpler method than
   * locking read-write transactions for doing several consistent
   * reads. However, this type of transaction does not support writes.
   * Snapshot transactions do not take locks. Instead, they work by
   * choosing a Cloud Spanner timestamp, then executing all reads at that
   * timestamp. Since they do not acquire locks, they do not block
   * concurrent read-write transactions.
   * Unlike locking read-write transactions, snapshot read-only
   * transactions never abort. They can fail if the chosen read
   * timestamp is garbage collected; however, the default garbage
   * collection policy is generous enough that most applications do not
   * need to worry about this in practice.
   * Snapshot read-only transactions do not need to call
   * [Commit][google.spanner.v1.Spanner.Commit] or
   * [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not
   * permitted to do so).
   * To execute a snapshot transaction, the client specifies a timestamp
   * bound, which tells Cloud Spanner how to choose a read timestamp.
   * The types of timestamp bound are:
   *   - Strong (the default).
   *   - Bounded staleness.
   *   - Exact staleness.
   * If the Cloud Spanner database to be read is geographically distributed,
   * stale read-only transactions can execute more quickly than strong
   * or read-write transaction, because they are able to execute far
   * from the leader replica.
   * Each type of timestamp bound is discussed in detail below.
   * ### Strong
   * Strong reads are guaranteed to see the effects of all transactions
   * that have committed before the start of the read. Furthermore, all
   * rows yielded by a single read are consistent with each other -- if
   * any part of the read observes a transaction, all parts of the read
   * see the transaction.
   * Strong reads are not repeatable: two consecutive strong read-only
   * transactions might return inconsistent results if there are
   * concurrent writes. If consistency across reads is required, the
   * reads should be executed within a transaction or at an exact read
   * timestamp.
   * See [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong].
   * ### Exact Staleness
   * These timestamp bounds execute reads at a user-specified
   * timestamp. Reads at a timestamp are guaranteed to see a consistent
   * prefix of the global transaction history: they observe
   * modifications done by all transactions with a commit timestamp <=
   * the read timestamp, and observe none of the modifications done by
   * transactions with a larger commit timestamp. They will block until
   * all conflicting transactions that may be assigned commit timestamps
   * <= the read timestamp have finished.
   * The timestamp can either be expressed as an absolute Cloud Spanner commit
   * timestamp or a staleness relative to the current time.
   * These modes do not require a "negotiation phase" to pick a
   * timestamp. As a result, they execute slightly faster than the
   * equivalent boundedly stale concurrency modes. On the other hand,
   * boundedly stale reads usually return fresher results.
   * See [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] and
   * [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness].
   * ### Bounded Staleness
   * Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
   * subject to a user-provided staleness bound. Cloud Spanner chooses the
   * newest timestamp within the staleness bound that allows execution
   * of the reads at the closest available replica without blocking.
   * All rows yielded are consistent with each other -- if any part of
   * the read observes a transaction, all parts of the read see the
   * transaction. Boundedly stale reads are not repeatable: two stale
   * reads, even if they use the same staleness bound, can execute at
   * different timestamps and thus return inconsistent results.
   * Boundedly stale reads execute in two phases: the first phase
   * negotiates a timestamp among all replicas needed to serve the
   * read. In the second phase, reads are executed at the negotiated
   * timestamp.
   * As a result of the two phase execution, bounded staleness reads are
   * usually a little slower than comparable exact staleness
   * reads. However, they are typically able to return fresher
   * results, and are more likely to execute at the closest replica.
   * Because the timestamp negotiation requires up-front knowledge of
   * which rows will be read, it can only be used with single-use
   * read-only transactions.
   * See [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] and
   * [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp].
   * ### Old Read Timestamps and Garbage Collection
   * Cloud Spanner continuously garbage collects deleted and overwritten data
   * in the background to reclaim storage space. This process is known
   * as "version GC". By default, version GC reclaims versions after they
   * are one hour old. Because of this, Cloud Spanner cannot perform reads
   * at read timestamps more than one hour in the past. This
   * restriction also applies to in-progress reads and/or SQL queries whose
   * timestamp become too old while executing. Reads and SQL queries with
   * too-old read timestamps fail with the error `FAILED_PRECONDITION`.
   * 
* * Protobuf type {@code google.spanner.v1.TransactionOptions} */ public static final class Builder extends nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.TransactionOptions) nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptionsOrBuilder { public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_descriptor; } protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.class, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.Builder.class); } // Construct using nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); modeCase_ = 0; mode_ = null; return this; } public nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionProto.internal_static_google_spanner_v1_TransactionOptions_descriptor; } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions getDefaultInstanceForType() { return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.getDefaultInstance(); } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions build() { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions buildPartial() { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions result = new nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions(this); if (modeCase_ == 1) { if (readWriteBuilder_ == null) { result.mode_ = mode_; } else { result.mode_ = readWriteBuilder_.build(); } } if (modeCase_ == 2) { if (readOnlyBuilder_ == null) { result.mode_ = mode_; } else { result.mode_ = readOnlyBuilder_.build(); } } result.modeCase_ = modeCase_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.protobuf.Message other) { if (other instanceof nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions) { return mergeFrom((nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions other) { if (other == nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.getDefaultInstance()) return this; switch (other.getModeCase()) { case READ_WRITE: { mergeReadWrite(other.getReadWrite()); break; } case READ_ONLY: { mergeReadOnly(other.getReadOnly()); break; } case MODE_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int modeCase_ = 0; private java.lang.Object mode_; public ModeCase getModeCase() { return ModeCase.forNumber( modeCase_); } public Builder clearMode() { modeCase_ = 0; mode_ = null; onChanged(); return this; } private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.Builder, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder> readWriteBuilder_; /** *
     * Transaction may write.
     * Authorization to begin a read-write transaction requires
     * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public boolean hasReadWrite() { return modeCase_ == 1; } /** *
     * Transaction may write.
     * Authorization to begin a read-write transaction requires
     * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite getReadWrite() { if (readWriteBuilder_ == null) { if (modeCase_ == 1) { return (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_; } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } else { if (modeCase_ == 1) { return readWriteBuilder_.getMessage(); } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } } /** *
     * Transaction may write.
     * Authorization to begin a read-write transaction requires
     * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public Builder setReadWrite(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite value) { if (readWriteBuilder_ == null) { if (value == null) { throw new NullPointerException(); } mode_ = value; onChanged(); } else { readWriteBuilder_.setMessage(value); } modeCase_ = 1; return this; } /** *
     * Transaction may write.
     * Authorization to begin a read-write transaction requires
     * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public Builder setReadWrite( nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.Builder builderForValue) { if (readWriteBuilder_ == null) { mode_ = builderForValue.build(); onChanged(); } else { readWriteBuilder_.setMessage(builderForValue.build()); } modeCase_ = 1; return this; } /** *
     * Transaction may write.
     * Authorization to begin a read-write transaction requires
     * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public Builder mergeReadWrite(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite value) { if (readWriteBuilder_ == null) { if (modeCase_ == 1 && mode_ != nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance()) { mode_ = nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.newBuilder((nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_) .mergeFrom(value).buildPartial(); } else { mode_ = value; } onChanged(); } else { if (modeCase_ == 1) { readWriteBuilder_.mergeFrom(value); } readWriteBuilder_.setMessage(value); } modeCase_ = 1; return this; } /** *
     * Transaction may write.
     * Authorization to begin a read-write transaction requires
     * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public Builder clearReadWrite() { if (readWriteBuilder_ == null) { if (modeCase_ == 1) { modeCase_ = 0; mode_ = null; onChanged(); } } else { if (modeCase_ == 1) { modeCase_ = 0; mode_ = null; } readWriteBuilder_.clear(); } return this; } /** *
     * Transaction may write.
     * Authorization to begin a read-write transaction requires
     * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.Builder getReadWriteBuilder() { return getReadWriteFieldBuilder().getBuilder(); } /** *
     * Transaction may write.
     * Authorization to begin a read-write transaction requires
     * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder getReadWriteOrBuilder() { if ((modeCase_ == 1) && (readWriteBuilder_ != null)) { return readWriteBuilder_.getMessageOrBuilder(); } else { if (modeCase_ == 1) { return (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_; } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } } /** *
     * Transaction may write.
     * Authorization to begin a read-write transaction requires
     * `spanner.databases.beginOrRollbackReadWriteTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.Builder, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder> getReadWriteFieldBuilder() { if (readWriteBuilder_ == null) { if (!(modeCase_ == 1)) { mode_ = nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } readWriteBuilder_ = new nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite.Builder, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder>( (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadWrite) mode_, getParentForChildren(), isClean()); mode_ = null; } modeCase_ = 1; onChanged();; return readWriteBuilder_; } private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.Builder, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder> readOnlyBuilder_; /** *
     * Transaction will not write.
     * Authorization to begin a read-only transaction requires
     * `spanner.databases.beginReadOnlyTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public boolean hasReadOnly() { return modeCase_ == 2; } /** *
     * Transaction will not write.
     * Authorization to begin a read-only transaction requires
     * `spanner.databases.beginReadOnlyTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly getReadOnly() { if (readOnlyBuilder_ == null) { if (modeCase_ == 2) { return (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_; } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } else { if (modeCase_ == 2) { return readOnlyBuilder_.getMessage(); } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } } /** *
     * Transaction will not write.
     * Authorization to begin a read-only transaction requires
     * `spanner.databases.beginReadOnlyTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public Builder setReadOnly(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly value) { if (readOnlyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } mode_ = value; onChanged(); } else { readOnlyBuilder_.setMessage(value); } modeCase_ = 2; return this; } /** *
     * Transaction will not write.
     * Authorization to begin a read-only transaction requires
     * `spanner.databases.beginReadOnlyTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public Builder setReadOnly( nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.Builder builderForValue) { if (readOnlyBuilder_ == null) { mode_ = builderForValue.build(); onChanged(); } else { readOnlyBuilder_.setMessage(builderForValue.build()); } modeCase_ = 2; return this; } /** *
     * Transaction will not write.
     * Authorization to begin a read-only transaction requires
     * `spanner.databases.beginReadOnlyTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public Builder mergeReadOnly(nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly value) { if (readOnlyBuilder_ == null) { if (modeCase_ == 2 && mode_ != nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance()) { mode_ = nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.newBuilder((nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_) .mergeFrom(value).buildPartial(); } else { mode_ = value; } onChanged(); } else { if (modeCase_ == 2) { readOnlyBuilder_.mergeFrom(value); } readOnlyBuilder_.setMessage(value); } modeCase_ = 2; return this; } /** *
     * Transaction will not write.
     * Authorization to begin a read-only transaction requires
     * `spanner.databases.beginReadOnlyTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public Builder clearReadOnly() { if (readOnlyBuilder_ == null) { if (modeCase_ == 2) { modeCase_ = 0; mode_ = null; onChanged(); } } else { if (modeCase_ == 2) { modeCase_ = 0; mode_ = null; } readOnlyBuilder_.clear(); } return this; } /** *
     * Transaction will not write.
     * Authorization to begin a read-only transaction requires
     * `spanner.databases.beginReadOnlyTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.Builder getReadOnlyBuilder() { return getReadOnlyFieldBuilder().getBuilder(); } /** *
     * Transaction will not write.
     * Authorization to begin a read-only transaction requires
     * `spanner.databases.beginReadOnlyTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder() { if ((modeCase_ == 2) && (readOnlyBuilder_ != null)) { return readOnlyBuilder_.getMessageOrBuilder(); } else { if (modeCase_ == 2) { return (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_; } return nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } } /** *
     * Transaction will not write.
     * Authorization to begin a read-only transaction requires
     * `spanner.databases.beginReadOnlyTransaction` permission
     * on the `session` resource.
     * 
* * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ private nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.Builder, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder> getReadOnlyFieldBuilder() { if (readOnlyBuilder_ == null) { if (!(modeCase_ == 2)) { mode_ = nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } readOnlyBuilder_ = new nl.topicus.jdbc.shaded.com.google.protobuf.SingleFieldBuilderV3< nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly.Builder, nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder>( (nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions.ReadOnly) mode_, getParentForChildren(), isClean()); mode_ = null; } modeCase_ = 2; onChanged();; return readOnlyBuilder_; } public final Builder setUnknownFields( final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.spanner.v1.TransactionOptions) } // @@protoc_insertion_point(class_scope:google.spanner.v1.TransactionOptions) private static final nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions(); } public static nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions getDefaultInstance() { return DEFAULT_INSTANCE; } private static final nl.topicus.jdbc.shaded.com.google.protobuf.Parser PARSER = new nl.topicus.jdbc.shaded.com.google.protobuf.AbstractParser() { public TransactionOptions parsePartialFrom( nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input, nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException { return new TransactionOptions(input, extensionRegistry); } }; public static nl.topicus.jdbc.shaded.com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public nl.topicus.jdbc.shaded.com.google.protobuf.Parser getParserForType() { return PARSER; } public nl.topicus.jdbc.shaded.com.google.spanner.v1.TransactionOptions getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy