/** * * * <pre> * For snapshot read-only transactions, the read timestamp chosen * for the transaction. Not returned by default: see * [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. * Example: `"2014-10-02T15:01:23.045123456Z"`. * </pre> * * <code>.google.protobuf.Timestamp read_timestamp = 2;</code> */ public Builder setReadTimestamp(com.google.protobuf.Timestamp value) { if (readTimestampBuilder_ == null) { if (value == null) { throw new NullPointerException(); } readTimestamp_ = value; onChanged(); } else { readTimestampBuilder_.setMessage(value); } return this; } /**
/** * * * <pre> * `id` may be used to identify the transaction in subsequent * [Read][google.spanner.v1.Spanner.Read], * [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], * [Commit][google.spanner.v1.Spanner.Commit], or * [Rollback][google.spanner.v1.Spanner.Rollback] calls. * Single-use read-only transactions do not have IDs, because * single-use transactions do not support multiple requests. * </pre> * * <code>bytes id = 1;</code> */ public Builder setId(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /**
/** * * * <pre> * For snapshot read-only transactions, the read timestamp chosen * for the transaction. Not returned by default: see * [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. * Example: `"2014-10-02T15:01:23.045123456Z"`. * </pre> * * <code>.google.protobuf.Timestamp read_timestamp = 2;</code> */ public com.google.protobuf.Timestamp.Builder getReadTimestampBuilder() { onChanged(); return getReadTimestampFieldBuilder().getBuilder(); } /**
/** * * * <pre> * For snapshot read-only transactions, the read timestamp chosen * for the transaction. Not returned by default: see * [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. * Example: `"2014-10-02T15:01:23.045123456Z"`. * </pre> * * <code>.google.protobuf.Timestamp read_timestamp = 2;</code> */ public Builder mergeReadTimestamp(com.google.protobuf.Timestamp value) { if (readTimestampBuilder_ == null) { if (readTimestamp_ != null) { readTimestamp_ = com.google.protobuf.Timestamp.newBuilder(readTimestamp_) .mergeFrom(value) .buildPartial(); } else { readTimestamp_ = value; } onChanged(); } else { readTimestampBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * For snapshot read-only transactions, the read timestamp chosen * for the transaction. Not returned by default: see * [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. * Example: `"2014-10-02T15:01:23.045123456Z"`. * </pre> * * <code>.google.protobuf.Timestamp read_timestamp = 2;</code> */ public Builder setReadTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { if (readTimestampBuilder_ == null) { readTimestamp_ = builderForValue.build(); onChanged(); } else { readTimestampBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * For snapshot read-only transactions, the read timestamp chosen * for the transaction. Not returned by default: see * [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. * A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. * Example: `"2014-10-02T15:01:23.045123456Z"`. * </pre> * * <code>.google.protobuf.Timestamp read_timestamp = 2;</code> */ public Builder clearReadTimestamp() { if (readTimestampBuilder_ == null) { readTimestamp_ = null; onChanged(); } else { readTimestamp_ = null; readTimestampBuilder_ = null; } return this; } /**
/** * * * <pre> * `id` may be used to identify the transaction in subsequent * [Read][google.spanner.v1.Spanner.Read], * [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], * [Commit][google.spanner.v1.Spanner.Commit], or * [Rollback][google.spanner.v1.Spanner.Rollback] calls. * Single-use read-only transactions do not have IDs, because * single-use transactions do not support multiple requests. * </pre> * * <code>bytes id = 1;</code> */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; }
public Builder mergeFrom(com.google.spanner.v1.Transaction other) { if (other == com.google.spanner.v1.Transaction.getDefaultInstance()) return this; if (other.getId() != com.google.protobuf.ByteString.EMPTY) { setId(other.getId()); } if (other.hasReadTimestamp()) { mergeReadTimestamp(other.getReadTimestamp()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }