Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: com/daml/lf/value.proto
package com.daml.lf.value;
public final class ValueOuterClass {
private ValueOuterClass() {}
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 VersionedValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.VersionedValue)
com.google.protobuf.MessageOrBuilder {
/**
* string version = 1;
* @return The version.
*/
java.lang.String getVersion();
/**
* string version = 1;
* @return The bytes for version.
*/
com.google.protobuf.ByteString
getVersionBytes();
/**
* bytes value = 2;
* @return The value.
*/
com.google.protobuf.ByteString getValue();
}
/**
* Protobuf type {@code com.daml.lf.value.VersionedValue}
*/
public static final class VersionedValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.VersionedValue)
VersionedValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use VersionedValue.newBuilder() to construct.
private VersionedValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private VersionedValue() {
version_ = "";
value_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new VersionedValue();
}
@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.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_VersionedValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_VersionedValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.VersionedValue.class, com.daml.lf.value.ValueOuterClass.VersionedValue.Builder.class);
}
public static final int VERSION_FIELD_NUMBER = 1;
private volatile java.lang.Object version_;
/**
* string version = 1;
* @return The version.
*/
@java.lang.Override
public java.lang.String getVersion() {
java.lang.Object ref = version_;
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();
version_ = s;
return s;
}
}
/**
* string version = 1;
* @return The bytes for version.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString value_;
/**
* bytes value = 2;
* @return The value.
*/
@java.lang.Override
public com.google.protobuf.ByteString getValue() {
return value_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_);
}
if (!value_.isEmpty()) {
output.writeBytes(2, value_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_);
}
if (!value_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, 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.lf.value.ValueOuterClass.VersionedValue)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.VersionedValue other = (com.daml.lf.value.ValueOuterClass.VersionedValue) obj;
if (!getVersion()
.equals(other.getVersion())) return false;
if (!getValue()
.equals(other.getValue())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue 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.lf.value.ValueOuterClass.VersionedValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue 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.lf.value.ValueOuterClass.VersionedValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue 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.lf.value.ValueOuterClass.VersionedValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue 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.lf.value.ValueOuterClass.VersionedValue 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;
}
/**
* Protobuf type {@code com.daml.lf.value.VersionedValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.VersionedValue)
com.daml.lf.value.ValueOuterClass.VersionedValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_VersionedValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_VersionedValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.VersionedValue.class, com.daml.lf.value.ValueOuterClass.VersionedValue.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.VersionedValue.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
version_ = "";
value_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_VersionedValue_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.VersionedValue getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.VersionedValue.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.VersionedValue build() {
com.daml.lf.value.ValueOuterClass.VersionedValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.VersionedValue buildPartial() {
com.daml.lf.value.ValueOuterClass.VersionedValue result = new com.daml.lf.value.ValueOuterClass.VersionedValue(this);
result.version_ = version_;
result.value_ = value_;
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.lf.value.ValueOuterClass.VersionedValue) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.VersionedValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.VersionedValue other) {
if (other == com.daml.lf.value.ValueOuterClass.VersionedValue.getDefaultInstance()) return this;
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
onChanged();
}
if (other.getValue() != com.google.protobuf.ByteString.EMPTY) {
setValue(other.getValue());
}
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: {
version_ = input.readStringRequireUtf8();
break;
} // case 10
case 18: {
value_ = input.readBytes();
break;
} // case 18
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 java.lang.Object version_ = "";
/**
* string version = 1;
* @return The version.
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string version = 1;
* @return The bytes for version.
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string version = 1;
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
return this;
}
/**
* string version = 1;
* @return This builder for chaining.
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
* string version = 1;
* @param value The bytes for version to set.
* @return This builder for chaining.
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
version_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes value = 2;
* @return The value.
*/
@java.lang.Override
public com.google.protobuf.ByteString getValue() {
return value_;
}
/**
* bytes value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
* bytes value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
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.lf.value.VersionedValue)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.VersionedValue)
private static final com.daml.lf.value.ValueOuterClass.VersionedValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.VersionedValue();
}
public static com.daml.lf.value.ValueOuterClass.VersionedValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VersionedValue 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.lf.value.ValueOuterClass.VersionedValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.Value)
com.google.protobuf.MessageOrBuilder {
/**
* .com.daml.lf.value.Record record = 1;
* @return Whether the record field is set.
*/
boolean hasRecord();
/**
* .com.daml.lf.value.Record record = 1;
* @return The record.
*/
com.daml.lf.value.ValueOuterClass.Record getRecord();
/**
* .com.daml.lf.value.Record record = 1;
*/
com.daml.lf.value.ValueOuterClass.RecordOrBuilder getRecordOrBuilder();
/**
* .com.daml.lf.value.Variant variant = 2;
* @return Whether the variant field is set.
*/
boolean hasVariant();
/**
* .com.daml.lf.value.Variant variant = 2;
* @return The variant.
*/
com.daml.lf.value.ValueOuterClass.Variant getVariant();
/**
* .com.daml.lf.value.Variant variant = 2;
*/
com.daml.lf.value.ValueOuterClass.VariantOrBuilder getVariantOrBuilder();
/**
* .com.daml.lf.value.List list = 4;
* @return Whether the list field is set.
*/
boolean hasList();
/**
* .com.daml.lf.value.List list = 4;
* @return The list.
*/
com.daml.lf.value.ValueOuterClass.List getList();
/**
* .com.daml.lf.value.List list = 4;
*/
com.daml.lf.value.ValueOuterClass.ListOrBuilder getListOrBuilder();
/**
* sint64 int64 = 5;
* @return Whether the int64 field is set.
*/
boolean hasInt64();
/**
* sint64 int64 = 5;
* @return The int64.
*/
long getInt64();
/**
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
*
* string numeric = 6;
* @return Whether the numeric field is set.
*/
boolean hasNumeric();
/**
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
*
* string numeric = 6;
* @return The bytes for numeric.
*/
com.google.protobuf.ByteString
getNumericBytes();
/**
* string text = 8;
* @return Whether the text field is set.
*/
boolean hasText();
/**
* string text = 8;
* @return The text.
*/
java.lang.String getText();
/**
* string text = 8;
* @return The bytes for text.
*/
com.google.protobuf.ByteString
getTextBytes();
/**
*
* microseconds since the UNIX epoch. can go backwards. fixed
* since the vast majority of values will be greater than
* 2^28, since currently the number of microseconds since the
* epoch is greater than that. Range: 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59.999999Z, so that we can convert to/from
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* sfixed64 timestamp = 9;
* @return Whether the timestamp field is set.
*/
boolean hasTimestamp();
/**
*
* microseconds since the UNIX epoch. can go backwards. fixed
* since the vast majority of values will be greater than
* 2^28, since currently the number of microseconds since the
* epoch is greater than that. Range: 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59.999999Z, so that we can convert to/from
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* sfixed64 timestamp = 9;
* @return The timestamp.
*/
long getTimestamp();
/**
* string party = 10;
* @return Whether the party field is set.
*/
boolean hasParty();
/**
* string party = 10;
* @return The party.
*/
java.lang.String getParty();
/**
* string party = 10;
* @return The bytes for party.
*/
com.google.protobuf.ByteString
getPartyBytes();
/**
* bool bool = 11;
* @return Whether the bool field is set.
*/
boolean hasBool();
/**
* bool bool = 11;
* @return The bool.
*/
boolean getBool();
/**
* .google.protobuf.Empty unit = 12;
* @return Whether the unit field is set.
*/
boolean hasUnit();
/**
* .google.protobuf.Empty unit = 12;
* @return The unit.
*/
com.google.protobuf.Empty getUnit();
/**
* .google.protobuf.Empty unit = 12;
*/
com.google.protobuf.EmptyOrBuilder getUnitOrBuilder();
/**
*
* days since the unix epoch. can go backwards. limited from
* 0001-01-01 to 9999-12-31, also to be compatible with
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* int32 date = 13;
* @return Whether the date field is set.
*/
boolean hasDate();
/**
*
* days since the unix epoch. can go backwards. limited from
* 0001-01-01 to 9999-12-31, also to be compatible with
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* int32 date = 13;
* @return The date.
*/
int getDate();
/**
* .com.daml.lf.value.Optional optional = 14;
* @return Whether the optional field is set.
*/
boolean hasOptional();
/**
* .com.daml.lf.value.Optional optional = 14;
* @return The optional.
*/
com.daml.lf.value.ValueOuterClass.Optional getOptional();
/**
* .com.daml.lf.value.Optional optional = 14;
*/
com.daml.lf.value.ValueOuterClass.OptionalOrBuilder getOptionalOrBuilder();
/**
* .com.daml.lf.value.ContractId contract_id_struct = 15;
* @return Whether the contractIdStruct field is set.
*/
boolean hasContractIdStruct();
/**
* .com.daml.lf.value.ContractId contract_id_struct = 15;
* @return The contractIdStruct.
*/
com.daml.lf.value.ValueOuterClass.ContractId getContractIdStruct();
/**
* .com.daml.lf.value.ContractId contract_id_struct = 15;
*/
com.daml.lf.value.ValueOuterClass.ContractIdOrBuilder getContractIdStructOrBuilder();
/**
* .com.daml.lf.value.Map map = 16;
* @return Whether the map field is set.
*/
boolean hasMap();
/**
* .com.daml.lf.value.Map map = 16;
* @return The map.
*/
com.daml.lf.value.ValueOuterClass.Map getMap();
/**
* .com.daml.lf.value.Map map = 16;
*/
com.daml.lf.value.ValueOuterClass.MapOrBuilder getMapOrBuilder();
/**
* .com.daml.lf.value.Enum enum = 17;
* @return Whether the enum field is set.
*/
boolean hasEnum();
/**
* .com.daml.lf.value.Enum enum = 17;
* @return The enum.
*/
com.daml.lf.value.ValueOuterClass.Enum getEnum();
/**
* .com.daml.lf.value.Enum enum = 17;
*/
com.daml.lf.value.ValueOuterClass.EnumOrBuilder getEnumOrBuilder();
/**
*
* *since version 11*
*
*
* .com.daml.lf.value.GenMap gen_map = 18;
* @return Whether the genMap field is set.
*/
boolean hasGenMap();
/**
*
* The universe of serializable Daml-LF values.
* architecture-handbook-entry-begin: Value
*
*
* Protobuf type {@code com.daml.lf.value.Value}
*/
public static final class Value extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.Value)
ValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use Value.newBuilder() to construct.
private Value(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Value() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Value();
}
@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.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.class, com.daml.lf.value.ValueOuterClass.Value.Builder.class);
}
private int sumCase_ = 0;
private java.lang.Object sum_;
public enum SumCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
RECORD(1),
VARIANT(2),
LIST(4),
INT64(5),
NUMERIC(6),
TEXT(8),
TIMESTAMP(9),
PARTY(10),
BOOL(11),
UNIT(12),
DATE(13),
OPTIONAL(14),
CONTRACT_ID_STRUCT(15),
MAP(16),
ENUM(17),
GEN_MAP(18),
SUM_NOT_SET(0);
private final int value;
private SumCase(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 SumCase valueOf(int value) {
return forNumber(value);
}
public static SumCase forNumber(int value) {
switch (value) {
case 1: return RECORD;
case 2: return VARIANT;
case 4: return LIST;
case 5: return INT64;
case 6: return NUMERIC;
case 8: return TEXT;
case 9: return TIMESTAMP;
case 10: return PARTY;
case 11: return BOOL;
case 12: return UNIT;
case 13: return DATE;
case 14: return OPTIONAL;
case 15: return CONTRACT_ID_STRUCT;
case 16: return MAP;
case 17: return ENUM;
case 18: return GEN_MAP;
case 0: return SUM_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public static final int RECORD_FIELD_NUMBER = 1;
/**
* .com.daml.lf.value.Record record = 1;
* @return Whether the record field is set.
*/
@java.lang.Override
public boolean hasRecord() {
return sumCase_ == 1;
}
/**
* .com.daml.lf.value.Record record = 1;
* @return The record.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Record getRecord() {
if (sumCase_ == 1) {
return (com.daml.lf.value.ValueOuterClass.Record) sum_;
}
return com.daml.lf.value.ValueOuterClass.Record.getDefaultInstance();
}
/**
* .com.daml.lf.value.Record record = 1;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.RecordOrBuilder getRecordOrBuilder() {
if (sumCase_ == 1) {
return (com.daml.lf.value.ValueOuterClass.Record) sum_;
}
return com.daml.lf.value.ValueOuterClass.Record.getDefaultInstance();
}
public static final int VARIANT_FIELD_NUMBER = 2;
/**
* .com.daml.lf.value.Variant variant = 2;
* @return Whether the variant field is set.
*/
@java.lang.Override
public boolean hasVariant() {
return sumCase_ == 2;
}
/**
* .com.daml.lf.value.Variant variant = 2;
* @return The variant.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Variant getVariant() {
if (sumCase_ == 2) {
return (com.daml.lf.value.ValueOuterClass.Variant) sum_;
}
return com.daml.lf.value.ValueOuterClass.Variant.getDefaultInstance();
}
/**
* .com.daml.lf.value.Variant variant = 2;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.VariantOrBuilder getVariantOrBuilder() {
if (sumCase_ == 2) {
return (com.daml.lf.value.ValueOuterClass.Variant) sum_;
}
return com.daml.lf.value.ValueOuterClass.Variant.getDefaultInstance();
}
public static final int LIST_FIELD_NUMBER = 4;
/**
* .com.daml.lf.value.List list = 4;
* @return Whether the list field is set.
*/
@java.lang.Override
public boolean hasList() {
return sumCase_ == 4;
}
/**
* .com.daml.lf.value.List list = 4;
* @return The list.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.List getList() {
if (sumCase_ == 4) {
return (com.daml.lf.value.ValueOuterClass.List) sum_;
}
return com.daml.lf.value.ValueOuterClass.List.getDefaultInstance();
}
/**
* .com.daml.lf.value.List list = 4;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ListOrBuilder getListOrBuilder() {
if (sumCase_ == 4) {
return (com.daml.lf.value.ValueOuterClass.List) sum_;
}
return com.daml.lf.value.ValueOuterClass.List.getDefaultInstance();
}
public static final int INT64_FIELD_NUMBER = 5;
/**
* sint64 int64 = 5;
* @return Whether the int64 field is set.
*/
@java.lang.Override
public boolean hasInt64() {
return sumCase_ == 5;
}
/**
* sint64 int64 = 5;
* @return The int64.
*/
@java.lang.Override
public long getInt64() {
if (sumCase_ == 5) {
return (java.lang.Long) sum_;
}
return 0L;
}
public static final int NUMERIC_FIELD_NUMBER = 6;
/**
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
*
* string numeric = 6;
* @return Whether the numeric field is set.
*/
public boolean hasNumeric() {
return sumCase_ == 6;
}
/**
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
*
* string numeric = 6;
* @return The bytes for numeric.
*/
public com.google.protobuf.ByteString
getNumericBytes() {
java.lang.Object ref = "";
if (sumCase_ == 6) {
ref = sum_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sumCase_ == 6) {
sum_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TEXT_FIELD_NUMBER = 8;
/**
* string text = 8;
* @return Whether the text field is set.
*/
public boolean hasText() {
return sumCase_ == 8;
}
/**
* string text = 8;
* @return The text.
*/
public java.lang.String getText() {
java.lang.Object ref = "";
if (sumCase_ == 8) {
ref = sum_;
}
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 (sumCase_ == 8) {
sum_ = s;
}
return s;
}
}
/**
* string text = 8;
* @return The bytes for text.
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = "";
if (sumCase_ == 8) {
ref = sum_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sumCase_ == 8) {
sum_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TIMESTAMP_FIELD_NUMBER = 9;
/**
*
* microseconds since the UNIX epoch. can go backwards. fixed
* since the vast majority of values will be greater than
* 2^28, since currently the number of microseconds since the
* epoch is greater than that. Range: 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59.999999Z, so that we can convert to/from
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* sfixed64 timestamp = 9;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return sumCase_ == 9;
}
/**
*
* microseconds since the UNIX epoch. can go backwards. fixed
* since the vast majority of values will be greater than
* 2^28, since currently the number of microseconds since the
* epoch is greater than that. Range: 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59.999999Z, so that we can convert to/from
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* sfixed64 timestamp = 9;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
if (sumCase_ == 9) {
return (java.lang.Long) sum_;
}
return 0L;
}
public static final int PARTY_FIELD_NUMBER = 10;
/**
* string party = 10;
* @return Whether the party field is set.
*/
public boolean hasParty() {
return sumCase_ == 10;
}
/**
* string party = 10;
* @return The party.
*/
public java.lang.String getParty() {
java.lang.Object ref = "";
if (sumCase_ == 10) {
ref = sum_;
}
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 (sumCase_ == 10) {
sum_ = s;
}
return s;
}
}
/**
* string party = 10;
* @return The bytes for party.
*/
public com.google.protobuf.ByteString
getPartyBytes() {
java.lang.Object ref = "";
if (sumCase_ == 10) {
ref = sum_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sumCase_ == 10) {
sum_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BOOL_FIELD_NUMBER = 11;
/**
* bool bool = 11;
* @return Whether the bool field is set.
*/
@java.lang.Override
public boolean hasBool() {
return sumCase_ == 11;
}
/**
* bool bool = 11;
* @return The bool.
*/
@java.lang.Override
public boolean getBool() {
if (sumCase_ == 11) {
return (java.lang.Boolean) sum_;
}
return false;
}
public static final int UNIT_FIELD_NUMBER = 12;
/**
* .google.protobuf.Empty unit = 12;
* @return Whether the unit field is set.
*/
@java.lang.Override
public boolean hasUnit() {
return sumCase_ == 12;
}
/**
* .google.protobuf.Empty unit = 12;
* @return The unit.
*/
@java.lang.Override
public com.google.protobuf.Empty getUnit() {
if (sumCase_ == 12) {
return (com.google.protobuf.Empty) sum_;
}
return com.google.protobuf.Empty.getDefaultInstance();
}
/**
* .google.protobuf.Empty unit = 12;
*/
@java.lang.Override
public com.google.protobuf.EmptyOrBuilder getUnitOrBuilder() {
if (sumCase_ == 12) {
return (com.google.protobuf.Empty) sum_;
}
return com.google.protobuf.Empty.getDefaultInstance();
}
public static final int DATE_FIELD_NUMBER = 13;
/**
*
* days since the unix epoch. can go backwards. limited from
* 0001-01-01 to 9999-12-31, also to be compatible with
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* int32 date = 13;
* @return Whether the date field is set.
*/
@java.lang.Override
public boolean hasDate() {
return sumCase_ == 13;
}
/**
*
* days since the unix epoch. can go backwards. limited from
* 0001-01-01 to 9999-12-31, also to be compatible with
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* int32 date = 13;
* @return The date.
*/
@java.lang.Override
public int getDate() {
if (sumCase_ == 13) {
return (java.lang.Integer) sum_;
}
return 0;
}
public static final int OPTIONAL_FIELD_NUMBER = 14;
/**
* .com.daml.lf.value.Optional optional = 14;
* @return Whether the optional field is set.
*/
@java.lang.Override
public boolean hasOptional() {
return sumCase_ == 14;
}
/**
* .com.daml.lf.value.Optional optional = 14;
* @return The optional.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Optional getOptional() {
if (sumCase_ == 14) {
return (com.daml.lf.value.ValueOuterClass.Optional) sum_;
}
return com.daml.lf.value.ValueOuterClass.Optional.getDefaultInstance();
}
/**
* .com.daml.lf.value.Optional optional = 14;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.OptionalOrBuilder getOptionalOrBuilder() {
if (sumCase_ == 14) {
return (com.daml.lf.value.ValueOuterClass.Optional) sum_;
}
return com.daml.lf.value.ValueOuterClass.Optional.getDefaultInstance();
}
public static final int CONTRACT_ID_STRUCT_FIELD_NUMBER = 15;
/**
* .com.daml.lf.value.ContractId contract_id_struct = 15;
* @return Whether the contractIdStruct field is set.
*/
@java.lang.Override
public boolean hasContractIdStruct() {
return sumCase_ == 15;
}
/**
* .com.daml.lf.value.ContractId contract_id_struct = 15;
* @return The contractIdStruct.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ContractId getContractIdStruct() {
if (sumCase_ == 15) {
return (com.daml.lf.value.ValueOuterClass.ContractId) sum_;
}
return com.daml.lf.value.ValueOuterClass.ContractId.getDefaultInstance();
}
/**
* .com.daml.lf.value.ContractId contract_id_struct = 15;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ContractIdOrBuilder getContractIdStructOrBuilder() {
if (sumCase_ == 15) {
return (com.daml.lf.value.ValueOuterClass.ContractId) sum_;
}
return com.daml.lf.value.ValueOuterClass.ContractId.getDefaultInstance();
}
public static final int MAP_FIELD_NUMBER = 16;
/**
* .com.daml.lf.value.Map map = 16;
* @return Whether the map field is set.
*/
@java.lang.Override
public boolean hasMap() {
return sumCase_ == 16;
}
/**
* .com.daml.lf.value.Map map = 16;
* @return The map.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Map getMap() {
if (sumCase_ == 16) {
return (com.daml.lf.value.ValueOuterClass.Map) sum_;
}
return com.daml.lf.value.ValueOuterClass.Map.getDefaultInstance();
}
/**
* .com.daml.lf.value.Map map = 16;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.MapOrBuilder getMapOrBuilder() {
if (sumCase_ == 16) {
return (com.daml.lf.value.ValueOuterClass.Map) sum_;
}
return com.daml.lf.value.ValueOuterClass.Map.getDefaultInstance();
}
public static final int ENUM_FIELD_NUMBER = 17;
/**
* .com.daml.lf.value.Enum enum = 17;
* @return Whether the enum field is set.
*/
@java.lang.Override
public boolean hasEnum() {
return sumCase_ == 17;
}
/**
* .com.daml.lf.value.Enum enum = 17;
* @return The enum.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Enum getEnum() {
if (sumCase_ == 17) {
return (com.daml.lf.value.ValueOuterClass.Enum) sum_;
}
return com.daml.lf.value.ValueOuterClass.Enum.getDefaultInstance();
}
/**
* .com.daml.lf.value.Enum enum = 17;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.EnumOrBuilder getEnumOrBuilder() {
if (sumCase_ == 17) {
return (com.daml.lf.value.ValueOuterClass.Enum) sum_;
}
return com.daml.lf.value.ValueOuterClass.Enum.getDefaultInstance();
}
public static final int GEN_MAP_FIELD_NUMBER = 18;
/**
*
* *since version 11*
*
*
* .com.daml.lf.value.GenMap gen_map = 18;
* @return Whether the genMap field is set.
*/
@java.lang.Override
public boolean hasGenMap() {
return sumCase_ == 18;
}
/**
*
* *since version 11*
*
*
* .com.daml.lf.value.GenMap gen_map = 18;
* @return The genMap.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.GenMap getGenMap() {
if (sumCase_ == 18) {
return (com.daml.lf.value.ValueOuterClass.GenMap) sum_;
}
return com.daml.lf.value.ValueOuterClass.GenMap.getDefaultInstance();
}
/**
*
* *since version 11*
*
*
* .com.daml.lf.value.GenMap gen_map = 18;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.GenMapOrBuilder getGenMapOrBuilder() {
if (sumCase_ == 18) {
return (com.daml.lf.value.ValueOuterClass.GenMap) sum_;
}
return com.daml.lf.value.ValueOuterClass.GenMap.getDefaultInstance();
}
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 (sumCase_ == 1) {
output.writeMessage(1, (com.daml.lf.value.ValueOuterClass.Record) sum_);
}
if (sumCase_ == 2) {
output.writeMessage(2, (com.daml.lf.value.ValueOuterClass.Variant) sum_);
}
if (sumCase_ == 4) {
output.writeMessage(4, (com.daml.lf.value.ValueOuterClass.List) sum_);
}
if (sumCase_ == 5) {
output.writeSInt64(
5, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 6) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sum_);
}
if (sumCase_ == 8) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, sum_);
}
if (sumCase_ == 9) {
output.writeSFixed64(
9, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 10) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, sum_);
}
if (sumCase_ == 11) {
output.writeBool(
11, (boolean)((java.lang.Boolean) sum_));
}
if (sumCase_ == 12) {
output.writeMessage(12, (com.google.protobuf.Empty) sum_);
}
if (sumCase_ == 13) {
output.writeInt32(
13, (int)((java.lang.Integer) sum_));
}
if (sumCase_ == 14) {
output.writeMessage(14, (com.daml.lf.value.ValueOuterClass.Optional) sum_);
}
if (sumCase_ == 15) {
output.writeMessage(15, (com.daml.lf.value.ValueOuterClass.ContractId) sum_);
}
if (sumCase_ == 16) {
output.writeMessage(16, (com.daml.lf.value.ValueOuterClass.Map) sum_);
}
if (sumCase_ == 17) {
output.writeMessage(17, (com.daml.lf.value.ValueOuterClass.Enum) sum_);
}
if (sumCase_ == 18) {
output.writeMessage(18, (com.daml.lf.value.ValueOuterClass.GenMap) sum_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sumCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.daml.lf.value.ValueOuterClass.Record) sum_);
}
if (sumCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.daml.lf.value.ValueOuterClass.Variant) sum_);
}
if (sumCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.daml.lf.value.ValueOuterClass.List) sum_);
}
if (sumCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeSInt64Size(
5, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 6) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sum_);
}
if (sumCase_ == 8) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, sum_);
}
if (sumCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeSFixed64Size(
9, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 10) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, sum_);
}
if (sumCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
11, (boolean)((java.lang.Boolean) sum_));
}
if (sumCase_ == 12) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, (com.google.protobuf.Empty) sum_);
}
if (sumCase_ == 13) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(
13, (int)((java.lang.Integer) sum_));
}
if (sumCase_ == 14) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, (com.daml.lf.value.ValueOuterClass.Optional) sum_);
}
if (sumCase_ == 15) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, (com.daml.lf.value.ValueOuterClass.ContractId) sum_);
}
if (sumCase_ == 16) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, (com.daml.lf.value.ValueOuterClass.Map) sum_);
}
if (sumCase_ == 17) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(17, (com.daml.lf.value.ValueOuterClass.Enum) sum_);
}
if (sumCase_ == 18) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(18, (com.daml.lf.value.ValueOuterClass.GenMap) sum_);
}
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.lf.value.ValueOuterClass.Value)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.Value other = (com.daml.lf.value.ValueOuterClass.Value) obj;
if (!getSumCase().equals(other.getSumCase())) return false;
switch (sumCase_) {
case 1:
if (!getRecord()
.equals(other.getRecord())) return false;
break;
case 2:
if (!getVariant()
.equals(other.getVariant())) return false;
break;
case 4:
if (!getList()
.equals(other.getList())) return false;
break;
case 5:
if (getInt64()
!= other.getInt64()) return false;
break;
case 6:
if (!getNumeric()
.equals(other.getNumeric())) return false;
break;
case 8:
if (!getText()
.equals(other.getText())) return false;
break;
case 9:
if (getTimestamp()
!= other.getTimestamp()) return false;
break;
case 10:
if (!getParty()
.equals(other.getParty())) return false;
break;
case 11:
if (getBool()
!= other.getBool()) return false;
break;
case 12:
if (!getUnit()
.equals(other.getUnit())) return false;
break;
case 13:
if (getDate()
!= other.getDate()) return false;
break;
case 14:
if (!getOptional()
.equals(other.getOptional())) return false;
break;
case 15:
if (!getContractIdStruct()
.equals(other.getContractIdStruct())) return false;
break;
case 16:
if (!getMap()
.equals(other.getMap())) return false;
break;
case 17:
if (!getEnum()
.equals(other.getEnum())) return false;
break;
case 18:
if (!getGenMap()
.equals(other.getGenMap())) 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 (sumCase_) {
case 1:
hash = (37 * hash) + RECORD_FIELD_NUMBER;
hash = (53 * hash) + getRecord().hashCode();
break;
case 2:
hash = (37 * hash) + VARIANT_FIELD_NUMBER;
hash = (53 * hash) + getVariant().hashCode();
break;
case 4:
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getList().hashCode();
break;
case 5:
hash = (37 * hash) + INT64_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getInt64());
break;
case 6:
hash = (37 * hash) + NUMERIC_FIELD_NUMBER;
hash = (53 * hash) + getNumeric().hashCode();
break;
case 8:
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
break;
case 9:
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
break;
case 10:
hash = (37 * hash) + PARTY_FIELD_NUMBER;
hash = (53 * hash) + getParty().hashCode();
break;
case 11:
hash = (37 * hash) + BOOL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getBool());
break;
case 12:
hash = (37 * hash) + UNIT_FIELD_NUMBER;
hash = (53 * hash) + getUnit().hashCode();
break;
case 13:
hash = (37 * hash) + DATE_FIELD_NUMBER;
hash = (53 * hash) + getDate();
break;
case 14:
hash = (37 * hash) + OPTIONAL_FIELD_NUMBER;
hash = (53 * hash) + getOptional().hashCode();
break;
case 15:
hash = (37 * hash) + CONTRACT_ID_STRUCT_FIELD_NUMBER;
hash = (53 * hash) + getContractIdStruct().hashCode();
break;
case 16:
hash = (37 * hash) + MAP_FIELD_NUMBER;
hash = (53 * hash) + getMap().hashCode();
break;
case 17:
hash = (37 * hash) + ENUM_FIELD_NUMBER;
hash = (53 * hash) + getEnum().hashCode();
break;
case 18:
hash = (37 * hash) + GEN_MAP_FIELD_NUMBER;
hash = (53 * hash) + getGenMap().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.lf.value.ValueOuterClass.Value parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.Value parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value 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.lf.value.ValueOuterClass.Value parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.Value parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.Value 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.lf.value.ValueOuterClass.Value parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.Value 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.lf.value.ValueOuterClass.Value parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.Value 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.lf.value.ValueOuterClass.Value prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The universe of serializable Daml-LF values.
* architecture-handbook-entry-begin: Value
*
*
* Protobuf type {@code com.daml.lf.value.Value}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.Value)
com.daml.lf.value.ValueOuterClass.ValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.class, com.daml.lf.value.ValueOuterClass.Value.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.Value.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (recordBuilder_ != null) {
recordBuilder_.clear();
}
if (variantBuilder_ != null) {
variantBuilder_.clear();
}
if (listBuilder_ != null) {
listBuilder_.clear();
}
if (unitBuilder_ != null) {
unitBuilder_.clear();
}
if (optionalBuilder_ != null) {
optionalBuilder_.clear();
}
if (contractIdStructBuilder_ != null) {
contractIdStructBuilder_.clear();
}
if (mapBuilder_ != null) {
mapBuilder_.clear();
}
if (enumBuilder_ != null) {
enumBuilder_.clear();
}
if (genMapBuilder_ != null) {
genMapBuilder_.clear();
}
sumCase_ = 0;
sum_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value build() {
com.daml.lf.value.ValueOuterClass.Value result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value buildPartial() {
com.daml.lf.value.ValueOuterClass.Value result = new com.daml.lf.value.ValueOuterClass.Value(this);
if (sumCase_ == 1) {
if (recordBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = recordBuilder_.build();
}
}
if (sumCase_ == 2) {
if (variantBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = variantBuilder_.build();
}
}
if (sumCase_ == 4) {
if (listBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = listBuilder_.build();
}
}
if (sumCase_ == 5) {
result.sum_ = sum_;
}
if (sumCase_ == 6) {
result.sum_ = sum_;
}
if (sumCase_ == 8) {
result.sum_ = sum_;
}
if (sumCase_ == 9) {
result.sum_ = sum_;
}
if (sumCase_ == 10) {
result.sum_ = sum_;
}
if (sumCase_ == 11) {
result.sum_ = sum_;
}
if (sumCase_ == 12) {
if (unitBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = unitBuilder_.build();
}
}
if (sumCase_ == 13) {
result.sum_ = sum_;
}
if (sumCase_ == 14) {
if (optionalBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = optionalBuilder_.build();
}
}
if (sumCase_ == 15) {
if (contractIdStructBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = contractIdStructBuilder_.build();
}
}
if (sumCase_ == 16) {
if (mapBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = mapBuilder_.build();
}
}
if (sumCase_ == 17) {
if (enumBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = enumBuilder_.build();
}
}
if (sumCase_ == 18) {
if (genMapBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = genMapBuilder_.build();
}
}
result.sumCase_ = sumCase_;
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.lf.value.ValueOuterClass.Value) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.Value)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.Value other) {
if (other == com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance()) return this;
switch (other.getSumCase()) {
case RECORD: {
mergeRecord(other.getRecord());
break;
}
case VARIANT: {
mergeVariant(other.getVariant());
break;
}
case LIST: {
mergeList(other.getList());
break;
}
case INT64: {
setInt64(other.getInt64());
break;
}
case NUMERIC: {
sumCase_ = 6;
sum_ = other.sum_;
onChanged();
break;
}
case TEXT: {
sumCase_ = 8;
sum_ = other.sum_;
onChanged();
break;
}
case TIMESTAMP: {
setTimestamp(other.getTimestamp());
break;
}
case PARTY: {
sumCase_ = 10;
sum_ = other.sum_;
onChanged();
break;
}
case BOOL: {
setBool(other.getBool());
break;
}
case UNIT: {
mergeUnit(other.getUnit());
break;
}
case DATE: {
setDate(other.getDate());
break;
}
case OPTIONAL: {
mergeOptional(other.getOptional());
break;
}
case CONTRACT_ID_STRUCT: {
mergeContractIdStruct(other.getContractIdStruct());
break;
}
case MAP: {
mergeMap(other.getMap());
break;
}
case ENUM: {
mergeEnum(other.getEnum());
break;
}
case GEN_MAP: {
mergeGenMap(other.getGenMap());
break;
}
case SUM_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: {
input.readMessage(
getRecordFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getVariantFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 2;
break;
} // case 18
case 34: {
input.readMessage(
getListFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 4;
break;
} // case 34
case 40: {
sum_ = input.readSInt64();
sumCase_ = 5;
break;
} // case 40
case 50: {
java.lang.String s = input.readStringRequireUtf8();
sumCase_ = 6;
sum_ = s;
break;
} // case 50
case 66: {
java.lang.String s = input.readStringRequireUtf8();
sumCase_ = 8;
sum_ = s;
break;
} // case 66
case 73: {
sum_ = input.readSFixed64();
sumCase_ = 9;
break;
} // case 73
case 82: {
java.lang.String s = input.readStringRequireUtf8();
sumCase_ = 10;
sum_ = s;
break;
} // case 82
case 88: {
sum_ = input.readBool();
sumCase_ = 11;
break;
} // case 88
case 98: {
input.readMessage(
getUnitFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 12;
break;
} // case 98
case 104: {
sum_ = input.readInt32();
sumCase_ = 13;
break;
} // case 104
case 114: {
input.readMessage(
getOptionalFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 14;
break;
} // case 114
case 122: {
input.readMessage(
getContractIdStructFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 15;
break;
} // case 122
case 130: {
input.readMessage(
getMapFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 16;
break;
} // case 130
case 138: {
input.readMessage(
getEnumFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 17;
break;
} // case 138
case 146: {
input.readMessage(
getGenMapFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 18;
break;
} // case 146
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 sumCase_ = 0;
private java.lang.Object sum_;
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public Builder clearSum() {
sumCase_ = 0;
sum_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Record, com.daml.lf.value.ValueOuterClass.Record.Builder, com.daml.lf.value.ValueOuterClass.RecordOrBuilder> recordBuilder_;
/**
* .com.daml.lf.value.Record record = 1;
* @return Whether the record field is set.
*/
@java.lang.Override
public boolean hasRecord() {
return sumCase_ == 1;
}
/**
* .com.daml.lf.value.Record record = 1;
* @return The record.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Record getRecord() {
if (recordBuilder_ == null) {
if (sumCase_ == 1) {
return (com.daml.lf.value.ValueOuterClass.Record) sum_;
}
return com.daml.lf.value.ValueOuterClass.Record.getDefaultInstance();
} else {
if (sumCase_ == 1) {
return recordBuilder_.getMessage();
}
return com.daml.lf.value.ValueOuterClass.Record.getDefaultInstance();
}
}
/**
* .com.daml.lf.value.Record record = 1;
*/
public Builder setRecord(com.daml.lf.value.ValueOuterClass.Record value) {
if (recordBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
recordBuilder_.setMessage(value);
}
sumCase_ = 1;
return this;
}
/**
* .com.daml.lf.value.Record record = 1;
*/
public Builder setRecord(
com.daml.lf.value.ValueOuterClass.Record.Builder builderForValue) {
if (recordBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
recordBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 1;
return this;
}
/**
* .com.daml.lf.value.Record record = 1;
*/
public Builder mergeRecord(com.daml.lf.value.ValueOuterClass.Record value) {
if (recordBuilder_ == null) {
if (sumCase_ == 1 &&
sum_ != com.daml.lf.value.ValueOuterClass.Record.getDefaultInstance()) {
sum_ = com.daml.lf.value.ValueOuterClass.Record.newBuilder((com.daml.lf.value.ValueOuterClass.Record) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 1) {
recordBuilder_.mergeFrom(value);
}
recordBuilder_.setMessage(value);
}
sumCase_ = 1;
return this;
}
/**
* .com.daml.lf.value.Record record = 1;
*/
public Builder clearRecord() {
if (recordBuilder_ == null) {
if (sumCase_ == 1) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 1) {
sumCase_ = 0;
sum_ = null;
}
recordBuilder_.clear();
}
return this;
}
/**
* .com.daml.lf.value.Record record = 1;
*/
public com.daml.lf.value.ValueOuterClass.Record.Builder getRecordBuilder() {
return getRecordFieldBuilder().getBuilder();
}
/**
* .com.daml.lf.value.Record record = 1;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.RecordOrBuilder getRecordOrBuilder() {
if ((sumCase_ == 1) && (recordBuilder_ != null)) {
return recordBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 1) {
return (com.daml.lf.value.ValueOuterClass.Record) sum_;
}
return com.daml.lf.value.ValueOuterClass.Record.getDefaultInstance();
}
}
/**
* .com.daml.lf.value.Record record = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Record, com.daml.lf.value.ValueOuterClass.Record.Builder, com.daml.lf.value.ValueOuterClass.RecordOrBuilder>
getRecordFieldBuilder() {
if (recordBuilder_ == null) {
if (!(sumCase_ == 1)) {
sum_ = com.daml.lf.value.ValueOuterClass.Record.getDefaultInstance();
}
recordBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Record, com.daml.lf.value.ValueOuterClass.Record.Builder, com.daml.lf.value.ValueOuterClass.RecordOrBuilder>(
(com.daml.lf.value.ValueOuterClass.Record) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 1;
onChanged();;
return recordBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Variant, com.daml.lf.value.ValueOuterClass.Variant.Builder, com.daml.lf.value.ValueOuterClass.VariantOrBuilder> variantBuilder_;
/**
* .com.daml.lf.value.Variant variant = 2;
* @return Whether the variant field is set.
*/
@java.lang.Override
public boolean hasVariant() {
return sumCase_ == 2;
}
/**
* .com.daml.lf.value.Variant variant = 2;
* @return The variant.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Variant getVariant() {
if (variantBuilder_ == null) {
if (sumCase_ == 2) {
return (com.daml.lf.value.ValueOuterClass.Variant) sum_;
}
return com.daml.lf.value.ValueOuterClass.Variant.getDefaultInstance();
} else {
if (sumCase_ == 2) {
return variantBuilder_.getMessage();
}
return com.daml.lf.value.ValueOuterClass.Variant.getDefaultInstance();
}
}
/**
* .com.daml.lf.value.Variant variant = 2;
*/
public Builder setVariant(com.daml.lf.value.ValueOuterClass.Variant value) {
if (variantBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
variantBuilder_.setMessage(value);
}
sumCase_ = 2;
return this;
}
/**
* .com.daml.lf.value.Variant variant = 2;
*/
public Builder setVariant(
com.daml.lf.value.ValueOuterClass.Variant.Builder builderForValue) {
if (variantBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
variantBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 2;
return this;
}
/**
* .com.daml.lf.value.Variant variant = 2;
*/
public Builder mergeVariant(com.daml.lf.value.ValueOuterClass.Variant value) {
if (variantBuilder_ == null) {
if (sumCase_ == 2 &&
sum_ != com.daml.lf.value.ValueOuterClass.Variant.getDefaultInstance()) {
sum_ = com.daml.lf.value.ValueOuterClass.Variant.newBuilder((com.daml.lf.value.ValueOuterClass.Variant) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 2) {
variantBuilder_.mergeFrom(value);
}
variantBuilder_.setMessage(value);
}
sumCase_ = 2;
return this;
}
/**
* .com.daml.lf.value.Variant variant = 2;
*/
public Builder clearVariant() {
if (variantBuilder_ == null) {
if (sumCase_ == 2) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 2) {
sumCase_ = 0;
sum_ = null;
}
variantBuilder_.clear();
}
return this;
}
/**
* .com.daml.lf.value.Variant variant = 2;
*/
public com.daml.lf.value.ValueOuterClass.Variant.Builder getVariantBuilder() {
return getVariantFieldBuilder().getBuilder();
}
/**
* .com.daml.lf.value.Variant variant = 2;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.VariantOrBuilder getVariantOrBuilder() {
if ((sumCase_ == 2) && (variantBuilder_ != null)) {
return variantBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 2) {
return (com.daml.lf.value.ValueOuterClass.Variant) sum_;
}
return com.daml.lf.value.ValueOuterClass.Variant.getDefaultInstance();
}
}
/**
* .com.daml.lf.value.Variant variant = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Variant, com.daml.lf.value.ValueOuterClass.Variant.Builder, com.daml.lf.value.ValueOuterClass.VariantOrBuilder>
getVariantFieldBuilder() {
if (variantBuilder_ == null) {
if (!(sumCase_ == 2)) {
sum_ = com.daml.lf.value.ValueOuterClass.Variant.getDefaultInstance();
}
variantBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Variant, com.daml.lf.value.ValueOuterClass.Variant.Builder, com.daml.lf.value.ValueOuterClass.VariantOrBuilder>(
(com.daml.lf.value.ValueOuterClass.Variant) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 2;
onChanged();;
return variantBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.List, com.daml.lf.value.ValueOuterClass.List.Builder, com.daml.lf.value.ValueOuterClass.ListOrBuilder> listBuilder_;
/**
* .com.daml.lf.value.List list = 4;
* @return Whether the list field is set.
*/
@java.lang.Override
public boolean hasList() {
return sumCase_ == 4;
}
/**
* .com.daml.lf.value.List list = 4;
* @return The list.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.List getList() {
if (listBuilder_ == null) {
if (sumCase_ == 4) {
return (com.daml.lf.value.ValueOuterClass.List) sum_;
}
return com.daml.lf.value.ValueOuterClass.List.getDefaultInstance();
} else {
if (sumCase_ == 4) {
return listBuilder_.getMessage();
}
return com.daml.lf.value.ValueOuterClass.List.getDefaultInstance();
}
}
/**
* .com.daml.lf.value.List list = 4;
*/
public Builder setList(com.daml.lf.value.ValueOuterClass.List value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
listBuilder_.setMessage(value);
}
sumCase_ = 4;
return this;
}
/**
* .com.daml.lf.value.List list = 4;
*/
public Builder setList(
com.daml.lf.value.ValueOuterClass.List.Builder builderForValue) {
if (listBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
listBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 4;
return this;
}
/**
* .com.daml.lf.value.List list = 4;
*/
public Builder mergeList(com.daml.lf.value.ValueOuterClass.List value) {
if (listBuilder_ == null) {
if (sumCase_ == 4 &&
sum_ != com.daml.lf.value.ValueOuterClass.List.getDefaultInstance()) {
sum_ = com.daml.lf.value.ValueOuterClass.List.newBuilder((com.daml.lf.value.ValueOuterClass.List) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 4) {
listBuilder_.mergeFrom(value);
}
listBuilder_.setMessage(value);
}
sumCase_ = 4;
return this;
}
/**
* .com.daml.lf.value.List list = 4;
*/
public Builder clearList() {
if (listBuilder_ == null) {
if (sumCase_ == 4) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 4) {
sumCase_ = 0;
sum_ = null;
}
listBuilder_.clear();
}
return this;
}
/**
* .com.daml.lf.value.List list = 4;
*/
public com.daml.lf.value.ValueOuterClass.List.Builder getListBuilder() {
return getListFieldBuilder().getBuilder();
}
/**
* .com.daml.lf.value.List list = 4;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ListOrBuilder getListOrBuilder() {
if ((sumCase_ == 4) && (listBuilder_ != null)) {
return listBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 4) {
return (com.daml.lf.value.ValueOuterClass.List) sum_;
}
return com.daml.lf.value.ValueOuterClass.List.getDefaultInstance();
}
}
/**
* .com.daml.lf.value.List list = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.List, com.daml.lf.value.ValueOuterClass.List.Builder, com.daml.lf.value.ValueOuterClass.ListOrBuilder>
getListFieldBuilder() {
if (listBuilder_ == null) {
if (!(sumCase_ == 4)) {
sum_ = com.daml.lf.value.ValueOuterClass.List.getDefaultInstance();
}
listBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.List, com.daml.lf.value.ValueOuterClass.List.Builder, com.daml.lf.value.ValueOuterClass.ListOrBuilder>(
(com.daml.lf.value.ValueOuterClass.List) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 4;
onChanged();;
return listBuilder_;
}
/**
* sint64 int64 = 5;
* @return Whether the int64 field is set.
*/
public boolean hasInt64() {
return sumCase_ == 5;
}
/**
* sint64 int64 = 5;
* @return The int64.
*/
public long getInt64() {
if (sumCase_ == 5) {
return (java.lang.Long) sum_;
}
return 0L;
}
/**
* sint64 int64 = 5;
* @param value The int64 to set.
* @return This builder for chaining.
*/
public Builder setInt64(long value) {
sumCase_ = 5;
sum_ = value;
onChanged();
return this;
}
/**
* sint64 int64 = 5;
* @return This builder for chaining.
*/
public Builder clearInt64() {
if (sumCase_ == 5) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
*
* string numeric = 6;
* @return Whether the numeric field is set.
*/
@java.lang.Override
public boolean hasNumeric() {
return sumCase_ == 6;
}
/**
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
*
* string numeric = 6;
* @return The bytes for numeric.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNumericBytes() {
java.lang.Object ref = "";
if (sumCase_ == 6) {
ref = sum_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sumCase_ == 6) {
sum_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
*
* string numeric = 6;
* @param value The numeric to set.
* @return This builder for chaining.
*/
public Builder setNumeric(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sumCase_ = 6;
sum_ = value;
onChanged();
return this;
}
/**
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
*
* string numeric = 6;
* @return This builder for chaining.
*/
public Builder clearNumeric() {
if (sumCase_ == 6) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
*
* Between v1 and v5 this field expressed a number in base-10 with up
* to 28 digits before the decimal point and up to 10 after the decimal
* point.
* Starting from v5 this field expressed a number in base-10 with at most
* 38 digits from which at most 37 can be used in the right hand side
* of the decimal point.
* See value.rst for the exact syntaxes.
*
*
* string numeric = 6;
* @param value The bytes for numeric to set.
* @return This builder for chaining.
*/
public Builder setNumericBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sumCase_ = 6;
sum_ = value;
onChanged();
return this;
}
/**
* string text = 8;
* @return Whether the text field is set.
*/
@java.lang.Override
public boolean hasText() {
return sumCase_ == 8;
}
/**
* string text = 8;
* @return The text.
*/
@java.lang.Override
public java.lang.String getText() {
java.lang.Object ref = "";
if (sumCase_ == 8) {
ref = sum_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (sumCase_ == 8) {
sum_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string text = 8;
* @return The bytes for text.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = "";
if (sumCase_ == 8) {
ref = sum_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sumCase_ == 8) {
sum_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string text = 8;
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sumCase_ = 8;
sum_ = value;
onChanged();
return this;
}
/**
* string text = 8;
* @return This builder for chaining.
*/
public Builder clearText() {
if (sumCase_ == 8) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
* string text = 8;
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sumCase_ = 8;
sum_ = value;
onChanged();
return this;
}
/**
*
* microseconds since the UNIX epoch. can go backwards. fixed
* since the vast majority of values will be greater than
* 2^28, since currently the number of microseconds since the
* epoch is greater than that. Range: 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59.999999Z, so that we can convert to/from
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* sfixed64 timestamp = 9;
* @return Whether the timestamp field is set.
*/
public boolean hasTimestamp() {
return sumCase_ == 9;
}
/**
*
* microseconds since the UNIX epoch. can go backwards. fixed
* since the vast majority of values will be greater than
* 2^28, since currently the number of microseconds since the
* epoch is greater than that. Range: 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59.999999Z, so that we can convert to/from
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* sfixed64 timestamp = 9;
* @return The timestamp.
*/
public long getTimestamp() {
if (sumCase_ == 9) {
return (java.lang.Long) sum_;
}
return 0L;
}
/**
*
* microseconds since the UNIX epoch. can go backwards. fixed
* since the vast majority of values will be greater than
* 2^28, since currently the number of microseconds since the
* epoch is greater than that. Range: 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59.999999Z, so that we can convert to/from
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* sfixed64 timestamp = 9;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
sumCase_ = 9;
sum_ = value;
onChanged();
return this;
}
/**
*
* microseconds since the UNIX epoch. can go backwards. fixed
* since the vast majority of values will be greater than
* 2^28, since currently the number of microseconds since the
* epoch is greater than that. Range: 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59.999999Z, so that we can convert to/from
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* sfixed64 timestamp = 9;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
if (sumCase_ == 9) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
* string party = 10;
* @return Whether the party field is set.
*/
@java.lang.Override
public boolean hasParty() {
return sumCase_ == 10;
}
/**
* string party = 10;
* @return The party.
*/
@java.lang.Override
public java.lang.String getParty() {
java.lang.Object ref = "";
if (sumCase_ == 10) {
ref = sum_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (sumCase_ == 10) {
sum_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string party = 10;
* @return The bytes for party.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPartyBytes() {
java.lang.Object ref = "";
if (sumCase_ == 10) {
ref = sum_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sumCase_ == 10) {
sum_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string party = 10;
* @param value The party to set.
* @return This builder for chaining.
*/
public Builder setParty(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sumCase_ = 10;
sum_ = value;
onChanged();
return this;
}
/**
* string party = 10;
* @return This builder for chaining.
*/
public Builder clearParty() {
if (sumCase_ == 10) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
* string party = 10;
* @param value The bytes for party to set.
* @return This builder for chaining.
*/
public Builder setPartyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sumCase_ = 10;
sum_ = value;
onChanged();
return this;
}
/**
* bool bool = 11;
* @return Whether the bool field is set.
*/
public boolean hasBool() {
return sumCase_ == 11;
}
/**
* bool bool = 11;
* @return The bool.
*/
public boolean getBool() {
if (sumCase_ == 11) {
return (java.lang.Boolean) sum_;
}
return false;
}
/**
* bool bool = 11;
* @param value The bool to set.
* @return This builder for chaining.
*/
public Builder setBool(boolean value) {
sumCase_ = 11;
sum_ = value;
onChanged();
return this;
}
/**
* bool bool = 11;
* @return This builder for chaining.
*/
public Builder clearBool() {
if (sumCase_ == 11) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> unitBuilder_;
/**
* .google.protobuf.Empty unit = 12;
* @return Whether the unit field is set.
*/
@java.lang.Override
public boolean hasUnit() {
return sumCase_ == 12;
}
/**
* .google.protobuf.Empty unit = 12;
* @return The unit.
*/
@java.lang.Override
public com.google.protobuf.Empty getUnit() {
if (unitBuilder_ == null) {
if (sumCase_ == 12) {
return (com.google.protobuf.Empty) sum_;
}
return com.google.protobuf.Empty.getDefaultInstance();
} else {
if (sumCase_ == 12) {
return unitBuilder_.getMessage();
}
return com.google.protobuf.Empty.getDefaultInstance();
}
}
/**
* .google.protobuf.Empty unit = 12;
*/
public Builder setUnit(com.google.protobuf.Empty value) {
if (unitBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
unitBuilder_.setMessage(value);
}
sumCase_ = 12;
return this;
}
/**
* .google.protobuf.Empty unit = 12;
*/
public Builder setUnit(
com.google.protobuf.Empty.Builder builderForValue) {
if (unitBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
unitBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 12;
return this;
}
/**
* .google.protobuf.Empty unit = 12;
*/
public Builder mergeUnit(com.google.protobuf.Empty value) {
if (unitBuilder_ == null) {
if (sumCase_ == 12 &&
sum_ != com.google.protobuf.Empty.getDefaultInstance()) {
sum_ = com.google.protobuf.Empty.newBuilder((com.google.protobuf.Empty) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 12) {
unitBuilder_.mergeFrom(value);
}
unitBuilder_.setMessage(value);
}
sumCase_ = 12;
return this;
}
/**
* .google.protobuf.Empty unit = 12;
*/
public Builder clearUnit() {
if (unitBuilder_ == null) {
if (sumCase_ == 12) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 12) {
sumCase_ = 0;
sum_ = null;
}
unitBuilder_.clear();
}
return this;
}
/**
* .google.protobuf.Empty unit = 12;
*/
public com.google.protobuf.Empty.Builder getUnitBuilder() {
return getUnitFieldBuilder().getBuilder();
}
/**
* .google.protobuf.Empty unit = 12;
*/
@java.lang.Override
public com.google.protobuf.EmptyOrBuilder getUnitOrBuilder() {
if ((sumCase_ == 12) && (unitBuilder_ != null)) {
return unitBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 12) {
return (com.google.protobuf.Empty) sum_;
}
return com.google.protobuf.Empty.getDefaultInstance();
}
}
/**
* .google.protobuf.Empty unit = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder>
getUnitFieldBuilder() {
if (unitBuilder_ == null) {
if (!(sumCase_ == 12)) {
sum_ = com.google.protobuf.Empty.getDefaultInstance();
}
unitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder>(
(com.google.protobuf.Empty) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 12;
onChanged();;
return unitBuilder_;
}
/**
*
* days since the unix epoch. can go backwards. limited from
* 0001-01-01 to 9999-12-31, also to be compatible with
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* int32 date = 13;
* @return Whether the date field is set.
*/
public boolean hasDate() {
return sumCase_ == 13;
}
/**
*
* days since the unix epoch. can go backwards. limited from
* 0001-01-01 to 9999-12-31, also to be compatible with
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* int32 date = 13;
* @return The date.
*/
public int getDate() {
if (sumCase_ == 13) {
return (java.lang.Integer) sum_;
}
return 0;
}
/**
*
* days since the unix epoch. can go backwards. limited from
* 0001-01-01 to 9999-12-31, also to be compatible with
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* int32 date = 13;
* @param value The date to set.
* @return This builder for chaining.
*/
public Builder setDate(int value) {
sumCase_ = 13;
sum_ = value;
onChanged();
return this;
}
/**
*
* days since the unix epoch. can go backwards. limited from
* 0001-01-01 to 9999-12-31, also to be compatible with
* https://www.ietf.org/rfc/rfc3339.txt
*
*
* string package_id = 1;
* @return The bytes for packageId.
*/
com.google.protobuf.ByteString
getPackageIdBytes();
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @return A list containing the moduleName.
*/
java.util.List
getModuleNameList();
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @return The count of moduleName.
*/
int getModuleNameCount();
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @param index The index of the element to return.
* @return The moduleName at the given index.
*/
java.lang.String getModuleName(int index);
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @param index The index of the value to return.
* @return The bytes of the moduleName at the given index.
*/
com.google.protobuf.ByteString
getModuleNameBytes(int index);
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @return A list containing the name.
*/
java.util.List
getNameList();
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @return The count of name.
*/
int getNameCount();
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param index The index of the element to return.
* @return The name at the given index.
*/
java.lang.String getName(int index);
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param index The index of the value to return.
* @return The bytes of the name at the given index.
*/
com.google.protobuf.ByteString
getNameBytes(int index);
}
/**
*
* Each component of the module name and the name have additional
* lexical restrictions besides non-emptiness -- see the value.rst
* spec for more info.
*
*
* Protobuf type {@code com.daml.lf.value.Identifier}
*/
public static final class Identifier extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.Identifier)
IdentifierOrBuilder {
private static final long serialVersionUID = 0L;
// Use Identifier.newBuilder() to construct.
private Identifier(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Identifier() {
packageId_ = "";
moduleName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
name_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Identifier();
}
@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.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Identifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Identifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Identifier.class, com.daml.lf.value.ValueOuterClass.Identifier.Builder.class);
}
public static final int PACKAGE_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object packageId_;
/**
*
*
* string package_id = 1;
* @return The bytes for packageId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPackageIdBytes() {
java.lang.Object ref = packageId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
packageId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MODULE_NAME_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList moduleName_;
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @return A list containing the moduleName.
*/
public com.google.protobuf.ProtocolStringList
getModuleNameList() {
return moduleName_;
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @return The count of moduleName.
*/
public int getModuleNameCount() {
return moduleName_.size();
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @param index The index of the element to return.
* @return The moduleName at the given index.
*/
public java.lang.String getModuleName(int index) {
return moduleName_.get(index);
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @param index The index of the value to return.
* @return The bytes of the moduleName at the given index.
*/
public com.google.protobuf.ByteString
getModuleNameBytes(int index) {
return moduleName_.getByteString(index);
}
public static final int NAME_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList name_;
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @return A list containing the name.
*/
public com.google.protobuf.ProtocolStringList
getNameList() {
return name_;
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @return The count of name.
*/
public int getNameCount() {
return name_.size();
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param index The index of the element to return.
* @return The name at the given index.
*/
public java.lang.String getName(int index) {
return name_.get(index);
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param index The index of the value to return.
* @return The bytes of the name at the given index.
*/
public com.google.protobuf.ByteString
getNameBytes(int index) {
return name_.getByteString(index);
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, packageId_);
}
for (int i = 0; i < moduleName_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, moduleName_.getRaw(i));
}
for (int i = 0; i < name_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, packageId_);
}
{
int dataSize = 0;
for (int i = 0; i < moduleName_.size(); i++) {
dataSize += computeStringSizeNoTag(moduleName_.getRaw(i));
}
size += dataSize;
size += 1 * getModuleNameList().size();
}
{
int dataSize = 0;
for (int i = 0; i < name_.size(); i++) {
dataSize += computeStringSizeNoTag(name_.getRaw(i));
}
size += dataSize;
size += 1 * getNameList().size();
}
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.lf.value.ValueOuterClass.Identifier)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.Identifier other = (com.daml.lf.value.ValueOuterClass.Identifier) obj;
if (!getPackageId()
.equals(other.getPackageId())) return false;
if (!getModuleNameList()
.equals(other.getModuleNameList())) return false;
if (!getNameList()
.equals(other.getNameList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PACKAGE_ID_FIELD_NUMBER;
hash = (53 * hash) + getPackageId().hashCode();
if (getModuleNameCount() > 0) {
hash = (37 * hash) + MODULE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getModuleNameList().hashCode();
}
if (getNameCount() > 0) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getNameList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.lf.value.ValueOuterClass.Identifier parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Identifier parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.Identifier parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Identifier 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.lf.value.ValueOuterClass.Identifier parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Identifier parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.Identifier parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.Identifier 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.lf.value.ValueOuterClass.Identifier parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.Identifier 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.lf.value.ValueOuterClass.Identifier parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.Identifier 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.lf.value.ValueOuterClass.Identifier 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;
}
/**
*
* Each component of the module name and the name have additional
* lexical restrictions besides non-emptiness -- see the value.rst
* spec for more info.
*
*
* Protobuf type {@code com.daml.lf.value.Identifier}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.Identifier)
com.daml.lf.value.ValueOuterClass.IdentifierOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Identifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Identifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Identifier.class, com.daml.lf.value.ValueOuterClass.Identifier.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.Identifier.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
packageId_ = "";
moduleName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
name_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Identifier_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Identifier getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.Identifier.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Identifier build() {
com.daml.lf.value.ValueOuterClass.Identifier result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Identifier buildPartial() {
com.daml.lf.value.ValueOuterClass.Identifier result = new com.daml.lf.value.ValueOuterClass.Identifier(this);
int from_bitField0_ = bitField0_;
result.packageId_ = packageId_;
if (((bitField0_ & 0x00000001) != 0)) {
moduleName_ = moduleName_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.moduleName_ = moduleName_;
if (((bitField0_ & 0x00000002) != 0)) {
name_ = name_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.name_ = name_;
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.lf.value.ValueOuterClass.Identifier) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.Identifier)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.Identifier other) {
if (other == com.daml.lf.value.ValueOuterClass.Identifier.getDefaultInstance()) return this;
if (!other.getPackageId().isEmpty()) {
packageId_ = other.packageId_;
onChanged();
}
if (!other.moduleName_.isEmpty()) {
if (moduleName_.isEmpty()) {
moduleName_ = other.moduleName_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureModuleNameIsMutable();
moduleName_.addAll(other.moduleName_);
}
onChanged();
}
if (!other.name_.isEmpty()) {
if (name_.isEmpty()) {
name_ = other.name_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureNameIsMutable();
name_.addAll(other.name_);
}
onChanged();
}
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: {
packageId_ = input.readStringRequireUtf8();
break;
} // case 10
case 18: {
java.lang.String s = input.readStringRequireUtf8();
ensureModuleNameIsMutable();
moduleName_.add(s);
break;
} // case 18
case 26: {
java.lang.String s = input.readStringRequireUtf8();
ensureNameIsMutable();
name_.add(s);
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object packageId_ = "";
/**
*
*
* string package_id = 1;
* @return The bytes for packageId.
*/
public com.google.protobuf.ByteString
getPackageIdBytes() {
java.lang.Object ref = packageId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
packageId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* non-empty
*
*
* string package_id = 1;
* @param value The packageId to set.
* @return This builder for chaining.
*/
public Builder setPackageId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
packageId_ = value;
onChanged();
return this;
}
/**
*
* non-empty
*
*
* string package_id = 1;
* @return This builder for chaining.
*/
public Builder clearPackageId() {
packageId_ = getDefaultInstance().getPackageId();
onChanged();
return this;
}
/**
*
* non-empty
*
*
* string package_id = 1;
* @param value The bytes for packageId to set.
* @return This builder for chaining.
*/
public Builder setPackageIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
packageId_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList moduleName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureModuleNameIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
moduleName_ = new com.google.protobuf.LazyStringArrayList(moduleName_);
bitField0_ |= 0x00000001;
}
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @return A list containing the moduleName.
*/
public com.google.protobuf.ProtocolStringList
getModuleNameList() {
return moduleName_.getUnmodifiableView();
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @return The count of moduleName.
*/
public int getModuleNameCount() {
return moduleName_.size();
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @param index The index of the element to return.
* @return The moduleName at the given index.
*/
public java.lang.String getModuleName(int index) {
return moduleName_.get(index);
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @param index The index of the value to return.
* @return The bytes of the moduleName at the given index.
*/
public com.google.protobuf.ByteString
getModuleNameBytes(int index) {
return moduleName_.getByteString(index);
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @param index The index to set the value at.
* @param value The moduleName to set.
* @return This builder for chaining.
*/
public Builder setModuleName(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureModuleNameIsMutable();
moduleName_.set(index, value);
onChanged();
return this;
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @param value The moduleName to add.
* @return This builder for chaining.
*/
public Builder addModuleName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureModuleNameIsMutable();
moduleName_.add(value);
onChanged();
return this;
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @param values The moduleName to add.
* @return This builder for chaining.
*/
public Builder addAllModuleName(
java.lang.Iterable values) {
ensureModuleNameIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, moduleName_);
onChanged();
return this;
}
/**
*
*
* repeated string module_name = 2;
* @param value The bytes of the moduleName to add.
* @return This builder for chaining.
*/
public Builder addModuleNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureModuleNameIsMutable();
moduleName_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList name_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureNameIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
name_ = new com.google.protobuf.LazyStringArrayList(name_);
bitField0_ |= 0x00000002;
}
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @return A list containing the name.
*/
public com.google.protobuf.ProtocolStringList
getNameList() {
return name_.getUnmodifiableView();
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @return The count of name.
*/
public int getNameCount() {
return name_.size();
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param index The index of the element to return.
* @return The name at the given index.
*/
public java.lang.String getName(int index) {
return name_.get(index);
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param index The index of the value to return.
* @return The bytes of the name at the given index.
*/
public com.google.protobuf.ByteString
getNameBytes(int index) {
return name_.getByteString(index);
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param index The index to set the value at.
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNameIsMutable();
name_.set(index, value);
onChanged();
return this;
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param value The name to add.
* @return This builder for chaining.
*/
public Builder addName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNameIsMutable();
name_.add(value);
onChanged();
return this;
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param values The name to add.
* @return This builder for chaining.
*/
public Builder addAllName(
java.lang.Iterable values) {
ensureNameIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, name_);
onChanged();
return this;
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @param value The bytes of the name to add.
* @return This builder for chaining.
*/
public Builder addNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureNameIsMutable();
name_.add(value);
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.lf.value.Identifier)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.Identifier)
private static final com.daml.lf.value.ValueOuterClass.Identifier DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.Identifier();
}
public static com.daml.lf.value.ValueOuterClass.Identifier getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Identifier 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.lf.value.ValueOuterClass.Identifier getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface VariantOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.Variant)
com.google.protobuf.MessageOrBuilder {
/**
*
* *until version 11*, optional
*
*
* .com.daml.lf.value.Identifier variant_id = 1;
* @return Whether the variantId field is set.
*/
boolean hasVariantId();
/**
*
*
* .com.daml.lf.value.Identifier enum_id = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Identifier, com.daml.lf.value.ValueOuterClass.Identifier.Builder, com.daml.lf.value.ValueOuterClass.IdentifierOrBuilder>
getEnumIdFieldBuilder() {
if (enumIdBuilder_ == null) {
enumIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Identifier, com.daml.lf.value.ValueOuterClass.Identifier.Builder, com.daml.lf.value.ValueOuterClass.IdentifierOrBuilder>(
getEnumId(),
getParentForChildren(),
isClean());
enumId_ = null;
}
return enumIdBuilder_;
}
private java.lang.Object value_ = "";
/**
* string value = 2;
* @return The value.
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string value = 2;
* @return The bytes for value.
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
* string value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
/**
* string value = 2;
* @param value The bytes for value to set.
* @return This builder for chaining.
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
value_ = value;
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.lf.value.Enum)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.Enum)
private static final com.daml.lf.value.ValueOuterClass.Enum DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.Enum();
}
public static com.daml.lf.value.ValueOuterClass.Enum getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Enum 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.lf.value.ValueOuterClass.Enum getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ContractIdOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.ContractId)
com.google.protobuf.MessageOrBuilder {
/**
* string contract_id = 1;
* @return The contractId.
*/
java.lang.String getContractId();
/**
* string contract_id = 1;
* @return The bytes for contractId.
*/
com.google.protobuf.ByteString
getContractIdBytes();
}
/**
* Protobuf type {@code com.daml.lf.value.ContractId}
*/
public static final class ContractId extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.ContractId)
ContractIdOrBuilder {
private static final long serialVersionUID = 0L;
// Use ContractId.newBuilder() to construct.
private ContractId(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ContractId() {
contractId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ContractId();
}
@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.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_ContractId_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_ContractId_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.ContractId.class, com.daml.lf.value.ValueOuterClass.ContractId.Builder.class);
}
public static final int CONTRACT_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object contractId_;
/**
* string contract_id = 1;
* @return The contractId.
*/
@java.lang.Override
public java.lang.String getContractId() {
java.lang.Object ref = contractId_;
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();
contractId_ = s;
return s;
}
}
/**
* string contract_id = 1;
* @return The bytes for contractId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getContractIdBytes() {
java.lang.Object ref = contractId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contractId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contractId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contractId_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contractId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, contractId_);
}
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.lf.value.ValueOuterClass.ContractId)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.ContractId other = (com.daml.lf.value.ValueOuterClass.ContractId) obj;
if (!getContractId()
.equals(other.getContractId())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CONTRACT_ID_FIELD_NUMBER;
hash = (53 * hash) + getContractId().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.lf.value.ValueOuterClass.ContractId parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.ContractId parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.ContractId parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.ContractId 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.lf.value.ValueOuterClass.ContractId parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.ContractId parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.ContractId parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.ContractId 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.lf.value.ValueOuterClass.ContractId parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.ContractId 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.lf.value.ValueOuterClass.ContractId parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.ContractId 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.lf.value.ValueOuterClass.ContractId 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;
}
/**
* Protobuf type {@code com.daml.lf.value.ContractId}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.ContractId)
com.daml.lf.value.ValueOuterClass.ContractIdOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_ContractId_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_ContractId_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.ContractId.class, com.daml.lf.value.ValueOuterClass.ContractId.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.ContractId.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
contractId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_ContractId_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ContractId getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.ContractId.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ContractId build() {
com.daml.lf.value.ValueOuterClass.ContractId result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ContractId buildPartial() {
com.daml.lf.value.ValueOuterClass.ContractId result = new com.daml.lf.value.ValueOuterClass.ContractId(this);
result.contractId_ = contractId_;
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.lf.value.ValueOuterClass.ContractId) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.ContractId)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.ContractId other) {
if (other == com.daml.lf.value.ValueOuterClass.ContractId.getDefaultInstance()) return this;
if (!other.getContractId().isEmpty()) {
contractId_ = other.contractId_;
onChanged();
}
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: {
contractId_ = input.readStringRequireUtf8();
break;
} // case 10
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 java.lang.Object contractId_ = "";
/**
* string contract_id = 1;
* @return The contractId.
*/
public java.lang.String getContractId() {
java.lang.Object ref = contractId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contractId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string contract_id = 1;
* @return The bytes for contractId.
*/
public com.google.protobuf.ByteString
getContractIdBytes() {
java.lang.Object ref = contractId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contractId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string contract_id = 1;
* @param value The contractId to set.
* @return This builder for chaining.
*/
public Builder setContractId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contractId_ = value;
onChanged();
return this;
}
/**
* string contract_id = 1;
* @return This builder for chaining.
*/
public Builder clearContractId() {
contractId_ = getDefaultInstance().getContractId();
onChanged();
return this;
}
/**
* string contract_id = 1;
* @param value The bytes for contractId to set.
* @return This builder for chaining.
*/
public Builder setContractIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contractId_ = value;
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.lf.value.ContractId)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.ContractId)
private static final com.daml.lf.value.ValueOuterClass.ContractId DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.ContractId();
}
public static com.daml.lf.value.ValueOuterClass.ContractId getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ContractId 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.lf.value.ValueOuterClass.ContractId getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ListOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.List)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
java.util.List
getElementsList();
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
com.daml.lf.value.ValueOuterClass.Value getElements(int index);
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
int getElementsCount();
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
java.util.List extends com.daml.lf.value.ValueOuterClass.ValueOrBuilder>
getElementsOrBuilderList();
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
com.daml.lf.value.ValueOuterClass.ValueOrBuilder getElementsOrBuilder(
int index);
}
/**
* Protobuf type {@code com.daml.lf.value.List}
*/
public static final class List extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.List)
ListOrBuilder {
private static final long serialVersionUID = 0L;
// Use List.newBuilder() to construct.
private List(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private List() {
elements_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new List();
}
@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.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_List_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_List_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.List.class, com.daml.lf.value.ValueOuterClass.List.Builder.class);
}
public static final int ELEMENTS_FIELD_NUMBER = 1;
private java.util.List elements_;
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
@java.lang.Override
public java.util.List getElementsList() {
return elements_;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
@java.lang.Override
public java.util.List extends com.daml.lf.value.ValueOuterClass.ValueOrBuilder>
getElementsOrBuilderList() {
return elements_;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
@java.lang.Override
public int getElementsCount() {
return elements_.size();
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value getElements(int index) {
return elements_.get(index);
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ValueOrBuilder getElementsOrBuilder(
int index) {
return elements_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < elements_.size(); i++) {
output.writeMessage(1, elements_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < elements_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, elements_.get(i));
}
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.lf.value.ValueOuterClass.List)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.List other = (com.daml.lf.value.ValueOuterClass.List) obj;
if (!getElementsList()
.equals(other.getElementsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getElementsCount() > 0) {
hash = (37 * hash) + ELEMENTS_FIELD_NUMBER;
hash = (53 * hash) + getElementsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.lf.value.ValueOuterClass.List parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.List parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.List parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.List 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.lf.value.ValueOuterClass.List parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.List parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.List parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.List 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.lf.value.ValueOuterClass.List parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.List 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.lf.value.ValueOuterClass.List parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.List 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.lf.value.ValueOuterClass.List 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;
}
/**
* Protobuf type {@code com.daml.lf.value.List}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.List)
com.daml.lf.value.ValueOuterClass.ListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_List_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_List_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.List.class, com.daml.lf.value.ValueOuterClass.List.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.List.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (elementsBuilder_ == null) {
elements_ = java.util.Collections.emptyList();
} else {
elements_ = null;
elementsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_List_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.List getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.List.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.List build() {
com.daml.lf.value.ValueOuterClass.List result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.List buildPartial() {
com.daml.lf.value.ValueOuterClass.List result = new com.daml.lf.value.ValueOuterClass.List(this);
int from_bitField0_ = bitField0_;
if (elementsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
elements_ = java.util.Collections.unmodifiableList(elements_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.elements_ = elements_;
} else {
result.elements_ = elementsBuilder_.build();
}
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.lf.value.ValueOuterClass.List) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.List)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.List other) {
if (other == com.daml.lf.value.ValueOuterClass.List.getDefaultInstance()) return this;
if (elementsBuilder_ == null) {
if (!other.elements_.isEmpty()) {
if (elements_.isEmpty()) {
elements_ = other.elements_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureElementsIsMutable();
elements_.addAll(other.elements_);
}
onChanged();
}
} else {
if (!other.elements_.isEmpty()) {
if (elementsBuilder_.isEmpty()) {
elementsBuilder_.dispose();
elementsBuilder_ = null;
elements_ = other.elements_;
bitField0_ = (bitField0_ & ~0x00000001);
elementsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getElementsFieldBuilder() : null;
} else {
elementsBuilder_.addAllMessages(other.elements_);
}
}
}
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: {
com.daml.lf.value.ValueOuterClass.Value m =
input.readMessage(
com.daml.lf.value.ValueOuterClass.Value.parser(),
extensionRegistry);
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.add(m);
} else {
elementsBuilder_.addMessage(m);
}
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List elements_ =
java.util.Collections.emptyList();
private void ensureElementsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
elements_ = new java.util.ArrayList(elements_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value, com.daml.lf.value.ValueOuterClass.Value.Builder, com.daml.lf.value.ValueOuterClass.ValueOrBuilder> elementsBuilder_;
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public java.util.List getElementsList() {
if (elementsBuilder_ == null) {
return java.util.Collections.unmodifiableList(elements_);
} else {
return elementsBuilder_.getMessageList();
}
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public int getElementsCount() {
if (elementsBuilder_ == null) {
return elements_.size();
} else {
return elementsBuilder_.getCount();
}
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value getElements(int index) {
if (elementsBuilder_ == null) {
return elements_.get(index);
} else {
return elementsBuilder_.getMessage(index);
}
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public Builder setElements(
int index, com.daml.lf.value.ValueOuterClass.Value value) {
if (elementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureElementsIsMutable();
elements_.set(index, value);
onChanged();
} else {
elementsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public Builder setElements(
int index, com.daml.lf.value.ValueOuterClass.Value.Builder builderForValue) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.set(index, builderForValue.build());
onChanged();
} else {
elementsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public Builder addElements(com.daml.lf.value.ValueOuterClass.Value value) {
if (elementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureElementsIsMutable();
elements_.add(value);
onChanged();
} else {
elementsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public Builder addElements(
int index, com.daml.lf.value.ValueOuterClass.Value value) {
if (elementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureElementsIsMutable();
elements_.add(index, value);
onChanged();
} else {
elementsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public Builder addElements(
com.daml.lf.value.ValueOuterClass.Value.Builder builderForValue) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.add(builderForValue.build());
onChanged();
} else {
elementsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public Builder addElements(
int index, com.daml.lf.value.ValueOuterClass.Value.Builder builderForValue) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.add(index, builderForValue.build());
onChanged();
} else {
elementsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public Builder addAllElements(
java.lang.Iterable extends com.daml.lf.value.ValueOuterClass.Value> values) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, elements_);
onChanged();
} else {
elementsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public Builder clearElements() {
if (elementsBuilder_ == null) {
elements_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
elementsBuilder_.clear();
}
return this;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public Builder removeElements(int index) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.remove(index);
onChanged();
} else {
elementsBuilder_.remove(index);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value.Builder getElementsBuilder(
int index) {
return getElementsFieldBuilder().getBuilder(index);
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public com.daml.lf.value.ValueOuterClass.ValueOrBuilder getElementsOrBuilder(
int index) {
if (elementsBuilder_ == null) {
return elements_.get(index); } else {
return elementsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public java.util.List extends com.daml.lf.value.ValueOuterClass.ValueOrBuilder>
getElementsOrBuilderList() {
if (elementsBuilder_ != null) {
return elementsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(elements_);
}
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value.Builder addElementsBuilder() {
return getElementsFieldBuilder().addBuilder(
com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance());
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value.Builder addElementsBuilder(
int index) {
return getElementsFieldBuilder().addBuilder(
index, com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance());
}
/**
* repeated .com.daml.lf.value.Value elements = 1;
*/
public java.util.List
getElementsBuilderList() {
return getElementsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value, com.daml.lf.value.ValueOuterClass.Value.Builder, com.daml.lf.value.ValueOuterClass.ValueOrBuilder>
getElementsFieldBuilder() {
if (elementsBuilder_ == null) {
elementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value, com.daml.lf.value.ValueOuterClass.Value.Builder, com.daml.lf.value.ValueOuterClass.ValueOrBuilder>(
elements_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
elements_ = null;
}
return elementsBuilder_;
}
@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.lf.value.List)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.List)
private static final com.daml.lf.value.ValueOuterClass.List DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.List();
}
public static com.daml.lf.value.ValueOuterClass.List getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public List 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.lf.value.ValueOuterClass.List getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OptionalOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.Optional)
com.google.protobuf.MessageOrBuilder {
/**
*
* optional
*
*
* .com.daml.lf.value.Value value = 1;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
*
* optional
*
*
* .com.daml.lf.value.Value value = 1;
* @return The value.
*/
com.daml.lf.value.ValueOuterClass.Value getValue();
/**
*
* optional
*
*
* .com.daml.lf.value.Value value = 1;
*/
com.daml.lf.value.ValueOuterClass.ValueOrBuilder getValueOrBuilder();
}
/**
* Protobuf type {@code com.daml.lf.value.Optional}
*/
public static final class Optional extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.Optional)
OptionalOrBuilder {
private static final long serialVersionUID = 0L;
// Use Optional.newBuilder() to construct.
private Optional(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Optional() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Optional();
}
@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.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Optional_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Optional_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Optional.class, com.daml.lf.value.ValueOuterClass.Optional.Builder.class);
}
public static final int VALUE_FIELD_NUMBER = 1;
private com.daml.lf.value.ValueOuterClass.Value value_;
/**
*
* optional
*
*
* .com.daml.lf.value.Value value = 1;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return value_ != null;
}
/**
*
* optional
*
*
* .com.daml.lf.value.Value value = 1;
* @return The value.
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value getValue() {
return value_ == null ? com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance() : value_;
}
/**
*
* optional
*
*
* .com.daml.lf.value.Value value = 1;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ValueOrBuilder getValueOrBuilder() {
return getValue();
}
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 (value_ != null) {
output.writeMessage(1, getValue());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (value_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getValue());
}
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.lf.value.ValueOuterClass.Optional)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.Optional other = (com.daml.lf.value.ValueOuterClass.Optional) obj;
if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
if (!getValue()
.equals(other.getValue())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.lf.value.ValueOuterClass.Optional parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Optional parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.Optional parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Optional 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.lf.value.ValueOuterClass.Optional parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Optional parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.lf.value.ValueOuterClass.Optional parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.Optional 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.lf.value.ValueOuterClass.Optional parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.Optional 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.lf.value.ValueOuterClass.Optional parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.lf.value.ValueOuterClass.Optional 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.lf.value.ValueOuterClass.Optional 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;
}
/**
* Protobuf type {@code com.daml.lf.value.Optional}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.Optional)
com.daml.lf.value.ValueOuterClass.OptionalOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Optional_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Optional_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Optional.class, com.daml.lf.value.ValueOuterClass.Optional.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.Optional.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (valueBuilder_ == null) {
value_ = null;
} else {
value_ = null;
valueBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Optional_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Optional getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.Optional.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Optional build() {
com.daml.lf.value.ValueOuterClass.Optional result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Optional buildPartial() {
com.daml.lf.value.ValueOuterClass.Optional result = new com.daml.lf.value.ValueOuterClass.Optional(this);
if (valueBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = valueBuilder_.build();
}
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.lf.value.ValueOuterClass.Optional) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.Optional)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.Optional other) {
if (other == com.daml.lf.value.ValueOuterClass.Optional.getDefaultInstance()) return this;
if (other.hasValue()) {
mergeValue(other.getValue());
}
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: {
input.readMessage(
getValueFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
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 com.daml.lf.value.ValueOuterClass.Value value_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value, com.daml.lf.value.ValueOuterClass.Value.Builder, com.daml.lf.value.ValueOuterClass.ValueOrBuilder> valueBuilder_;
/**
*
* optional
*
*
* .com.daml.lf.value.Value value = 1;
* @return Whether the value field is set.
*/
public boolean hasValue() {
return valueBuilder_ != null || value_ != null;
}
/**
*
* optional
*
*
* .com.daml.lf.value.Value value = 1;
* @return The value.
*/
public com.daml.lf.value.ValueOuterClass.Value getValue() {
if (valueBuilder_ == null) {
return value_ == null ? com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance() : value_;
} else {
return valueBuilder_.getMessage();
}
}
/**
*
* optional
*
*
* .com.daml.lf.value.Value value = 1;
*/
public Builder setValue(com.daml.lf.value.ValueOuterClass.Value value) {
if (valueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
valueBuilder_.setMessage(value);
}
return this;
}
/**
*