
com.daml.ledger.api.v1.LedgerOffsetOuterClass Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: com/daml/ledger/api/v1/ledger_offset.proto
package com.daml.ledger.api.v1;
public final class LedgerOffsetOuterClass {
private LedgerOffsetOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface LedgerOffsetOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.ledger.api.v1.LedgerOffset)
com.google.protobuf.MessageOrBuilder {
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return Whether the absolute field is set.
*/
boolean hasAbsolute();
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return The absolute.
*/
java.lang.String getAbsolute();
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return The bytes for absolute.
*/
com.google.protobuf.ByteString
getAbsoluteBytes();
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return Whether the boundary field is set.
*/
boolean hasBoundary();
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return The enum numeric value on the wire for boundary.
*/
int getBoundaryValue();
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return The boundary.
*/
com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary getBoundary();
public com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.ValueCase getValueCase();
}
/**
*
* Describes a specific point on the ledger.
* The Ledger API endpoints that take offsets allow to specify portions
* of the ledger that are relevant for the client to read.
* Offsets returned by the Ledger API can be used as-is (e.g.
* to keep track of processed transactions and provide a restart
* point to use in case of need).
* The format of absolute offsets is opaque to the client: no
* client-side transformation of an offset is guaranteed
* to return a meaningful offset.
* The server implementation ensures internally that offsets
* are lexicographically comparable.
*
*
* Protobuf type {@code com.daml.ledger.api.v1.LedgerOffset}
*/
public static final class LedgerOffset extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.ledger.api.v1.LedgerOffset)
LedgerOffsetOrBuilder {
private static final long serialVersionUID = 0L;
// Use LedgerOffset.newBuilder() to construct.
private LedgerOffset(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LedgerOffset() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LedgerOffset();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.ledger.api.v1.LedgerOffsetOuterClass.internal_static_com_daml_ledger_api_v1_LedgerOffset_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.ledger.api.v1.LedgerOffsetOuterClass.internal_static_com_daml_ledger_api_v1_LedgerOffset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.class, com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.Builder.class);
}
/**
* Protobuf enum {@code com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary}
*/
public enum LedgerBoundary
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Refers to the first transaction.
*
*
* LEDGER_BEGIN = 0;
*/
LEDGER_BEGIN(0),
/**
*
* Refers to the currently last transaction, which is a moving target.
*
*
* LEDGER_END = 1;
*/
LEDGER_END(1),
UNRECOGNIZED(-1),
;
/**
*
* Refers to the first transaction.
*
*
* LEDGER_BEGIN = 0;
*/
public static final int LEDGER_BEGIN_VALUE = 0;
/**
*
* Refers to the currently last transaction, which is a moving target.
*
*
* LEDGER_END = 1;
*/
public static final int LEDGER_END_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LedgerBoundary valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static LedgerBoundary forNumber(int value) {
switch (value) {
case 0: return LEDGER_BEGIN;
case 1: return LEDGER_END;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
LedgerBoundary> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public LedgerBoundary findValueByNumber(int number) {
return LedgerBoundary.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.getDescriptor().getEnumTypes().get(0);
}
private static final LedgerBoundary[] VALUES = values();
public static LedgerBoundary valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private LedgerBoundary(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary)
}
private int valueCase_ = 0;
private java.lang.Object value_;
public enum ValueCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
ABSOLUTE(1),
BOUNDARY(2),
VALUE_NOT_SET(0);
private final int value;
private ValueCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueCase valueOf(int value) {
return forNumber(value);
}
public static ValueCase forNumber(int value) {
switch (value) {
case 1: return ABSOLUTE;
case 2: return BOUNDARY;
case 0: return VALUE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public static final int ABSOLUTE_FIELD_NUMBER = 1;
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return Whether the absolute field is set.
*/
public boolean hasAbsolute() {
return valueCase_ == 1;
}
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return The absolute.
*/
public java.lang.String getAbsolute() {
java.lang.Object ref = "";
if (valueCase_ == 1) {
ref = value_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 1) {
value_ = s;
}
return s;
}
}
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return The bytes for absolute.
*/
public com.google.protobuf.ByteString
getAbsoluteBytes() {
java.lang.Object ref = "";
if (valueCase_ == 1) {
ref = value_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 1) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BOUNDARY_FIELD_NUMBER = 2;
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return Whether the boundary field is set.
*/
public boolean hasBoundary() {
return valueCase_ == 2;
}
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return The enum numeric value on the wire for boundary.
*/
public int getBoundaryValue() {
if (valueCase_ == 2) {
return (java.lang.Integer) value_;
}
return 0;
}
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return The boundary.
*/
public com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary getBoundary() {
if (valueCase_ == 2) {
@SuppressWarnings("deprecation")
com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary result = com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary.valueOf(
(java.lang.Integer) value_);
return result == null ? com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary.UNRECOGNIZED : result;
}
return com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary.LEDGER_BEGIN;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (valueCase_ == 1) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_);
}
if (valueCase_ == 2) {
output.writeEnum(2, ((java.lang.Integer) value_));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (valueCase_ == 1) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_);
}
if (valueCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, ((java.lang.Integer) value_));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset)) {
return super.equals(obj);
}
com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset other = (com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset) obj;
if (!getValueCase().equals(other.getValueCase())) return false;
switch (valueCase_) {
case 1:
if (!getAbsolute()
.equals(other.getAbsolute())) return false;
break;
case 2:
if (getBoundaryValue()
!= other.getBoundaryValue()) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (valueCase_) {
case 1:
hash = (37 * hash) + ABSOLUTE_FIELD_NUMBER;
hash = (53 * hash) + getAbsolute().hashCode();
break;
case 2:
hash = (37 * hash) + BOUNDARY_FIELD_NUMBER;
hash = (53 * hash) + getBoundaryValue();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Describes a specific point on the ledger.
* The Ledger API endpoints that take offsets allow to specify portions
* of the ledger that are relevant for the client to read.
* Offsets returned by the Ledger API can be used as-is (e.g.
* to keep track of processed transactions and provide a restart
* point to use in case of need).
* The format of absolute offsets is opaque to the client: no
* client-side transformation of an offset is guaranteed
* to return a meaningful offset.
* The server implementation ensures internally that offsets
* are lexicographically comparable.
*
*
* Protobuf type {@code com.daml.ledger.api.v1.LedgerOffset}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.ledger.api.v1.LedgerOffset)
com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffsetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.ledger.api.v1.LedgerOffsetOuterClass.internal_static_com_daml_ledger_api_v1_LedgerOffset_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.ledger.api.v1.LedgerOffsetOuterClass.internal_static_com_daml_ledger_api_v1_LedgerOffset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.class, com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.Builder.class);
}
// Construct using com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
valueCase_ = 0;
value_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.ledger.api.v1.LedgerOffsetOuterClass.internal_static_com_daml_ledger_api_v1_LedgerOffset_descriptor;
}
@java.lang.Override
public com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset getDefaultInstanceForType() {
return com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.getDefaultInstance();
}
@java.lang.Override
public com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset build() {
com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset buildPartial() {
com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset result = new com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset(this);
if (valueCase_ == 1) {
result.value_ = value_;
}
if (valueCase_ == 2) {
result.value_ = value_;
}
result.valueCase_ = valueCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset) {
return mergeFrom((com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset other) {
if (other == com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.getDefaultInstance()) return this;
switch (other.getValueCase()) {
case ABSOLUTE: {
valueCase_ = 1;
value_ = other.value_;
onChanged();
break;
}
case BOUNDARY: {
setBoundaryValue(other.getBoundaryValue());
break;
}
case VALUE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
valueCase_ = 1;
value_ = s;
break;
} // case 10
case 16: {
int rawValue = input.readEnum();
valueCase_ = 2;
value_ = rawValue;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int valueCase_ = 0;
private java.lang.Object value_;
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public Builder clearValue() {
valueCase_ = 0;
value_ = null;
onChanged();
return this;
}
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return Whether the absolute field is set.
*/
@java.lang.Override
public boolean hasAbsolute() {
return valueCase_ == 1;
}
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return The absolute.
*/
@java.lang.Override
public java.lang.String getAbsolute() {
java.lang.Object ref = "";
if (valueCase_ == 1) {
ref = value_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 1) {
value_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return The bytes for absolute.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAbsoluteBytes() {
java.lang.Object ref = "";
if (valueCase_ == 1) {
ref = value_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 1) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @param value The absolute to set.
* @return This builder for chaining.
*/
public Builder setAbsolute(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 1;
value_ = value;
onChanged();
return this;
}
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @return This builder for chaining.
*/
public Builder clearAbsolute() {
if (valueCase_ == 1) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
* The format of this string is specific to the ledger and opaque to the client.
*
*
* string absolute = 1;
* @param value The bytes for absolute to set.
* @return This builder for chaining.
*/
public Builder setAbsoluteBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueCase_ = 1;
value_ = value;
onChanged();
return this;
}
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return Whether the boundary field is set.
*/
@java.lang.Override
public boolean hasBoundary() {
return valueCase_ == 2;
}
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return The enum numeric value on the wire for boundary.
*/
@java.lang.Override
public int getBoundaryValue() {
if (valueCase_ == 2) {
return ((java.lang.Integer) value_).intValue();
}
return 0;
}
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @param value The enum numeric value on the wire for boundary to set.
* @return This builder for chaining.
*/
public Builder setBoundaryValue(int value) {
valueCase_ = 2;
value_ = value;
onChanged();
return this;
}
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return The boundary.
*/
@java.lang.Override
public com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary getBoundary() {
if (valueCase_ == 2) {
@SuppressWarnings("deprecation")
com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary result = com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary.valueOf(
(java.lang.Integer) value_);
return result == null ? com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary.UNRECOGNIZED : result;
}
return com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary.LEDGER_BEGIN;
}
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @param value The boundary to set.
* @return This builder for chaining.
*/
public Builder setBoundary(com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset.LedgerBoundary value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 2;
value_ = value.getNumber();
onChanged();
return this;
}
/**
* .com.daml.ledger.api.v1.LedgerOffset.LedgerBoundary boundary = 2;
* @return This builder for chaining.
*/
public Builder clearBoundary() {
if (valueCase_ == 2) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:com.daml.ledger.api.v1.LedgerOffset)
}
// @@protoc_insertion_point(class_scope:com.daml.ledger.api.v1.LedgerOffset)
private static final com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset();
}
public static com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LedgerOffset parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.daml.ledger.api.v1.LedgerOffsetOuterClass.LedgerOffset getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_com_daml_ledger_api_v1_LedgerOffset_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_com_daml_ledger_api_v1_LedgerOffset_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n*com/daml/ledger/api/v1/ledger_offset.p" +
"roto\022\026com.daml.ledger.api.v1\"\250\001\n\014LedgerO" +
"ffset\022\022\n\010absolute\030\001 \001(\tH\000\022G\n\010boundary\030\002 " +
"\001(\01623.com.daml.ledger.api.v1.LedgerOffse" +
"t.LedgerBoundaryH\000\"2\n\016LedgerBoundary\022\020\n\014" +
"LEDGER_BEGIN\020\000\022\016\n\nLEDGER_END\020\001B\007\n\005valueB" +
"I\n\026com.daml.ledger.api.v1B\026LedgerOffsetO" +
"uterClass\252\002\026Com.Daml.Ledger.Api.V1b\006prot" +
"o3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_com_daml_ledger_api_v1_LedgerOffset_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_com_daml_ledger_api_v1_LedgerOffset_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_com_daml_ledger_api_v1_LedgerOffset_descriptor,
new java.lang.String[] { "Absolute", "Boundary", "Value", });
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy