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.
*
* 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.emptyList();
name_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Identifier();
}
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;
@SuppressWarnings("serial")
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;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList moduleName_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* 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;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList name_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* 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();
bitField0_ = 0;
packageId_ = "";
moduleName_ =
com.google.protobuf.LazyStringArrayList.emptyList();
name_ =
com.google.protobuf.LazyStringArrayList.emptyList();
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.lf.value.ValueOuterClass.Identifier result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.packageId_ = packageId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
moduleName_.makeImmutable();
result.moduleName_ = moduleName_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
name_.makeImmutable();
result.name_ = name_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.moduleName_.isEmpty()) {
if (moduleName_.isEmpty()) {
moduleName_ = other.moduleName_;
bitField0_ |= 0x00000002;
} else {
ensureModuleNameIsMutable();
moduleName_.addAll(other.moduleName_);
}
onChanged();
}
if (!other.name_.isEmpty()) {
if (name_.isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000004;
} 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();
bitField0_ |= 0x00000001;
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;
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList moduleName_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureModuleNameIsMutable() {
if (!moduleName_.isModifiable()) {
moduleName_ = new com.google.protobuf.LazyStringArrayList(moduleName_);
}
bitField0_ |= 0x00000002;
}
/**
*
* at least length 1
*
*
* repeated string module_name = 2;
* @return A list containing the moduleName.
*/
public com.google.protobuf.ProtocolStringList
getModuleNameList() {
moduleName_.makeImmutable();
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);
}
/**
*
* 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);
bitField0_ |= 0x00000002;
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);
bitField0_ |= 0x00000002;
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_);
bitField0_ |= 0x00000002;
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);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList name_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureNameIsMutable() {
if (!name_.isModifiable()) {
name_ = new com.google.protobuf.LazyStringArrayList(name_);
}
bitField0_ |= 0x00000004;
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @return A list containing the name.
*/
public com.google.protobuf.ProtocolStringList
getNameList() {
name_.makeImmutable();
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);
}
/**
*
* 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);
bitField0_ |= 0x00000004;
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);
bitField0_ |= 0x00000004;
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_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* at least length 1
*
*
* repeated string name = 3;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);;
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);
bitField0_ |= 0x00000004;
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 ValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.Value)
com.google.protobuf.MessageOrBuilder {
/**
* .google.protobuf.Empty unit = 1;
* @return Whether the unit field is set.
*/
boolean hasUnit();
/**
* .google.protobuf.Empty unit = 1;
* @return The unit.
*/
com.google.protobuf.Empty getUnit();
/**
* .google.protobuf.Empty unit = 1;
*/
com.google.protobuf.EmptyOrBuilder getUnitOrBuilder();
/**
* bool bool = 2;
* @return Whether the bool field is set.
*/
boolean hasBool();
/**
* bool bool = 2;
* @return The bool.
*/
boolean getBool();
/**
* sint64 int64 = 3;
* @return Whether the int64 field is set.
*/
boolean hasInt64();
/**
* sint64 int64 = 3;
* @return The int64.
*/
long getInt64();
/**
*
* 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 = 4;
* @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 = 4;
* @return The date.
*/
int getDate();
/**
*
* 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 = 5;
* @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 = 5;
* @return The timestamp.
*/
long getTimestamp();
/**
*
* 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();
/**
*
* 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.
*
* 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 party = 7;
* @return Whether the party field is set.
*/
boolean hasParty();
/**
* string party = 7;
* @return The party.
*/
java.lang.String getParty();
/**
* string party = 7;
* @return The bytes for party.
*/
com.google.protobuf.ByteString
getPartyBytes();
/**
* 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();
/**
* bytes contract_id = 9;
* @return Whether the contractId field is set.
*/
boolean hasContractId();
/**
* bytes contract_id = 9;
* @return The contractId.
*/
com.google.protobuf.ByteString getContractId();
/**
* .com.daml.lf.value.Value.Optional optional = 10;
* @return Whether the optional field is set.
*/
boolean hasOptional();
/**
* .com.daml.lf.value.Value.Optional optional = 10;
* @return The optional.
*/
com.daml.lf.value.ValueOuterClass.Value.Optional getOptional();
/**
* .com.daml.lf.value.Value.Optional optional = 10;
*/
com.daml.lf.value.ValueOuterClass.Value.OptionalOrBuilder getOptionalOrBuilder();
/**
* .com.daml.lf.value.Value.List list = 11;
* @return Whether the list field is set.
*/
boolean hasList();
/**
* .com.daml.lf.value.Value.List list = 11;
* @return The list.
*/
com.daml.lf.value.ValueOuterClass.Value.List getList();
/**
* .com.daml.lf.value.Value.List list = 11;
*/
com.daml.lf.value.ValueOuterClass.Value.ListOrBuilder getListOrBuilder();
/**
* .com.daml.lf.value.Value.Map map = 12;
* @return Whether the map field is set.
*/
boolean hasMap();
/**
* .com.daml.lf.value.Value.Map map = 12;
* @return The map.
*/
com.daml.lf.value.ValueOuterClass.Value.Map getMap();
/**
* .com.daml.lf.value.Value.Map map = 12;
*/
com.daml.lf.value.ValueOuterClass.Value.MapOrBuilder getMapOrBuilder();
/**
* .com.daml.lf.value.Value.TextMap text_map = 13;
* @return Whether the textMap field is set.
*/
boolean hasTextMap();
/**
* .com.daml.lf.value.Value.TextMap text_map = 13;
* @return The textMap.
*/
com.daml.lf.value.ValueOuterClass.Value.TextMap getTextMap();
/**
* .com.daml.lf.value.Value.TextMap text_map = 13;
*/
com.daml.lf.value.ValueOuterClass.Value.TextMapOrBuilder getTextMapOrBuilder();
/**
* .com.daml.lf.value.Value.Record record = 14;
* @return Whether the record field is set.
*/
boolean hasRecord();
/**
* .com.daml.lf.value.Value.Record record = 14;
* @return The record.
*/
com.daml.lf.value.ValueOuterClass.Value.Record getRecord();
/**
* .com.daml.lf.value.Value.Record record = 14;
*/
com.daml.lf.value.ValueOuterClass.Value.RecordOrBuilder getRecordOrBuilder();
/**
* .com.daml.lf.value.Value.Variant variant = 15;
* @return Whether the variant field is set.
*/
boolean hasVariant();
/**
* .com.daml.lf.value.Value.Variant variant = 15;
* @return The variant.
*/
com.daml.lf.value.ValueOuterClass.Value.Variant getVariant();
/**
* .com.daml.lf.value.Value.Variant variant = 15;
*/
com.daml.lf.value.ValueOuterClass.Value.VariantOrBuilder getVariantOrBuilder();
/**
* .com.daml.lf.value.Value.Enum enum = 16;
* @return Whether the enum field is set.
*/
boolean hasEnum();
/**
* .com.daml.lf.value.Value.Enum enum = 16;
* @return The enum.
*/
com.daml.lf.value.ValueOuterClass.Value.Enum getEnum();
/**
* .com.daml.lf.value.Value.Enum enum = 16;
*/
com.daml.lf.value.ValueOuterClass.Value.EnumOrBuilder getEnumOrBuilder();
com.daml.lf.value.ValueOuterClass.Value.SumCase getSumCase();
}
/**
*
* 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();
}
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);
}
public interface RecordOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.Value.Record)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
java.util.List
getFieldsList();
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
com.daml.lf.value.ValueOuterClass.Value.Record.Field getFields(int index);
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
int getFieldsCount();
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
java.util.List extends com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder>
getFieldsOrBuilderList();
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder getFieldsOrBuilder(
int index);
}
/**
* Protobuf type {@code com.daml.lf.value.Value.Record}
*/
public static final class Record extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.Value.Record)
RecordOrBuilder {
private static final long serialVersionUID = 0L;
// Use Record.newBuilder() to construct.
private Record(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Record() {
fields_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Record();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Record_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Record_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Record.class, com.daml.lf.value.ValueOuterClass.Value.Record.Builder.class);
}
public interface FieldOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.Value.Record.Field)
com.google.protobuf.MessageOrBuilder {
/**
* .com.daml.lf.value.Value value = 1;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* .com.daml.lf.value.Value value = 1;
* @return The value.
*/
com.daml.lf.value.ValueOuterClass.Value getValue();
/**
* .com.daml.lf.value.Value value = 1;
*/
com.daml.lf.value.ValueOuterClass.ValueOrBuilder getValueOrBuilder();
}
/**
* Protobuf type {@code com.daml.lf.value.Value.Record.Field}
*/
public static final class Field extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.Value.Record.Field)
FieldOrBuilder {
private static final long serialVersionUID = 0L;
// Use Field.newBuilder() to construct.
private Field(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Field() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Field();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Record_Field_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Record_Field_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Record.Field.class, com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder.class);
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private com.daml.lf.value.ValueOuterClass.Value value_;
/**
* .com.daml.lf.value.Value value = 1;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .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_;
}
/**
* .com.daml.lf.value.Value value = 1;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ValueOrBuilder getValueOrBuilder() {
return value_ == null ? com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance() : 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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getValue());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
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.Value.Record.Field)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.Value.Record.Field other = (com.daml.lf.value.ValueOuterClass.Value.Record.Field) 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.Value.Record.Field parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Record.Field 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.Record.Field parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Record.Field 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.Record.Field parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Record.Field 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.Record.Field 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.Record.Field 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.Record.Field 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.Record.Field 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.Record.Field 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.Record.Field 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.Record.Field 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.Value.Record.Field}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.Value.Record.Field)
com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Record_Field_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Record_Field_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Record.Field.class, com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.Value.Record.Field.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
value_ = null;
if (valueBuilder_ != null) {
valueBuilder_.dispose();
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_Value_Record_Field_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Record.Field getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.Value.Record.Field.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Record.Field build() {
com.daml.lf.value.ValueOuterClass.Value.Record.Field result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Record.Field buildPartial() {
com.daml.lf.value.ValueOuterClass.Value.Record.Field result = new com.daml.lf.value.ValueOuterClass.Value.Record.Field(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.lf.value.ValueOuterClass.Value.Record.Field result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.value_ = valueBuilder_ == null
? value_
: valueBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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.Record.Field) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.Value.Record.Field)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.Value.Record.Field other) {
if (other == com.daml.lf.value.ValueOuterClass.Value.Record.Field.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);
bitField0_ |= 0x00000001;
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 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_;
/**
* .com.daml.lf.value.Value value = 1;
* @return Whether the value field is set.
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .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();
}
}
/**
* .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;
} else {
valueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .com.daml.lf.value.Value value = 1;
*/
public Builder setValue(
com.daml.lf.value.ValueOuterClass.Value.Builder builderForValue) {
if (valueBuilder_ == null) {
value_ = builderForValue.build();
} else {
valueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .com.daml.lf.value.Value value = 1;
*/
public Builder mergeValue(com.daml.lf.value.ValueOuterClass.Value value) {
if (valueBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
value_ != null &&
value_ != com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance()) {
getValueBuilder().mergeFrom(value);
} else {
value_ = value;
}
} else {
valueBuilder_.mergeFrom(value);
}
if (value_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
* .com.daml.lf.value.Value value = 1;
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = null;
if (valueBuilder_ != null) {
valueBuilder_.dispose();
valueBuilder_ = null;
}
onChanged();
return this;
}
/**
* .com.daml.lf.value.Value value = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value.Builder getValueBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getValueFieldBuilder().getBuilder();
}
/**
* .com.daml.lf.value.Value value = 1;
*/
public com.daml.lf.value.ValueOuterClass.ValueOrBuilder getValueOrBuilder() {
if (valueBuilder_ != null) {
return valueBuilder_.getMessageOrBuilder();
} else {
return value_ == null ?
com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance() : value_;
}
}
/**
* .com.daml.lf.value.Value value = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value, com.daml.lf.value.ValueOuterClass.Value.Builder, com.daml.lf.value.ValueOuterClass.ValueOrBuilder>
getValueFieldBuilder() {
if (valueBuilder_ == null) {
valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value, com.daml.lf.value.ValueOuterClass.Value.Builder, com.daml.lf.value.ValueOuterClass.ValueOrBuilder>(
getValue(),
getParentForChildren(),
isClean());
value_ = null;
}
return valueBuilder_;
}
@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.Value.Record.Field)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.Value.Record.Field)
private static final com.daml.lf.value.ValueOuterClass.Value.Record.Field DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.Value.Record.Field();
}
public static com.daml.lf.value.ValueOuterClass.Value.Record.Field getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Field 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.Value.Record.Field getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int FIELDS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List fields_;
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
@java.lang.Override
public java.util.List getFieldsList() {
return fields_;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
@java.lang.Override
public java.util.List extends com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder>
getFieldsOrBuilderList() {
return fields_;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
@java.lang.Override
public int getFieldsCount() {
return fields_.size();
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Record.Field getFields(int index) {
return fields_.get(index);
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder getFieldsOrBuilder(
int index) {
return fields_.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 < fields_.size(); i++) {
output.writeMessage(1, fields_.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 < fields_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, fields_.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.Value.Record)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.Value.Record other = (com.daml.lf.value.ValueOuterClass.Value.Record) obj;
if (!getFieldsList()
.equals(other.getFieldsList())) 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 (getFieldsCount() > 0) {
hash = (37 * hash) + FIELDS_FIELD_NUMBER;
hash = (53 * hash) + getFieldsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.lf.value.ValueOuterClass.Value.Record parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Record 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.Record parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Record 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.Record parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Record 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.Record 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.Record 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.Record 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.Record 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.Record 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.Record 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.Record 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.Value.Record}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.Value.Record)
com.daml.lf.value.ValueOuterClass.Value.RecordOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Record_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Record_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Record.class, com.daml.lf.value.ValueOuterClass.Value.Record.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.Value.Record.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (fieldsBuilder_ == null) {
fields_ = java.util.Collections.emptyList();
} else {
fields_ = null;
fieldsBuilder_.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_Value_Record_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Record getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.Value.Record.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Record build() {
com.daml.lf.value.ValueOuterClass.Value.Record result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Record buildPartial() {
com.daml.lf.value.ValueOuterClass.Value.Record result = new com.daml.lf.value.ValueOuterClass.Value.Record(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.lf.value.ValueOuterClass.Value.Record result) {
if (fieldsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
fields_ = java.util.Collections.unmodifiableList(fields_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.fields_ = fields_;
} else {
result.fields_ = fieldsBuilder_.build();
}
}
private void buildPartial0(com.daml.lf.value.ValueOuterClass.Value.Record result) {
int from_bitField0_ = bitField0_;
}
@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.Record) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.Value.Record)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.Value.Record other) {
if (other == com.daml.lf.value.ValueOuterClass.Value.Record.getDefaultInstance()) return this;
if (fieldsBuilder_ == null) {
if (!other.fields_.isEmpty()) {
if (fields_.isEmpty()) {
fields_ = other.fields_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFieldsIsMutable();
fields_.addAll(other.fields_);
}
onChanged();
}
} else {
if (!other.fields_.isEmpty()) {
if (fieldsBuilder_.isEmpty()) {
fieldsBuilder_.dispose();
fieldsBuilder_ = null;
fields_ = other.fields_;
bitField0_ = (bitField0_ & ~0x00000001);
fieldsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFieldsFieldBuilder() : null;
} else {
fieldsBuilder_.addAllMessages(other.fields_);
}
}
}
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.Record.Field m =
input.readMessage(
com.daml.lf.value.ValueOuterClass.Value.Record.Field.parser(),
extensionRegistry);
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(m);
} else {
fieldsBuilder_.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 fields_ =
java.util.Collections.emptyList();
private void ensureFieldsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
fields_ = new java.util.ArrayList(fields_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value.Record.Field, com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder, com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder> fieldsBuilder_;
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public java.util.List getFieldsList() {
if (fieldsBuilder_ == null) {
return java.util.Collections.unmodifiableList(fields_);
} else {
return fieldsBuilder_.getMessageList();
}
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public int getFieldsCount() {
if (fieldsBuilder_ == null) {
return fields_.size();
} else {
return fieldsBuilder_.getCount();
}
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value.Record.Field getFields(int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index);
} else {
return fieldsBuilder_.getMessage(index);
}
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public Builder setFields(
int index, com.daml.lf.value.ValueOuterClass.Value.Record.Field value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.set(index, value);
onChanged();
} else {
fieldsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public Builder setFields(
int index, com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.set(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public Builder addFields(com.daml.lf.value.ValueOuterClass.Value.Record.Field value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(value);
onChanged();
} else {
fieldsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public Builder addFields(
int index, com.daml.lf.value.ValueOuterClass.Value.Record.Field value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(index, value);
onChanged();
} else {
fieldsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public Builder addFields(
com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public Builder addFields(
int index, com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public Builder addAllFields(
java.lang.Iterable extends com.daml.lf.value.ValueOuterClass.Value.Record.Field> values) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fields_);
onChanged();
} else {
fieldsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public Builder clearFields() {
if (fieldsBuilder_ == null) {
fields_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
fieldsBuilder_.clear();
}
return this;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public Builder removeFields(int index) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.remove(index);
onChanged();
} else {
fieldsBuilder_.remove(index);
}
return this;
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder getFieldsBuilder(
int index) {
return getFieldsFieldBuilder().getBuilder(index);
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder getFieldsOrBuilder(
int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index); } else {
return fieldsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public java.util.List extends com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder>
getFieldsOrBuilderList() {
if (fieldsBuilder_ != null) {
return fieldsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(fields_);
}
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder addFieldsBuilder() {
return getFieldsFieldBuilder().addBuilder(
com.daml.lf.value.ValueOuterClass.Value.Record.Field.getDefaultInstance());
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder addFieldsBuilder(
int index) {
return getFieldsFieldBuilder().addBuilder(
index, com.daml.lf.value.ValueOuterClass.Value.Record.Field.getDefaultInstance());
}
/**
* repeated .com.daml.lf.value.Value.Record.Field fields = 1;
*/
public java.util.List
getFieldsBuilderList() {
return getFieldsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value.Record.Field, com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder, com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder>
getFieldsFieldBuilder() {
if (fieldsBuilder_ == null) {
fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value.Record.Field, com.daml.lf.value.ValueOuterClass.Value.Record.Field.Builder, com.daml.lf.value.ValueOuterClass.Value.Record.FieldOrBuilder>(
fields_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
fields_ = null;
}
return fieldsBuilder_;
}
@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.Value.Record)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.Value.Record)
private static final com.daml.lf.value.ValueOuterClass.Value.Record DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.Value.Record();
}
public static com.daml.lf.value.ValueOuterClass.Value.Record getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Record 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.Value.Record getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface VariantOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.Value.Variant)
com.google.protobuf.MessageOrBuilder {
/**
* string constructor = 1;
* @return The constructor.
*/
java.lang.String getConstructor();
/**
* string constructor = 1;
* @return The bytes for constructor.
*/
com.google.protobuf.ByteString
getConstructorBytes();
/**
* .com.daml.lf.value.Value value = 2;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* .com.daml.lf.value.Value value = 2;
* @return The value.
*/
com.daml.lf.value.ValueOuterClass.Value getValue();
/**
* .com.daml.lf.value.Value value = 2;
*/
com.daml.lf.value.ValueOuterClass.ValueOrBuilder getValueOrBuilder();
}
/**
* Protobuf type {@code com.daml.lf.value.Value.Variant}
*/
public static final class Variant extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.Value.Variant)
VariantOrBuilder {
private static final long serialVersionUID = 0L;
// Use Variant.newBuilder() to construct.
private Variant(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Variant() {
constructor_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Variant();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Variant_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Variant_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Variant.class, com.daml.lf.value.ValueOuterClass.Value.Variant.Builder.class);
}
private int bitField0_;
public static final int CONSTRUCTOR_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object constructor_ = "";
/**
* string constructor = 1;
* @return The constructor.
*/
@java.lang.Override
public java.lang.String getConstructor() {
java.lang.Object ref = constructor_;
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();
constructor_ = s;
return s;
}
}
/**
* string constructor = 1;
* @return The bytes for constructor.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getConstructorBytes() {
java.lang.Object ref = constructor_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
constructor_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 2;
private com.daml.lf.value.ValueOuterClass.Value value_;
/**
* .com.daml.lf.value.Value value = 2;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .com.daml.lf.value.Value value = 2;
* @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_;
}
/**
* .com.daml.lf.value.Value value = 2;
*/
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.ValueOrBuilder getValueOrBuilder() {
return value_ == null ? com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance() : 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(constructor_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, constructor_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getValue());
}
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(constructor_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, constructor_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, 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.Value.Variant)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.Value.Variant other = (com.daml.lf.value.ValueOuterClass.Value.Variant) obj;
if (!getConstructor()
.equals(other.getConstructor())) return false;
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();
hash = (37 * hash) + CONSTRUCTOR_FIELD_NUMBER;
hash = (53 * hash) + getConstructor().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.Value.Variant parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Variant 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.Variant parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Variant 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.Variant parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Variant 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.Variant 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.Variant 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.Variant 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.Variant 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.Variant 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.Variant 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.Variant 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.Value.Variant}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.Value.Variant)
com.daml.lf.value.ValueOuterClass.Value.VariantOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Variant_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Variant_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Variant.class, com.daml.lf.value.ValueOuterClass.Value.Variant.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.Value.Variant.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
constructor_ = "";
value_ = null;
if (valueBuilder_ != null) {
valueBuilder_.dispose();
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_Value_Variant_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Variant getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.Value.Variant.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Variant build() {
com.daml.lf.value.ValueOuterClass.Value.Variant result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Variant buildPartial() {
com.daml.lf.value.ValueOuterClass.Value.Variant result = new com.daml.lf.value.ValueOuterClass.Value.Variant(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.lf.value.ValueOuterClass.Value.Variant result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.constructor_ = constructor_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.value_ = valueBuilder_ == null
? value_
: valueBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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.Variant) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.Value.Variant)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.Value.Variant other) {
if (other == com.daml.lf.value.ValueOuterClass.Value.Variant.getDefaultInstance()) return this;
if (!other.getConstructor().isEmpty()) {
constructor_ = other.constructor_;
bitField0_ |= 0x00000001;
onChanged();
}
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: {
constructor_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getValueFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
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 int bitField0_;
private java.lang.Object constructor_ = "";
/**
* string constructor = 1;
* @return The constructor.
*/
public java.lang.String getConstructor() {
java.lang.Object ref = constructor_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
constructor_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string constructor = 1;
* @return The bytes for constructor.
*/
public com.google.protobuf.ByteString
getConstructorBytes() {
java.lang.Object ref = constructor_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
constructor_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string constructor = 1;
* @param value The constructor to set.
* @return This builder for chaining.
*/
public Builder setConstructor(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
constructor_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string constructor = 1;
* @return This builder for chaining.
*/
public Builder clearConstructor() {
constructor_ = getDefaultInstance().getConstructor();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string constructor = 1;
* @param value The bytes for constructor to set.
* @return This builder for chaining.
*/
public Builder setConstructorBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
constructor_ = value;
bitField0_ |= 0x00000001;
onChanged();
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_;
/**
* .com.daml.lf.value.Value value = 2;
* @return Whether the value field is set.
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .com.daml.lf.value.Value value = 2;
* @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();
}
}
/**
* .com.daml.lf.value.Value value = 2;
*/
public Builder setValue(com.daml.lf.value.ValueOuterClass.Value value) {
if (valueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
} else {
valueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .com.daml.lf.value.Value value = 2;
*/
public Builder setValue(
com.daml.lf.value.ValueOuterClass.Value.Builder builderForValue) {
if (valueBuilder_ == null) {
value_ = builderForValue.build();
} else {
valueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .com.daml.lf.value.Value value = 2;
*/
public Builder mergeValue(com.daml.lf.value.ValueOuterClass.Value value) {
if (valueBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
value_ != null &&
value_ != com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance()) {
getValueBuilder().mergeFrom(value);
} else {
value_ = value;
}
} else {
valueBuilder_.mergeFrom(value);
}
if (value_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
* .com.daml.lf.value.Value value = 2;
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000002);
value_ = null;
if (valueBuilder_ != null) {
valueBuilder_.dispose();
valueBuilder_ = null;
}
onChanged();
return this;
}
/**
* .com.daml.lf.value.Value value = 2;
*/
public com.daml.lf.value.ValueOuterClass.Value.Builder getValueBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getValueFieldBuilder().getBuilder();
}
/**
* .com.daml.lf.value.Value value = 2;
*/
public com.daml.lf.value.ValueOuterClass.ValueOrBuilder getValueOrBuilder() {
if (valueBuilder_ != null) {
return valueBuilder_.getMessageOrBuilder();
} else {
return value_ == null ?
com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance() : value_;
}
}
/**
* .com.daml.lf.value.Value value = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value, com.daml.lf.value.ValueOuterClass.Value.Builder, com.daml.lf.value.ValueOuterClass.ValueOrBuilder>
getValueFieldBuilder() {
if (valueBuilder_ == null) {
valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.lf.value.ValueOuterClass.Value, com.daml.lf.value.ValueOuterClass.Value.Builder, com.daml.lf.value.ValueOuterClass.ValueOrBuilder>(
getValue(),
getParentForChildren(),
isClean());
value_ = null;
}
return valueBuilder_;
}
@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.Value.Variant)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.Value.Variant)
private static final com.daml.lf.value.ValueOuterClass.Value.Variant DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.Value.Variant();
}
public static com.daml.lf.value.ValueOuterClass.Value.Variant getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Variant 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.Value.Variant getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EnumOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.Value.Enum)
com.google.protobuf.MessageOrBuilder {
/**
* string value = 1;
* @return The value.
*/
java.lang.String getValue();
/**
* string value = 1;
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
}
/**
* Protobuf type {@code com.daml.lf.value.Value.Enum}
*/
public static final class Enum extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.Value.Enum)
EnumOrBuilder {
private static final long serialVersionUID = 0L;
// Use Enum.newBuilder() to construct.
private Enum(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Enum() {
value_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Enum();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Enum_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Enum_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Enum.class, com.daml.lf.value.ValueOuterClass.Value.Enum.Builder.class);
}
public static final int VALUE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object value_ = "";
/**
* string value = 1;
* @return The value.
*/
@java.lang.Override
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
}
}
/**
* string value = 1;
* @return The bytes for value.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.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;
}
}
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(value_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, 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(value_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, 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.Value.Enum)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.Value.Enum other = (com.daml.lf.value.ValueOuterClass.Value.Enum) obj;
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) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.lf.value.ValueOuterClass.Value.Enum parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Enum 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.Enum parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Enum 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.Enum parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.Enum 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.Enum 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.Enum 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.Enum 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.Enum 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.Enum 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.Enum 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.Enum 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.Value.Enum}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.Value.Enum)
com.daml.lf.value.ValueOuterClass.Value.EnumOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Enum_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_Value_Enum_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Enum.class, com.daml.lf.value.ValueOuterClass.Value.Enum.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.Value.Enum.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
value_ = "";
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_Enum_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Enum getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.Value.Enum.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Enum build() {
com.daml.lf.value.ValueOuterClass.Value.Enum result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Enum buildPartial() {
com.daml.lf.value.ValueOuterClass.Value.Enum result = new com.daml.lf.value.ValueOuterClass.Value.Enum(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.lf.value.ValueOuterClass.Value.Enum result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.value_ = value_;
}
}
@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.Enum) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.Value.Enum)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.Value.Enum other) {
if (other == com.daml.lf.value.ValueOuterClass.Value.Enum.getDefaultInstance()) return this;
if (!other.getValue().isEmpty()) {
value_ = other.value_;
bitField0_ |= 0x00000001;
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: {
value_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
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.lang.Object value_ = "";
/**
* string value = 1;
* @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 = 1;
* @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 = 1;
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string value = 1;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string value = 1;
* @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;
bitField0_ |= 0x00000001;
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.Value.Enum)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.Value.Enum)
private static final com.daml.lf.value.ValueOuterClass.Value.Enum DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.Value.Enum();
}
public static com.daml.lf.value.ValueOuterClass.Value.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.Value.Enum getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ListOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.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.Value.List}
*/
public static final class List extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.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();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_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_Value_List_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.List.class, com.daml.lf.value.ValueOuterClass.Value.List.Builder.class);
}
public static final int ELEMENTS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
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.Value.List)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.Value.List other = (com.daml.lf.value.ValueOuterClass.Value.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.Value.List parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.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.Value.List parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.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.Value.List parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.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.Value.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.Value.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.Value.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.Value.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.Value.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.Value.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.Value.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.Value.List}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.Value.List)
com.daml.lf.value.ValueOuterClass.Value.ListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_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_Value_List_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.List.class, com.daml.lf.value.ValueOuterClass.Value.List.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.Value.List.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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_Value_List_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.List getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.Value.List.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.List build() {
com.daml.lf.value.ValueOuterClass.Value.List result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.List buildPartial() {
com.daml.lf.value.ValueOuterClass.Value.List result = new com.daml.lf.value.ValueOuterClass.Value.List(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.lf.value.ValueOuterClass.Value.List result) {
if (elementsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
elements_ = java.util.Collections.unmodifiableList(elements_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.elements_ = elements_;
} else {
result.elements_ = elementsBuilder_.build();
}
}
private void buildPartial0(com.daml.lf.value.ValueOuterClass.Value.List result) {
int from_bitField0_ = bitField0_;
}
@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.List) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.Value.List)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.Value.List other) {
if (other == com.daml.lf.value.ValueOuterClass.Value.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.Value.List)
}
// @@protoc_insertion_point(class_scope:com.daml.lf.value.Value.List)
private static final com.daml.lf.value.ValueOuterClass.Value.List DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.lf.value.ValueOuterClass.Value.List();
}
public static com.daml.lf.value.ValueOuterClass.Value.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.Value.List getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OptionalOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.daml.lf.value.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.Value.Optional}
*/
public static final class Optional extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.daml.lf.value.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();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_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_Value_Optional_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Optional.class, com.daml.lf.value.ValueOuterClass.Value.Optional.Builder.class);
}
private int bitField0_;
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 ((bitField0_ & 0x00000001) != 0);
}
/**
*
* 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 value_ == null ? com.daml.lf.value.ValueOuterClass.Value.getDefaultInstance() : 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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getValue());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
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.Value.Optional)) {
return super.equals(obj);
}
com.daml.lf.value.ValueOuterClass.Value.Optional other = (com.daml.lf.value.ValueOuterClass.Value.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.Value.Optional parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.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.Value.Optional parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.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.Value.Optional parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.lf.value.ValueOuterClass.Value.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.Value.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.Value.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.Value.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.Value.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.Value.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.Value.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.Value.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.Value.Optional}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.daml.lf.value.Value.Optional)
com.daml.lf.value.ValueOuterClass.Value.OptionalOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.lf.value.ValueOuterClass.internal_static_com_daml_lf_value_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_Value_Optional_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.lf.value.ValueOuterClass.Value.Optional.class, com.daml.lf.value.ValueOuterClass.Value.Optional.Builder.class);
}
// Construct using com.daml.lf.value.ValueOuterClass.Value.Optional.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
value_ = null;
if (valueBuilder_ != null) {
valueBuilder_.dispose();
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_Value_Optional_descriptor;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Optional getDefaultInstanceForType() {
return com.daml.lf.value.ValueOuterClass.Value.Optional.getDefaultInstance();
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Optional build() {
com.daml.lf.value.ValueOuterClass.Value.Optional result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.lf.value.ValueOuterClass.Value.Optional buildPartial() {
com.daml.lf.value.ValueOuterClass.Value.Optional result = new com.daml.lf.value.ValueOuterClass.Value.Optional(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.lf.value.ValueOuterClass.Value.Optional result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.value_ = valueBuilder_ == null
? value_
: valueBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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.Optional) {
return mergeFrom((com.daml.lf.value.ValueOuterClass.Value.Optional)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.lf.value.ValueOuterClass.Value.Optional other) {
if (other == com.daml.lf.value.ValueOuterClass.Value.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);
bitField0_ |= 0x00000001;
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 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 ((bitField0_ & 0x00000001) != 0);
}
/**
*
* 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;
} else {
valueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*