Please wait. This can take some minutes ...
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.
com.daml.daml_lf_dev.DamlLf2 Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: com/daml/daml_lf_dev/daml_lf2.proto
package com.daml.daml_lf_dev;
public final class DamlLf2 {
private DamlLf2() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* Builtin types
*
*
* Protobuf enum {@code daml_lf_2.BuiltinType}
*/
public enum BuiltinType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Builtin type 'Unit'
*
*
* UNIT = 0;
*/
UNIT(0),
/**
*
* Builtin type 'Bool'
*
*
* BOOL = 1;
*/
BOOL(1),
/**
*
* Builtin type 'Int64'
*
*
* INT64 = 2;
*/
INT64(2),
/**
*
* Builtin type 'Date'
*
*
* DATE = 3;
*/
DATE(3),
/**
*
* Builtin type 'Timestamp'
*
*
* TIMESTAMP = 4;
*/
TIMESTAMP(4),
/**
*
* Builtin type 'Numeric'
*
*
* NUMERIC = 5;
*/
NUMERIC(5),
/**
*
* Builtin tpe 'Party'
*
*
* PARTY = 6;
*/
PARTY(6),
/**
*
* Builtin type 'Text'
*
*
* TEXT = 7;
*/
TEXT(7),
/**
*
* Builtin type 'ContractId'
*
*
* CONTRACT_ID = 8;
*/
CONTRACT_ID(8),
/**
*
* Builtin type 'Optional'
*
*
* OPTIONAL = 9;
*/
OPTIONAL(9),
/**
*
* Builtin type 'List'
*
*
* LIST = 10;
*/
LIST(10),
/**
*
* Builtin type 'TGenMap`
*
*
* GENMAP = 11;
*/
GENMAP(11),
/**
*
* Builtin type 'Any'
*
*
* ANY = 13;
*/
ANY(13),
/**
*
* Builtin type 'TAnyException'
*
*
* ANY_EXCEPTION = 14;
*/
ANY_EXCEPTION(14),
/**
*
* Builtin type 'TypeRep'
*
*
* TYPE_REP = 15;
*/
TYPE_REP(15),
/**
*
* Builtin type `TArrow`
*
*
* ARROW = 16;
*/
ARROW(16),
/**
*
* Builtin type 'Update'
*
*
* UPDATE = 17;
*/
UPDATE(17),
/**
*
* Builtin type 'TTextMap`
* *Available in versions >= 2.dev*
*
*
* TEXTMAP = 1001;
*/
TEXTMAP(1001),
/**
*
* Builtin type 'TBigNumeric'
* *Available in versions >= 2.dev*
*
*
* BIGNUMERIC = 1002;
*/
BIGNUMERIC(1002),
/**
*
* Builtin type 'TRoundingMode'
* *Available in versions >= 2.dev*
*
*
* ROUNDING_MODE = 1003;
*/
ROUNDING_MODE(1003),
/**
*
* Builtin type 'Scenario'
* *Available in versions >= 2.dev*
*
*
* SCENARIO = 1004;
*/
SCENARIO(1004),
UNRECOGNIZED(-1),
;
/**
*
* Builtin type 'Unit'
*
*
* UNIT = 0;
*/
public static final int UNIT_VALUE = 0;
/**
*
* Builtin type 'Bool'
*
*
* BOOL = 1;
*/
public static final int BOOL_VALUE = 1;
/**
*
* Builtin type 'Int64'
*
*
* INT64 = 2;
*/
public static final int INT64_VALUE = 2;
/**
*
* Builtin type 'Date'
*
*
* DATE = 3;
*/
public static final int DATE_VALUE = 3;
/**
*
* Builtin type 'Timestamp'
*
*
* TIMESTAMP = 4;
*/
public static final int TIMESTAMP_VALUE = 4;
/**
*
* Builtin type 'Numeric'
*
*
* NUMERIC = 5;
*/
public static final int NUMERIC_VALUE = 5;
/**
*
* Builtin tpe 'Party'
*
*
* PARTY = 6;
*/
public static final int PARTY_VALUE = 6;
/**
*
* Builtin type 'Text'
*
*
* TEXT = 7;
*/
public static final int TEXT_VALUE = 7;
/**
*
* Builtin type 'ContractId'
*
*
* CONTRACT_ID = 8;
*/
public static final int CONTRACT_ID_VALUE = 8;
/**
*
* Builtin type 'Optional'
*
*
* OPTIONAL = 9;
*/
public static final int OPTIONAL_VALUE = 9;
/**
*
* Builtin type 'List'
*
*
* LIST = 10;
*/
public static final int LIST_VALUE = 10;
/**
*
* Builtin type 'TGenMap`
*
*
* GENMAP = 11;
*/
public static final int GENMAP_VALUE = 11;
/**
*
* Builtin type 'Any'
*
*
* ANY = 13;
*/
public static final int ANY_VALUE = 13;
/**
*
* Builtin type 'TAnyException'
*
*
* ANY_EXCEPTION = 14;
*/
public static final int ANY_EXCEPTION_VALUE = 14;
/**
*
* Builtin type 'TypeRep'
*
*
* TYPE_REP = 15;
*/
public static final int TYPE_REP_VALUE = 15;
/**
*
* Builtin type `TArrow`
*
*
* ARROW = 16;
*/
public static final int ARROW_VALUE = 16;
/**
*
* Builtin type 'Update'
*
*
* UPDATE = 17;
*/
public static final int UPDATE_VALUE = 17;
/**
*
* Builtin type 'TTextMap`
* *Available in versions >= 2.dev*
*
*
* TEXTMAP = 1001;
*/
public static final int TEXTMAP_VALUE = 1001;
/**
*
* Builtin type 'TBigNumeric'
* *Available in versions >= 2.dev*
*
*
* BIGNUMERIC = 1002;
*/
public static final int BIGNUMERIC_VALUE = 1002;
/**
*
* Builtin type 'TRoundingMode'
* *Available in versions >= 2.dev*
*
*
* ROUNDING_MODE = 1003;
*/
public static final int ROUNDING_MODE_VALUE = 1003;
/**
*
* Builtin type 'Scenario'
* *Available in versions >= 2.dev*
*
*
* SCENARIO = 1004;
*/
public static final int SCENARIO_VALUE = 1004;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BuiltinType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static BuiltinType forNumber(int value) {
switch (value) {
case 0: return UNIT;
case 1: return BOOL;
case 2: return INT64;
case 3: return DATE;
case 4: return TIMESTAMP;
case 5: return NUMERIC;
case 6: return PARTY;
case 7: return TEXT;
case 8: return CONTRACT_ID;
case 9: return OPTIONAL;
case 10: return LIST;
case 11: return GENMAP;
case 13: return ANY;
case 14: return ANY_EXCEPTION;
case 15: return TYPE_REP;
case 16: return ARROW;
case 17: return UPDATE;
case 1001: return TEXTMAP;
case 1002: return BIGNUMERIC;
case 1003: return ROUNDING_MODE;
case 1004: return SCENARIO;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
BuiltinType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public BuiltinType findValueByNumber(int number) {
return BuiltinType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.getDescriptor().getEnumTypes().get(0);
}
private static final BuiltinType[] VALUES = values();
public static BuiltinType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private BuiltinType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:daml_lf_2.BuiltinType)
}
/**
*
* Builtin constructors
*
*
* Protobuf enum {@code daml_lf_2.BuiltinCon}
*/
public enum BuiltinCon
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Unit value '()'
*
*
* CON_UNIT = 0;
*/
CON_UNIT(0),
/**
*
* 'False' boolean value
*
*
* CON_FALSE = 1;
*/
CON_FALSE(1),
/**
*
* 'True' boolean value
*
*
* CON_TRUE = 2;
*/
CON_TRUE(2),
UNRECOGNIZED(-1),
;
/**
*
* Unit value '()'
*
*
* CON_UNIT = 0;
*/
public static final int CON_UNIT_VALUE = 0;
/**
*
* 'False' boolean value
*
*
* CON_FALSE = 1;
*/
public static final int CON_FALSE_VALUE = 1;
/**
*
* 'True' boolean value
*
*
* CON_TRUE = 2;
*/
public static final int CON_TRUE_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BuiltinCon valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static BuiltinCon forNumber(int value) {
switch (value) {
case 0: return CON_UNIT;
case 1: return CON_FALSE;
case 2: return CON_TRUE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
BuiltinCon> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public BuiltinCon findValueByNumber(int number) {
return BuiltinCon.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.getDescriptor().getEnumTypes().get(1);
}
private static final BuiltinCon[] VALUES = values();
public static BuiltinCon valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private BuiltinCon(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:daml_lf_2.BuiltinCon)
}
/**
*
* Builtin functions
* Refer to Daml-LF major version 1 specification for types and behavior of those.
*
*
* Protobuf enum {@code daml_lf_2.BuiltinFunction}
*/
public enum BuiltinFunction
implements com.google.protobuf.ProtocolMessageEnum {
/**
* TRACE = 0;
*/
TRACE(0),
/**
* ERROR = 1;
*/
ERROR(1),
/**
* EQUAL = 2;
*/
EQUAL(2),
/**
* LESS_EQ = 3;
*/
LESS_EQ(3),
/**
* LESS = 4;
*/
LESS(4),
/**
* GREATER_EQ = 5;
*/
GREATER_EQ(5),
/**
* GREATER = 6;
*/
GREATER(6),
/**
* ADD_INT64 = 7;
*/
ADD_INT64(7),
/**
* SUB_INT64 = 8;
*/
SUB_INT64(8),
/**
* MUL_INT64 = 9;
*/
MUL_INT64(9),
/**
* DIV_INT64 = 10;
*/
DIV_INT64(10),
/**
* MOD_INT64 = 11;
*/
MOD_INT64(11),
/**
* EXP_INT64 = 12;
*/
EXP_INT64(12),
/**
* ADD_NUMERIC = 13;
*/
ADD_NUMERIC(13),
/**
* SUB_NUMERIC = 14;
*/
SUB_NUMERIC(14),
/**
* MUL_NUMERIC = 15;
*/
MUL_NUMERIC(15),
/**
* DIV_NUMERIC = 16;
*/
DIV_NUMERIC(16),
/**
* ROUND_NUMERIC = 17;
*/
ROUND_NUMERIC(17),
/**
* CAST_NUMERIC = 18;
*/
CAST_NUMERIC(18),
/**
* SHIFT_NUMERIC = 19;
*/
SHIFT_NUMERIC(19),
/**
* INT64_TO_NUMERIC = 20;
*/
INT64_TO_NUMERIC(20),
/**
* NUMERIC_TO_INT64 = 21;
*/
NUMERIC_TO_INT64(21),
/**
* INT64_TO_TEXT = 22;
*/
INT64_TO_TEXT(22),
/**
* NUMERIC_TO_TEXT = 23;
*/
NUMERIC_TO_TEXT(23),
/**
* TIMESTAMP_TO_TEXT = 25;
*/
TIMESTAMP_TO_TEXT(25),
/**
* DATE_TO_TEXT = 26;
*/
DATE_TO_TEXT(26),
/**
* PARTY_TO_TEXT = 27;
*/
PARTY_TO_TEXT(27),
/**
* TEXT_TO_PARTY = 28;
*/
TEXT_TO_PARTY(28),
/**
* TEXT_TO_INT64 = 29;
*/
TEXT_TO_INT64(29),
/**
* TEXT_TO_NUMERIC = 30;
*/
TEXT_TO_NUMERIC(30),
/**
* CONTRACT_ID_TO_TEXT = 31;
*/
CONTRACT_ID_TO_TEXT(31),
/**
* SHA256_TEXT = 32;
*/
SHA256_TEXT(32),
/**
* EXPLODE_TEXT = 33;
*/
EXPLODE_TEXT(33),
/**
* APPEND_TEXT = 34;
*/
APPEND_TEXT(34),
/**
* IMPLODE_TEXT = 35;
*/
IMPLODE_TEXT(35),
/**
* CODE_POINTS_TO_TEXT = 36;
*/
CODE_POINTS_TO_TEXT(36),
/**
* TEXT_TO_CODE_POINTS = 37;
*/
TEXT_TO_CODE_POINTS(37),
/**
* DATE_TO_UNIX_DAYS = 38;
*/
DATE_TO_UNIX_DAYS(38),
/**
* UNIX_DAYS_TO_DATE = 39;
*/
UNIX_DAYS_TO_DATE(39),
/**
* TIMESTAMP_TO_UNIX_MICROSECONDS = 40;
*/
TIMESTAMP_TO_UNIX_MICROSECONDS(40),
/**
* UNIX_MICROSECONDS_TO_TIMESTAMP = 41;
*/
UNIX_MICROSECONDS_TO_TIMESTAMP(41),
/**
* COERCE_CONTRACT_ID = 42;
*/
COERCE_CONTRACT_ID(42),
/**
* FOLDL = 43;
*/
FOLDL(43),
/**
* FOLDR = 44;
*/
FOLDR(44),
/**
* EQUAL_LIST = 45;
*/
EQUAL_LIST(45),
/**
* GENMAP_EMPTY = 52;
*/
GENMAP_EMPTY(52),
/**
* GENMAP_INSERT = 53;
*/
GENMAP_INSERT(53),
/**
* GENMAP_LOOKUP = 54;
*/
GENMAP_LOOKUP(54),
/**
* GENMAP_DELETE = 55;
*/
GENMAP_DELETE(55),
/**
* GENMAP_KEYS = 56;
*/
GENMAP_KEYS(56),
/**
* GENMAP_VALUES = 57;
*/
GENMAP_VALUES(57),
/**
* GENMAP_SIZE = 58;
*/
GENMAP_SIZE(58),
/**
* ANY_EXCEPTION_MESSAGE = 59;
*/
ANY_EXCEPTION_MESSAGE(59),
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_EMPTY = 1001;
*/
TEXTMAP_EMPTY(1001),
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_INSERT = 1002;
*/
TEXTMAP_INSERT(1002),
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_LOOKUP = 1003;
*/
TEXTMAP_LOOKUP(1003),
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_DELETE = 1004;
*/
TEXTMAP_DELETE(1004),
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_TO_LIST = 1005;
*/
TEXTMAP_TO_LIST(1005),
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_SIZE = 1006;
*/
TEXTMAP_SIZE(1006),
/**
*
* *Available in versions >= 2.dev*
*
*
* SCALE_BIGNUMERIC = 2001;
*/
SCALE_BIGNUMERIC(2001),
/**
*
* *Available in versions >= 2.dev*
*
*
* PRECISION_BIGNUMERIC = 2002;
*/
PRECISION_BIGNUMERIC(2002),
/**
*
* *Available in versions >= 2.dev*
*
*
* ADD_BIGNUMERIC = 2003;
*/
ADD_BIGNUMERIC(2003),
/**
*
* *Available in versions >= 2.dev*
*
*
* SUB_BIGNUMERIC = 2004;
*/
SUB_BIGNUMERIC(2004),
/**
*
* *Available in versions >= 2.dev*
*
*
* MUL_BIGNUMERIC = 2005;
*/
MUL_BIGNUMERIC(2005),
/**
*
* *Available in versions >= 2.dev*
*
*
* DIV_BIGNUMERIC = 2006;
*/
DIV_BIGNUMERIC(2006),
/**
*
* *Available in versions >= 2.dev*
*
*
* SHIFT_RIGHT_BIGNUMERIC = 2007;
*/
SHIFT_RIGHT_BIGNUMERIC(2007),
/**
*
* *Available in versions >= 2.dev*
*
*
* BIGNUMERIC_TO_NUMERIC = 2008;
*/
BIGNUMERIC_TO_NUMERIC(2008),
/**
*
* *Available in versions >= 2.dev*
*
*
* NUMERIC_TO_BIGNUMERIC = 2009;
*/
NUMERIC_TO_BIGNUMERIC(2009),
/**
*
* *Available in versions >= 2.dev*
*
*
* BIGNUMERIC_TO_TEXT = 2010;
*/
BIGNUMERIC_TO_TEXT(2010),
/**
*
* *Available in versions >= 2.dev*
*
*
* TYPE_REP_TYCON_NAME = 3011;
*/
TYPE_REP_TYCON_NAME(3011),
UNRECOGNIZED(-1),
;
/**
* TRACE = 0;
*/
public static final int TRACE_VALUE = 0;
/**
* ERROR = 1;
*/
public static final int ERROR_VALUE = 1;
/**
* EQUAL = 2;
*/
public static final int EQUAL_VALUE = 2;
/**
* LESS_EQ = 3;
*/
public static final int LESS_EQ_VALUE = 3;
/**
* LESS = 4;
*/
public static final int LESS_VALUE = 4;
/**
* GREATER_EQ = 5;
*/
public static final int GREATER_EQ_VALUE = 5;
/**
* GREATER = 6;
*/
public static final int GREATER_VALUE = 6;
/**
* ADD_INT64 = 7;
*/
public static final int ADD_INT64_VALUE = 7;
/**
* SUB_INT64 = 8;
*/
public static final int SUB_INT64_VALUE = 8;
/**
* MUL_INT64 = 9;
*/
public static final int MUL_INT64_VALUE = 9;
/**
* DIV_INT64 = 10;
*/
public static final int DIV_INT64_VALUE = 10;
/**
* MOD_INT64 = 11;
*/
public static final int MOD_INT64_VALUE = 11;
/**
* EXP_INT64 = 12;
*/
public static final int EXP_INT64_VALUE = 12;
/**
* ADD_NUMERIC = 13;
*/
public static final int ADD_NUMERIC_VALUE = 13;
/**
* SUB_NUMERIC = 14;
*/
public static final int SUB_NUMERIC_VALUE = 14;
/**
* MUL_NUMERIC = 15;
*/
public static final int MUL_NUMERIC_VALUE = 15;
/**
* DIV_NUMERIC = 16;
*/
public static final int DIV_NUMERIC_VALUE = 16;
/**
* ROUND_NUMERIC = 17;
*/
public static final int ROUND_NUMERIC_VALUE = 17;
/**
* CAST_NUMERIC = 18;
*/
public static final int CAST_NUMERIC_VALUE = 18;
/**
* SHIFT_NUMERIC = 19;
*/
public static final int SHIFT_NUMERIC_VALUE = 19;
/**
* INT64_TO_NUMERIC = 20;
*/
public static final int INT64_TO_NUMERIC_VALUE = 20;
/**
* NUMERIC_TO_INT64 = 21;
*/
public static final int NUMERIC_TO_INT64_VALUE = 21;
/**
* INT64_TO_TEXT = 22;
*/
public static final int INT64_TO_TEXT_VALUE = 22;
/**
* NUMERIC_TO_TEXT = 23;
*/
public static final int NUMERIC_TO_TEXT_VALUE = 23;
/**
* TIMESTAMP_TO_TEXT = 25;
*/
public static final int TIMESTAMP_TO_TEXT_VALUE = 25;
/**
* DATE_TO_TEXT = 26;
*/
public static final int DATE_TO_TEXT_VALUE = 26;
/**
* PARTY_TO_TEXT = 27;
*/
public static final int PARTY_TO_TEXT_VALUE = 27;
/**
* TEXT_TO_PARTY = 28;
*/
public static final int TEXT_TO_PARTY_VALUE = 28;
/**
* TEXT_TO_INT64 = 29;
*/
public static final int TEXT_TO_INT64_VALUE = 29;
/**
* TEXT_TO_NUMERIC = 30;
*/
public static final int TEXT_TO_NUMERIC_VALUE = 30;
/**
* CONTRACT_ID_TO_TEXT = 31;
*/
public static final int CONTRACT_ID_TO_TEXT_VALUE = 31;
/**
* SHA256_TEXT = 32;
*/
public static final int SHA256_TEXT_VALUE = 32;
/**
* EXPLODE_TEXT = 33;
*/
public static final int EXPLODE_TEXT_VALUE = 33;
/**
* APPEND_TEXT = 34;
*/
public static final int APPEND_TEXT_VALUE = 34;
/**
* IMPLODE_TEXT = 35;
*/
public static final int IMPLODE_TEXT_VALUE = 35;
/**
* CODE_POINTS_TO_TEXT = 36;
*/
public static final int CODE_POINTS_TO_TEXT_VALUE = 36;
/**
* TEXT_TO_CODE_POINTS = 37;
*/
public static final int TEXT_TO_CODE_POINTS_VALUE = 37;
/**
* DATE_TO_UNIX_DAYS = 38;
*/
public static final int DATE_TO_UNIX_DAYS_VALUE = 38;
/**
* UNIX_DAYS_TO_DATE = 39;
*/
public static final int UNIX_DAYS_TO_DATE_VALUE = 39;
/**
* TIMESTAMP_TO_UNIX_MICROSECONDS = 40;
*/
public static final int TIMESTAMP_TO_UNIX_MICROSECONDS_VALUE = 40;
/**
* UNIX_MICROSECONDS_TO_TIMESTAMP = 41;
*/
public static final int UNIX_MICROSECONDS_TO_TIMESTAMP_VALUE = 41;
/**
* COERCE_CONTRACT_ID = 42;
*/
public static final int COERCE_CONTRACT_ID_VALUE = 42;
/**
* FOLDL = 43;
*/
public static final int FOLDL_VALUE = 43;
/**
* FOLDR = 44;
*/
public static final int FOLDR_VALUE = 44;
/**
* EQUAL_LIST = 45;
*/
public static final int EQUAL_LIST_VALUE = 45;
/**
* GENMAP_EMPTY = 52;
*/
public static final int GENMAP_EMPTY_VALUE = 52;
/**
* GENMAP_INSERT = 53;
*/
public static final int GENMAP_INSERT_VALUE = 53;
/**
* GENMAP_LOOKUP = 54;
*/
public static final int GENMAP_LOOKUP_VALUE = 54;
/**
* GENMAP_DELETE = 55;
*/
public static final int GENMAP_DELETE_VALUE = 55;
/**
* GENMAP_KEYS = 56;
*/
public static final int GENMAP_KEYS_VALUE = 56;
/**
* GENMAP_VALUES = 57;
*/
public static final int GENMAP_VALUES_VALUE = 57;
/**
* GENMAP_SIZE = 58;
*/
public static final int GENMAP_SIZE_VALUE = 58;
/**
* ANY_EXCEPTION_MESSAGE = 59;
*/
public static final int ANY_EXCEPTION_MESSAGE_VALUE = 59;
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_EMPTY = 1001;
*/
public static final int TEXTMAP_EMPTY_VALUE = 1001;
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_INSERT = 1002;
*/
public static final int TEXTMAP_INSERT_VALUE = 1002;
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_LOOKUP = 1003;
*/
public static final int TEXTMAP_LOOKUP_VALUE = 1003;
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_DELETE = 1004;
*/
public static final int TEXTMAP_DELETE_VALUE = 1004;
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_TO_LIST = 1005;
*/
public static final int TEXTMAP_TO_LIST_VALUE = 1005;
/**
*
* *Available in versions >= 2.dev*
*
*
* TEXTMAP_SIZE = 1006;
*/
public static final int TEXTMAP_SIZE_VALUE = 1006;
/**
*
* *Available in versions >= 2.dev*
*
*
* SCALE_BIGNUMERIC = 2001;
*/
public static final int SCALE_BIGNUMERIC_VALUE = 2001;
/**
*
* *Available in versions >= 2.dev*
*
*
* PRECISION_BIGNUMERIC = 2002;
*/
public static final int PRECISION_BIGNUMERIC_VALUE = 2002;
/**
*
* *Available in versions >= 2.dev*
*
*
* ADD_BIGNUMERIC = 2003;
*/
public static final int ADD_BIGNUMERIC_VALUE = 2003;
/**
*
* *Available in versions >= 2.dev*
*
*
* SUB_BIGNUMERIC = 2004;
*/
public static final int SUB_BIGNUMERIC_VALUE = 2004;
/**
*
* *Available in versions >= 2.dev*
*
*
* MUL_BIGNUMERIC = 2005;
*/
public static final int MUL_BIGNUMERIC_VALUE = 2005;
/**
*
* *Available in versions >= 2.dev*
*
*
* DIV_BIGNUMERIC = 2006;
*/
public static final int DIV_BIGNUMERIC_VALUE = 2006;
/**
*
* *Available in versions >= 2.dev*
*
*
* SHIFT_RIGHT_BIGNUMERIC = 2007;
*/
public static final int SHIFT_RIGHT_BIGNUMERIC_VALUE = 2007;
/**
*
* *Available in versions >= 2.dev*
*
*
* BIGNUMERIC_TO_NUMERIC = 2008;
*/
public static final int BIGNUMERIC_TO_NUMERIC_VALUE = 2008;
/**
*
* *Available in versions >= 2.dev*
*
*
* NUMERIC_TO_BIGNUMERIC = 2009;
*/
public static final int NUMERIC_TO_BIGNUMERIC_VALUE = 2009;
/**
*
* *Available in versions >= 2.dev*
*
*
* BIGNUMERIC_TO_TEXT = 2010;
*/
public static final int BIGNUMERIC_TO_TEXT_VALUE = 2010;
/**
*
* *Available in versions >= 2.dev*
*
*
* TYPE_REP_TYCON_NAME = 3011;
*/
public static final int TYPE_REP_TYCON_NAME_VALUE = 3011;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BuiltinFunction valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static BuiltinFunction forNumber(int value) {
switch (value) {
case 0: return TRACE;
case 1: return ERROR;
case 2: return EQUAL;
case 3: return LESS_EQ;
case 4: return LESS;
case 5: return GREATER_EQ;
case 6: return GREATER;
case 7: return ADD_INT64;
case 8: return SUB_INT64;
case 9: return MUL_INT64;
case 10: return DIV_INT64;
case 11: return MOD_INT64;
case 12: return EXP_INT64;
case 13: return ADD_NUMERIC;
case 14: return SUB_NUMERIC;
case 15: return MUL_NUMERIC;
case 16: return DIV_NUMERIC;
case 17: return ROUND_NUMERIC;
case 18: return CAST_NUMERIC;
case 19: return SHIFT_NUMERIC;
case 20: return INT64_TO_NUMERIC;
case 21: return NUMERIC_TO_INT64;
case 22: return INT64_TO_TEXT;
case 23: return NUMERIC_TO_TEXT;
case 25: return TIMESTAMP_TO_TEXT;
case 26: return DATE_TO_TEXT;
case 27: return PARTY_TO_TEXT;
case 28: return TEXT_TO_PARTY;
case 29: return TEXT_TO_INT64;
case 30: return TEXT_TO_NUMERIC;
case 31: return CONTRACT_ID_TO_TEXT;
case 32: return SHA256_TEXT;
case 33: return EXPLODE_TEXT;
case 34: return APPEND_TEXT;
case 35: return IMPLODE_TEXT;
case 36: return CODE_POINTS_TO_TEXT;
case 37: return TEXT_TO_CODE_POINTS;
case 38: return DATE_TO_UNIX_DAYS;
case 39: return UNIX_DAYS_TO_DATE;
case 40: return TIMESTAMP_TO_UNIX_MICROSECONDS;
case 41: return UNIX_MICROSECONDS_TO_TIMESTAMP;
case 42: return COERCE_CONTRACT_ID;
case 43: return FOLDL;
case 44: return FOLDR;
case 45: return EQUAL_LIST;
case 52: return GENMAP_EMPTY;
case 53: return GENMAP_INSERT;
case 54: return GENMAP_LOOKUP;
case 55: return GENMAP_DELETE;
case 56: return GENMAP_KEYS;
case 57: return GENMAP_VALUES;
case 58: return GENMAP_SIZE;
case 59: return ANY_EXCEPTION_MESSAGE;
case 1001: return TEXTMAP_EMPTY;
case 1002: return TEXTMAP_INSERT;
case 1003: return TEXTMAP_LOOKUP;
case 1004: return TEXTMAP_DELETE;
case 1005: return TEXTMAP_TO_LIST;
case 1006: return TEXTMAP_SIZE;
case 2001: return SCALE_BIGNUMERIC;
case 2002: return PRECISION_BIGNUMERIC;
case 2003: return ADD_BIGNUMERIC;
case 2004: return SUB_BIGNUMERIC;
case 2005: return MUL_BIGNUMERIC;
case 2006: return DIV_BIGNUMERIC;
case 2007: return SHIFT_RIGHT_BIGNUMERIC;
case 2008: return BIGNUMERIC_TO_NUMERIC;
case 2009: return NUMERIC_TO_BIGNUMERIC;
case 2010: return BIGNUMERIC_TO_TEXT;
case 3011: return TYPE_REP_TYCON_NAME;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
BuiltinFunction> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public BuiltinFunction findValueByNumber(int number) {
return BuiltinFunction.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.getDescriptor().getEnumTypes().get(2);
}
private static final BuiltinFunction[] VALUES = values();
public static BuiltinFunction valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private BuiltinFunction(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:daml_lf_2.BuiltinFunction)
}
public interface UnitOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Unit)
com.google.protobuf.MessageOrBuilder {
}
/**
*
* Canonical encoding in one-ofs for cases that carry no meaningful
* values.
*
*
* Protobuf type {@code daml_lf_2.Unit}
*/
public static final class Unit extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Unit)
UnitOrBuilder {
private static final long serialVersionUID = 0L;
// Use Unit.newBuilder() to construct.
private Unit(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Unit() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Unit();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Unit_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Unit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Unit.class, com.daml.daml_lf_dev.DamlLf2.Unit.Builder.class);
}
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 {
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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.daml_lf_dev.DamlLf2.Unit)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Unit other = (com.daml.daml_lf_dev.DamlLf2.Unit) obj;
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 = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Unit parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Unit parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Unit parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Unit 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.daml_lf_dev.DamlLf2.Unit parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Unit parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Unit parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Unit 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.daml_lf_dev.DamlLf2.Unit parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Unit 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.daml_lf_dev.DamlLf2.Unit parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Unit 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.daml_lf_dev.DamlLf2.Unit 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;
}
/**
*
* Canonical encoding in one-ofs for cases that carry no meaningful
* values.
*
*
* Protobuf type {@code daml_lf_2.Unit}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Unit)
com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Unit_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Unit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Unit.class, com.daml.daml_lf_dev.DamlLf2.Unit.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Unit.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Unit_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Unit getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Unit build() {
com.daml.daml_lf_dev.DamlLf2.Unit result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Unit buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Unit result = new com.daml.daml_lf_dev.DamlLf2.Unit(this);
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.daml.daml_lf_dev.DamlLf2.Unit) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Unit)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Unit other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance()) return this;
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;
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;
}
@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:daml_lf_2.Unit)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Unit)
private static final com.daml.daml_lf_dev.DamlLf2.Unit DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Unit();
}
public static com.daml.daml_lf_dev.DamlLf2.Unit getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Unit 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.daml_lf_dev.DamlLf2.Unit getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PackageRefOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.PackageRef)
com.google.protobuf.MessageOrBuilder {
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
* @return Whether the self field is set.
*/
boolean hasSelf();
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
* @return The self.
*/
com.daml.daml_lf_dev.DamlLf2.Unit getSelf();
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
*/
com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder getSelfOrBuilder();
/**
*
* An index into `interned_package_ids` of the Package containing
* this reference.
* *Must be a valid interned package Id string*
*
*
* int32 package_id_interned_str = 3;
* @return Whether the packageIdInternedStr field is set.
*/
boolean hasPackageIdInternedStr();
/**
*
* An index into `interned_package_ids` of the Package containing
* this reference.
* *Must be a valid interned package Id string*
*
*
* int32 package_id_interned_str = 3;
* @return The packageIdInternedStr.
*/
int getPackageIdInternedStr();
com.daml.daml_lf_dev.DamlLf2.PackageRef.SumCase getSumCase();
}
/**
*
* Package reference
*
*
* Protobuf type {@code daml_lf_2.PackageRef}
*/
public static final class PackageRef extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.PackageRef)
PackageRefOrBuilder {
private static final long serialVersionUID = 0L;
// Use PackageRef.newBuilder() to construct.
private PackageRef(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PackageRef() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PackageRef();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_PackageRef_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_PackageRef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.PackageRef.class, com.daml.daml_lf_dev.DamlLf2.PackageRef.Builder.class);
}
private int sumCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object sum_;
public enum SumCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SELF(1),
PACKAGE_ID_INTERNED_STR(3),
SUM_NOT_SET(0);
private final int value;
private SumCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SumCase valueOf(int value) {
return forNumber(value);
}
public static SumCase forNumber(int value) {
switch (value) {
case 1: return SELF;
case 3: return PACKAGE_ID_INTERNED_STR;
case 0: return SUM_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public static final int SELF_FIELD_NUMBER = 1;
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
* @return Whether the self field is set.
*/
@java.lang.Override
public boolean hasSelf() {
return sumCase_ == 1;
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
* @return The self.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Unit getSelf() {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder getSelfOrBuilder() {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
public static final int PACKAGE_ID_INTERNED_STR_FIELD_NUMBER = 3;
/**
*
* An index into `interned_package_ids` of the Package containing
* this reference.
* *Must be a valid interned package Id string*
*
*
* int32 package_id_interned_str = 3;
* @return Whether the packageIdInternedStr field is set.
*/
@java.lang.Override
public boolean hasPackageIdInternedStr() {
return sumCase_ == 3;
}
/**
*
* An index into `interned_package_ids` of the Package containing
* this reference.
* *Must be a valid interned package Id string*
*
*
* int32 package_id_interned_str = 3;
* @return The packageIdInternedStr.
*/
@java.lang.Override
public int getPackageIdInternedStr() {
if (sumCase_ == 3) {
return (java.lang.Integer) sum_;
}
return 0;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (sumCase_ == 1) {
output.writeMessage(1, (com.daml.daml_lf_dev.DamlLf2.Unit) sum_);
}
if (sumCase_ == 3) {
output.writeInt32(
3, (int)((java.lang.Integer) sum_));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sumCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.daml.daml_lf_dev.DamlLf2.Unit) sum_);
}
if (sumCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(
3, (int)((java.lang.Integer) sum_));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.daml.daml_lf_dev.DamlLf2.PackageRef)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.PackageRef other = (com.daml.daml_lf_dev.DamlLf2.PackageRef) obj;
if (!getSumCase().equals(other.getSumCase())) return false;
switch (sumCase_) {
case 1:
if (!getSelf()
.equals(other.getSelf())) return false;
break;
case 3:
if (getPackageIdInternedStr()
!= other.getPackageIdInternedStr()) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (sumCase_) {
case 1:
hash = (37 * hash) + SELF_FIELD_NUMBER;
hash = (53 * hash) + getSelf().hashCode();
break;
case 3:
hash = (37 * hash) + PACKAGE_ID_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getPackageIdInternedStr();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef 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.daml_lf_dev.DamlLf2.PackageRef parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef 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.daml_lf_dev.DamlLf2.PackageRef parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef 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.daml_lf_dev.DamlLf2.PackageRef parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef 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.daml_lf_dev.DamlLf2.PackageRef 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;
}
/**
*
* Package reference
*
*
* Protobuf type {@code daml_lf_2.PackageRef}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.PackageRef)
com.daml.daml_lf_dev.DamlLf2.PackageRefOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_PackageRef_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_PackageRef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.PackageRef.class, com.daml.daml_lf_dev.DamlLf2.PackageRef.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.PackageRef.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (selfBuilder_ != null) {
selfBuilder_.clear();
}
sumCase_ = 0;
sum_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_PackageRef_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.PackageRef getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.PackageRef.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.PackageRef build() {
com.daml.daml_lf_dev.DamlLf2.PackageRef result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.PackageRef buildPartial() {
com.daml.daml_lf_dev.DamlLf2.PackageRef result = new com.daml.daml_lf_dev.DamlLf2.PackageRef(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.PackageRef result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(com.daml.daml_lf_dev.DamlLf2.PackageRef result) {
result.sumCase_ = sumCase_;
result.sum_ = this.sum_;
if (sumCase_ == 1 &&
selfBuilder_ != null) {
result.sum_ = selfBuilder_.build();
}
}
@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.daml_lf_dev.DamlLf2.PackageRef) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.PackageRef)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.PackageRef other) {
if (other == com.daml.daml_lf_dev.DamlLf2.PackageRef.getDefaultInstance()) return this;
switch (other.getSumCase()) {
case SELF: {
mergeSelf(other.getSelf());
break;
}
case PACKAGE_ID_INTERNED_STR: {
setPackageIdInternedStr(other.getPackageIdInternedStr());
break;
}
case SUM_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getSelfFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 1;
break;
} // case 10
case 24: {
sum_ = input.readInt32();
sumCase_ = 3;
break;
} // case 24
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int sumCase_ = 0;
private java.lang.Object sum_;
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public Builder clearSum() {
sumCase_ = 0;
sum_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Unit, com.daml.daml_lf_dev.DamlLf2.Unit.Builder, com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder> selfBuilder_;
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
* @return Whether the self field is set.
*/
@java.lang.Override
public boolean hasSelf() {
return sumCase_ == 1;
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
* @return The self.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Unit getSelf() {
if (selfBuilder_ == null) {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
} else {
if (sumCase_ == 1) {
return selfBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
*/
public Builder setSelf(com.daml.daml_lf_dev.DamlLf2.Unit value) {
if (selfBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
selfBuilder_.setMessage(value);
}
sumCase_ = 1;
return this;
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
*/
public Builder setSelf(
com.daml.daml_lf_dev.DamlLf2.Unit.Builder builderForValue) {
if (selfBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
selfBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 1;
return this;
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
*/
public Builder mergeSelf(com.daml.daml_lf_dev.DamlLf2.Unit value) {
if (selfBuilder_ == null) {
if (sumCase_ == 1 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Unit.newBuilder((com.daml.daml_lf_dev.DamlLf2.Unit) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 1) {
selfBuilder_.mergeFrom(value);
} else {
selfBuilder_.setMessage(value);
}
}
sumCase_ = 1;
return this;
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
*/
public Builder clearSelf() {
if (selfBuilder_ == null) {
if (sumCase_ == 1) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 1) {
sumCase_ = 0;
sum_ = null;
}
selfBuilder_.clear();
}
return this;
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Unit.Builder getSelfBuilder() {
return getSelfFieldBuilder().getBuilder();
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder getSelfOrBuilder() {
if ((sumCase_ == 1) && (selfBuilder_ != null)) {
return selfBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
}
/**
*
* Reference to the package of which the package this reference
* belongs.
*
*
* .daml_lf_2.Unit self = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Unit, com.daml.daml_lf_dev.DamlLf2.Unit.Builder, com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder>
getSelfFieldBuilder() {
if (selfBuilder_ == null) {
if (!(sumCase_ == 1)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
selfBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Unit, com.daml.daml_lf_dev.DamlLf2.Unit.Builder, com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Unit) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 1;
onChanged();
return selfBuilder_;
}
/**
*
* An index into `interned_package_ids` of the Package containing
* this reference.
* *Must be a valid interned package Id string*
*
*
* int32 package_id_interned_str = 3;
* @return Whether the packageIdInternedStr field is set.
*/
public boolean hasPackageIdInternedStr() {
return sumCase_ == 3;
}
/**
*
* An index into `interned_package_ids` of the Package containing
* this reference.
* *Must be a valid interned package Id string*
*
*
* int32 package_id_interned_str = 3;
* @return The packageIdInternedStr.
*/
public int getPackageIdInternedStr() {
if (sumCase_ == 3) {
return (java.lang.Integer) sum_;
}
return 0;
}
/**
*
* An index into `interned_package_ids` of the Package containing
* this reference.
* *Must be a valid interned package Id string*
*
*
* int32 package_id_interned_str = 3;
* @param value The packageIdInternedStr to set.
* @return This builder for chaining.
*/
public Builder setPackageIdInternedStr(int value) {
sumCase_ = 3;
sum_ = value;
onChanged();
return this;
}
/**
*
* An index into `interned_package_ids` of the Package containing
* this reference.
* *Must be a valid interned package Id string*
*
*
* int32 package_id_interned_str = 3;
* @return This builder for chaining.
*/
public Builder clearPackageIdInternedStr() {
if (sumCase_ == 3) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:daml_lf_2.PackageRef)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.PackageRef)
private static final com.daml.daml_lf_dev.DamlLf2.PackageRef DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.PackageRef();
}
public static com.daml.daml_lf_dev.DamlLf2.PackageRef getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PackageRef 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.daml_lf_dev.DamlLf2.PackageRef getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ModuleRefOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.ModuleRef)
com.google.protobuf.MessageOrBuilder {
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
* @return Whether the packageRef field is set.
*/
boolean hasPackageRef();
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
* @return The packageRef.
*/
com.daml.daml_lf_dev.DamlLf2.PackageRef getPackageRef();
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
*/
com.daml.daml_lf_dev.DamlLf2.PackageRefOrBuilder getPackageRefOrBuilder();
/**
* int32 module_name_interned_dname = 2;
* @return The moduleNameInternedDname.
*/
int getModuleNameInternedDname();
}
/**
*
* A fully qualified module reference
*
*
* Protobuf type {@code daml_lf_2.ModuleRef}
*/
public static final class ModuleRef extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.ModuleRef)
ModuleRefOrBuilder {
private static final long serialVersionUID = 0L;
// Use ModuleRef.newBuilder() to construct.
private ModuleRef(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ModuleRef() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ModuleRef();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ModuleRef_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ModuleRef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.ModuleRef.class, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder.class);
}
private int bitField0_;
public static final int PACKAGE_REF_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.PackageRef packageRef_;
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
* @return Whether the packageRef field is set.
*/
@java.lang.Override
public boolean hasPackageRef() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
* @return The packageRef.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.PackageRef getPackageRef() {
return packageRef_ == null ? com.daml.daml_lf_dev.DamlLf2.PackageRef.getDefaultInstance() : packageRef_;
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.PackageRefOrBuilder getPackageRefOrBuilder() {
return packageRef_ == null ? com.daml.daml_lf_dev.DamlLf2.PackageRef.getDefaultInstance() : packageRef_;
}
public static final int MODULE_NAME_INTERNED_DNAME_FIELD_NUMBER = 2;
private int moduleNameInternedDname_ = 0;
/**
* int32 module_name_interned_dname = 2;
* @return The moduleNameInternedDname.
*/
@java.lang.Override
public int getModuleNameInternedDname() {
return moduleNameInternedDname_;
}
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, getPackageRef());
}
if (moduleNameInternedDname_ != 0) {
output.writeInt32(2, moduleNameInternedDname_);
}
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, getPackageRef());
}
if (moduleNameInternedDname_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, moduleNameInternedDname_);
}
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.daml_lf_dev.DamlLf2.ModuleRef)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.ModuleRef other = (com.daml.daml_lf_dev.DamlLf2.ModuleRef) obj;
if (hasPackageRef() != other.hasPackageRef()) return false;
if (hasPackageRef()) {
if (!getPackageRef()
.equals(other.getPackageRef())) return false;
}
if (getModuleNameInternedDname()
!= other.getModuleNameInternedDname()) 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 (hasPackageRef()) {
hash = (37 * hash) + PACKAGE_REF_FIELD_NUMBER;
hash = (53 * hash) + getPackageRef().hashCode();
}
hash = (37 * hash) + MODULE_NAME_INTERNED_DNAME_FIELD_NUMBER;
hash = (53 * hash) + getModuleNameInternedDname();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef 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.daml_lf_dev.DamlLf2.ModuleRef parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef 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.daml_lf_dev.DamlLf2.ModuleRef parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef 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.daml_lf_dev.DamlLf2.ModuleRef parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef 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.daml_lf_dev.DamlLf2.ModuleRef 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;
}
/**
*
* A fully qualified module reference
*
*
* Protobuf type {@code daml_lf_2.ModuleRef}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.ModuleRef)
com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ModuleRef_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ModuleRef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.ModuleRef.class, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.ModuleRef.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPackageRefFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
packageRef_ = null;
if (packageRefBuilder_ != null) {
packageRefBuilder_.dispose();
packageRefBuilder_ = null;
}
moduleNameInternedDname_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ModuleRef_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRef getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRef build() {
com.daml.daml_lf_dev.DamlLf2.ModuleRef result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRef buildPartial() {
com.daml.daml_lf_dev.DamlLf2.ModuleRef result = new com.daml.daml_lf_dev.DamlLf2.ModuleRef(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.ModuleRef result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.packageRef_ = packageRefBuilder_ == null
? packageRef_
: packageRefBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.moduleNameInternedDname_ = moduleNameInternedDname_;
}
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.daml_lf_dev.DamlLf2.ModuleRef) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.ModuleRef)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.ModuleRef other) {
if (other == com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance()) return this;
if (other.hasPackageRef()) {
mergePackageRef(other.getPackageRef());
}
if (other.getModuleNameInternedDname() != 0) {
setModuleNameInternedDname(other.getModuleNameInternedDname());
}
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(
getPackageRefFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
moduleNameInternedDname_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.daml.daml_lf_dev.DamlLf2.PackageRef packageRef_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.PackageRef, com.daml.daml_lf_dev.DamlLf2.PackageRef.Builder, com.daml.daml_lf_dev.DamlLf2.PackageRefOrBuilder> packageRefBuilder_;
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
* @return Whether the packageRef field is set.
*/
public boolean hasPackageRef() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
* @return The packageRef.
*/
public com.daml.daml_lf_dev.DamlLf2.PackageRef getPackageRef() {
if (packageRefBuilder_ == null) {
return packageRef_ == null ? com.daml.daml_lf_dev.DamlLf2.PackageRef.getDefaultInstance() : packageRef_;
} else {
return packageRefBuilder_.getMessage();
}
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
*/
public Builder setPackageRef(com.daml.daml_lf_dev.DamlLf2.PackageRef value) {
if (packageRefBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
packageRef_ = value;
} else {
packageRefBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
*/
public Builder setPackageRef(
com.daml.daml_lf_dev.DamlLf2.PackageRef.Builder builderForValue) {
if (packageRefBuilder_ == null) {
packageRef_ = builderForValue.build();
} else {
packageRefBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
*/
public Builder mergePackageRef(com.daml.daml_lf_dev.DamlLf2.PackageRef value) {
if (packageRefBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
packageRef_ != null &&
packageRef_ != com.daml.daml_lf_dev.DamlLf2.PackageRef.getDefaultInstance()) {
getPackageRefBuilder().mergeFrom(value);
} else {
packageRef_ = value;
}
} else {
packageRefBuilder_.mergeFrom(value);
}
if (packageRef_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
*/
public Builder clearPackageRef() {
bitField0_ = (bitField0_ & ~0x00000001);
packageRef_ = null;
if (packageRefBuilder_ != null) {
packageRefBuilder_.dispose();
packageRefBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.PackageRef.Builder getPackageRefBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getPackageRefFieldBuilder().getBuilder();
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.PackageRefOrBuilder getPackageRefOrBuilder() {
if (packageRefBuilder_ != null) {
return packageRefBuilder_.getMessageOrBuilder();
} else {
return packageRef_ == null ?
com.daml.daml_lf_dev.DamlLf2.PackageRef.getDefaultInstance() : packageRef_;
}
}
/**
*
* package where the module is defined.
*
*
* .daml_lf_2.PackageRef package_ref = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.PackageRef, com.daml.daml_lf_dev.DamlLf2.PackageRef.Builder, com.daml.daml_lf_dev.DamlLf2.PackageRefOrBuilder>
getPackageRefFieldBuilder() {
if (packageRefBuilder_ == null) {
packageRefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.PackageRef, com.daml.daml_lf_dev.DamlLf2.PackageRef.Builder, com.daml.daml_lf_dev.DamlLf2.PackageRefOrBuilder>(
getPackageRef(),
getParentForChildren(),
isClean());
packageRef_ = null;
}
return packageRefBuilder_;
}
private int moduleNameInternedDname_ ;
/**
* int32 module_name_interned_dname = 2;
* @return The moduleNameInternedDname.
*/
@java.lang.Override
public int getModuleNameInternedDname() {
return moduleNameInternedDname_;
}
/**
* int32 module_name_interned_dname = 2;
* @param value The moduleNameInternedDname to set.
* @return This builder for chaining.
*/
public Builder setModuleNameInternedDname(int value) {
moduleNameInternedDname_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* int32 module_name_interned_dname = 2;
* @return This builder for chaining.
*/
public Builder clearModuleNameInternedDname() {
bitField0_ = (bitField0_ & ~0x00000002);
moduleNameInternedDname_ = 0;
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:daml_lf_2.ModuleRef)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.ModuleRef)
private static final com.daml.daml_lf_dev.DamlLf2.ModuleRef DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.ModuleRef();
}
public static com.daml.daml_lf_dev.DamlLf2.ModuleRef getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ModuleRef 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.daml_lf_dev.DamlLf2.ModuleRef getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TypeConNameOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.TypeConName)
com.google.protobuf.MessageOrBuilder {
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
boolean hasModule();
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule();
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder();
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return The nameInternedDname.
*/
int getNameInternedDname();
}
/**
*
* A fully qualified reference to a type constructor name.
*
*
* Protobuf type {@code daml_lf_2.TypeConName}
*/
public static final class TypeConName extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.TypeConName)
TypeConNameOrBuilder {
private static final long serialVersionUID = 0L;
// Use TypeConName.newBuilder() to construct.
private TypeConName(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TypeConName() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TypeConName();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeConName_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeConName_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.TypeConName.class, com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder.class);
}
private int bitField0_;
public static final int MODULE_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.ModuleRef module_;
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
@java.lang.Override
public boolean hasModule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule() {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder() {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
public static final int NAME_INTERNED_DNAME_FIELD_NUMBER = 2;
private int nameInternedDname_ = 0;
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return The nameInternedDname.
*/
@java.lang.Override
public int getNameInternedDname() {
return nameInternedDname_;
}
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, getModule());
}
if (nameInternedDname_ != 0) {
output.writeInt32(2, nameInternedDname_);
}
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, getModule());
}
if (nameInternedDname_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, nameInternedDname_);
}
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.daml_lf_dev.DamlLf2.TypeConName)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.TypeConName other = (com.daml.daml_lf_dev.DamlLf2.TypeConName) obj;
if (hasModule() != other.hasModule()) return false;
if (hasModule()) {
if (!getModule()
.equals(other.getModule())) return false;
}
if (getNameInternedDname()
!= other.getNameInternedDname()) 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 (hasModule()) {
hash = (37 * hash) + MODULE_FIELD_NUMBER;
hash = (53 * hash) + getModule().hashCode();
}
hash = (37 * hash) + NAME_INTERNED_DNAME_FIELD_NUMBER;
hash = (53 * hash) + getNameInternedDname();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName 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.daml_lf_dev.DamlLf2.TypeConName parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName 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.daml_lf_dev.DamlLf2.TypeConName parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName 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.daml_lf_dev.DamlLf2.TypeConName parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName 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.daml_lf_dev.DamlLf2.TypeConName 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;
}
/**
*
* A fully qualified reference to a type constructor name.
*
*
* Protobuf type {@code daml_lf_2.TypeConName}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.TypeConName)
com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeConName_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeConName_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.TypeConName.class, com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.TypeConName.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getModuleFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
module_ = null;
if (moduleBuilder_ != null) {
moduleBuilder_.dispose();
moduleBuilder_ = null;
}
nameInternedDname_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeConName_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeConName getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeConName build() {
com.daml.daml_lf_dev.DamlLf2.TypeConName result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeConName buildPartial() {
com.daml.daml_lf_dev.DamlLf2.TypeConName result = new com.daml.daml_lf_dev.DamlLf2.TypeConName(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.TypeConName result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.module_ = moduleBuilder_ == null
? module_
: moduleBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.nameInternedDname_ = nameInternedDname_;
}
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.daml_lf_dev.DamlLf2.TypeConName) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.TypeConName)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.TypeConName other) {
if (other == com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance()) return this;
if (other.hasModule()) {
mergeModule(other.getModule());
}
if (other.getNameInternedDname() != 0) {
setNameInternedDname(other.getNameInternedDname());
}
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(
getModuleFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
nameInternedDname_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.daml.daml_lf_dev.DamlLf2.ModuleRef module_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder> moduleBuilder_;
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
public boolean hasModule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule() {
if (moduleBuilder_ == null) {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
} else {
return moduleBuilder_.getMessage();
}
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder setModule(com.daml.daml_lf_dev.DamlLf2.ModuleRef value) {
if (moduleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
module_ = value;
} else {
moduleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder setModule(
com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder builderForValue) {
if (moduleBuilder_ == null) {
module_ = builderForValue.build();
} else {
moduleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder mergeModule(com.daml.daml_lf_dev.DamlLf2.ModuleRef value) {
if (moduleBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
module_ != null &&
module_ != com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance()) {
getModuleBuilder().mergeFrom(value);
} else {
module_ = value;
}
} else {
moduleBuilder_.mergeFrom(value);
}
if (module_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder clearModule() {
bitField0_ = (bitField0_ & ~0x00000001);
module_ = null;
if (moduleBuilder_ != null) {
moduleBuilder_.dispose();
moduleBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder getModuleBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getModuleFieldBuilder().getBuilder();
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder() {
if (moduleBuilder_ != null) {
return moduleBuilder_.getMessageOrBuilder();
} else {
return module_ == null ?
com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder>
getModuleFieldBuilder() {
if (moduleBuilder_ == null) {
moduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder>(
getModule(),
getParentForChildren(),
isClean());
module_ = null;
}
return moduleBuilder_;
}
private int nameInternedDname_ ;
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return The nameInternedDname.
*/
@java.lang.Override
public int getNameInternedDname() {
return nameInternedDname_;
}
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @param value The nameInternedDname to set.
* @return This builder for chaining.
*/
public Builder setNameInternedDname(int value) {
nameInternedDname_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return This builder for chaining.
*/
public Builder clearNameInternedDname() {
bitField0_ = (bitField0_ & ~0x00000002);
nameInternedDname_ = 0;
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:daml_lf_2.TypeConName)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.TypeConName)
private static final com.daml.daml_lf_dev.DamlLf2.TypeConName DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.TypeConName();
}
public static com.daml.daml_lf_dev.DamlLf2.TypeConName getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TypeConName 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.daml_lf_dev.DamlLf2.TypeConName getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TypeSynNameOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.TypeSynName)
com.google.protobuf.MessageOrBuilder {
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
boolean hasModule();
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule();
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder();
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return The nameInternedDname.
*/
int getNameInternedDname();
}
/**
*
* A fully qualified reference to a type synonym name.
*
*
* Protobuf type {@code daml_lf_2.TypeSynName}
*/
public static final class TypeSynName extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.TypeSynName)
TypeSynNameOrBuilder {
private static final long serialVersionUID = 0L;
// Use TypeSynName.newBuilder() to construct.
private TypeSynName(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TypeSynName() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TypeSynName();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeSynName_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeSynName_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.TypeSynName.class, com.daml.daml_lf_dev.DamlLf2.TypeSynName.Builder.class);
}
private int bitField0_;
public static final int MODULE_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.ModuleRef module_;
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
@java.lang.Override
public boolean hasModule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule() {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder() {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
public static final int NAME_INTERNED_DNAME_FIELD_NUMBER = 2;
private int nameInternedDname_ = 0;
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return The nameInternedDname.
*/
@java.lang.Override
public int getNameInternedDname() {
return nameInternedDname_;
}
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, getModule());
}
if (nameInternedDname_ != 0) {
output.writeInt32(2, nameInternedDname_);
}
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, getModule());
}
if (nameInternedDname_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, nameInternedDname_);
}
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.daml_lf_dev.DamlLf2.TypeSynName)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.TypeSynName other = (com.daml.daml_lf_dev.DamlLf2.TypeSynName) obj;
if (hasModule() != other.hasModule()) return false;
if (hasModule()) {
if (!getModule()
.equals(other.getModule())) return false;
}
if (getNameInternedDname()
!= other.getNameInternedDname()) 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 (hasModule()) {
hash = (37 * hash) + MODULE_FIELD_NUMBER;
hash = (53 * hash) + getModule().hashCode();
}
hash = (37 * hash) + NAME_INTERNED_DNAME_FIELD_NUMBER;
hash = (53 * hash) + getNameInternedDname();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName 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.daml_lf_dev.DamlLf2.TypeSynName parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName 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.daml_lf_dev.DamlLf2.TypeSynName parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName 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.daml_lf_dev.DamlLf2.TypeSynName parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName 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.daml_lf_dev.DamlLf2.TypeSynName 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;
}
/**
*
* A fully qualified reference to a type synonym name.
*
*
* Protobuf type {@code daml_lf_2.TypeSynName}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.TypeSynName)
com.daml.daml_lf_dev.DamlLf2.TypeSynNameOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeSynName_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeSynName_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.TypeSynName.class, com.daml.daml_lf_dev.DamlLf2.TypeSynName.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.TypeSynName.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getModuleFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
module_ = null;
if (moduleBuilder_ != null) {
moduleBuilder_.dispose();
moduleBuilder_ = null;
}
nameInternedDname_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeSynName_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeSynName getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.TypeSynName.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeSynName build() {
com.daml.daml_lf_dev.DamlLf2.TypeSynName result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeSynName buildPartial() {
com.daml.daml_lf_dev.DamlLf2.TypeSynName result = new com.daml.daml_lf_dev.DamlLf2.TypeSynName(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.TypeSynName result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.module_ = moduleBuilder_ == null
? module_
: moduleBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.nameInternedDname_ = nameInternedDname_;
}
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.daml_lf_dev.DamlLf2.TypeSynName) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.TypeSynName)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.TypeSynName other) {
if (other == com.daml.daml_lf_dev.DamlLf2.TypeSynName.getDefaultInstance()) return this;
if (other.hasModule()) {
mergeModule(other.getModule());
}
if (other.getNameInternedDname() != 0) {
setNameInternedDname(other.getNameInternedDname());
}
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(
getModuleFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
nameInternedDname_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.daml.daml_lf_dev.DamlLf2.ModuleRef module_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder> moduleBuilder_;
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
public boolean hasModule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule() {
if (moduleBuilder_ == null) {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
} else {
return moduleBuilder_.getMessage();
}
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder setModule(com.daml.daml_lf_dev.DamlLf2.ModuleRef value) {
if (moduleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
module_ = value;
} else {
moduleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder setModule(
com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder builderForValue) {
if (moduleBuilder_ == null) {
module_ = builderForValue.build();
} else {
moduleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder mergeModule(com.daml.daml_lf_dev.DamlLf2.ModuleRef value) {
if (moduleBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
module_ != null &&
module_ != com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance()) {
getModuleBuilder().mergeFrom(value);
} else {
module_ = value;
}
} else {
moduleBuilder_.mergeFrom(value);
}
if (module_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder clearModule() {
bitField0_ = (bitField0_ & ~0x00000001);
module_ = null;
if (moduleBuilder_ != null) {
moduleBuilder_.dispose();
moduleBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder getModuleBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getModuleFieldBuilder().getBuilder();
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder() {
if (moduleBuilder_ != null) {
return moduleBuilder_.getMessageOrBuilder();
} else {
return module_ == null ?
com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
}
/**
*
* Module where the type is defined.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder>
getModuleFieldBuilder() {
if (moduleBuilder_ == null) {
moduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder>(
getModule(),
getParentForChildren(),
isClean());
module_ = null;
}
return moduleBuilder_;
}
private int nameInternedDname_ ;
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return The nameInternedDname.
*/
@java.lang.Override
public int getNameInternedDname() {
return nameInternedDname_;
}
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @param value The nameInternedDname to set.
* @return This builder for chaining.
*/
public Builder setNameInternedDname(int value) {
nameInternedDname_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return This builder for chaining.
*/
public Builder clearNameInternedDname() {
bitField0_ = (bitField0_ & ~0x00000002);
nameInternedDname_ = 0;
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:daml_lf_2.TypeSynName)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.TypeSynName)
private static final com.daml.daml_lf_dev.DamlLf2.TypeSynName DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.TypeSynName();
}
public static com.daml.daml_lf_dev.DamlLf2.TypeSynName getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TypeSynName 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.daml_lf_dev.DamlLf2.TypeSynName getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ValNameOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.ValName)
com.google.protobuf.MessageOrBuilder {
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
boolean hasModule();
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule();
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder();
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return The nameInternedDname.
*/
int getNameInternedDname();
}
/**
*
* A fully qualified reference to a value definition.
*
*
* Protobuf type {@code daml_lf_2.ValName}
*/
public static final class ValName extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.ValName)
ValNameOrBuilder {
private static final long serialVersionUID = 0L;
// Use ValName.newBuilder() to construct.
private ValName(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ValName() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ValName();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ValName_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ValName_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.ValName.class, com.daml.daml_lf_dev.DamlLf2.ValName.Builder.class);
}
private int bitField0_;
public static final int MODULE_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.ModuleRef module_;
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
@java.lang.Override
public boolean hasModule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule() {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder() {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
public static final int NAME_INTERNED_DNAME_FIELD_NUMBER = 2;
private int nameInternedDname_ = 0;
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return The nameInternedDname.
*/
@java.lang.Override
public int getNameInternedDname() {
return nameInternedDname_;
}
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, getModule());
}
if (nameInternedDname_ != 0) {
output.writeInt32(2, nameInternedDname_);
}
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, getModule());
}
if (nameInternedDname_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, nameInternedDname_);
}
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.daml_lf_dev.DamlLf2.ValName)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.ValName other = (com.daml.daml_lf_dev.DamlLf2.ValName) obj;
if (hasModule() != other.hasModule()) return false;
if (hasModule()) {
if (!getModule()
.equals(other.getModule())) return false;
}
if (getNameInternedDname()
!= other.getNameInternedDname()) 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 (hasModule()) {
hash = (37 * hash) + MODULE_FIELD_NUMBER;
hash = (53 * hash) + getModule().hashCode();
}
hash = (37 * hash) + NAME_INTERNED_DNAME_FIELD_NUMBER;
hash = (53 * hash) + getNameInternedDname();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.ValName parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.ValName parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.ValName parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.ValName 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.daml_lf_dev.DamlLf2.ValName parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.ValName parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.ValName parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.ValName 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.daml_lf_dev.DamlLf2.ValName parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.ValName 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.daml_lf_dev.DamlLf2.ValName parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.ValName 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.daml_lf_dev.DamlLf2.ValName 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;
}
/**
*
* A fully qualified reference to a value definition.
*
*
* Protobuf type {@code daml_lf_2.ValName}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.ValName)
com.daml.daml_lf_dev.DamlLf2.ValNameOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ValName_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ValName_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.ValName.class, com.daml.daml_lf_dev.DamlLf2.ValName.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.ValName.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getModuleFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
module_ = null;
if (moduleBuilder_ != null) {
moduleBuilder_.dispose();
moduleBuilder_ = null;
}
nameInternedDname_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_ValName_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ValName getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.ValName.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ValName build() {
com.daml.daml_lf_dev.DamlLf2.ValName result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ValName buildPartial() {
com.daml.daml_lf_dev.DamlLf2.ValName result = new com.daml.daml_lf_dev.DamlLf2.ValName(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.ValName result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.module_ = moduleBuilder_ == null
? module_
: moduleBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.nameInternedDname_ = nameInternedDname_;
}
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.daml_lf_dev.DamlLf2.ValName) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.ValName)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.ValName other) {
if (other == com.daml.daml_lf_dev.DamlLf2.ValName.getDefaultInstance()) return this;
if (other.hasModule()) {
mergeModule(other.getModule());
}
if (other.getNameInternedDname() != 0) {
setNameInternedDname(other.getNameInternedDname());
}
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(
getModuleFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
nameInternedDname_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.daml.daml_lf_dev.DamlLf2.ModuleRef module_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder> moduleBuilder_;
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
public boolean hasModule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule() {
if (moduleBuilder_ == null) {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
} else {
return moduleBuilder_.getMessage();
}
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder setModule(com.daml.daml_lf_dev.DamlLf2.ModuleRef value) {
if (moduleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
module_ = value;
} else {
moduleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder setModule(
com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder builderForValue) {
if (moduleBuilder_ == null) {
module_ = builderForValue.build();
} else {
moduleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder mergeModule(com.daml.daml_lf_dev.DamlLf2.ModuleRef value) {
if (moduleBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
module_ != null &&
module_ != com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance()) {
getModuleBuilder().mergeFrom(value);
} else {
module_ = value;
}
} else {
moduleBuilder_.mergeFrom(value);
}
if (module_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder clearModule() {
bitField0_ = (bitField0_ & ~0x00000001);
module_ = null;
if (moduleBuilder_ != null) {
moduleBuilder_.dispose();
moduleBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder getModuleBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getModuleFieldBuilder().getBuilder();
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder() {
if (moduleBuilder_ != null) {
return moduleBuilder_.getMessageOrBuilder();
} else {
return module_ == null ?
com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
}
/**
*
* Module where the value is defined
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder>
getModuleFieldBuilder() {
if (moduleBuilder_ == null) {
moduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder>(
getModule(),
getParentForChildren(),
isClean());
module_ = null;
}
return moduleBuilder_;
}
private int nameInternedDname_ ;
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return The nameInternedDname.
*/
@java.lang.Override
public int getNameInternedDname() {
return nameInternedDname_;
}
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @param value The nameInternedDname to set.
* @return This builder for chaining.
*/
public Builder setNameInternedDname(int value) {
nameInternedDname_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* *Must be a valid interned name*
*
*
* int32 name_interned_dname = 2;
* @return This builder for chaining.
*/
public Builder clearNameInternedDname() {
bitField0_ = (bitField0_ & ~0x00000002);
nameInternedDname_ = 0;
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:daml_lf_2.ValName)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.ValName)
private static final com.daml.daml_lf_dev.DamlLf2.ValName DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.ValName();
}
public static com.daml.daml_lf_dev.DamlLf2.ValName getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ValName 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.daml_lf_dev.DamlLf2.ValName getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FieldWithTypeOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.FieldWithType)
com.google.protobuf.MessageOrBuilder {
/**
*
* *Must a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @return The fieldInternedStr.
*/
int getFieldInternedStr();
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
* @return Whether the type field is set.
*/
boolean hasType();
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
* @return The type.
*/
com.daml.daml_lf_dev.DamlLf2.Type getType();
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
*/
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypeOrBuilder();
}
/**
*
* A field name definition in a record or a variant associated with a type.
*
*
* Protobuf type {@code daml_lf_2.FieldWithType}
*/
public static final class FieldWithType extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.FieldWithType)
FieldWithTypeOrBuilder {
private static final long serialVersionUID = 0L;
// Use FieldWithType.newBuilder() to construct.
private FieldWithType(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FieldWithType() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FieldWithType();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithType_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.FieldWithType.class, com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder.class);
}
private int bitField0_;
public static final int FIELD_INTERNED_STR_FIELD_NUMBER = 3;
private int fieldInternedStr_ = 0;
/**
*
* *Must a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
public static final int TYPE_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Type type_;
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
* @return Whether the type field is set.
*/
@java.lang.Override
public boolean hasType() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
* @return The type.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type getType() {
return type_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : type_;
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypeOrBuilder() {
return type_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : type_;
}
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(2, getType());
}
if (fieldInternedStr_ != 0) {
output.writeInt32(3, fieldInternedStr_);
}
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(2, getType());
}
if (fieldInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, fieldInternedStr_);
}
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.daml_lf_dev.DamlLf2.FieldWithType)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.FieldWithType other = (com.daml.daml_lf_dev.DamlLf2.FieldWithType) obj;
if (getFieldInternedStr()
!= other.getFieldInternedStr()) return false;
if (hasType() != other.hasType()) return false;
if (hasType()) {
if (!getType()
.equals(other.getType())) 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) + FIELD_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getFieldInternedStr();
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType 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.daml_lf_dev.DamlLf2.FieldWithType parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType 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.daml_lf_dev.DamlLf2.FieldWithType parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType 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.daml_lf_dev.DamlLf2.FieldWithType parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType 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.daml_lf_dev.DamlLf2.FieldWithType 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;
}
/**
*
* A field name definition in a record or a variant associated with a type.
*
*
* Protobuf type {@code daml_lf_2.FieldWithType}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.FieldWithType)
com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithType_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.FieldWithType.class, com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.FieldWithType.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTypeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
fieldInternedStr_ = 0;
type_ = null;
if (typeBuilder_ != null) {
typeBuilder_.dispose();
typeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithType_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithType getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.FieldWithType.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithType build() {
com.daml.daml_lf_dev.DamlLf2.FieldWithType result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithType buildPartial() {
com.daml.daml_lf_dev.DamlLf2.FieldWithType result = new com.daml.daml_lf_dev.DamlLf2.FieldWithType(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.FieldWithType result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.fieldInternedStr_ = fieldInternedStr_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.type_ = typeBuilder_ == null
? type_
: typeBuilder_.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.daml_lf_dev.DamlLf2.FieldWithType) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.FieldWithType)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.FieldWithType other) {
if (other == com.daml.daml_lf_dev.DamlLf2.FieldWithType.getDefaultInstance()) return this;
if (other.getFieldInternedStr() != 0) {
setFieldInternedStr(other.getFieldInternedStr());
}
if (other.hasType()) {
mergeType(other.getType());
}
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 18: {
input.readMessage(
getTypeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
fieldInternedStr_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 24
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 int fieldInternedStr_ ;
/**
*
* *Must a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
/**
*
* *Must a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @param value The fieldInternedStr to set.
* @return This builder for chaining.
*/
public Builder setFieldInternedStr(int value) {
fieldInternedStr_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* *Must a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @return This builder for chaining.
*/
public Builder clearFieldInternedStr() {
bitField0_ = (bitField0_ & ~0x00000001);
fieldInternedStr_ = 0;
onChanged();
return this;
}
private com.daml.daml_lf_dev.DamlLf2.Type type_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder> typeBuilder_;
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
* @return Whether the type field is set.
*/
public boolean hasType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
* @return The type.
*/
public com.daml.daml_lf_dev.DamlLf2.Type getType() {
if (typeBuilder_ == null) {
return type_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : type_;
} else {
return typeBuilder_.getMessage();
}
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
*/
public Builder setType(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (typeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
type_ = value;
} else {
typeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
*/
public Builder setType(
com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (typeBuilder_ == null) {
type_ = builderForValue.build();
} else {
typeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
*/
public Builder mergeType(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (typeBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
type_ != null &&
type_ != com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance()) {
getTypeBuilder().mergeFrom(value);
} else {
type_ = value;
}
} else {
typeBuilder_.mergeFrom(value);
}
if (type_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000002);
type_ = null;
if (typeBuilder_ != null) {
typeBuilder_.dispose();
typeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder getTypeBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getTypeFieldBuilder().getBuilder();
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypeOrBuilder() {
if (typeBuilder_ != null) {
return typeBuilder_.getMessageOrBuilder();
} else {
return type_ == null ?
com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : type_;
}
}
/**
*
* Type associated
*
*
* .daml_lf_2.Type type = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getTypeFieldBuilder() {
if (typeBuilder_ == null) {
typeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>(
getType(),
getParentForChildren(),
isClean());
type_ = null;
}
return typeBuilder_;
}
@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:daml_lf_2.FieldWithType)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.FieldWithType)
private static final com.daml.daml_lf_dev.DamlLf2.FieldWithType DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.FieldWithType();
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithType getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FieldWithType 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.daml_lf_dev.DamlLf2.FieldWithType getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface VarWithTypeOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.VarWithType)
com.google.protobuf.MessageOrBuilder {
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return The varInternedStr.
*/
int getVarInternedStr();
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
* @return Whether the type field is set.
*/
boolean hasType();
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
* @return The type.
*/
com.daml.daml_lf_dev.DamlLf2.Type getType();
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
*/
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypeOrBuilder();
}
/**
*
* Binder associated with a type.
*
*
* Protobuf type {@code daml_lf_2.VarWithType}
*/
public static final class VarWithType extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.VarWithType)
VarWithTypeOrBuilder {
private static final long serialVersionUID = 0L;
// Use VarWithType.newBuilder() to construct.
private VarWithType(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private VarWithType() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new VarWithType();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_VarWithType_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_VarWithType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.VarWithType.class, com.daml.daml_lf_dev.DamlLf2.VarWithType.Builder.class);
}
private int bitField0_;
public static final int VAR_INTERNED_STR_FIELD_NUMBER = 3;
private int varInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return The varInternedStr.
*/
@java.lang.Override
public int getVarInternedStr() {
return varInternedStr_;
}
public static final int TYPE_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Type type_;
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
* @return Whether the type field is set.
*/
@java.lang.Override
public boolean hasType() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
* @return The type.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type getType() {
return type_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : type_;
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypeOrBuilder() {
return type_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : type_;
}
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(2, getType());
}
if (varInternedStr_ != 0) {
output.writeInt32(3, varInternedStr_);
}
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(2, getType());
}
if (varInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, varInternedStr_);
}
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.daml_lf_dev.DamlLf2.VarWithType)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.VarWithType other = (com.daml.daml_lf_dev.DamlLf2.VarWithType) obj;
if (getVarInternedStr()
!= other.getVarInternedStr()) return false;
if (hasType() != other.hasType()) return false;
if (hasType()) {
if (!getType()
.equals(other.getType())) 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) + VAR_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getVarInternedStr();
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType 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.daml_lf_dev.DamlLf2.VarWithType parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType 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.daml_lf_dev.DamlLf2.VarWithType parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType 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.daml_lf_dev.DamlLf2.VarWithType parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType 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.daml_lf_dev.DamlLf2.VarWithType 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;
}
/**
*
* Binder associated with a type.
*
*
* Protobuf type {@code daml_lf_2.VarWithType}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.VarWithType)
com.daml.daml_lf_dev.DamlLf2.VarWithTypeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_VarWithType_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_VarWithType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.VarWithType.class, com.daml.daml_lf_dev.DamlLf2.VarWithType.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.VarWithType.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTypeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
varInternedStr_ = 0;
type_ = null;
if (typeBuilder_ != null) {
typeBuilder_.dispose();
typeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_VarWithType_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.VarWithType getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.VarWithType.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.VarWithType build() {
com.daml.daml_lf_dev.DamlLf2.VarWithType result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.VarWithType buildPartial() {
com.daml.daml_lf_dev.DamlLf2.VarWithType result = new com.daml.daml_lf_dev.DamlLf2.VarWithType(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.VarWithType result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.varInternedStr_ = varInternedStr_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.type_ = typeBuilder_ == null
? type_
: typeBuilder_.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.daml_lf_dev.DamlLf2.VarWithType) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.VarWithType)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.VarWithType other) {
if (other == com.daml.daml_lf_dev.DamlLf2.VarWithType.getDefaultInstance()) return this;
if (other.getVarInternedStr() != 0) {
setVarInternedStr(other.getVarInternedStr());
}
if (other.hasType()) {
mergeType(other.getType());
}
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 18: {
input.readMessage(
getTypeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
varInternedStr_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 24
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 int varInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return The varInternedStr.
*/
@java.lang.Override
public int getVarInternedStr() {
return varInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @param value The varInternedStr to set.
* @return This builder for chaining.
*/
public Builder setVarInternedStr(int value) {
varInternedStr_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return This builder for chaining.
*/
public Builder clearVarInternedStr() {
bitField0_ = (bitField0_ & ~0x00000001);
varInternedStr_ = 0;
onChanged();
return this;
}
private com.daml.daml_lf_dev.DamlLf2.Type type_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder> typeBuilder_;
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
* @return Whether the type field is set.
*/
public boolean hasType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
* @return The type.
*/
public com.daml.daml_lf_dev.DamlLf2.Type getType() {
if (typeBuilder_ == null) {
return type_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : type_;
} else {
return typeBuilder_.getMessage();
}
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
*/
public Builder setType(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (typeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
type_ = value;
} else {
typeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
*/
public Builder setType(
com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (typeBuilder_ == null) {
type_ = builderForValue.build();
} else {
typeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
*/
public Builder mergeType(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (typeBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
type_ != null &&
type_ != com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance()) {
getTypeBuilder().mergeFrom(value);
} else {
type_ = value;
}
} else {
typeBuilder_.mergeFrom(value);
}
if (type_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000002);
type_ = null;
if (typeBuilder_ != null) {
typeBuilder_.dispose();
typeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder getTypeBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getTypeFieldBuilder().getBuilder();
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypeOrBuilder() {
if (typeBuilder_ != null) {
return typeBuilder_.getMessageOrBuilder();
} else {
return type_ == null ?
com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : type_;
}
}
/**
*
* Type of the bound variable
*
*
* .daml_lf_2.Type type = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getTypeFieldBuilder() {
if (typeBuilder_ == null) {
typeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>(
getType(),
getParentForChildren(),
isClean());
type_ = null;
}
return typeBuilder_;
}
@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:daml_lf_2.VarWithType)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.VarWithType)
private static final com.daml.daml_lf_dev.DamlLf2.VarWithType DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.VarWithType();
}
public static com.daml.daml_lf_dev.DamlLf2.VarWithType getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VarWithType 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.daml_lf_dev.DamlLf2.VarWithType getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TypeVarWithKindOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.TypeVarWithKind)
com.google.protobuf.MessageOrBuilder {
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return The varInternedStr.
*/
int getVarInternedStr();
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
* @return Whether the kind field is set.
*/
boolean hasKind();
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
* @return The kind.
*/
com.daml.daml_lf_dev.DamlLf2.Kind getKind();
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
*/
com.daml.daml_lf_dev.DamlLf2.KindOrBuilder getKindOrBuilder();
}
/**
*
* Type binder associated with a kind.
*
*
* Protobuf type {@code daml_lf_2.TypeVarWithKind}
*/
public static final class TypeVarWithKind extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.TypeVarWithKind)
TypeVarWithKindOrBuilder {
private static final long serialVersionUID = 0L;
// Use TypeVarWithKind.newBuilder() to construct.
private TypeVarWithKind(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TypeVarWithKind() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TypeVarWithKind();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeVarWithKind_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeVarWithKind_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.class, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder.class);
}
private int bitField0_;
public static final int VAR_INTERNED_STR_FIELD_NUMBER = 3;
private int varInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return The varInternedStr.
*/
@java.lang.Override
public int getVarInternedStr() {
return varInternedStr_;
}
public static final int KIND_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Kind kind_;
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
* @return Whether the kind field is set.
*/
@java.lang.Override
public boolean hasKind() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
* @return The kind.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind getKind() {
return kind_ == null ? com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance() : kind_;
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.KindOrBuilder getKindOrBuilder() {
return kind_ == null ? com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance() : kind_;
}
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(2, getKind());
}
if (varInternedStr_ != 0) {
output.writeInt32(3, varInternedStr_);
}
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(2, getKind());
}
if (varInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, varInternedStr_);
}
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.daml_lf_dev.DamlLf2.TypeVarWithKind)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind other = (com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind) obj;
if (getVarInternedStr()
!= other.getVarInternedStr()) return false;
if (hasKind() != other.hasKind()) return false;
if (hasKind()) {
if (!getKind()
.equals(other.getKind())) 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) + VAR_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getVarInternedStr();
if (hasKind()) {
hash = (37 * hash) + KIND_FIELD_NUMBER;
hash = (53 * hash) + getKind().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind 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.daml_lf_dev.DamlLf2.TypeVarWithKind parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind 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.daml_lf_dev.DamlLf2.TypeVarWithKind parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind 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.daml_lf_dev.DamlLf2.TypeVarWithKind parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind 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.daml_lf_dev.DamlLf2.TypeVarWithKind 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;
}
/**
*
* Type binder associated with a kind.
*
*
* Protobuf type {@code daml_lf_2.TypeVarWithKind}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.TypeVarWithKind)
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeVarWithKind_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeVarWithKind_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.class, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getKindFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
varInternedStr_ = 0;
kind_ = null;
if (kindBuilder_ != null) {
kindBuilder_.dispose();
kindBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_TypeVarWithKind_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind build() {
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind buildPartial() {
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind result = new com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.varInternedStr_ = varInternedStr_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.kind_ = kindBuilder_ == null
? kind_
: kindBuilder_.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.daml_lf_dev.DamlLf2.TypeVarWithKind) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind other) {
if (other == com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.getDefaultInstance()) return this;
if (other.getVarInternedStr() != 0) {
setVarInternedStr(other.getVarInternedStr());
}
if (other.hasKind()) {
mergeKind(other.getKind());
}
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 18: {
input.readMessage(
getKindFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
varInternedStr_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 24
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 int varInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return The varInternedStr.
*/
@java.lang.Override
public int getVarInternedStr() {
return varInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @param value The varInternedStr to set.
* @return This builder for chaining.
*/
public Builder setVarInternedStr(int value) {
varInternedStr_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return This builder for chaining.
*/
public Builder clearVarInternedStr() {
bitField0_ = (bitField0_ & ~0x00000001);
varInternedStr_ = 0;
onChanged();
return this;
}
private com.daml.daml_lf_dev.DamlLf2.Kind kind_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind, com.daml.daml_lf_dev.DamlLf2.Kind.Builder, com.daml.daml_lf_dev.DamlLf2.KindOrBuilder> kindBuilder_;
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
* @return Whether the kind field is set.
*/
public boolean hasKind() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
* @return The kind.
*/
public com.daml.daml_lf_dev.DamlLf2.Kind getKind() {
if (kindBuilder_ == null) {
return kind_ == null ? com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance() : kind_;
} else {
return kindBuilder_.getMessage();
}
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
*/
public Builder setKind(com.daml.daml_lf_dev.DamlLf2.Kind value) {
if (kindBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
} else {
kindBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
*/
public Builder setKind(
com.daml.daml_lf_dev.DamlLf2.Kind.Builder builderForValue) {
if (kindBuilder_ == null) {
kind_ = builderForValue.build();
} else {
kindBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
*/
public Builder mergeKind(com.daml.daml_lf_dev.DamlLf2.Kind value) {
if (kindBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
kind_ != null &&
kind_ != com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance()) {
getKindBuilder().mergeFrom(value);
} else {
kind_ = value;
}
} else {
kindBuilder_.mergeFrom(value);
}
if (kind_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
*/
public Builder clearKind() {
bitField0_ = (bitField0_ & ~0x00000002);
kind_ = null;
if (kindBuilder_ != null) {
kindBuilder_.dispose();
kindBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Kind.Builder getKindBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getKindFieldBuilder().getBuilder();
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.KindOrBuilder getKindOrBuilder() {
if (kindBuilder_ != null) {
return kindBuilder_.getMessageOrBuilder();
} else {
return kind_ == null ?
com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance() : kind_;
}
}
/**
*
* Kind of the bound variable
*
*
* .daml_lf_2.Kind kind = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind, com.daml.daml_lf_dev.DamlLf2.Kind.Builder, com.daml.daml_lf_dev.DamlLf2.KindOrBuilder>
getKindFieldBuilder() {
if (kindBuilder_ == null) {
kindBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind, com.daml.daml_lf_dev.DamlLf2.Kind.Builder, com.daml.daml_lf_dev.DamlLf2.KindOrBuilder>(
getKind(),
getParentForChildren(),
isClean());
kind_ = null;
}
return kindBuilder_;
}
@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:daml_lf_2.TypeVarWithKind)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.TypeVarWithKind)
private static final com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind();
}
public static com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TypeVarWithKind 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.daml_lf_dev.DamlLf2.TypeVarWithKind getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FieldWithExprOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.FieldWithExpr)
com.google.protobuf.MessageOrBuilder {
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @return The fieldInternedStr.
*/
int getFieldInternedStr();
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
* @return Whether the expr field is set.
*/
boolean hasExpr();
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
* @return The expr.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getExpr();
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getExprOrBuilder();
}
/**
*
* A field in a record with its value.
*
*
* Protobuf type {@code daml_lf_2.FieldWithExpr}
*/
public static final class FieldWithExpr extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.FieldWithExpr)
FieldWithExprOrBuilder {
private static final long serialVersionUID = 0L;
// Use FieldWithExpr.newBuilder() to construct.
private FieldWithExpr(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FieldWithExpr() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FieldWithExpr();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithExpr_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithExpr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.class, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder.class);
}
private int bitField0_;
public static final int FIELD_INTERNED_STR_FIELD_NUMBER = 3;
private int fieldInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
public static final int EXPR_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Expr expr_;
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
* @return Whether the expr field is set.
*/
@java.lang.Override
public boolean hasExpr() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
* @return The expr.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getExpr() {
return expr_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : expr_;
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getExprOrBuilder() {
return expr_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : expr_;
}
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(2, getExpr());
}
if (fieldInternedStr_ != 0) {
output.writeInt32(3, fieldInternedStr_);
}
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(2, getExpr());
}
if (fieldInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, fieldInternedStr_);
}
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.daml_lf_dev.DamlLf2.FieldWithExpr)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr other = (com.daml.daml_lf_dev.DamlLf2.FieldWithExpr) obj;
if (getFieldInternedStr()
!= other.getFieldInternedStr()) return false;
if (hasExpr() != other.hasExpr()) return false;
if (hasExpr()) {
if (!getExpr()
.equals(other.getExpr())) 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) + FIELD_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getFieldInternedStr();
if (hasExpr()) {
hash = (37 * hash) + EXPR_FIELD_NUMBER;
hash = (53 * hash) + getExpr().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr 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.daml_lf_dev.DamlLf2.FieldWithExpr parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr 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.daml_lf_dev.DamlLf2.FieldWithExpr parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr 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.daml_lf_dev.DamlLf2.FieldWithExpr parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr 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.daml_lf_dev.DamlLf2.FieldWithExpr 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;
}
/**
*
* A field in a record with its value.
*
*
* Protobuf type {@code daml_lf_2.FieldWithExpr}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.FieldWithExpr)
com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithExpr_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithExpr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.class, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getExprFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
fieldInternedStr_ = 0;
expr_ = null;
if (exprBuilder_ != null) {
exprBuilder_.dispose();
exprBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_FieldWithExpr_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr build() {
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr buildPartial() {
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr result = new com.daml.daml_lf_dev.DamlLf2.FieldWithExpr(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.FieldWithExpr result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.fieldInternedStr_ = fieldInternedStr_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.expr_ = exprBuilder_ == null
? expr_
: exprBuilder_.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.daml_lf_dev.DamlLf2.FieldWithExpr) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.FieldWithExpr)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.FieldWithExpr other) {
if (other == com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.getDefaultInstance()) return this;
if (other.getFieldInternedStr() != 0) {
setFieldInternedStr(other.getFieldInternedStr());
}
if (other.hasExpr()) {
mergeExpr(other.getExpr());
}
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 18: {
input.readMessage(
getExprFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
fieldInternedStr_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 24
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 int fieldInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @param value The fieldInternedStr to set.
* @return This builder for chaining.
*/
public Builder setFieldInternedStr(int value) {
fieldInternedStr_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 3;
* @return This builder for chaining.
*/
public Builder clearFieldInternedStr() {
bitField0_ = (bitField0_ & ~0x00000001);
fieldInternedStr_ = 0;
onChanged();
return this;
}
private com.daml.daml_lf_dev.DamlLf2.Expr expr_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> exprBuilder_;
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
* @return Whether the expr field is set.
*/
public boolean hasExpr() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
* @return The expr.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getExpr() {
if (exprBuilder_ == null) {
return expr_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : expr_;
} else {
return exprBuilder_.getMessage();
}
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
*/
public Builder setExpr(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (exprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expr_ = value;
} else {
exprBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
*/
public Builder setExpr(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (exprBuilder_ == null) {
expr_ = builderForValue.build();
} else {
exprBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
*/
public Builder mergeExpr(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (exprBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
expr_ != null &&
expr_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getExprBuilder().mergeFrom(value);
} else {
expr_ = value;
}
} else {
exprBuilder_.mergeFrom(value);
}
if (expr_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
*/
public Builder clearExpr() {
bitField0_ = (bitField0_ & ~0x00000002);
expr_ = null;
if (exprBuilder_ != null) {
exprBuilder_.dispose();
exprBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getExprBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getExprFieldBuilder().getBuilder();
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getExprOrBuilder() {
if (exprBuilder_ != null) {
return exprBuilder_.getMessageOrBuilder();
} else {
return expr_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : expr_;
}
}
/**
*
* Value of the field
*
*
* .daml_lf_2.Expr expr = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getExprFieldBuilder() {
if (exprBuilder_ == null) {
exprBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getExpr(),
getParentForChildren(),
isClean());
expr_ = null;
}
return exprBuilder_;
}
@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:daml_lf_2.FieldWithExpr)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.FieldWithExpr)
private static final com.daml.daml_lf_dev.DamlLf2.FieldWithExpr DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.FieldWithExpr();
}
public static com.daml.daml_lf_dev.DamlLf2.FieldWithExpr getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FieldWithExpr 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.daml_lf_dev.DamlLf2.FieldWithExpr getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BindingOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Binding)
com.google.protobuf.MessageOrBuilder {
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
* @return Whether the binder field is set.
*/
boolean hasBinder();
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
* @return The binder.
*/
com.daml.daml_lf_dev.DamlLf2.VarWithType getBinder();
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
*/
com.daml.daml_lf_dev.DamlLf2.VarWithTypeOrBuilder getBinderOrBuilder();
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
* @return Whether the bound field is set.
*/
boolean hasBound();
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
* @return The bound.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getBound();
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getBoundOrBuilder();
}
/**
*
* A binding of a typed binder to an expression
*
*
* Protobuf type {@code daml_lf_2.Binding}
*/
public static final class Binding extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Binding)
BindingOrBuilder {
private static final long serialVersionUID = 0L;
// Use Binding.newBuilder() to construct.
private Binding(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Binding() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Binding();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Binding_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Binding_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Binding.class, com.daml.daml_lf_dev.DamlLf2.Binding.Builder.class);
}
private int bitField0_;
public static final int BINDER_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.VarWithType binder_;
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
* @return Whether the binder field is set.
*/
@java.lang.Override
public boolean hasBinder() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
* @return The binder.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.VarWithType getBinder() {
return binder_ == null ? com.daml.daml_lf_dev.DamlLf2.VarWithType.getDefaultInstance() : binder_;
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.VarWithTypeOrBuilder getBinderOrBuilder() {
return binder_ == null ? com.daml.daml_lf_dev.DamlLf2.VarWithType.getDefaultInstance() : binder_;
}
public static final int BOUND_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Expr bound_;
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
* @return Whether the bound field is set.
*/
@java.lang.Override
public boolean hasBound() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
* @return The bound.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getBound() {
return bound_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : bound_;
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getBoundOrBuilder() {
return bound_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : bound_;
}
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, getBinder());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(2, getBound());
}
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, getBinder());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getBound());
}
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.daml_lf_dev.DamlLf2.Binding)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Binding other = (com.daml.daml_lf_dev.DamlLf2.Binding) obj;
if (hasBinder() != other.hasBinder()) return false;
if (hasBinder()) {
if (!getBinder()
.equals(other.getBinder())) return false;
}
if (hasBound() != other.hasBound()) return false;
if (hasBound()) {
if (!getBound()
.equals(other.getBound())) 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 (hasBinder()) {
hash = (37 * hash) + BINDER_FIELD_NUMBER;
hash = (53 * hash) + getBinder().hashCode();
}
if (hasBound()) {
hash = (37 * hash) + BOUND_FIELD_NUMBER;
hash = (53 * hash) + getBound().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Binding parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Binding parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Binding parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Binding 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.daml_lf_dev.DamlLf2.Binding parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Binding parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Binding parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Binding 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.daml_lf_dev.DamlLf2.Binding parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Binding 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.daml_lf_dev.DamlLf2.Binding parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Binding 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.daml_lf_dev.DamlLf2.Binding 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;
}
/**
*
* A binding of a typed binder to an expression
*
*
* Protobuf type {@code daml_lf_2.Binding}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Binding)
com.daml.daml_lf_dev.DamlLf2.BindingOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Binding_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Binding_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Binding.class, com.daml.daml_lf_dev.DamlLf2.Binding.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Binding.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getBinderFieldBuilder();
getBoundFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
binder_ = null;
if (binderBuilder_ != null) {
binderBuilder_.dispose();
binderBuilder_ = null;
}
bound_ = null;
if (boundBuilder_ != null) {
boundBuilder_.dispose();
boundBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Binding_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Binding getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Binding.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Binding build() {
com.daml.daml_lf_dev.DamlLf2.Binding result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Binding buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Binding result = new com.daml.daml_lf_dev.DamlLf2.Binding(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Binding result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.binder_ = binderBuilder_ == null
? binder_
: binderBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.bound_ = boundBuilder_ == null
? bound_
: boundBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.daml_lf_dev.DamlLf2.Binding) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Binding)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Binding other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Binding.getDefaultInstance()) return this;
if (other.hasBinder()) {
mergeBinder(other.getBinder());
}
if (other.hasBound()) {
mergeBound(other.getBound());
}
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(
getBinderFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getBoundFieldBuilder().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 com.daml.daml_lf_dev.DamlLf2.VarWithType binder_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.VarWithType, com.daml.daml_lf_dev.DamlLf2.VarWithType.Builder, com.daml.daml_lf_dev.DamlLf2.VarWithTypeOrBuilder> binderBuilder_;
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
* @return Whether the binder field is set.
*/
public boolean hasBinder() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
* @return The binder.
*/
public com.daml.daml_lf_dev.DamlLf2.VarWithType getBinder() {
if (binderBuilder_ == null) {
return binder_ == null ? com.daml.daml_lf_dev.DamlLf2.VarWithType.getDefaultInstance() : binder_;
} else {
return binderBuilder_.getMessage();
}
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
*/
public Builder setBinder(com.daml.daml_lf_dev.DamlLf2.VarWithType value) {
if (binderBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
binder_ = value;
} else {
binderBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
*/
public Builder setBinder(
com.daml.daml_lf_dev.DamlLf2.VarWithType.Builder builderForValue) {
if (binderBuilder_ == null) {
binder_ = builderForValue.build();
} else {
binderBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
*/
public Builder mergeBinder(com.daml.daml_lf_dev.DamlLf2.VarWithType value) {
if (binderBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
binder_ != null &&
binder_ != com.daml.daml_lf_dev.DamlLf2.VarWithType.getDefaultInstance()) {
getBinderBuilder().mergeFrom(value);
} else {
binder_ = value;
}
} else {
binderBuilder_.mergeFrom(value);
}
if (binder_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
*/
public Builder clearBinder() {
bitField0_ = (bitField0_ & ~0x00000001);
binder_ = null;
if (binderBuilder_ != null) {
binderBuilder_.dispose();
binderBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.VarWithType.Builder getBinderBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getBinderFieldBuilder().getBuilder();
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.VarWithTypeOrBuilder getBinderOrBuilder() {
if (binderBuilder_ != null) {
return binderBuilder_.getMessageOrBuilder();
} else {
return binder_ == null ?
com.daml.daml_lf_dev.DamlLf2.VarWithType.getDefaultInstance() : binder_;
}
}
/**
*
* The binder (expression variable and type)
*
*
* .daml_lf_2.VarWithType binder = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.VarWithType, com.daml.daml_lf_dev.DamlLf2.VarWithType.Builder, com.daml.daml_lf_dev.DamlLf2.VarWithTypeOrBuilder>
getBinderFieldBuilder() {
if (binderBuilder_ == null) {
binderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.VarWithType, com.daml.daml_lf_dev.DamlLf2.VarWithType.Builder, com.daml.daml_lf_dev.DamlLf2.VarWithTypeOrBuilder>(
getBinder(),
getParentForChildren(),
isClean());
binder_ = null;
}
return binderBuilder_;
}
private com.daml.daml_lf_dev.DamlLf2.Expr bound_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> boundBuilder_;
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
* @return Whether the bound field is set.
*/
public boolean hasBound() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
* @return The bound.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getBound() {
if (boundBuilder_ == null) {
return bound_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : bound_;
} else {
return boundBuilder_.getMessage();
}
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
*/
public Builder setBound(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (boundBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
bound_ = value;
} else {
boundBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
*/
public Builder setBound(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (boundBuilder_ == null) {
bound_ = builderForValue.build();
} else {
boundBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
*/
public Builder mergeBound(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (boundBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
bound_ != null &&
bound_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getBoundBuilder().mergeFrom(value);
} else {
bound_ = value;
}
} else {
boundBuilder_.mergeFrom(value);
}
if (bound_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
*/
public Builder clearBound() {
bitField0_ = (bitField0_ & ~0x00000002);
bound_ = null;
if (boundBuilder_ != null) {
boundBuilder_.dispose();
boundBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getBoundBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getBoundFieldBuilder().getBuilder();
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getBoundOrBuilder() {
if (boundBuilder_ != null) {
return boundBuilder_.getMessageOrBuilder();
} else {
return bound_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : bound_;
}
}
/**
*
* The value to which the variable is bound.
*
*
* .daml_lf_2.Expr bound = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getBoundFieldBuilder() {
if (boundBuilder_ == null) {
boundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getBound(),
getParentForChildren(),
isClean());
bound_ = null;
}
return boundBuilder_;
}
@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:daml_lf_2.Binding)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Binding)
private static final com.daml.daml_lf_dev.DamlLf2.Binding DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Binding();
}
public static com.daml.daml_lf_dev.DamlLf2.Binding getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Binding 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.daml_lf_dev.DamlLf2.Binding getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface KindOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Kind)
com.google.protobuf.MessageOrBuilder {
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
* @return Whether the star field is set.
*/
boolean hasStar();
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
* @return The star.
*/
com.daml.daml_lf_dev.DamlLf2.Unit getStar();
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
*/
com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder getStarOrBuilder();
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
* @return Whether the arrow field is set.
*/
boolean hasArrow();
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
* @return The arrow.
*/
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow getArrow();
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
*/
com.daml.daml_lf_dev.DamlLf2.Kind.ArrowOrBuilder getArrowOrBuilder();
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
* @return Whether the nat field is set.
*/
boolean hasNat();
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
* @return The nat.
*/
com.daml.daml_lf_dev.DamlLf2.Unit getNat();
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
*/
com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder getNatOrBuilder();
com.daml.daml_lf_dev.DamlLf2.Kind.SumCase getSumCase();
}
/**
*
* Kinds
*
*
* Protobuf type {@code daml_lf_2.Kind}
*/
public static final class Kind extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Kind)
KindOrBuilder {
private static final long serialVersionUID = 0L;
// Use Kind.newBuilder() to construct.
private Kind(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Kind() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Kind();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Kind.class, com.daml.daml_lf_dev.DamlLf2.Kind.Builder.class);
}
public interface ArrowOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Kind.Arrow)
com.google.protobuf.MessageOrBuilder {
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
java.util.List
getParamsList();
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
com.daml.daml_lf_dev.DamlLf2.Kind getParams(int index);
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
int getParamsCount();
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.KindOrBuilder>
getParamsOrBuilderList();
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
com.daml.daml_lf_dev.DamlLf2.KindOrBuilder getParamsOrBuilder(
int index);
/**
* .daml_lf_2.Kind result = 2;
* @return Whether the result field is set.
*/
boolean hasResult();
/**
* .daml_lf_2.Kind result = 2;
* @return The result.
*/
com.daml.daml_lf_dev.DamlLf2.Kind getResult();
/**
* .daml_lf_2.Kind result = 2;
*/
com.daml.daml_lf_dev.DamlLf2.KindOrBuilder getResultOrBuilder();
}
/**
*
* The kind of polimorphic type.
*
*
* Protobuf type {@code daml_lf_2.Kind.Arrow}
*/
public static final class Arrow extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Kind.Arrow)
ArrowOrBuilder {
private static final long serialVersionUID = 0L;
// Use Arrow.newBuilder() to construct.
private Arrow(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Arrow() {
params_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Arrow();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_Arrow_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_Arrow_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.class, com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.Builder.class);
}
private int bitField0_;
public static final int PARAMS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List params_;
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
@java.lang.Override
public java.util.List getParamsList() {
return params_;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.KindOrBuilder>
getParamsOrBuilderList() {
return params_;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
@java.lang.Override
public int getParamsCount() {
return params_.size();
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind getParams(int index) {
return params_.get(index);
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.KindOrBuilder getParamsOrBuilder(
int index) {
return params_.get(index);
}
public static final int RESULT_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Kind result_;
/**
* .daml_lf_2.Kind result = 2;
* @return Whether the result field is set.
*/
@java.lang.Override
public boolean hasResult() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .daml_lf_2.Kind result = 2;
* @return The result.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind getResult() {
return result_ == null ? com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance() : result_;
}
/**
* .daml_lf_2.Kind result = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.KindOrBuilder getResultOrBuilder() {
return result_ == null ? com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance() : result_;
}
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 < params_.size(); i++) {
output.writeMessage(1, params_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getResult());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < params_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, params_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getResult());
}
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.daml_lf_dev.DamlLf2.Kind.Arrow)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow other = (com.daml.daml_lf_dev.DamlLf2.Kind.Arrow) obj;
if (!getParamsList()
.equals(other.getParamsList())) return false;
if (hasResult() != other.hasResult()) return false;
if (hasResult()) {
if (!getResult()
.equals(other.getResult())) 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 (getParamsCount() > 0) {
hash = (37 * hash) + PARAMS_FIELD_NUMBER;
hash = (53 * hash) + getParamsList().hashCode();
}
if (hasResult()) {
hash = (37 * hash) + RESULT_FIELD_NUMBER;
hash = (53 * hash) + getResult().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow 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.daml_lf_dev.DamlLf2.Kind.Arrow parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow 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.daml_lf_dev.DamlLf2.Kind.Arrow parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow 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.daml_lf_dev.DamlLf2.Kind.Arrow parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow 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.daml_lf_dev.DamlLf2.Kind.Arrow prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The kind of polimorphic type.
*
*
* Protobuf type {@code daml_lf_2.Kind.Arrow}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Kind.Arrow)
com.daml.daml_lf_dev.DamlLf2.Kind.ArrowOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_Arrow_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_Arrow_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.class, com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getParamsFieldBuilder();
getResultFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (paramsBuilder_ == null) {
params_ = java.util.Collections.emptyList();
} else {
params_ = null;
paramsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
result_ = null;
if (resultBuilder_ != null) {
resultBuilder_.dispose();
resultBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_Arrow_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind.Arrow getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind.Arrow build() {
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind.Arrow buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow result = new com.daml.daml_lf_dev.DamlLf2.Kind.Arrow(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Kind.Arrow result) {
if (paramsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
params_ = java.util.Collections.unmodifiableList(params_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.params_ = params_;
} else {
result.params_ = paramsBuilder_.build();
}
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Kind.Arrow result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.result_ = resultBuilder_ == null
? result_
: resultBuilder_.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.daml_lf_dev.DamlLf2.Kind.Arrow) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Kind.Arrow)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Kind.Arrow other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.getDefaultInstance()) return this;
if (paramsBuilder_ == null) {
if (!other.params_.isEmpty()) {
if (params_.isEmpty()) {
params_ = other.params_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureParamsIsMutable();
params_.addAll(other.params_);
}
onChanged();
}
} else {
if (!other.params_.isEmpty()) {
if (paramsBuilder_.isEmpty()) {
paramsBuilder_.dispose();
paramsBuilder_ = null;
params_ = other.params_;
bitField0_ = (bitField0_ & ~0x00000001);
paramsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getParamsFieldBuilder() : null;
} else {
paramsBuilder_.addAllMessages(other.params_);
}
}
}
if (other.hasResult()) {
mergeResult(other.getResult());
}
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.daml_lf_dev.DamlLf2.Kind m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.Kind.parser(),
extensionRegistry);
if (paramsBuilder_ == null) {
ensureParamsIsMutable();
params_.add(m);
} else {
paramsBuilder_.addMessage(m);
}
break;
} // case 10
case 18: {
input.readMessage(
getResultFieldBuilder().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.util.List params_ =
java.util.Collections.emptyList();
private void ensureParamsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
params_ = new java.util.ArrayList(params_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind, com.daml.daml_lf_dev.DamlLf2.Kind.Builder, com.daml.daml_lf_dev.DamlLf2.KindOrBuilder> paramsBuilder_;
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public java.util.List getParamsList() {
if (paramsBuilder_ == null) {
return java.util.Collections.unmodifiableList(params_);
} else {
return paramsBuilder_.getMessageList();
}
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public int getParamsCount() {
if (paramsBuilder_ == null) {
return params_.size();
} else {
return paramsBuilder_.getCount();
}
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Kind getParams(int index) {
if (paramsBuilder_ == null) {
return params_.get(index);
} else {
return paramsBuilder_.getMessage(index);
}
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public Builder setParams(
int index, com.daml.daml_lf_dev.DamlLf2.Kind value) {
if (paramsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureParamsIsMutable();
params_.set(index, value);
onChanged();
} else {
paramsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public Builder setParams(
int index, com.daml.daml_lf_dev.DamlLf2.Kind.Builder builderForValue) {
if (paramsBuilder_ == null) {
ensureParamsIsMutable();
params_.set(index, builderForValue.build());
onChanged();
} else {
paramsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public Builder addParams(com.daml.daml_lf_dev.DamlLf2.Kind value) {
if (paramsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureParamsIsMutable();
params_.add(value);
onChanged();
} else {
paramsBuilder_.addMessage(value);
}
return this;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public Builder addParams(
int index, com.daml.daml_lf_dev.DamlLf2.Kind value) {
if (paramsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureParamsIsMutable();
params_.add(index, value);
onChanged();
} else {
paramsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public Builder addParams(
com.daml.daml_lf_dev.DamlLf2.Kind.Builder builderForValue) {
if (paramsBuilder_ == null) {
ensureParamsIsMutable();
params_.add(builderForValue.build());
onChanged();
} else {
paramsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public Builder addParams(
int index, com.daml.daml_lf_dev.DamlLf2.Kind.Builder builderForValue) {
if (paramsBuilder_ == null) {
ensureParamsIsMutable();
params_.add(index, builderForValue.build());
onChanged();
} else {
paramsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public Builder addAllParams(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.Kind> values) {
if (paramsBuilder_ == null) {
ensureParamsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, params_);
onChanged();
} else {
paramsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public Builder clearParams() {
if (paramsBuilder_ == null) {
params_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
paramsBuilder_.clear();
}
return this;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public Builder removeParams(int index) {
if (paramsBuilder_ == null) {
ensureParamsIsMutable();
params_.remove(index);
onChanged();
} else {
paramsBuilder_.remove(index);
}
return this;
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Kind.Builder getParamsBuilder(
int index) {
return getParamsFieldBuilder().getBuilder(index);
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.KindOrBuilder getParamsOrBuilder(
int index) {
if (paramsBuilder_ == null) {
return params_.get(index); } else {
return paramsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.KindOrBuilder>
getParamsOrBuilderList() {
if (paramsBuilder_ != null) {
return paramsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(params_);
}
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Kind.Builder addParamsBuilder() {
return getParamsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance());
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Kind.Builder addParamsBuilder(
int index) {
return getParamsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance());
}
/**
*
* parameter of the kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Kind params = 1;
*/
public java.util.List
getParamsBuilderList() {
return getParamsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind, com.daml.daml_lf_dev.DamlLf2.Kind.Builder, com.daml.daml_lf_dev.DamlLf2.KindOrBuilder>
getParamsFieldBuilder() {
if (paramsBuilder_ == null) {
paramsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind, com.daml.daml_lf_dev.DamlLf2.Kind.Builder, com.daml.daml_lf_dev.DamlLf2.KindOrBuilder>(
params_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
params_ = null;
}
return paramsBuilder_;
}
private com.daml.daml_lf_dev.DamlLf2.Kind result_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind, com.daml.daml_lf_dev.DamlLf2.Kind.Builder, com.daml.daml_lf_dev.DamlLf2.KindOrBuilder> resultBuilder_;
/**
* .daml_lf_2.Kind result = 2;
* @return Whether the result field is set.
*/
public boolean hasResult() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .daml_lf_2.Kind result = 2;
* @return The result.
*/
public com.daml.daml_lf_dev.DamlLf2.Kind getResult() {
if (resultBuilder_ == null) {
return result_ == null ? com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance() : result_;
} else {
return resultBuilder_.getMessage();
}
}
/**
* .daml_lf_2.Kind result = 2;
*/
public Builder setResult(com.daml.daml_lf_dev.DamlLf2.Kind value) {
if (resultBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
result_ = value;
} else {
resultBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .daml_lf_2.Kind result = 2;
*/
public Builder setResult(
com.daml.daml_lf_dev.DamlLf2.Kind.Builder builderForValue) {
if (resultBuilder_ == null) {
result_ = builderForValue.build();
} else {
resultBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .daml_lf_2.Kind result = 2;
*/
public Builder mergeResult(com.daml.daml_lf_dev.DamlLf2.Kind value) {
if (resultBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
result_ != null &&
result_ != com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance()) {
getResultBuilder().mergeFrom(value);
} else {
result_ = value;
}
} else {
resultBuilder_.mergeFrom(value);
}
if (result_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
* .daml_lf_2.Kind result = 2;
*/
public Builder clearResult() {
bitField0_ = (bitField0_ & ~0x00000002);
result_ = null;
if (resultBuilder_ != null) {
resultBuilder_.dispose();
resultBuilder_ = null;
}
onChanged();
return this;
}
/**
* .daml_lf_2.Kind result = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Kind.Builder getResultBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getResultFieldBuilder().getBuilder();
}
/**
* .daml_lf_2.Kind result = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.KindOrBuilder getResultOrBuilder() {
if (resultBuilder_ != null) {
return resultBuilder_.getMessageOrBuilder();
} else {
return result_ == null ?
com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance() : result_;
}
}
/**
* .daml_lf_2.Kind result = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind, com.daml.daml_lf_dev.DamlLf2.Kind.Builder, com.daml.daml_lf_dev.DamlLf2.KindOrBuilder>
getResultFieldBuilder() {
if (resultBuilder_ == null) {
resultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind, com.daml.daml_lf_dev.DamlLf2.Kind.Builder, com.daml.daml_lf_dev.DamlLf2.KindOrBuilder>(
getResult(),
getParentForChildren(),
isClean());
result_ = null;
}
return resultBuilder_;
}
@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:daml_lf_2.Kind.Arrow)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Kind.Arrow)
private static final com.daml.daml_lf_dev.DamlLf2.Kind.Arrow DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Kind.Arrow();
}
public static com.daml.daml_lf_dev.DamlLf2.Kind.Arrow getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Arrow 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.daml_lf_dev.DamlLf2.Kind.Arrow getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int sumCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object sum_;
public enum SumCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
STAR(1),
ARROW(2),
NAT(3),
SUM_NOT_SET(0);
private final int value;
private SumCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SumCase valueOf(int value) {
return forNumber(value);
}
public static SumCase forNumber(int value) {
switch (value) {
case 1: return STAR;
case 2: return ARROW;
case 3: return NAT;
case 0: return SUM_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public static final int STAR_FIELD_NUMBER = 1;
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
* @return Whether the star field is set.
*/
@java.lang.Override
public boolean hasStar() {
return sumCase_ == 1;
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
* @return The star.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Unit getStar() {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder getStarOrBuilder() {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
public static final int ARROW_FIELD_NUMBER = 2;
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
* @return Whether the arrow field is set.
*/
@java.lang.Override
public boolean hasArrow() {
return sumCase_ == 2;
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
* @return The arrow.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind.Arrow getArrow() {
if (sumCase_ == 2) {
return (com.daml.daml_lf_dev.DamlLf2.Kind.Arrow) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.getDefaultInstance();
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind.ArrowOrBuilder getArrowOrBuilder() {
if (sumCase_ == 2) {
return (com.daml.daml_lf_dev.DamlLf2.Kind.Arrow) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.getDefaultInstance();
}
public static final int NAT_FIELD_NUMBER = 3;
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
* @return Whether the nat field is set.
*/
@java.lang.Override
public boolean hasNat() {
return sumCase_ == 3;
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
* @return The nat.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Unit getNat() {
if (sumCase_ == 3) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder getNatOrBuilder() {
if (sumCase_ == 3) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (sumCase_ == 1) {
output.writeMessage(1, (com.daml.daml_lf_dev.DamlLf2.Unit) sum_);
}
if (sumCase_ == 2) {
output.writeMessage(2, (com.daml.daml_lf_dev.DamlLf2.Kind.Arrow) sum_);
}
if (sumCase_ == 3) {
output.writeMessage(3, (com.daml.daml_lf_dev.DamlLf2.Unit) sum_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sumCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.daml.daml_lf_dev.DamlLf2.Unit) sum_);
}
if (sumCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.daml.daml_lf_dev.DamlLf2.Kind.Arrow) sum_);
}
if (sumCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.daml.daml_lf_dev.DamlLf2.Unit) sum_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.daml.daml_lf_dev.DamlLf2.Kind)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Kind other = (com.daml.daml_lf_dev.DamlLf2.Kind) obj;
if (!getSumCase().equals(other.getSumCase())) return false;
switch (sumCase_) {
case 1:
if (!getStar()
.equals(other.getStar())) return false;
break;
case 2:
if (!getArrow()
.equals(other.getArrow())) return false;
break;
case 3:
if (!getNat()
.equals(other.getNat())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (sumCase_) {
case 1:
hash = (37 * hash) + STAR_FIELD_NUMBER;
hash = (53 * hash) + getStar().hashCode();
break;
case 2:
hash = (37 * hash) + ARROW_FIELD_NUMBER;
hash = (53 * hash) + getArrow().hashCode();
break;
case 3:
hash = (37 * hash) + NAT_FIELD_NUMBER;
hash = (53 * hash) + getNat().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Kind parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind 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.daml_lf_dev.DamlLf2.Kind parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind 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.daml_lf_dev.DamlLf2.Kind parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind 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.daml_lf_dev.DamlLf2.Kind parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Kind 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.daml_lf_dev.DamlLf2.Kind 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;
}
/**
*
* Kinds
*
*
* Protobuf type {@code daml_lf_2.Kind}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Kind)
com.daml.daml_lf_dev.DamlLf2.KindOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Kind.class, com.daml.daml_lf_dev.DamlLf2.Kind.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Kind.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (starBuilder_ != null) {
starBuilder_.clear();
}
if (arrowBuilder_ != null) {
arrowBuilder_.clear();
}
if (natBuilder_ != null) {
natBuilder_.clear();
}
sumCase_ = 0;
sum_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Kind_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind build() {
com.daml.daml_lf_dev.DamlLf2.Kind result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Kind result = new com.daml.daml_lf_dev.DamlLf2.Kind(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Kind result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(com.daml.daml_lf_dev.DamlLf2.Kind result) {
result.sumCase_ = sumCase_;
result.sum_ = this.sum_;
if (sumCase_ == 1 &&
starBuilder_ != null) {
result.sum_ = starBuilder_.build();
}
if (sumCase_ == 2 &&
arrowBuilder_ != null) {
result.sum_ = arrowBuilder_.build();
}
if (sumCase_ == 3 &&
natBuilder_ != null) {
result.sum_ = natBuilder_.build();
}
}
@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.daml_lf_dev.DamlLf2.Kind) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Kind)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Kind other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Kind.getDefaultInstance()) return this;
switch (other.getSumCase()) {
case STAR: {
mergeStar(other.getStar());
break;
}
case ARROW: {
mergeArrow(other.getArrow());
break;
}
case NAT: {
mergeNat(other.getNat());
break;
}
case SUM_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getStarFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getArrowFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getNatFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 3;
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 sumCase_ = 0;
private java.lang.Object sum_;
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public Builder clearSum() {
sumCase_ = 0;
sum_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Unit, com.daml.daml_lf_dev.DamlLf2.Unit.Builder, com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder> starBuilder_;
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
* @return Whether the star field is set.
*/
@java.lang.Override
public boolean hasStar() {
return sumCase_ == 1;
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
* @return The star.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Unit getStar() {
if (starBuilder_ == null) {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
} else {
if (sumCase_ == 1) {
return starBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
*/
public Builder setStar(com.daml.daml_lf_dev.DamlLf2.Unit value) {
if (starBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
starBuilder_.setMessage(value);
}
sumCase_ = 1;
return this;
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
*/
public Builder setStar(
com.daml.daml_lf_dev.DamlLf2.Unit.Builder builderForValue) {
if (starBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
starBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 1;
return this;
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
*/
public Builder mergeStar(com.daml.daml_lf_dev.DamlLf2.Unit value) {
if (starBuilder_ == null) {
if (sumCase_ == 1 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Unit.newBuilder((com.daml.daml_lf_dev.DamlLf2.Unit) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 1) {
starBuilder_.mergeFrom(value);
} else {
starBuilder_.setMessage(value);
}
}
sumCase_ = 1;
return this;
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
*/
public Builder clearStar() {
if (starBuilder_ == null) {
if (sumCase_ == 1) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 1) {
sumCase_ = 0;
sum_ = null;
}
starBuilder_.clear();
}
return this;
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Unit.Builder getStarBuilder() {
return getStarFieldBuilder().getBuilder();
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder getStarOrBuilder() {
if ((sumCase_ == 1) && (starBuilder_ != null)) {
return starBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
}
/**
*
* Kind of monomorphic type.
*
*
* .daml_lf_2.Unit star = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Unit, com.daml.daml_lf_dev.DamlLf2.Unit.Builder, com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder>
getStarFieldBuilder() {
if (starBuilder_ == null) {
if (!(sumCase_ == 1)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
starBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Unit, com.daml.daml_lf_dev.DamlLf2.Unit.Builder, com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Unit) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 1;
onChanged();
return starBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow, com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.Builder, com.daml.daml_lf_dev.DamlLf2.Kind.ArrowOrBuilder> arrowBuilder_;
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
* @return Whether the arrow field is set.
*/
@java.lang.Override
public boolean hasArrow() {
return sumCase_ == 2;
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
* @return The arrow.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind.Arrow getArrow() {
if (arrowBuilder_ == null) {
if (sumCase_ == 2) {
return (com.daml.daml_lf_dev.DamlLf2.Kind.Arrow) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.getDefaultInstance();
} else {
if (sumCase_ == 2) {
return arrowBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.getDefaultInstance();
}
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
*/
public Builder setArrow(com.daml.daml_lf_dev.DamlLf2.Kind.Arrow value) {
if (arrowBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
arrowBuilder_.setMessage(value);
}
sumCase_ = 2;
return this;
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
*/
public Builder setArrow(
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.Builder builderForValue) {
if (arrowBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
arrowBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 2;
return this;
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
*/
public Builder mergeArrow(com.daml.daml_lf_dev.DamlLf2.Kind.Arrow value) {
if (arrowBuilder_ == null) {
if (sumCase_ == 2 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.newBuilder((com.daml.daml_lf_dev.DamlLf2.Kind.Arrow) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 2) {
arrowBuilder_.mergeFrom(value);
} else {
arrowBuilder_.setMessage(value);
}
}
sumCase_ = 2;
return this;
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
*/
public Builder clearArrow() {
if (arrowBuilder_ == null) {
if (sumCase_ == 2) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 2) {
sumCase_ = 0;
sum_ = null;
}
arrowBuilder_.clear();
}
return this;
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.Builder getArrowBuilder() {
return getArrowFieldBuilder().getBuilder();
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Kind.ArrowOrBuilder getArrowOrBuilder() {
if ((sumCase_ == 2) && (arrowBuilder_ != null)) {
return arrowBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 2) {
return (com.daml.daml_lf_dev.DamlLf2.Kind.Arrow) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.getDefaultInstance();
}
}
/**
*
* Kind of polymorphic type.
*
*
* .daml_lf_2.Kind.Arrow arrow = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow, com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.Builder, com.daml.daml_lf_dev.DamlLf2.Kind.ArrowOrBuilder>
getArrowFieldBuilder() {
if (arrowBuilder_ == null) {
if (!(sumCase_ == 2)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.getDefaultInstance();
}
arrowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Kind.Arrow, com.daml.daml_lf_dev.DamlLf2.Kind.Arrow.Builder, com.daml.daml_lf_dev.DamlLf2.Kind.ArrowOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Kind.Arrow) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 2;
onChanged();
return arrowBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Unit, com.daml.daml_lf_dev.DamlLf2.Unit.Builder, com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder> natBuilder_;
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
* @return Whether the nat field is set.
*/
@java.lang.Override
public boolean hasNat() {
return sumCase_ == 3;
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
* @return The nat.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Unit getNat() {
if (natBuilder_ == null) {
if (sumCase_ == 3) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
} else {
if (sumCase_ == 3) {
return natBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
*/
public Builder setNat(com.daml.daml_lf_dev.DamlLf2.Unit value) {
if (natBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
natBuilder_.setMessage(value);
}
sumCase_ = 3;
return this;
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
*/
public Builder setNat(
com.daml.daml_lf_dev.DamlLf2.Unit.Builder builderForValue) {
if (natBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
natBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 3;
return this;
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
*/
public Builder mergeNat(com.daml.daml_lf_dev.DamlLf2.Unit value) {
if (natBuilder_ == null) {
if (sumCase_ == 3 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Unit.newBuilder((com.daml.daml_lf_dev.DamlLf2.Unit) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 3) {
natBuilder_.mergeFrom(value);
} else {
natBuilder_.setMessage(value);
}
}
sumCase_ = 3;
return this;
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
*/
public Builder clearNat() {
if (natBuilder_ == null) {
if (sumCase_ == 3) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 3) {
sumCase_ = 0;
sum_ = null;
}
natBuilder_.clear();
}
return this;
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.Unit.Builder getNatBuilder() {
return getNatFieldBuilder().getBuilder();
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder getNatOrBuilder() {
if ((sumCase_ == 3) && (natBuilder_ != null)) {
return natBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 3) {
return (com.daml.daml_lf_dev.DamlLf2.Unit) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
}
/**
*
* kind of TNat type;
*
*
* .daml_lf_2.Unit nat = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Unit, com.daml.daml_lf_dev.DamlLf2.Unit.Builder, com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder>
getNatFieldBuilder() {
if (natBuilder_ == null) {
if (!(sumCase_ == 3)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Unit.getDefaultInstance();
}
natBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Unit, com.daml.daml_lf_dev.DamlLf2.Unit.Builder, com.daml.daml_lf_dev.DamlLf2.UnitOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Unit) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 3;
onChanged();
return natBuilder_;
}
@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:daml_lf_2.Kind)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Kind)
private static final com.daml.daml_lf_dev.DamlLf2.Kind DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Kind();
}
public static com.daml.daml_lf_dev.DamlLf2.Kind getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Kind 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.daml_lf_dev.DamlLf2.Kind getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TypeOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Type)
com.google.protobuf.MessageOrBuilder {
/**
* .daml_lf_2.Type.Var var = 1;
* @return Whether the var field is set.
*/
boolean hasVar();
/**
* .daml_lf_2.Type.Var var = 1;
* @return The var.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Var getVar();
/**
* .daml_lf_2.Type.Var var = 1;
*/
com.daml.daml_lf_dev.DamlLf2.Type.VarOrBuilder getVarOrBuilder();
/**
* .daml_lf_2.Type.Con con = 2;
* @return Whether the con field is set.
*/
boolean hasCon();
/**
* .daml_lf_2.Type.Con con = 2;
* @return The con.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Con getCon();
/**
* .daml_lf_2.Type.Con con = 2;
*/
com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getConOrBuilder();
/**
* .daml_lf_2.Type.Builtin builtin = 3;
* @return Whether the builtin field is set.
*/
boolean hasBuiltin();
/**
* .daml_lf_2.Type.Builtin builtin = 3;
* @return The builtin.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Builtin getBuiltin();
/**
* .daml_lf_2.Type.Builtin builtin = 3;
*/
com.daml.daml_lf_dev.DamlLf2.Type.BuiltinOrBuilder getBuiltinOrBuilder();
/**
* .daml_lf_2.Type.Forall forall = 4;
* @return Whether the forall field is set.
*/
boolean hasForall();
/**
* .daml_lf_2.Type.Forall forall = 4;
* @return The forall.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Forall getForall();
/**
* .daml_lf_2.Type.Forall forall = 4;
*/
com.daml.daml_lf_dev.DamlLf2.Type.ForallOrBuilder getForallOrBuilder();
/**
* .daml_lf_2.Type.Struct struct = 5;
* @return Whether the struct field is set.
*/
boolean hasStruct();
/**
* .daml_lf_2.Type.Struct struct = 5;
* @return The struct.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Struct getStruct();
/**
* .daml_lf_2.Type.Struct struct = 5;
*/
com.daml.daml_lf_dev.DamlLf2.Type.StructOrBuilder getStructOrBuilder();
/**
*
* *Must be between 0 and 37 (bounds inclusive)*
* use standard signed long for future usage.
*
*
* sint64 nat = 6;
* @return Whether the nat field is set.
*/
boolean hasNat();
/**
*
* *Must be between 0 and 37 (bounds inclusive)*
* use standard signed long for future usage.
*
*
* sint64 nat = 6;
* @return The nat.
*/
long getNat();
/**
* .daml_lf_2.Type.Syn syn = 7;
* @return Whether the syn field is set.
*/
boolean hasSyn();
/**
* .daml_lf_2.Type.Syn syn = 7;
* @return The syn.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Syn getSyn();
/**
* .daml_lf_2.Type.Syn syn = 7;
*/
com.daml.daml_lf_dev.DamlLf2.Type.SynOrBuilder getSynOrBuilder();
/**
* int32 interned = 8;
* @return Whether the interned field is set.
*/
boolean hasInterned();
/**
* int32 interned = 8;
* @return The interned.
*/
int getInterned();
com.daml.daml_lf_dev.DamlLf2.Type.SumCase getSumCase();
}
/**
*
* Types
*
*
* Protobuf type {@code daml_lf_2.Type}
*/
public static final class Type extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Type)
TypeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Type.newBuilder() to construct.
private Type(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Type() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Type();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.class, com.daml.daml_lf_dev.DamlLf2.Type.Builder.class);
}
public interface VarOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Type.Var)
com.google.protobuf.MessageOrBuilder {
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return The varInternedStr.
*/
int getVarInternedStr();
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
java.util.List
getArgsList();
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index);
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
int getArgsCount();
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList();
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index);
}
/**
*
* Possibly applied type variable 'TyVar'
*
*
* Protobuf type {@code daml_lf_2.Type.Var}
*/
public static final class Var extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Type.Var)
VarOrBuilder {
private static final long serialVersionUID = 0L;
// Use Var.newBuilder() to construct.
private Var(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Var() {
args_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Var();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Var_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Var_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Var.class, com.daml.daml_lf_dev.DamlLf2.Type.Var.Builder.class);
}
public static final int VAR_INTERNED_STR_FIELD_NUMBER = 3;
private int varInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return The varInternedStr.
*/
@java.lang.Override
public int getVarInternedStr() {
return varInternedStr_;
}
public static final int ARGS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List args_;
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public java.util.List getArgsList() {
return args_;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList() {
return args_;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public int getArgsCount() {
return args_.size();
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index) {
return args_.get(index);
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index) {
return args_.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 < args_.size(); i++) {
output.writeMessage(2, args_.get(i));
}
if (varInternedStr_ != 0) {
output.writeInt32(3, varInternedStr_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < args_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, args_.get(i));
}
if (varInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, varInternedStr_);
}
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.daml_lf_dev.DamlLf2.Type.Var)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Type.Var other = (com.daml.daml_lf_dev.DamlLf2.Type.Var) obj;
if (getVarInternedStr()
!= other.getVarInternedStr()) return false;
if (!getArgsList()
.equals(other.getArgsList())) 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) + VAR_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getVarInternedStr();
if (getArgsCount() > 0) {
hash = (37 * hash) + ARGS_FIELD_NUMBER;
hash = (53 * hash) + getArgsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var 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.daml_lf_dev.DamlLf2.Type.Var parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var 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.daml_lf_dev.DamlLf2.Type.Var parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var 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.daml_lf_dev.DamlLf2.Type.Var parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var 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.daml_lf_dev.DamlLf2.Type.Var 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;
}
/**
*
* Possibly applied type variable 'TyVar'
*
*
* Protobuf type {@code daml_lf_2.Type.Var}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Type.Var)
com.daml.daml_lf_dev.DamlLf2.Type.VarOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Var_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Var_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Var.class, com.daml.daml_lf_dev.DamlLf2.Type.Var.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Type.Var.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
varInternedStr_ = 0;
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
} else {
args_ = null;
argsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Var_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Var getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Type.Var.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Var build() {
com.daml.daml_lf_dev.DamlLf2.Type.Var result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Var buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Type.Var result = new com.daml.daml_lf_dev.DamlLf2.Type.Var(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Type.Var result) {
if (argsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
args_ = java.util.Collections.unmodifiableList(args_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.args_ = args_;
} else {
result.args_ = argsBuilder_.build();
}
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Type.Var result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.varInternedStr_ = varInternedStr_;
}
}
@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.daml_lf_dev.DamlLf2.Type.Var) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Type.Var)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Type.Var other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Type.Var.getDefaultInstance()) return this;
if (other.getVarInternedStr() != 0) {
setVarInternedStr(other.getVarInternedStr());
}
if (argsBuilder_ == null) {
if (!other.args_.isEmpty()) {
if (args_.isEmpty()) {
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureArgsIsMutable();
args_.addAll(other.args_);
}
onChanged();
}
} else {
if (!other.args_.isEmpty()) {
if (argsBuilder_.isEmpty()) {
argsBuilder_.dispose();
argsBuilder_ = null;
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
argsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getArgsFieldBuilder() : null;
} else {
argsBuilder_.addAllMessages(other.args_);
}
}
}
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 18: {
com.daml.daml_lf_dev.DamlLf2.Type m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.Type.parser(),
extensionRegistry);
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(m);
} else {
argsBuilder_.addMessage(m);
}
break;
} // case 18
case 24: {
varInternedStr_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 24
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 int varInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return The varInternedStr.
*/
@java.lang.Override
public int getVarInternedStr() {
return varInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @param value The varInternedStr to set.
* @return This builder for chaining.
*/
public Builder setVarInternedStr(int value) {
varInternedStr_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 3;
* @return This builder for chaining.
*/
public Builder clearVarInternedStr() {
bitField0_ = (bitField0_ & ~0x00000001);
varInternedStr_ = 0;
onChanged();
return this;
}
private java.util.List args_ =
java.util.Collections.emptyList();
private void ensureArgsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
args_ = new java.util.ArrayList(args_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder> argsBuilder_;
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List getArgsList() {
if (argsBuilder_ == null) {
return java.util.Collections.unmodifiableList(args_);
} else {
return argsBuilder_.getMessageList();
}
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public int getArgsCount() {
if (argsBuilder_ == null) {
return args_.size();
} else {
return argsBuilder_.getCount();
}
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index) {
if (argsBuilder_ == null) {
return args_.get(index);
} else {
return argsBuilder_.getMessage(index);
}
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.set(index, value);
onChanged();
} else {
argsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.set(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(value);
onChanged();
} else {
argsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(index, value);
onChanged();
} else {
argsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addAllArgs(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.Type> values) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, args_);
onChanged();
} else {
argsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder clearArgs() {
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
argsBuilder_.clear();
}
return this;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder removeArgs(int index) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.remove(index);
onChanged();
} else {
argsBuilder_.remove(index);
}
return this;
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder getArgsBuilder(
int index) {
return getArgsFieldBuilder().getBuilder(index);
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index) {
if (argsBuilder_ == null) {
return args_.get(index); } else {
return argsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList() {
if (argsBuilder_ != null) {
return argsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(args_);
}
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addArgsBuilder() {
return getArgsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addArgsBuilder(
int index) {
return getArgsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Types to which the variable is applied
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List
getArgsBuilderList() {
return getArgsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsFieldBuilder() {
if (argsBuilder_ == null) {
argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>(
args_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
args_ = null;
}
return argsBuilder_;
}
@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:daml_lf_2.Type.Var)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Type.Var)
private static final com.daml.daml_lf_dev.DamlLf2.Type.Var DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Type.Var();
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Var getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Var 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.daml_lf_dev.DamlLf2.Type.Var getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ConOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Type.Con)
com.google.protobuf.MessageOrBuilder {
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return Whether the tycon field is set.
*/
boolean hasTycon();
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return The tycon.
*/
com.daml.daml_lf_dev.DamlLf2.TypeConName getTycon();
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder getTyconOrBuilder();
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
java.util.List
getArgsList();
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index);
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
int getArgsCount();
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList();
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index);
}
/**
*
* Possibly applied type constructor 'TyCon'
*
*
* Protobuf type {@code daml_lf_2.Type.Con}
*/
public static final class Con extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Type.Con)
ConOrBuilder {
private static final long serialVersionUID = 0L;
// Use Con.newBuilder() to construct.
private Con(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Con() {
args_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Con();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Con_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Con_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Con.class, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder.class);
}
private int bitField0_;
public static final int TYCON_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.TypeConName tycon_;
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return Whether the tycon field is set.
*/
@java.lang.Override
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return The tycon.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeConName getTycon() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance() : tycon_;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder getTyconOrBuilder() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance() : tycon_;
}
public static final int ARGS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List args_;
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public java.util.List getArgsList() {
return args_;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList() {
return args_;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public int getArgsCount() {
return args_.size();
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index) {
return args_.get(index);
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index) {
return args_.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 {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getTycon());
}
for (int i = 0; i < args_.size(); i++) {
output.writeMessage(2, args_.get(i));
}
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, getTycon());
}
for (int i = 0; i < args_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, args_.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.daml_lf_dev.DamlLf2.Type.Con)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Type.Con other = (com.daml.daml_lf_dev.DamlLf2.Type.Con) obj;
if (hasTycon() != other.hasTycon()) return false;
if (hasTycon()) {
if (!getTycon()
.equals(other.getTycon())) return false;
}
if (!getArgsList()
.equals(other.getArgsList())) 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 (hasTycon()) {
hash = (37 * hash) + TYCON_FIELD_NUMBER;
hash = (53 * hash) + getTycon().hashCode();
}
if (getArgsCount() > 0) {
hash = (37 * hash) + ARGS_FIELD_NUMBER;
hash = (53 * hash) + getArgsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con 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.daml_lf_dev.DamlLf2.Type.Con parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con 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.daml_lf_dev.DamlLf2.Type.Con parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con 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.daml_lf_dev.DamlLf2.Type.Con parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con 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.daml_lf_dev.DamlLf2.Type.Con 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;
}
/**
*
* Possibly applied type constructor 'TyCon'
*
*
* Protobuf type {@code daml_lf_2.Type.Con}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Type.Con)
com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Con_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Con_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Con.class, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Type.Con.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTyconFieldBuilder();
getArgsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
} else {
args_ = null;
argsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Con_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Con getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Con build() {
com.daml.daml_lf_dev.DamlLf2.Type.Con result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Con buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Type.Con result = new com.daml.daml_lf_dev.DamlLf2.Type.Con(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Type.Con result) {
if (argsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
args_ = java.util.Collections.unmodifiableList(args_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.args_ = args_;
} else {
result.args_ = argsBuilder_.build();
}
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Type.Con result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tycon_ = tyconBuilder_ == null
? tycon_
: tyconBuilder_.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.daml_lf_dev.DamlLf2.Type.Con) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Type.Con)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Type.Con other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance()) return this;
if (other.hasTycon()) {
mergeTycon(other.getTycon());
}
if (argsBuilder_ == null) {
if (!other.args_.isEmpty()) {
if (args_.isEmpty()) {
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureArgsIsMutable();
args_.addAll(other.args_);
}
onChanged();
}
} else {
if (!other.args_.isEmpty()) {
if (argsBuilder_.isEmpty()) {
argsBuilder_.dispose();
argsBuilder_ = null;
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
argsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getArgsFieldBuilder() : null;
} else {
argsBuilder_.addAllMessages(other.args_);
}
}
}
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(
getTyconFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.daml.daml_lf_dev.DamlLf2.Type m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.Type.parser(),
extensionRegistry);
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(m);
} else {
argsBuilder_.addMessage(m);
}
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 com.daml.daml_lf_dev.DamlLf2.TypeConName tycon_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeConName, com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder, com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder> tyconBuilder_;
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return Whether the tycon field is set.
*/
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return The tycon.
*/
public com.daml.daml_lf_dev.DamlLf2.TypeConName getTycon() {
if (tyconBuilder_ == null) {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance() : tycon_;
} else {
return tyconBuilder_.getMessage();
}
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public Builder setTycon(com.daml.daml_lf_dev.DamlLf2.TypeConName value) {
if (tyconBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tycon_ = value;
} else {
tyconBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public Builder setTycon(
com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder builderForValue) {
if (tyconBuilder_ == null) {
tycon_ = builderForValue.build();
} else {
tyconBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public Builder mergeTycon(com.daml.daml_lf_dev.DamlLf2.TypeConName value) {
if (tyconBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
tycon_ != null &&
tycon_ != com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance()) {
getTyconBuilder().mergeFrom(value);
} else {
tycon_ = value;
}
} else {
tyconBuilder_.mergeFrom(value);
}
if (tycon_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public Builder clearTycon() {
bitField0_ = (bitField0_ & ~0x00000001);
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder getTyconBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTyconFieldBuilder().getBuilder();
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder getTyconOrBuilder() {
if (tyconBuilder_ != null) {
return tyconBuilder_.getMessageOrBuilder();
} else {
return tycon_ == null ?
com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance() : tycon_;
}
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeConName, com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder, com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder>
getTyconFieldBuilder() {
if (tyconBuilder_ == null) {
tyconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeConName, com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder, com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder>(
getTycon(),
getParentForChildren(),
isClean());
tycon_ = null;
}
return tyconBuilder_;
}
private java.util.List args_ =
java.util.Collections.emptyList();
private void ensureArgsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
args_ = new java.util.ArrayList(args_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder> argsBuilder_;
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List getArgsList() {
if (argsBuilder_ == null) {
return java.util.Collections.unmodifiableList(args_);
} else {
return argsBuilder_.getMessageList();
}
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public int getArgsCount() {
if (argsBuilder_ == null) {
return args_.size();
} else {
return argsBuilder_.getCount();
}
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index) {
if (argsBuilder_ == null) {
return args_.get(index);
} else {
return argsBuilder_.getMessage(index);
}
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.set(index, value);
onChanged();
} else {
argsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.set(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(value);
onChanged();
} else {
argsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(index, value);
onChanged();
} else {
argsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addAllArgs(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.Type> values) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, args_);
onChanged();
} else {
argsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder clearArgs() {
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
argsBuilder_.clear();
}
return this;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder removeArgs(int index) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.remove(index);
onChanged();
} else {
argsBuilder_.remove(index);
}
return this;
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder getArgsBuilder(
int index) {
return getArgsFieldBuilder().getBuilder(index);
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index) {
if (argsBuilder_ == null) {
return args_.get(index); } else {
return argsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList() {
if (argsBuilder_ != null) {
return argsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(args_);
}
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addArgsBuilder() {
return getArgsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addArgsBuilder(
int index) {
return getArgsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Type to which the constructor name is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List
getArgsBuilderList() {
return getArgsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsFieldBuilder() {
if (argsBuilder_ == null) {
argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>(
args_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
args_ = null;
}
return argsBuilder_;
}
@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:daml_lf_2.Type.Con)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Type.Con)
private static final com.daml.daml_lf_dev.DamlLf2.Type.Con DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Type.Con();
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Con getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Con 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.daml_lf_dev.DamlLf2.Type.Con getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SynOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Type.Syn)
com.google.protobuf.MessageOrBuilder {
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
* @return Whether the tysyn field is set.
*/
boolean hasTysyn();
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
* @return The tysyn.
*/
com.daml.daml_lf_dev.DamlLf2.TypeSynName getTysyn();
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
*/
com.daml.daml_lf_dev.DamlLf2.TypeSynNameOrBuilder getTysynOrBuilder();
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
java.util.List
getArgsList();
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index);
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
int getArgsCount();
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList();
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index);
}
/**
*
* Fully applied type constructor 'TySyn'
*
*
* Protobuf type {@code daml_lf_2.Type.Syn}
*/
public static final class Syn extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Type.Syn)
SynOrBuilder {
private static final long serialVersionUID = 0L;
// Use Syn.newBuilder() to construct.
private Syn(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Syn() {
args_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Syn();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Syn_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Syn_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Syn.class, com.daml.daml_lf_dev.DamlLf2.Type.Syn.Builder.class);
}
private int bitField0_;
public static final int TYSYN_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.TypeSynName tysyn_;
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
* @return Whether the tysyn field is set.
*/
@java.lang.Override
public boolean hasTysyn() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
* @return The tysyn.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeSynName getTysyn() {
return tysyn_ == null ? com.daml.daml_lf_dev.DamlLf2.TypeSynName.getDefaultInstance() : tysyn_;
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeSynNameOrBuilder getTysynOrBuilder() {
return tysyn_ == null ? com.daml.daml_lf_dev.DamlLf2.TypeSynName.getDefaultInstance() : tysyn_;
}
public static final int ARGS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List args_;
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public java.util.List getArgsList() {
return args_;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList() {
return args_;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public int getArgsCount() {
return args_.size();
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index) {
return args_.get(index);
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index) {
return args_.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 {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getTysyn());
}
for (int i = 0; i < args_.size(); i++) {
output.writeMessage(2, args_.get(i));
}
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, getTysyn());
}
for (int i = 0; i < args_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, args_.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.daml_lf_dev.DamlLf2.Type.Syn)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Type.Syn other = (com.daml.daml_lf_dev.DamlLf2.Type.Syn) obj;
if (hasTysyn() != other.hasTysyn()) return false;
if (hasTysyn()) {
if (!getTysyn()
.equals(other.getTysyn())) return false;
}
if (!getArgsList()
.equals(other.getArgsList())) 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 (hasTysyn()) {
hash = (37 * hash) + TYSYN_FIELD_NUMBER;
hash = (53 * hash) + getTysyn().hashCode();
}
if (getArgsCount() > 0) {
hash = (37 * hash) + ARGS_FIELD_NUMBER;
hash = (53 * hash) + getArgsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn 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.daml_lf_dev.DamlLf2.Type.Syn parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn 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.daml_lf_dev.DamlLf2.Type.Syn parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn 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.daml_lf_dev.DamlLf2.Type.Syn parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn 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.daml_lf_dev.DamlLf2.Type.Syn 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;
}
/**
*
* Fully applied type constructor 'TySyn'
*
*
* Protobuf type {@code daml_lf_2.Type.Syn}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Type.Syn)
com.daml.daml_lf_dev.DamlLf2.Type.SynOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Syn_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Syn_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Syn.class, com.daml.daml_lf_dev.DamlLf2.Type.Syn.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Type.Syn.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTysynFieldBuilder();
getArgsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tysyn_ = null;
if (tysynBuilder_ != null) {
tysynBuilder_.dispose();
tysynBuilder_ = null;
}
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
} else {
args_ = null;
argsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Syn_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Syn getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Type.Syn.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Syn build() {
com.daml.daml_lf_dev.DamlLf2.Type.Syn result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Syn buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Type.Syn result = new com.daml.daml_lf_dev.DamlLf2.Type.Syn(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Type.Syn result) {
if (argsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
args_ = java.util.Collections.unmodifiableList(args_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.args_ = args_;
} else {
result.args_ = argsBuilder_.build();
}
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Type.Syn result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tysyn_ = tysynBuilder_ == null
? tysyn_
: tysynBuilder_.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.daml_lf_dev.DamlLf2.Type.Syn) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Type.Syn)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Type.Syn other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Type.Syn.getDefaultInstance()) return this;
if (other.hasTysyn()) {
mergeTysyn(other.getTysyn());
}
if (argsBuilder_ == null) {
if (!other.args_.isEmpty()) {
if (args_.isEmpty()) {
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureArgsIsMutable();
args_.addAll(other.args_);
}
onChanged();
}
} else {
if (!other.args_.isEmpty()) {
if (argsBuilder_.isEmpty()) {
argsBuilder_.dispose();
argsBuilder_ = null;
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
argsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getArgsFieldBuilder() : null;
} else {
argsBuilder_.addAllMessages(other.args_);
}
}
}
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(
getTysynFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.daml.daml_lf_dev.DamlLf2.Type m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.Type.parser(),
extensionRegistry);
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(m);
} else {
argsBuilder_.addMessage(m);
}
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 com.daml.daml_lf_dev.DamlLf2.TypeSynName tysyn_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeSynName, com.daml.daml_lf_dev.DamlLf2.TypeSynName.Builder, com.daml.daml_lf_dev.DamlLf2.TypeSynNameOrBuilder> tysynBuilder_;
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
* @return Whether the tysyn field is set.
*/
public boolean hasTysyn() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
* @return The tysyn.
*/
public com.daml.daml_lf_dev.DamlLf2.TypeSynName getTysyn() {
if (tysynBuilder_ == null) {
return tysyn_ == null ? com.daml.daml_lf_dev.DamlLf2.TypeSynName.getDefaultInstance() : tysyn_;
} else {
return tysynBuilder_.getMessage();
}
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
*/
public Builder setTysyn(com.daml.daml_lf_dev.DamlLf2.TypeSynName value) {
if (tysynBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tysyn_ = value;
} else {
tysynBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
*/
public Builder setTysyn(
com.daml.daml_lf_dev.DamlLf2.TypeSynName.Builder builderForValue) {
if (tysynBuilder_ == null) {
tysyn_ = builderForValue.build();
} else {
tysynBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
*/
public Builder mergeTysyn(com.daml.daml_lf_dev.DamlLf2.TypeSynName value) {
if (tysynBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
tysyn_ != null &&
tysyn_ != com.daml.daml_lf_dev.DamlLf2.TypeSynName.getDefaultInstance()) {
getTysynBuilder().mergeFrom(value);
} else {
tysyn_ = value;
}
} else {
tysynBuilder_.mergeFrom(value);
}
if (tysyn_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
*/
public Builder clearTysyn() {
bitField0_ = (bitField0_ & ~0x00000001);
tysyn_ = null;
if (tysynBuilder_ != null) {
tysynBuilder_.dispose();
tysynBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeSynName.Builder getTysynBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTysynFieldBuilder().getBuilder();
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeSynNameOrBuilder getTysynOrBuilder() {
if (tysynBuilder_ != null) {
return tysynBuilder_.getMessageOrBuilder();
} else {
return tysyn_ == null ?
com.daml.daml_lf_dev.DamlLf2.TypeSynName.getDefaultInstance() : tysyn_;
}
}
/**
*
* Name of the type synonym
*
*
* .daml_lf_2.TypeSynName tysyn = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeSynName, com.daml.daml_lf_dev.DamlLf2.TypeSynName.Builder, com.daml.daml_lf_dev.DamlLf2.TypeSynNameOrBuilder>
getTysynFieldBuilder() {
if (tysynBuilder_ == null) {
tysynBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeSynName, com.daml.daml_lf_dev.DamlLf2.TypeSynName.Builder, com.daml.daml_lf_dev.DamlLf2.TypeSynNameOrBuilder>(
getTysyn(),
getParentForChildren(),
isClean());
tysyn_ = null;
}
return tysynBuilder_;
}
private java.util.List args_ =
java.util.Collections.emptyList();
private void ensureArgsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
args_ = new java.util.ArrayList(args_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder> argsBuilder_;
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List getArgsList() {
if (argsBuilder_ == null) {
return java.util.Collections.unmodifiableList(args_);
} else {
return argsBuilder_.getMessageList();
}
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public int getArgsCount() {
if (argsBuilder_ == null) {
return args_.size();
} else {
return argsBuilder_.getCount();
}
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index) {
if (argsBuilder_ == null) {
return args_.get(index);
} else {
return argsBuilder_.getMessage(index);
}
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.set(index, value);
onChanged();
} else {
argsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.set(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(value);
onChanged();
} else {
argsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(index, value);
onChanged();
} else {
argsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addAllArgs(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.Type> values) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, args_);
onChanged();
} else {
argsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder clearArgs() {
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
argsBuilder_.clear();
}
return this;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder removeArgs(int index) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.remove(index);
onChanged();
} else {
argsBuilder_.remove(index);
}
return this;
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder getArgsBuilder(
int index) {
return getArgsFieldBuilder().getBuilder(index);
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index) {
if (argsBuilder_ == null) {
return args_.get(index); } else {
return argsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList() {
if (argsBuilder_ != null) {
return argsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(args_);
}
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addArgsBuilder() {
return getArgsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addArgsBuilder(
int index) {
return getArgsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Types to which the synonym is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List
getArgsBuilderList() {
return getArgsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsFieldBuilder() {
if (argsBuilder_ == null) {
argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>(
args_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
args_ = null;
}
return argsBuilder_;
}
@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:daml_lf_2.Type.Syn)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Type.Syn)
private static final com.daml.daml_lf_dev.DamlLf2.Type.Syn DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Type.Syn();
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Syn getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Syn 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.daml_lf_dev.DamlLf2.Type.Syn getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BuiltinOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Type.Builtin)
com.google.protobuf.MessageOrBuilder {
/**
*
* Builtin type
* FixMe: Rename
*
*
* .daml_lf_2.BuiltinType builtin = 1;
* @return The enum numeric value on the wire for builtin.
*/
int getBuiltinValue();
/**
*
* Builtin type
* FixMe: Rename
*
*
* .daml_lf_2.BuiltinType builtin = 1;
* @return The builtin.
*/
com.daml.daml_lf_dev.DamlLf2.BuiltinType getBuiltin();
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
java.util.List
getArgsList();
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index);
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
int getArgsCount();
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList();
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index);
}
/**
*
* Possibly applied builtin types
*
*
* Protobuf type {@code daml_lf_2.Type.Builtin}
*/
public static final class Builtin extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Type.Builtin)
BuiltinOrBuilder {
private static final long serialVersionUID = 0L;
// Use Builtin.newBuilder() to construct.
private Builtin(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Builtin() {
builtin_ = 0;
args_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Builtin();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Builtin_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Builtin_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Builtin.class, com.daml.daml_lf_dev.DamlLf2.Type.Builtin.Builder.class);
}
public static final int BUILTIN_FIELD_NUMBER = 1;
private int builtin_ = 0;
/**
*
* Builtin type
* FixMe: Rename
*
*
* .daml_lf_2.BuiltinType builtin = 1;
* @return The enum numeric value on the wire for builtin.
*/
@java.lang.Override public int getBuiltinValue() {
return builtin_;
}
/**
*
* Builtin type
* FixMe: Rename
*
*
* .daml_lf_2.BuiltinType builtin = 1;
* @return The builtin.
*/
@java.lang.Override public com.daml.daml_lf_dev.DamlLf2.BuiltinType getBuiltin() {
com.daml.daml_lf_dev.DamlLf2.BuiltinType result = com.daml.daml_lf_dev.DamlLf2.BuiltinType.forNumber(builtin_);
return result == null ? com.daml.daml_lf_dev.DamlLf2.BuiltinType.UNRECOGNIZED : result;
}
public static final int ARGS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List args_;
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public java.util.List getArgsList() {
return args_;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList() {
return args_;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public int getArgsCount() {
return args_.size();
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index) {
return args_.get(index);
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index) {
return args_.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 {
if (builtin_ != com.daml.daml_lf_dev.DamlLf2.BuiltinType.UNIT.getNumber()) {
output.writeEnum(1, builtin_);
}
for (int i = 0; i < args_.size(); i++) {
output.writeMessage(2, args_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (builtin_ != com.daml.daml_lf_dev.DamlLf2.BuiltinType.UNIT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, builtin_);
}
for (int i = 0; i < args_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, args_.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.daml_lf_dev.DamlLf2.Type.Builtin)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Type.Builtin other = (com.daml.daml_lf_dev.DamlLf2.Type.Builtin) obj;
if (builtin_ != other.builtin_) return false;
if (!getArgsList()
.equals(other.getArgsList())) 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) + BUILTIN_FIELD_NUMBER;
hash = (53 * hash) + builtin_;
if (getArgsCount() > 0) {
hash = (37 * hash) + ARGS_FIELD_NUMBER;
hash = (53 * hash) + getArgsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin 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.daml_lf_dev.DamlLf2.Type.Builtin parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin 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.daml_lf_dev.DamlLf2.Type.Builtin parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin 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.daml_lf_dev.DamlLf2.Type.Builtin parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin 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.daml_lf_dev.DamlLf2.Type.Builtin 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;
}
/**
*
* Possibly applied builtin types
*
*
* Protobuf type {@code daml_lf_2.Type.Builtin}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Type.Builtin)
com.daml.daml_lf_dev.DamlLf2.Type.BuiltinOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Builtin_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Builtin_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Builtin.class, com.daml.daml_lf_dev.DamlLf2.Type.Builtin.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Type.Builtin.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
builtin_ = 0;
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
} else {
args_ = null;
argsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Builtin_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Builtin getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Type.Builtin.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Builtin build() {
com.daml.daml_lf_dev.DamlLf2.Type.Builtin result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Builtin buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Type.Builtin result = new com.daml.daml_lf_dev.DamlLf2.Type.Builtin(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Type.Builtin result) {
if (argsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
args_ = java.util.Collections.unmodifiableList(args_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.args_ = args_;
} else {
result.args_ = argsBuilder_.build();
}
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Type.Builtin result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.builtin_ = builtin_;
}
}
@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.daml_lf_dev.DamlLf2.Type.Builtin) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Type.Builtin)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Type.Builtin other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Type.Builtin.getDefaultInstance()) return this;
if (other.builtin_ != 0) {
setBuiltinValue(other.getBuiltinValue());
}
if (argsBuilder_ == null) {
if (!other.args_.isEmpty()) {
if (args_.isEmpty()) {
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureArgsIsMutable();
args_.addAll(other.args_);
}
onChanged();
}
} else {
if (!other.args_.isEmpty()) {
if (argsBuilder_.isEmpty()) {
argsBuilder_.dispose();
argsBuilder_ = null;
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
argsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getArgsFieldBuilder() : null;
} else {
argsBuilder_.addAllMessages(other.args_);
}
}
}
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 8: {
builtin_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
com.daml.daml_lf_dev.DamlLf2.Type m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.Type.parser(),
extensionRegistry);
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(m);
} else {
argsBuilder_.addMessage(m);
}
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 int builtin_ = 0;
/**
*
* Builtin type
* FixMe: Rename
*
*
* .daml_lf_2.BuiltinType builtin = 1;
* @return The enum numeric value on the wire for builtin.
*/
@java.lang.Override public int getBuiltinValue() {
return builtin_;
}
/**
*
* Builtin type
* FixMe: Rename
*
*
* .daml_lf_2.BuiltinType builtin = 1;
* @param value The enum numeric value on the wire for builtin to set.
* @return This builder for chaining.
*/
public Builder setBuiltinValue(int value) {
builtin_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Builtin type
* FixMe: Rename
*
*
* .daml_lf_2.BuiltinType builtin = 1;
* @return The builtin.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.BuiltinType getBuiltin() {
com.daml.daml_lf_dev.DamlLf2.BuiltinType result = com.daml.daml_lf_dev.DamlLf2.BuiltinType.forNumber(builtin_);
return result == null ? com.daml.daml_lf_dev.DamlLf2.BuiltinType.UNRECOGNIZED : result;
}
/**
*
* Builtin type
* FixMe: Rename
*
*
* .daml_lf_2.BuiltinType builtin = 1;
* @param value The builtin to set.
* @return This builder for chaining.
*/
public Builder setBuiltin(com.daml.daml_lf_dev.DamlLf2.BuiltinType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
builtin_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Builtin type
* FixMe: Rename
*
*
* .daml_lf_2.BuiltinType builtin = 1;
* @return This builder for chaining.
*/
public Builder clearBuiltin() {
bitField0_ = (bitField0_ & ~0x00000001);
builtin_ = 0;
onChanged();
return this;
}
private java.util.List args_ =
java.util.Collections.emptyList();
private void ensureArgsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
args_ = new java.util.ArrayList(args_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder> argsBuilder_;
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List getArgsList() {
if (argsBuilder_ == null) {
return java.util.Collections.unmodifiableList(args_);
} else {
return argsBuilder_.getMessageList();
}
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public int getArgsCount() {
if (argsBuilder_ == null) {
return args_.size();
} else {
return argsBuilder_.getCount();
}
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type getArgs(int index) {
if (argsBuilder_ == null) {
return args_.get(index);
} else {
return argsBuilder_.getMessage(index);
}
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.set(index, value);
onChanged();
} else {
argsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.set(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(value);
onChanged();
} else {
argsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(index, value);
onChanged();
} else {
argsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder addAllArgs(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.Type> values) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, args_);
onChanged();
} else {
argsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder clearArgs() {
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
argsBuilder_.clear();
}
return this;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public Builder removeArgs(int index) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.remove(index);
onChanged();
} else {
argsBuilder_.remove(index);
}
return this;
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder getArgsBuilder(
int index) {
return getArgsFieldBuilder().getBuilder(index);
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getArgsOrBuilder(
int index) {
if (argsBuilder_ == null) {
return args_.get(index); } else {
return argsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsOrBuilderList() {
if (argsBuilder_ != null) {
return argsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(args_);
}
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addArgsBuilder() {
return getArgsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addArgsBuilder(
int index) {
return getArgsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Types to which the builtin type is applied.
*
*
* repeated .daml_lf_2.Type args = 2;
*/
public java.util.List
getArgsBuilderList() {
return getArgsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getArgsFieldBuilder() {
if (argsBuilder_ == null) {
argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>(
args_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
args_ = null;
}
return argsBuilder_;
}
@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:daml_lf_2.Type.Builtin)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Type.Builtin)
private static final com.daml.daml_lf_dev.DamlLf2.Type.Builtin DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Type.Builtin();
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Builtin getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Builtin 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.daml_lf_dev.DamlLf2.Type.Builtin getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ForallOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Type.Forall)
com.google.protobuf.MessageOrBuilder {
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
java.util.List
getVarsList();
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind getVars(int index);
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
int getVarsCount();
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder>
getVarsOrBuilderList();
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder getVarsOrBuilder(
int index);
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
* @return Whether the body field is set.
*/
boolean hasBody();
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
* @return The body.
*/
com.daml.daml_lf_dev.DamlLf2.Type getBody();
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
*/
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getBodyOrBuilder();
}
/**
*
* Universal quantification 'TyForAll'
*
*
* Protobuf type {@code daml_lf_2.Type.Forall}
*/
public static final class Forall extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Type.Forall)
ForallOrBuilder {
private static final long serialVersionUID = 0L;
// Use Forall.newBuilder() to construct.
private Forall(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Forall() {
vars_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Forall();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Forall_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Forall_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Forall.class, com.daml.daml_lf_dev.DamlLf2.Type.Forall.Builder.class);
}
private int bitField0_;
public static final int VARS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List vars_;
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
@java.lang.Override
public java.util.List getVarsList() {
return vars_;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder>
getVarsOrBuilderList() {
return vars_;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
@java.lang.Override
public int getVarsCount() {
return vars_.size();
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind getVars(int index) {
return vars_.get(index);
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder getVarsOrBuilder(
int index) {
return vars_.get(index);
}
public static final int BODY_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Type body_;
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
* @return Whether the body field is set.
*/
@java.lang.Override
public boolean hasBody() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
* @return The body.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type getBody() {
return body_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : body_;
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getBodyOrBuilder() {
return body_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : body_;
}
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 < vars_.size(); i++) {
output.writeMessage(1, vars_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getBody());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < vars_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, vars_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getBody());
}
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.daml_lf_dev.DamlLf2.Type.Forall)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Type.Forall other = (com.daml.daml_lf_dev.DamlLf2.Type.Forall) obj;
if (!getVarsList()
.equals(other.getVarsList())) return false;
if (hasBody() != other.hasBody()) return false;
if (hasBody()) {
if (!getBody()
.equals(other.getBody())) 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 (getVarsCount() > 0) {
hash = (37 * hash) + VARS_FIELD_NUMBER;
hash = (53 * hash) + getVarsList().hashCode();
}
if (hasBody()) {
hash = (37 * hash) + BODY_FIELD_NUMBER;
hash = (53 * hash) + getBody().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall 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.daml_lf_dev.DamlLf2.Type.Forall parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall 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.daml_lf_dev.DamlLf2.Type.Forall parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall 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.daml_lf_dev.DamlLf2.Type.Forall parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall 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.daml_lf_dev.DamlLf2.Type.Forall 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;
}
/**
*
* Universal quantification 'TyForAll'
*
*
* Protobuf type {@code daml_lf_2.Type.Forall}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Type.Forall)
com.daml.daml_lf_dev.DamlLf2.Type.ForallOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Forall_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Forall_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Forall.class, com.daml.daml_lf_dev.DamlLf2.Type.Forall.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Type.Forall.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getVarsFieldBuilder();
getBodyFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (varsBuilder_ == null) {
vars_ = java.util.Collections.emptyList();
} else {
vars_ = null;
varsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
body_ = null;
if (bodyBuilder_ != null) {
bodyBuilder_.dispose();
bodyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Forall_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Forall getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Type.Forall.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Forall build() {
com.daml.daml_lf_dev.DamlLf2.Type.Forall result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Forall buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Type.Forall result = new com.daml.daml_lf_dev.DamlLf2.Type.Forall(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Type.Forall result) {
if (varsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
vars_ = java.util.Collections.unmodifiableList(vars_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.vars_ = vars_;
} else {
result.vars_ = varsBuilder_.build();
}
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Type.Forall result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.body_ = bodyBuilder_ == null
? body_
: bodyBuilder_.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.daml_lf_dev.DamlLf2.Type.Forall) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Type.Forall)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Type.Forall other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Type.Forall.getDefaultInstance()) return this;
if (varsBuilder_ == null) {
if (!other.vars_.isEmpty()) {
if (vars_.isEmpty()) {
vars_ = other.vars_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureVarsIsMutable();
vars_.addAll(other.vars_);
}
onChanged();
}
} else {
if (!other.vars_.isEmpty()) {
if (varsBuilder_.isEmpty()) {
varsBuilder_.dispose();
varsBuilder_ = null;
vars_ = other.vars_;
bitField0_ = (bitField0_ & ~0x00000001);
varsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getVarsFieldBuilder() : null;
} else {
varsBuilder_.addAllMessages(other.vars_);
}
}
}
if (other.hasBody()) {
mergeBody(other.getBody());
}
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.daml_lf_dev.DamlLf2.TypeVarWithKind m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.parser(),
extensionRegistry);
if (varsBuilder_ == null) {
ensureVarsIsMutable();
vars_.add(m);
} else {
varsBuilder_.addMessage(m);
}
break;
} // case 10
case 18: {
input.readMessage(
getBodyFieldBuilder().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.util.List vars_ =
java.util.Collections.emptyList();
private void ensureVarsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
vars_ = new java.util.ArrayList(vars_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder> varsBuilder_;
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public java.util.List getVarsList() {
if (varsBuilder_ == null) {
return java.util.Collections.unmodifiableList(vars_);
} else {
return varsBuilder_.getMessageList();
}
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public int getVarsCount() {
if (varsBuilder_ == null) {
return vars_.size();
} else {
return varsBuilder_.getCount();
}
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind getVars(int index) {
if (varsBuilder_ == null) {
return vars_.get(index);
} else {
return varsBuilder_.getMessage(index);
}
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public Builder setVars(
int index, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind value) {
if (varsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVarsIsMutable();
vars_.set(index, value);
onChanged();
} else {
varsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public Builder setVars(
int index, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder builderForValue) {
if (varsBuilder_ == null) {
ensureVarsIsMutable();
vars_.set(index, builderForValue.build());
onChanged();
} else {
varsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public Builder addVars(com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind value) {
if (varsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVarsIsMutable();
vars_.add(value);
onChanged();
} else {
varsBuilder_.addMessage(value);
}
return this;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public Builder addVars(
int index, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind value) {
if (varsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVarsIsMutable();
vars_.add(index, value);
onChanged();
} else {
varsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public Builder addVars(
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder builderForValue) {
if (varsBuilder_ == null) {
ensureVarsIsMutable();
vars_.add(builderForValue.build());
onChanged();
} else {
varsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public Builder addVars(
int index, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder builderForValue) {
if (varsBuilder_ == null) {
ensureVarsIsMutable();
vars_.add(index, builderForValue.build());
onChanged();
} else {
varsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public Builder addAllVars(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind> values) {
if (varsBuilder_ == null) {
ensureVarsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, vars_);
onChanged();
} else {
varsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public Builder clearVars() {
if (varsBuilder_ == null) {
vars_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
varsBuilder_.clear();
}
return this;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public Builder removeVars(int index) {
if (varsBuilder_ == null) {
ensureVarsIsMutable();
vars_.remove(index);
onChanged();
} else {
varsBuilder_.remove(index);
}
return this;
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder getVarsBuilder(
int index) {
return getVarsFieldBuilder().getBuilder(index);
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder getVarsOrBuilder(
int index) {
if (varsBuilder_ == null) {
return vars_.get(index); } else {
return varsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder>
getVarsOrBuilderList() {
if (varsBuilder_ != null) {
return varsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(vars_);
}
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder addVarsBuilder() {
return getVarsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.getDefaultInstance());
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder addVarsBuilder(
int index) {
return getVarsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.getDefaultInstance());
}
/**
*
* binders of the quantification
* *Must be non-empty*
*
*
* repeated .daml_lf_2.TypeVarWithKind vars = 1;
*/
public java.util.List
getVarsBuilderList() {
return getVarsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder>
getVarsFieldBuilder() {
if (varsBuilder_ == null) {
varsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKind.Builder, com.daml.daml_lf_dev.DamlLf2.TypeVarWithKindOrBuilder>(
vars_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
vars_ = null;
}
return varsBuilder_;
}
private com.daml.daml_lf_dev.DamlLf2.Type body_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder> bodyBuilder_;
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
* @return Whether the body field is set.
*/
public boolean hasBody() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
* @return The body.
*/
public com.daml.daml_lf_dev.DamlLf2.Type getBody() {
if (bodyBuilder_ == null) {
return body_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : body_;
} else {
return bodyBuilder_.getMessage();
}
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
*/
public Builder setBody(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (bodyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
body_ = value;
} else {
bodyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
*/
public Builder setBody(
com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (bodyBuilder_ == null) {
body_ = builderForValue.build();
} else {
bodyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
*/
public Builder mergeBody(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (bodyBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
body_ != null &&
body_ != com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance()) {
getBodyBuilder().mergeFrom(value);
} else {
body_ = value;
}
} else {
bodyBuilder_.mergeFrom(value);
}
if (body_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
*/
public Builder clearBody() {
bitField0_ = (bitField0_ & ~0x00000002);
body_ = null;
if (bodyBuilder_ != null) {
bodyBuilder_.dispose();
bodyBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder getBodyBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getBodyFieldBuilder().getBuilder();
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getBodyOrBuilder() {
if (bodyBuilder_ != null) {
return bodyBuilder_.getMessageOrBuilder();
} else {
return body_ == null ?
com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance() : body_;
}
}
/**
*
* Body of the quantification
*
*
* .daml_lf_2.Type body = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getBodyFieldBuilder() {
if (bodyBuilder_ == null) {
bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>(
getBody(),
getParentForChildren(),
isClean());
body_ = null;
}
return bodyBuilder_;
}
@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:daml_lf_2.Type.Forall)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Type.Forall)
private static final com.daml.daml_lf_dev.DamlLf2.Type.Forall DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Type.Forall();
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Forall getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Forall 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.daml_lf_dev.DamlLf2.Type.Forall getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StructOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Type.Struct)
com.google.protobuf.MessageOrBuilder {
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
java.util.List
getFieldsList();
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
com.daml.daml_lf_dev.DamlLf2.FieldWithType getFields(int index);
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
int getFieldsCount();
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder>
getFieldsOrBuilderList();
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder getFieldsOrBuilder(
int index);
}
/**
*
* Struct type
*
*
* Protobuf type {@code daml_lf_2.Type.Struct}
*/
public static final class Struct extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Type.Struct)
StructOrBuilder {
private static final long serialVersionUID = 0L;
// Use Struct.newBuilder() to construct.
private Struct(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Struct() {
fields_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Struct();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Struct_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Struct_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Struct.class, com.daml.daml_lf_dev.DamlLf2.Type.Struct.Builder.class);
}
public static final int FIELDS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List fields_;
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
@java.lang.Override
public java.util.List getFieldsList() {
return fields_;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder>
getFieldsOrBuilderList() {
return fields_;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
@java.lang.Override
public int getFieldsCount() {
return fields_.size();
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithType getFields(int index) {
return fields_.get(index);
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder 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.daml_lf_dev.DamlLf2.Type.Struct)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Type.Struct other = (com.daml.daml_lf_dev.DamlLf2.Type.Struct) 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.daml_lf_dev.DamlLf2.Type.Struct parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Struct parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Struct parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Struct 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.daml_lf_dev.DamlLf2.Type.Struct parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Struct parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Struct parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Struct 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.daml_lf_dev.DamlLf2.Type.Struct parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Struct 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.daml_lf_dev.DamlLf2.Type.Struct parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Struct 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.daml_lf_dev.DamlLf2.Type.Struct 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;
}
/**
*
* Struct type
*
*
* Protobuf type {@code daml_lf_2.Type.Struct}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Type.Struct)
com.daml.daml_lf_dev.DamlLf2.Type.StructOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Struct_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Struct_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.Struct.class, com.daml.daml_lf_dev.DamlLf2.Type.Struct.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Type.Struct.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.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_Struct_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Struct getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Type.Struct.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Struct build() {
com.daml.daml_lf_dev.DamlLf2.Type.Struct result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Struct buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Type.Struct result = new com.daml.daml_lf_dev.DamlLf2.Type.Struct(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Type.Struct 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.daml_lf_dev.DamlLf2.Type.Struct 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.daml_lf_dev.DamlLf2.Type.Struct) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Type.Struct)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Type.Struct other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Type.Struct.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.daml_lf_dev.DamlLf2.FieldWithType m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.FieldWithType.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.daml_lf_dev.DamlLf2.FieldWithType, com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder, com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder> fieldsBuilder_;
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public java.util.List getFieldsList() {
if (fieldsBuilder_ == null) {
return java.util.Collections.unmodifiableList(fields_);
} else {
return fieldsBuilder_.getMessageList();
}
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public int getFieldsCount() {
if (fieldsBuilder_ == null) {
return fields_.size();
} else {
return fieldsBuilder_.getCount();
}
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithType getFields(int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index);
} else {
return fieldsBuilder_.getMessage(index);
}
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public Builder setFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithType value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.set(index, value);
onChanged();
} else {
fieldsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public Builder setFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.set(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public Builder addFields(com.daml.daml_lf_dev.DamlLf2.FieldWithType value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(value);
onChanged();
} else {
fieldsBuilder_.addMessage(value);
}
return this;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public Builder addFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithType value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(index, value);
onChanged();
} else {
fieldsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public Builder addFields(
com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public Builder addFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public Builder addAllFields(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.FieldWithType> values) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fields_);
onChanged();
} else {
fieldsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public Builder clearFields() {
if (fieldsBuilder_ == null) {
fields_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
fieldsBuilder_.clear();
}
return this;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public Builder removeFields(int index) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.remove(index);
onChanged();
} else {
fieldsBuilder_.remove(index);
}
return this;
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder getFieldsBuilder(
int index) {
return getFieldsFieldBuilder().getBuilder(index);
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder getFieldsOrBuilder(
int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index); } else {
return fieldsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder>
getFieldsOrBuilderList() {
if (fieldsBuilder_ != null) {
return fieldsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(fields_);
}
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder addFieldsBuilder() {
return getFieldsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.FieldWithType.getDefaultInstance());
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder addFieldsBuilder(
int index) {
return getFieldsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.FieldWithType.getDefaultInstance());
}
/**
*
* name of the field with their types.
*
*
* repeated .daml_lf_2.FieldWithType fields = 1;
*/
public java.util.List
getFieldsBuilderList() {
return getFieldsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.FieldWithType, com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder, com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder>
getFieldsFieldBuilder() {
if (fieldsBuilder_ == null) {
fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.FieldWithType, com.daml.daml_lf_dev.DamlLf2.FieldWithType.Builder, com.daml.daml_lf_dev.DamlLf2.FieldWithTypeOrBuilder>(
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:daml_lf_2.Type.Struct)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Type.Struct)
private static final com.daml.daml_lf_dev.DamlLf2.Type.Struct DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Type.Struct();
}
public static com.daml.daml_lf_dev.DamlLf2.Type.Struct getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Struct 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.daml_lf_dev.DamlLf2.Type.Struct getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int sumCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object sum_;
public enum SumCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
VAR(1),
CON(2),
BUILTIN(3),
FORALL(4),
STRUCT(5),
NAT(6),
SYN(7),
INTERNED(8),
SUM_NOT_SET(0);
private final int value;
private SumCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SumCase valueOf(int value) {
return forNumber(value);
}
public static SumCase forNumber(int value) {
switch (value) {
case 1: return VAR;
case 2: return CON;
case 3: return BUILTIN;
case 4: return FORALL;
case 5: return STRUCT;
case 6: return NAT;
case 7: return SYN;
case 8: return INTERNED;
case 0: return SUM_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public static final int VAR_FIELD_NUMBER = 1;
/**
* .daml_lf_2.Type.Var var = 1;
* @return Whether the var field is set.
*/
@java.lang.Override
public boolean hasVar() {
return sumCase_ == 1;
}
/**
* .daml_lf_2.Type.Var var = 1;
* @return The var.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Var getVar() {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Var) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Var.getDefaultInstance();
}
/**
* .daml_lf_2.Type.Var var = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.VarOrBuilder getVarOrBuilder() {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Var) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Var.getDefaultInstance();
}
public static final int CON_FIELD_NUMBER = 2;
/**
* .daml_lf_2.Type.Con con = 2;
* @return Whether the con field is set.
*/
@java.lang.Override
public boolean hasCon() {
return sumCase_ == 2;
}
/**
* .daml_lf_2.Type.Con con = 2;
* @return The con.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Con getCon() {
if (sumCase_ == 2) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Con) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance();
}
/**
* .daml_lf_2.Type.Con con = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getConOrBuilder() {
if (sumCase_ == 2) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Con) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance();
}
public static final int BUILTIN_FIELD_NUMBER = 3;
/**
* .daml_lf_2.Type.Builtin builtin = 3;
* @return Whether the builtin field is set.
*/
@java.lang.Override
public boolean hasBuiltin() {
return sumCase_ == 3;
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
* @return The builtin.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Builtin getBuiltin() {
if (sumCase_ == 3) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Builtin) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Builtin.getDefaultInstance();
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.BuiltinOrBuilder getBuiltinOrBuilder() {
if (sumCase_ == 3) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Builtin) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Builtin.getDefaultInstance();
}
public static final int FORALL_FIELD_NUMBER = 4;
/**
* .daml_lf_2.Type.Forall forall = 4;
* @return Whether the forall field is set.
*/
@java.lang.Override
public boolean hasForall() {
return sumCase_ == 4;
}
/**
* .daml_lf_2.Type.Forall forall = 4;
* @return The forall.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Forall getForall() {
if (sumCase_ == 4) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Forall) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Forall.getDefaultInstance();
}
/**
* .daml_lf_2.Type.Forall forall = 4;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.ForallOrBuilder getForallOrBuilder() {
if (sumCase_ == 4) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Forall) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Forall.getDefaultInstance();
}
public static final int STRUCT_FIELD_NUMBER = 5;
/**
* .daml_lf_2.Type.Struct struct = 5;
* @return Whether the struct field is set.
*/
@java.lang.Override
public boolean hasStruct() {
return sumCase_ == 5;
}
/**
* .daml_lf_2.Type.Struct struct = 5;
* @return The struct.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Struct getStruct() {
if (sumCase_ == 5) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Struct) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Struct.getDefaultInstance();
}
/**
* .daml_lf_2.Type.Struct struct = 5;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.StructOrBuilder getStructOrBuilder() {
if (sumCase_ == 5) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Struct) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Struct.getDefaultInstance();
}
public static final int NAT_FIELD_NUMBER = 6;
/**
*
* *Must be between 0 and 37 (bounds inclusive)*
* use standard signed long for future usage.
*
*
* sint64 nat = 6;
* @return Whether the nat field is set.
*/
@java.lang.Override
public boolean hasNat() {
return sumCase_ == 6;
}
/**
*
* *Must be between 0 and 37 (bounds inclusive)*
* use standard signed long for future usage.
*
*
* sint64 nat = 6;
* @return The nat.
*/
@java.lang.Override
public long getNat() {
if (sumCase_ == 6) {
return (java.lang.Long) sum_;
}
return 0L;
}
public static final int SYN_FIELD_NUMBER = 7;
/**
* .daml_lf_2.Type.Syn syn = 7;
* @return Whether the syn field is set.
*/
@java.lang.Override
public boolean hasSyn() {
return sumCase_ == 7;
}
/**
* .daml_lf_2.Type.Syn syn = 7;
* @return The syn.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Syn getSyn() {
if (sumCase_ == 7) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Syn) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Syn.getDefaultInstance();
}
/**
* .daml_lf_2.Type.Syn syn = 7;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.SynOrBuilder getSynOrBuilder() {
if (sumCase_ == 7) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Syn) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Syn.getDefaultInstance();
}
public static final int INTERNED_FIELD_NUMBER = 8;
/**
* int32 interned = 8;
* @return Whether the interned field is set.
*/
@java.lang.Override
public boolean hasInterned() {
return sumCase_ == 8;
}
/**
* int32 interned = 8;
* @return The interned.
*/
@java.lang.Override
public int getInterned() {
if (sumCase_ == 8) {
return (java.lang.Integer) sum_;
}
return 0;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (sumCase_ == 1) {
output.writeMessage(1, (com.daml.daml_lf_dev.DamlLf2.Type.Var) sum_);
}
if (sumCase_ == 2) {
output.writeMessage(2, (com.daml.daml_lf_dev.DamlLf2.Type.Con) sum_);
}
if (sumCase_ == 3) {
output.writeMessage(3, (com.daml.daml_lf_dev.DamlLf2.Type.Builtin) sum_);
}
if (sumCase_ == 4) {
output.writeMessage(4, (com.daml.daml_lf_dev.DamlLf2.Type.Forall) sum_);
}
if (sumCase_ == 5) {
output.writeMessage(5, (com.daml.daml_lf_dev.DamlLf2.Type.Struct) sum_);
}
if (sumCase_ == 6) {
output.writeSInt64(
6, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 7) {
output.writeMessage(7, (com.daml.daml_lf_dev.DamlLf2.Type.Syn) sum_);
}
if (sumCase_ == 8) {
output.writeInt32(
8, (int)((java.lang.Integer) sum_));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sumCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.daml.daml_lf_dev.DamlLf2.Type.Var) sum_);
}
if (sumCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.daml.daml_lf_dev.DamlLf2.Type.Con) sum_);
}
if (sumCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.daml.daml_lf_dev.DamlLf2.Type.Builtin) sum_);
}
if (sumCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.daml.daml_lf_dev.DamlLf2.Type.Forall) sum_);
}
if (sumCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (com.daml.daml_lf_dev.DamlLf2.Type.Struct) sum_);
}
if (sumCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeSInt64Size(
6, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (com.daml.daml_lf_dev.DamlLf2.Type.Syn) sum_);
}
if (sumCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(
8, (int)((java.lang.Integer) sum_));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.daml.daml_lf_dev.DamlLf2.Type)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Type other = (com.daml.daml_lf_dev.DamlLf2.Type) obj;
if (!getSumCase().equals(other.getSumCase())) return false;
switch (sumCase_) {
case 1:
if (!getVar()
.equals(other.getVar())) return false;
break;
case 2:
if (!getCon()
.equals(other.getCon())) return false;
break;
case 3:
if (!getBuiltin()
.equals(other.getBuiltin())) return false;
break;
case 4:
if (!getForall()
.equals(other.getForall())) return false;
break;
case 5:
if (!getStruct()
.equals(other.getStruct())) return false;
break;
case 6:
if (getNat()
!= other.getNat()) return false;
break;
case 7:
if (!getSyn()
.equals(other.getSyn())) return false;
break;
case 8:
if (getInterned()
!= other.getInterned()) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (sumCase_) {
case 1:
hash = (37 * hash) + VAR_FIELD_NUMBER;
hash = (53 * hash) + getVar().hashCode();
break;
case 2:
hash = (37 * hash) + CON_FIELD_NUMBER;
hash = (53 * hash) + getCon().hashCode();
break;
case 3:
hash = (37 * hash) + BUILTIN_FIELD_NUMBER;
hash = (53 * hash) + getBuiltin().hashCode();
break;
case 4:
hash = (37 * hash) + FORALL_FIELD_NUMBER;
hash = (53 * hash) + getForall().hashCode();
break;
case 5:
hash = (37 * hash) + STRUCT_FIELD_NUMBER;
hash = (53 * hash) + getStruct().hashCode();
break;
case 6:
hash = (37 * hash) + NAT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNat());
break;
case 7:
hash = (37 * hash) + SYN_FIELD_NUMBER;
hash = (53 * hash) + getSyn().hashCode();
break;
case 8:
hash = (37 * hash) + INTERNED_FIELD_NUMBER;
hash = (53 * hash) + getInterned();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Type parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type 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.daml_lf_dev.DamlLf2.Type parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Type parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Type parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type 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.daml_lf_dev.DamlLf2.Type parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type 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.daml_lf_dev.DamlLf2.Type parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Type 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.daml_lf_dev.DamlLf2.Type 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;
}
/**
*
* Types
*
*
* Protobuf type {@code daml_lf_2.Type}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Type)
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Type.class, com.daml.daml_lf_dev.DamlLf2.Type.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Type.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (varBuilder_ != null) {
varBuilder_.clear();
}
if (conBuilder_ != null) {
conBuilder_.clear();
}
if (builtinBuilder_ != null) {
builtinBuilder_.clear();
}
if (forallBuilder_ != null) {
forallBuilder_.clear();
}
if (structBuilder_ != null) {
structBuilder_.clear();
}
if (synBuilder_ != null) {
synBuilder_.clear();
}
sumCase_ = 0;
sum_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Type_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type build() {
com.daml.daml_lf_dev.DamlLf2.Type result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Type result = new com.daml.daml_lf_dev.DamlLf2.Type(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Type result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(com.daml.daml_lf_dev.DamlLf2.Type result) {
result.sumCase_ = sumCase_;
result.sum_ = this.sum_;
if (sumCase_ == 1 &&
varBuilder_ != null) {
result.sum_ = varBuilder_.build();
}
if (sumCase_ == 2 &&
conBuilder_ != null) {
result.sum_ = conBuilder_.build();
}
if (sumCase_ == 3 &&
builtinBuilder_ != null) {
result.sum_ = builtinBuilder_.build();
}
if (sumCase_ == 4 &&
forallBuilder_ != null) {
result.sum_ = forallBuilder_.build();
}
if (sumCase_ == 5 &&
structBuilder_ != null) {
result.sum_ = structBuilder_.build();
}
if (sumCase_ == 7 &&
synBuilder_ != null) {
result.sum_ = synBuilder_.build();
}
}
@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.daml_lf_dev.DamlLf2.Type) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Type)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Type other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance()) return this;
switch (other.getSumCase()) {
case VAR: {
mergeVar(other.getVar());
break;
}
case CON: {
mergeCon(other.getCon());
break;
}
case BUILTIN: {
mergeBuiltin(other.getBuiltin());
break;
}
case FORALL: {
mergeForall(other.getForall());
break;
}
case STRUCT: {
mergeStruct(other.getStruct());
break;
}
case NAT: {
setNat(other.getNat());
break;
}
case SYN: {
mergeSyn(other.getSyn());
break;
}
case INTERNED: {
setInterned(other.getInterned());
break;
}
case SUM_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getVarFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getConFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getBuiltinFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getForallFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 4;
break;
} // case 34
case 42: {
input.readMessage(
getStructFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 5;
break;
} // case 42
case 48: {
sum_ = input.readSInt64();
sumCase_ = 6;
break;
} // case 48
case 58: {
input.readMessage(
getSynFieldBuilder().getBuilder(),
extensionRegistry);
sumCase_ = 7;
break;
} // case 58
case 64: {
sum_ = input.readInt32();
sumCase_ = 8;
break;
} // case 64
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int sumCase_ = 0;
private java.lang.Object sum_;
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public Builder clearSum() {
sumCase_ = 0;
sum_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Var, com.daml.daml_lf_dev.DamlLf2.Type.Var.Builder, com.daml.daml_lf_dev.DamlLf2.Type.VarOrBuilder> varBuilder_;
/**
* .daml_lf_2.Type.Var var = 1;
* @return Whether the var field is set.
*/
@java.lang.Override
public boolean hasVar() {
return sumCase_ == 1;
}
/**
* .daml_lf_2.Type.Var var = 1;
* @return The var.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Var getVar() {
if (varBuilder_ == null) {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Var) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Var.getDefaultInstance();
} else {
if (sumCase_ == 1) {
return varBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Type.Var.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Var var = 1;
*/
public Builder setVar(com.daml.daml_lf_dev.DamlLf2.Type.Var value) {
if (varBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
varBuilder_.setMessage(value);
}
sumCase_ = 1;
return this;
}
/**
* .daml_lf_2.Type.Var var = 1;
*/
public Builder setVar(
com.daml.daml_lf_dev.DamlLf2.Type.Var.Builder builderForValue) {
if (varBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
varBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 1;
return this;
}
/**
* .daml_lf_2.Type.Var var = 1;
*/
public Builder mergeVar(com.daml.daml_lf_dev.DamlLf2.Type.Var value) {
if (varBuilder_ == null) {
if (sumCase_ == 1 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Type.Var.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Var.newBuilder((com.daml.daml_lf_dev.DamlLf2.Type.Var) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 1) {
varBuilder_.mergeFrom(value);
} else {
varBuilder_.setMessage(value);
}
}
sumCase_ = 1;
return this;
}
/**
* .daml_lf_2.Type.Var var = 1;
*/
public Builder clearVar() {
if (varBuilder_ == null) {
if (sumCase_ == 1) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 1) {
sumCase_ = 0;
sum_ = null;
}
varBuilder_.clear();
}
return this;
}
/**
* .daml_lf_2.Type.Var var = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Var.Builder getVarBuilder() {
return getVarFieldBuilder().getBuilder();
}
/**
* .daml_lf_2.Type.Var var = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.VarOrBuilder getVarOrBuilder() {
if ((sumCase_ == 1) && (varBuilder_ != null)) {
return varBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 1) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Var) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Var.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Var var = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Var, com.daml.daml_lf_dev.DamlLf2.Type.Var.Builder, com.daml.daml_lf_dev.DamlLf2.Type.VarOrBuilder>
getVarFieldBuilder() {
if (varBuilder_ == null) {
if (!(sumCase_ == 1)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Var.getDefaultInstance();
}
varBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Var, com.daml.daml_lf_dev.DamlLf2.Type.Var.Builder, com.daml.daml_lf_dev.DamlLf2.Type.VarOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Type.Var) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 1;
onChanged();
return varBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder> conBuilder_;
/**
* .daml_lf_2.Type.Con con = 2;
* @return Whether the con field is set.
*/
@java.lang.Override
public boolean hasCon() {
return sumCase_ == 2;
}
/**
* .daml_lf_2.Type.Con con = 2;
* @return The con.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Con getCon() {
if (conBuilder_ == null) {
if (sumCase_ == 2) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Con) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance();
} else {
if (sumCase_ == 2) {
return conBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Con con = 2;
*/
public Builder setCon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (conBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
conBuilder_.setMessage(value);
}
sumCase_ = 2;
return this;
}
/**
* .daml_lf_2.Type.Con con = 2;
*/
public Builder setCon(
com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder builderForValue) {
if (conBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
conBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 2;
return this;
}
/**
* .daml_lf_2.Type.Con con = 2;
*/
public Builder mergeCon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (conBuilder_ == null) {
if (sumCase_ == 2 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Con.newBuilder((com.daml.daml_lf_dev.DamlLf2.Type.Con) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 2) {
conBuilder_.mergeFrom(value);
} else {
conBuilder_.setMessage(value);
}
}
sumCase_ = 2;
return this;
}
/**
* .daml_lf_2.Type.Con con = 2;
*/
public Builder clearCon() {
if (conBuilder_ == null) {
if (sumCase_ == 2) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 2) {
sumCase_ = 0;
sum_ = null;
}
conBuilder_.clear();
}
return this;
}
/**
* .daml_lf_2.Type.Con con = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder getConBuilder() {
return getConFieldBuilder().getBuilder();
}
/**
* .daml_lf_2.Type.Con con = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getConOrBuilder() {
if ((sumCase_ == 2) && (conBuilder_ != null)) {
return conBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 2) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Con) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Con con = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>
getConFieldBuilder() {
if (conBuilder_ == null) {
if (!(sumCase_ == 2)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance();
}
conBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Type.Con) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 2;
onChanged();
return conBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Builtin, com.daml.daml_lf_dev.DamlLf2.Type.Builtin.Builder, com.daml.daml_lf_dev.DamlLf2.Type.BuiltinOrBuilder> builtinBuilder_;
/**
* .daml_lf_2.Type.Builtin builtin = 3;
* @return Whether the builtin field is set.
*/
@java.lang.Override
public boolean hasBuiltin() {
return sumCase_ == 3;
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
* @return The builtin.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Builtin getBuiltin() {
if (builtinBuilder_ == null) {
if (sumCase_ == 3) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Builtin) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Builtin.getDefaultInstance();
} else {
if (sumCase_ == 3) {
return builtinBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Type.Builtin.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
*/
public Builder setBuiltin(com.daml.daml_lf_dev.DamlLf2.Type.Builtin value) {
if (builtinBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
builtinBuilder_.setMessage(value);
}
sumCase_ = 3;
return this;
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
*/
public Builder setBuiltin(
com.daml.daml_lf_dev.DamlLf2.Type.Builtin.Builder builderForValue) {
if (builtinBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
builtinBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 3;
return this;
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
*/
public Builder mergeBuiltin(com.daml.daml_lf_dev.DamlLf2.Type.Builtin value) {
if (builtinBuilder_ == null) {
if (sumCase_ == 3 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Type.Builtin.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Builtin.newBuilder((com.daml.daml_lf_dev.DamlLf2.Type.Builtin) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 3) {
builtinBuilder_.mergeFrom(value);
} else {
builtinBuilder_.setMessage(value);
}
}
sumCase_ = 3;
return this;
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
*/
public Builder clearBuiltin() {
if (builtinBuilder_ == null) {
if (sumCase_ == 3) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 3) {
sumCase_ = 0;
sum_ = null;
}
builtinBuilder_.clear();
}
return this;
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builtin.Builder getBuiltinBuilder() {
return getBuiltinFieldBuilder().getBuilder();
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.BuiltinOrBuilder getBuiltinOrBuilder() {
if ((sumCase_ == 3) && (builtinBuilder_ != null)) {
return builtinBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 3) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Builtin) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Builtin.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Builtin builtin = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Builtin, com.daml.daml_lf_dev.DamlLf2.Type.Builtin.Builder, com.daml.daml_lf_dev.DamlLf2.Type.BuiltinOrBuilder>
getBuiltinFieldBuilder() {
if (builtinBuilder_ == null) {
if (!(sumCase_ == 3)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Builtin.getDefaultInstance();
}
builtinBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Builtin, com.daml.daml_lf_dev.DamlLf2.Type.Builtin.Builder, com.daml.daml_lf_dev.DamlLf2.Type.BuiltinOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Type.Builtin) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 3;
onChanged();
return builtinBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Forall, com.daml.daml_lf_dev.DamlLf2.Type.Forall.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ForallOrBuilder> forallBuilder_;
/**
* .daml_lf_2.Type.Forall forall = 4;
* @return Whether the forall field is set.
*/
@java.lang.Override
public boolean hasForall() {
return sumCase_ == 4;
}
/**
* .daml_lf_2.Type.Forall forall = 4;
* @return The forall.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Forall getForall() {
if (forallBuilder_ == null) {
if (sumCase_ == 4) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Forall) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Forall.getDefaultInstance();
} else {
if (sumCase_ == 4) {
return forallBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Type.Forall.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Forall forall = 4;
*/
public Builder setForall(com.daml.daml_lf_dev.DamlLf2.Type.Forall value) {
if (forallBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
forallBuilder_.setMessage(value);
}
sumCase_ = 4;
return this;
}
/**
* .daml_lf_2.Type.Forall forall = 4;
*/
public Builder setForall(
com.daml.daml_lf_dev.DamlLf2.Type.Forall.Builder builderForValue) {
if (forallBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
forallBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 4;
return this;
}
/**
* .daml_lf_2.Type.Forall forall = 4;
*/
public Builder mergeForall(com.daml.daml_lf_dev.DamlLf2.Type.Forall value) {
if (forallBuilder_ == null) {
if (sumCase_ == 4 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Type.Forall.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Forall.newBuilder((com.daml.daml_lf_dev.DamlLf2.Type.Forall) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 4) {
forallBuilder_.mergeFrom(value);
} else {
forallBuilder_.setMessage(value);
}
}
sumCase_ = 4;
return this;
}
/**
* .daml_lf_2.Type.Forall forall = 4;
*/
public Builder clearForall() {
if (forallBuilder_ == null) {
if (sumCase_ == 4) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 4) {
sumCase_ = 0;
sum_ = null;
}
forallBuilder_.clear();
}
return this;
}
/**
* .daml_lf_2.Type.Forall forall = 4;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Forall.Builder getForallBuilder() {
return getForallFieldBuilder().getBuilder();
}
/**
* .daml_lf_2.Type.Forall forall = 4;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.ForallOrBuilder getForallOrBuilder() {
if ((sumCase_ == 4) && (forallBuilder_ != null)) {
return forallBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 4) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Forall) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Forall.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Forall forall = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Forall, com.daml.daml_lf_dev.DamlLf2.Type.Forall.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ForallOrBuilder>
getForallFieldBuilder() {
if (forallBuilder_ == null) {
if (!(sumCase_ == 4)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Forall.getDefaultInstance();
}
forallBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Forall, com.daml.daml_lf_dev.DamlLf2.Type.Forall.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ForallOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Type.Forall) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 4;
onChanged();
return forallBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Struct, com.daml.daml_lf_dev.DamlLf2.Type.Struct.Builder, com.daml.daml_lf_dev.DamlLf2.Type.StructOrBuilder> structBuilder_;
/**
* .daml_lf_2.Type.Struct struct = 5;
* @return Whether the struct field is set.
*/
@java.lang.Override
public boolean hasStruct() {
return sumCase_ == 5;
}
/**
* .daml_lf_2.Type.Struct struct = 5;
* @return The struct.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Struct getStruct() {
if (structBuilder_ == null) {
if (sumCase_ == 5) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Struct) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Struct.getDefaultInstance();
} else {
if (sumCase_ == 5) {
return structBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Type.Struct.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Struct struct = 5;
*/
public Builder setStruct(com.daml.daml_lf_dev.DamlLf2.Type.Struct value) {
if (structBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
structBuilder_.setMessage(value);
}
sumCase_ = 5;
return this;
}
/**
* .daml_lf_2.Type.Struct struct = 5;
*/
public Builder setStruct(
com.daml.daml_lf_dev.DamlLf2.Type.Struct.Builder builderForValue) {
if (structBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
structBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 5;
return this;
}
/**
* .daml_lf_2.Type.Struct struct = 5;
*/
public Builder mergeStruct(com.daml.daml_lf_dev.DamlLf2.Type.Struct value) {
if (structBuilder_ == null) {
if (sumCase_ == 5 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Type.Struct.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Struct.newBuilder((com.daml.daml_lf_dev.DamlLf2.Type.Struct) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 5) {
structBuilder_.mergeFrom(value);
} else {
structBuilder_.setMessage(value);
}
}
sumCase_ = 5;
return this;
}
/**
* .daml_lf_2.Type.Struct struct = 5;
*/
public Builder clearStruct() {
if (structBuilder_ == null) {
if (sumCase_ == 5) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 5) {
sumCase_ = 0;
sum_ = null;
}
structBuilder_.clear();
}
return this;
}
/**
* .daml_lf_2.Type.Struct struct = 5;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Struct.Builder getStructBuilder() {
return getStructFieldBuilder().getBuilder();
}
/**
* .daml_lf_2.Type.Struct struct = 5;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.StructOrBuilder getStructOrBuilder() {
if ((sumCase_ == 5) && (structBuilder_ != null)) {
return structBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 5) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Struct) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Struct.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Struct struct = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Struct, com.daml.daml_lf_dev.DamlLf2.Type.Struct.Builder, com.daml.daml_lf_dev.DamlLf2.Type.StructOrBuilder>
getStructFieldBuilder() {
if (structBuilder_ == null) {
if (!(sumCase_ == 5)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Struct.getDefaultInstance();
}
structBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Struct, com.daml.daml_lf_dev.DamlLf2.Type.Struct.Builder, com.daml.daml_lf_dev.DamlLf2.Type.StructOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Type.Struct) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 5;
onChanged();
return structBuilder_;
}
/**
*
* *Must be between 0 and 37 (bounds inclusive)*
* use standard signed long for future usage.
*
*
* sint64 nat = 6;
* @return Whether the nat field is set.
*/
public boolean hasNat() {
return sumCase_ == 6;
}
/**
*
* *Must be between 0 and 37 (bounds inclusive)*
* use standard signed long for future usage.
*
*
* sint64 nat = 6;
* @return The nat.
*/
public long getNat() {
if (sumCase_ == 6) {
return (java.lang.Long) sum_;
}
return 0L;
}
/**
*
* *Must be between 0 and 37 (bounds inclusive)*
* use standard signed long for future usage.
*
*
* sint64 nat = 6;
* @param value The nat to set.
* @return This builder for chaining.
*/
public Builder setNat(long value) {
sumCase_ = 6;
sum_ = value;
onChanged();
return this;
}
/**
*
* *Must be between 0 and 37 (bounds inclusive)*
* use standard signed long for future usage.
*
*
* sint64 nat = 6;
* @return This builder for chaining.
*/
public Builder clearNat() {
if (sumCase_ == 6) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Syn, com.daml.daml_lf_dev.DamlLf2.Type.Syn.Builder, com.daml.daml_lf_dev.DamlLf2.Type.SynOrBuilder> synBuilder_;
/**
* .daml_lf_2.Type.Syn syn = 7;
* @return Whether the syn field is set.
*/
@java.lang.Override
public boolean hasSyn() {
return sumCase_ == 7;
}
/**
* .daml_lf_2.Type.Syn syn = 7;
* @return The syn.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Syn getSyn() {
if (synBuilder_ == null) {
if (sumCase_ == 7) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Syn) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Syn.getDefaultInstance();
} else {
if (sumCase_ == 7) {
return synBuilder_.getMessage();
}
return com.daml.daml_lf_dev.DamlLf2.Type.Syn.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Syn syn = 7;
*/
public Builder setSyn(com.daml.daml_lf_dev.DamlLf2.Type.Syn value) {
if (synBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
synBuilder_.setMessage(value);
}
sumCase_ = 7;
return this;
}
/**
* .daml_lf_2.Type.Syn syn = 7;
*/
public Builder setSyn(
com.daml.daml_lf_dev.DamlLf2.Type.Syn.Builder builderForValue) {
if (synBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
synBuilder_.setMessage(builderForValue.build());
}
sumCase_ = 7;
return this;
}
/**
* .daml_lf_2.Type.Syn syn = 7;
*/
public Builder mergeSyn(com.daml.daml_lf_dev.DamlLf2.Type.Syn value) {
if (synBuilder_ == null) {
if (sumCase_ == 7 &&
sum_ != com.daml.daml_lf_dev.DamlLf2.Type.Syn.getDefaultInstance()) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Syn.newBuilder((com.daml.daml_lf_dev.DamlLf2.Type.Syn) sum_)
.mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
if (sumCase_ == 7) {
synBuilder_.mergeFrom(value);
} else {
synBuilder_.setMessage(value);
}
}
sumCase_ = 7;
return this;
}
/**
* .daml_lf_2.Type.Syn syn = 7;
*/
public Builder clearSyn() {
if (synBuilder_ == null) {
if (sumCase_ == 7) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
} else {
if (sumCase_ == 7) {
sumCase_ = 0;
sum_ = null;
}
synBuilder_.clear();
}
return this;
}
/**
* .daml_lf_2.Type.Syn syn = 7;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Syn.Builder getSynBuilder() {
return getSynFieldBuilder().getBuilder();
}
/**
* .daml_lf_2.Type.Syn syn = 7;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.SynOrBuilder getSynOrBuilder() {
if ((sumCase_ == 7) && (synBuilder_ != null)) {
return synBuilder_.getMessageOrBuilder();
} else {
if (sumCase_ == 7) {
return (com.daml.daml_lf_dev.DamlLf2.Type.Syn) sum_;
}
return com.daml.daml_lf_dev.DamlLf2.Type.Syn.getDefaultInstance();
}
}
/**
* .daml_lf_2.Type.Syn syn = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Syn, com.daml.daml_lf_dev.DamlLf2.Type.Syn.Builder, com.daml.daml_lf_dev.DamlLf2.Type.SynOrBuilder>
getSynFieldBuilder() {
if (synBuilder_ == null) {
if (!(sumCase_ == 7)) {
sum_ = com.daml.daml_lf_dev.DamlLf2.Type.Syn.getDefaultInstance();
}
synBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Syn, com.daml.daml_lf_dev.DamlLf2.Type.Syn.Builder, com.daml.daml_lf_dev.DamlLf2.Type.SynOrBuilder>(
(com.daml.daml_lf_dev.DamlLf2.Type.Syn) sum_,
getParentForChildren(),
isClean());
sum_ = null;
}
sumCase_ = 7;
onChanged();
return synBuilder_;
}
/**
* int32 interned = 8;
* @return Whether the interned field is set.
*/
public boolean hasInterned() {
return sumCase_ == 8;
}
/**
* int32 interned = 8;
* @return The interned.
*/
public int getInterned() {
if (sumCase_ == 8) {
return (java.lang.Integer) sum_;
}
return 0;
}
/**
* int32 interned = 8;
* @param value The interned to set.
* @return This builder for chaining.
*/
public Builder setInterned(int value) {
sumCase_ = 8;
sum_ = value;
onChanged();
return this;
}
/**
* int32 interned = 8;
* @return This builder for chaining.
*/
public Builder clearInterned() {
if (sumCase_ == 8) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:daml_lf_2.Type)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Type)
private static final com.daml.daml_lf_dev.DamlLf2.Type DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Type();
}
public static com.daml.daml_lf_dev.DamlLf2.Type getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Type 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.daml_lf_dev.DamlLf2.Type getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BuiltinLitOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.BuiltinLit)
com.google.protobuf.MessageOrBuilder {
/**
*
* 64-bit integer literal ('LitInt64')
*
*
* sint64 int64 = 1;
* @return Whether the int64 field is set.
*/
boolean hasInt64();
/**
*
* 64-bit integer literal ('LitInt64')
*
*
* sint64 int64 = 1;
* @return The int64.
*/
long getInt64();
/**
*
* *Must be a valid timestamp*
*
*
* sfixed64 timestamp = 2;
* @return Whether the timestamp field is set.
*/
boolean hasTimestamp();
/**
*
* *Must be a valid timestamp*
*
*
* sfixed64 timestamp = 2;
* @return The timestamp.
*/
long getTimestamp();
/**
*
* *Must be a valid interned numeric */
*
*
* int32 numeric_interned_str = 3;
* @return Whether the numericInternedStr field is set.
*/
boolean hasNumericInternedStr();
/**
*
* *Must be a valid interned numeric */
*
*
* int32 numeric_interned_str = 3;
* @return The numericInternedStr.
*/
int getNumericInternedStr();
/**
*
* *Must be a valid interned text*
*
*
* int32 text_interned_str = 4;
* @return Whether the textInternedStr field is set.
*/
boolean hasTextInternedStr();
/**
*
* *Must be a valid interned text*
*
*
* int32 text_interned_str = 4;
* @return The textInternedStr.
*/
int getTextInternedStr();
/**
*
* *Must be a valid date*
*
*
* int32 date = 5;
* @return Whether the date field is set.
*/
boolean hasDate();
/**
*
* *Must be a valid date*
*
*
* int32 date = 5;
* @return The date.
*/
int getDate();
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return Whether the roundingMode field is set.
*/
boolean hasRoundingMode();
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return The enum numeric value on the wire for roundingMode.
*/
int getRoundingModeValue();
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return The roundingMode.
*/
com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode getRoundingMode();
com.daml.daml_lf_dev.DamlLf2.BuiltinLit.SumCase getSumCase();
}
/**
*
* Builtin literals
*
*
* Protobuf type {@code daml_lf_2.BuiltinLit}
*/
public static final class BuiltinLit extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.BuiltinLit)
BuiltinLitOrBuilder {
private static final long serialVersionUID = 0L;
// Use BuiltinLit.newBuilder() to construct.
private BuiltinLit(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BuiltinLit() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new BuiltinLit();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_BuiltinLit_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_BuiltinLit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.BuiltinLit.class, com.daml.daml_lf_dev.DamlLf2.BuiltinLit.Builder.class);
}
/**
*
* match java.math.BigDecimal.ROUND_XXX constants
* *Available in versions >= 2.dev*
*
*
* Protobuf enum {@code daml_lf_2.BuiltinLit.RoundingMode}
*/
public enum RoundingMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UP = 0;
*/
UP(0),
/**
* DOWN = 1;
*/
DOWN(1),
/**
* CEILING = 2;
*/
CEILING(2),
/**
* FLOOR = 3;
*/
FLOOR(3),
/**
* HALF_UP = 4;
*/
HALF_UP(4),
/**
* HALF_DOWN = 5;
*/
HALF_DOWN(5),
/**
* HALF_EVEN = 6;
*/
HALF_EVEN(6),
/**
* UNNECESSARY = 7;
*/
UNNECESSARY(7),
UNRECOGNIZED(-1),
;
/**
* UP = 0;
*/
public static final int UP_VALUE = 0;
/**
* DOWN = 1;
*/
public static final int DOWN_VALUE = 1;
/**
* CEILING = 2;
*/
public static final int CEILING_VALUE = 2;
/**
* FLOOR = 3;
*/
public static final int FLOOR_VALUE = 3;
/**
* HALF_UP = 4;
*/
public static final int HALF_UP_VALUE = 4;
/**
* HALF_DOWN = 5;
*/
public static final int HALF_DOWN_VALUE = 5;
/**
* HALF_EVEN = 6;
*/
public static final int HALF_EVEN_VALUE = 6;
/**
* UNNECESSARY = 7;
*/
public static final int UNNECESSARY_VALUE = 7;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static RoundingMode valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static RoundingMode forNumber(int value) {
switch (value) {
case 0: return UP;
case 1: return DOWN;
case 2: return CEILING;
case 3: return FLOOR;
case 4: return HALF_UP;
case 5: return HALF_DOWN;
case 6: return HALF_EVEN;
case 7: return UNNECESSARY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
RoundingMode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public RoundingMode findValueByNumber(int number) {
return RoundingMode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.BuiltinLit.getDescriptor().getEnumTypes().get(0);
}
private static final RoundingMode[] VALUES = values();
public static RoundingMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private RoundingMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:daml_lf_2.BuiltinLit.RoundingMode)
}
private int sumCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object sum_;
public enum SumCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
INT64(1),
TIMESTAMP(2),
NUMERIC_INTERNED_STR(3),
TEXT_INTERNED_STR(4),
DATE(5),
ROUNDING_MODE(1001),
SUM_NOT_SET(0);
private final int value;
private SumCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SumCase valueOf(int value) {
return forNumber(value);
}
public static SumCase forNumber(int value) {
switch (value) {
case 1: return INT64;
case 2: return TIMESTAMP;
case 3: return NUMERIC_INTERNED_STR;
case 4: return TEXT_INTERNED_STR;
case 5: return DATE;
case 1001: return ROUNDING_MODE;
case 0: return SUM_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public static final int INT64_FIELD_NUMBER = 1;
/**
*
* 64-bit integer literal ('LitInt64')
*
*
* sint64 int64 = 1;
* @return Whether the int64 field is set.
*/
@java.lang.Override
public boolean hasInt64() {
return sumCase_ == 1;
}
/**
*
* 64-bit integer literal ('LitInt64')
*
*
* sint64 int64 = 1;
* @return The int64.
*/
@java.lang.Override
public long getInt64() {
if (sumCase_ == 1) {
return (java.lang.Long) sum_;
}
return 0L;
}
public static final int TIMESTAMP_FIELD_NUMBER = 2;
/**
*
* *Must be a valid timestamp*
*
*
* sfixed64 timestamp = 2;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return sumCase_ == 2;
}
/**
*
* *Must be a valid timestamp*
*
*
* sfixed64 timestamp = 2;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
if (sumCase_ == 2) {
return (java.lang.Long) sum_;
}
return 0L;
}
public static final int NUMERIC_INTERNED_STR_FIELD_NUMBER = 3;
/**
*
* *Must be a valid interned numeric */
*
*
* int32 numeric_interned_str = 3;
* @return Whether the numericInternedStr field is set.
*/
@java.lang.Override
public boolean hasNumericInternedStr() {
return sumCase_ == 3;
}
/**
*
* *Must be a valid interned numeric */
*
*
* int32 numeric_interned_str = 3;
* @return The numericInternedStr.
*/
@java.lang.Override
public int getNumericInternedStr() {
if (sumCase_ == 3) {
return (java.lang.Integer) sum_;
}
return 0;
}
public static final int TEXT_INTERNED_STR_FIELD_NUMBER = 4;
/**
*
* *Must be a valid interned text*
*
*
* int32 text_interned_str = 4;
* @return Whether the textInternedStr field is set.
*/
@java.lang.Override
public boolean hasTextInternedStr() {
return sumCase_ == 4;
}
/**
*
* *Must be a valid interned text*
*
*
* int32 text_interned_str = 4;
* @return The textInternedStr.
*/
@java.lang.Override
public int getTextInternedStr() {
if (sumCase_ == 4) {
return (java.lang.Integer) sum_;
}
return 0;
}
public static final int DATE_FIELD_NUMBER = 5;
/**
*
* *Must be a valid date*
*
*
* int32 date = 5;
* @return Whether the date field is set.
*/
@java.lang.Override
public boolean hasDate() {
return sumCase_ == 5;
}
/**
*
* *Must be a valid date*
*
*
* int32 date = 5;
* @return The date.
*/
@java.lang.Override
public int getDate() {
if (sumCase_ == 5) {
return (java.lang.Integer) sum_;
}
return 0;
}
public static final int ROUNDING_MODE_FIELD_NUMBER = 1001;
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return Whether the roundingMode field is set.
*/
public boolean hasRoundingMode() {
return sumCase_ == 1001;
}
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return The enum numeric value on the wire for roundingMode.
*/
public int getRoundingModeValue() {
if (sumCase_ == 1001) {
return (java.lang.Integer) sum_;
}
return 0;
}
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return The roundingMode.
*/
public com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode getRoundingMode() {
if (sumCase_ == 1001) {
com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode result = com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode.forNumber(
(java.lang.Integer) sum_);
return result == null ? com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode.UNRECOGNIZED : result;
}
return com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode.UP;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (sumCase_ == 1) {
output.writeSInt64(
1, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 2) {
output.writeSFixed64(
2, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 3) {
output.writeInt32(
3, (int)((java.lang.Integer) sum_));
}
if (sumCase_ == 4) {
output.writeInt32(
4, (int)((java.lang.Integer) sum_));
}
if (sumCase_ == 5) {
output.writeInt32(
5, (int)((java.lang.Integer) sum_));
}
if (sumCase_ == 1001) {
output.writeEnum(1001, ((java.lang.Integer) sum_));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sumCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeSInt64Size(
1, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeSFixed64Size(
2, (long)((java.lang.Long) sum_));
}
if (sumCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(
3, (int)((java.lang.Integer) sum_));
}
if (sumCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(
4, (int)((java.lang.Integer) sum_));
}
if (sumCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(
5, (int)((java.lang.Integer) sum_));
}
if (sumCase_ == 1001) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1001, ((java.lang.Integer) sum_));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.daml.daml_lf_dev.DamlLf2.BuiltinLit)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.BuiltinLit other = (com.daml.daml_lf_dev.DamlLf2.BuiltinLit) obj;
if (!getSumCase().equals(other.getSumCase())) return false;
switch (sumCase_) {
case 1:
if (getInt64()
!= other.getInt64()) return false;
break;
case 2:
if (getTimestamp()
!= other.getTimestamp()) return false;
break;
case 3:
if (getNumericInternedStr()
!= other.getNumericInternedStr()) return false;
break;
case 4:
if (getTextInternedStr()
!= other.getTextInternedStr()) return false;
break;
case 5:
if (getDate()
!= other.getDate()) return false;
break;
case 1001:
if (getRoundingModeValue()
!= other.getRoundingModeValue()) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (sumCase_) {
case 1:
hash = (37 * hash) + INT64_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getInt64());
break;
case 2:
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
break;
case 3:
hash = (37 * hash) + NUMERIC_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getNumericInternedStr();
break;
case 4:
hash = (37 * hash) + TEXT_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getTextInternedStr();
break;
case 5:
hash = (37 * hash) + DATE_FIELD_NUMBER;
hash = (53 * hash) + getDate();
break;
case 1001:
hash = (37 * hash) + ROUNDING_MODE_FIELD_NUMBER;
hash = (53 * hash) + getRoundingModeValue();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit 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.daml_lf_dev.DamlLf2.BuiltinLit parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit 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.daml_lf_dev.DamlLf2.BuiltinLit parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit 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.daml_lf_dev.DamlLf2.BuiltinLit parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit 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.daml_lf_dev.DamlLf2.BuiltinLit 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;
}
/**
*
* Builtin literals
*
*
* Protobuf type {@code daml_lf_2.BuiltinLit}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.BuiltinLit)
com.daml.daml_lf_dev.DamlLf2.BuiltinLitOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_BuiltinLit_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_BuiltinLit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.BuiltinLit.class, com.daml.daml_lf_dev.DamlLf2.BuiltinLit.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.BuiltinLit.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
sumCase_ = 0;
sum_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_BuiltinLit_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.BuiltinLit getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.BuiltinLit.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.BuiltinLit build() {
com.daml.daml_lf_dev.DamlLf2.BuiltinLit result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.BuiltinLit buildPartial() {
com.daml.daml_lf_dev.DamlLf2.BuiltinLit result = new com.daml.daml_lf_dev.DamlLf2.BuiltinLit(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.BuiltinLit result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(com.daml.daml_lf_dev.DamlLf2.BuiltinLit result) {
result.sumCase_ = sumCase_;
result.sum_ = this.sum_;
}
@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.daml_lf_dev.DamlLf2.BuiltinLit) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.BuiltinLit)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.BuiltinLit other) {
if (other == com.daml.daml_lf_dev.DamlLf2.BuiltinLit.getDefaultInstance()) return this;
switch (other.getSumCase()) {
case INT64: {
setInt64(other.getInt64());
break;
}
case TIMESTAMP: {
setTimestamp(other.getTimestamp());
break;
}
case NUMERIC_INTERNED_STR: {
setNumericInternedStr(other.getNumericInternedStr());
break;
}
case TEXT_INTERNED_STR: {
setTextInternedStr(other.getTextInternedStr());
break;
}
case DATE: {
setDate(other.getDate());
break;
}
case ROUNDING_MODE: {
setRoundingModeValue(other.getRoundingModeValue());
break;
}
case SUM_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
sum_ = input.readSInt64();
sumCase_ = 1;
break;
} // case 8
case 17: {
sum_ = input.readSFixed64();
sumCase_ = 2;
break;
} // case 17
case 24: {
sum_ = input.readInt32();
sumCase_ = 3;
break;
} // case 24
case 32: {
sum_ = input.readInt32();
sumCase_ = 4;
break;
} // case 32
case 40: {
sum_ = input.readInt32();
sumCase_ = 5;
break;
} // case 40
case 8008: {
int rawValue = input.readEnum();
sumCase_ = 1001;
sum_ = rawValue;
break;
} // case 8008
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int sumCase_ = 0;
private java.lang.Object sum_;
public SumCase
getSumCase() {
return SumCase.forNumber(
sumCase_);
}
public Builder clearSum() {
sumCase_ = 0;
sum_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
*
* 64-bit integer literal ('LitInt64')
*
*
* sint64 int64 = 1;
* @return Whether the int64 field is set.
*/
public boolean hasInt64() {
return sumCase_ == 1;
}
/**
*
* 64-bit integer literal ('LitInt64')
*
*
* sint64 int64 = 1;
* @return The int64.
*/
public long getInt64() {
if (sumCase_ == 1) {
return (java.lang.Long) sum_;
}
return 0L;
}
/**
*
* 64-bit integer literal ('LitInt64')
*
*
* sint64 int64 = 1;
* @param value The int64 to set.
* @return This builder for chaining.
*/
public Builder setInt64(long value) {
sumCase_ = 1;
sum_ = value;
onChanged();
return this;
}
/**
*
* 64-bit integer literal ('LitInt64')
*
*
* sint64 int64 = 1;
* @return This builder for chaining.
*/
public Builder clearInt64() {
if (sumCase_ == 1) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
*
* *Must be a valid timestamp*
*
*
* sfixed64 timestamp = 2;
* @return Whether the timestamp field is set.
*/
public boolean hasTimestamp() {
return sumCase_ == 2;
}
/**
*
* *Must be a valid timestamp*
*
*
* sfixed64 timestamp = 2;
* @return The timestamp.
*/
public long getTimestamp() {
if (sumCase_ == 2) {
return (java.lang.Long) sum_;
}
return 0L;
}
/**
*
* *Must be a valid timestamp*
*
*
* sfixed64 timestamp = 2;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
sumCase_ = 2;
sum_ = value;
onChanged();
return this;
}
/**
*
* *Must be a valid timestamp*
*
*
* sfixed64 timestamp = 2;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
if (sumCase_ == 2) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
*
* *Must be a valid interned numeric */
*
*
* int32 numeric_interned_str = 3;
* @return Whether the numericInternedStr field is set.
*/
public boolean hasNumericInternedStr() {
return sumCase_ == 3;
}
/**
*
* *Must be a valid interned numeric */
*
*
* int32 numeric_interned_str = 3;
* @return The numericInternedStr.
*/
public int getNumericInternedStr() {
if (sumCase_ == 3) {
return (java.lang.Integer) sum_;
}
return 0;
}
/**
*
* *Must be a valid interned numeric */
*
*
* int32 numeric_interned_str = 3;
* @param value The numericInternedStr to set.
* @return This builder for chaining.
*/
public Builder setNumericInternedStr(int value) {
sumCase_ = 3;
sum_ = value;
onChanged();
return this;
}
/**
*
* *Must be a valid interned numeric */
*
*
* int32 numeric_interned_str = 3;
* @return This builder for chaining.
*/
public Builder clearNumericInternedStr() {
if (sumCase_ == 3) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
*
* *Must be a valid interned text*
*
*
* int32 text_interned_str = 4;
* @return Whether the textInternedStr field is set.
*/
public boolean hasTextInternedStr() {
return sumCase_ == 4;
}
/**
*
* *Must be a valid interned text*
*
*
* int32 text_interned_str = 4;
* @return The textInternedStr.
*/
public int getTextInternedStr() {
if (sumCase_ == 4) {
return (java.lang.Integer) sum_;
}
return 0;
}
/**
*
* *Must be a valid interned text*
*
*
* int32 text_interned_str = 4;
* @param value The textInternedStr to set.
* @return This builder for chaining.
*/
public Builder setTextInternedStr(int value) {
sumCase_ = 4;
sum_ = value;
onChanged();
return this;
}
/**
*
* *Must be a valid interned text*
*
*
* int32 text_interned_str = 4;
* @return This builder for chaining.
*/
public Builder clearTextInternedStr() {
if (sumCase_ == 4) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
*
* *Must be a valid date*
*
*
* int32 date = 5;
* @return Whether the date field is set.
*/
public boolean hasDate() {
return sumCase_ == 5;
}
/**
*
* *Must be a valid date*
*
*
* int32 date = 5;
* @return The date.
*/
public int getDate() {
if (sumCase_ == 5) {
return (java.lang.Integer) sum_;
}
return 0;
}
/**
*
* *Must be a valid date*
*
*
* int32 date = 5;
* @param value The date to set.
* @return This builder for chaining.
*/
public Builder setDate(int value) {
sumCase_ = 5;
sum_ = value;
onChanged();
return this;
}
/**
*
* *Must be a valid date*
*
*
* int32 date = 5;
* @return This builder for chaining.
*/
public Builder clearDate() {
if (sumCase_ == 5) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return Whether the roundingMode field is set.
*/
@java.lang.Override
public boolean hasRoundingMode() {
return sumCase_ == 1001;
}
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return The enum numeric value on the wire for roundingMode.
*/
@java.lang.Override
public int getRoundingModeValue() {
if (sumCase_ == 1001) {
return ((java.lang.Integer) sum_).intValue();
}
return 0;
}
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @param value The enum numeric value on the wire for roundingMode to set.
* @return This builder for chaining.
*/
public Builder setRoundingModeValue(int value) {
sumCase_ = 1001;
sum_ = value;
onChanged();
return this;
}
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return The roundingMode.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode getRoundingMode() {
if (sumCase_ == 1001) {
com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode result = com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode.forNumber(
(java.lang.Integer) sum_);
return result == null ? com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode.UNRECOGNIZED : result;
}
return com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode.UP;
}
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @param value The roundingMode to set.
* @return This builder for chaining.
*/
public Builder setRoundingMode(com.daml.daml_lf_dev.DamlLf2.BuiltinLit.RoundingMode value) {
if (value == null) {
throw new NullPointerException();
}
sumCase_ = 1001;
sum_ = value.getNumber();
onChanged();
return this;
}
/**
*
* rounding mode for arithmetic operation
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.BuiltinLit.RoundingMode rounding_mode = 1001;
* @return This builder for chaining.
*/
public Builder clearRoundingMode() {
if (sumCase_ == 1001) {
sumCase_ = 0;
sum_ = null;
onChanged();
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:daml_lf_2.BuiltinLit)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.BuiltinLit)
private static final com.daml.daml_lf_dev.DamlLf2.BuiltinLit DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.BuiltinLit();
}
public static com.daml.daml_lf_dev.DamlLf2.BuiltinLit getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BuiltinLit 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.daml_lf_dev.DamlLf2.BuiltinLit getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LocationOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Location)
com.google.protobuf.MessageOrBuilder {
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
boolean hasModule();
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule();
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder();
/**
* .daml_lf_2.Location.Range range = 2;
* @return Whether the range field is set.
*/
boolean hasRange();
/**
* .daml_lf_2.Location.Range range = 2;
* @return The range.
*/
com.daml.daml_lf_dev.DamlLf2.Location.Range getRange();
/**
* .daml_lf_2.Location.Range range = 2;
*/
com.daml.daml_lf_dev.DamlLf2.Location.RangeOrBuilder getRangeOrBuilder();
}
/**
*
* Source code locations
*
*
* Protobuf type {@code daml_lf_2.Location}
*/
public static final class Location extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Location)
LocationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Location.newBuilder() to construct.
private Location(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Location() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Location();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Location.class, com.daml.daml_lf_dev.DamlLf2.Location.Builder.class);
}
public interface RangeOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Location.Range)
com.google.protobuf.MessageOrBuilder {
/**
* int32 start_line = 1;
* @return The startLine.
*/
int getStartLine();
/**
* int32 start_col = 2;
* @return The startCol.
*/
int getStartCol();
/**
* int32 end_line = 3;
* @return The endLine.
*/
int getEndLine();
/**
* int32 end_col = 4;
* @return The endCol.
*/
int getEndCol();
}
/**
*
* 0-indexed start and end line and column numbers.
*
*
* Protobuf type {@code daml_lf_2.Location.Range}
*/
public static final class Range extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Location.Range)
RangeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Range.newBuilder() to construct.
private Range(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Range() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Range();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_Range_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_Range_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Location.Range.class, com.daml.daml_lf_dev.DamlLf2.Location.Range.Builder.class);
}
public static final int START_LINE_FIELD_NUMBER = 1;
private int startLine_ = 0;
/**
* int32 start_line = 1;
* @return The startLine.
*/
@java.lang.Override
public int getStartLine() {
return startLine_;
}
public static final int START_COL_FIELD_NUMBER = 2;
private int startCol_ = 0;
/**
* int32 start_col = 2;
* @return The startCol.
*/
@java.lang.Override
public int getStartCol() {
return startCol_;
}
public static final int END_LINE_FIELD_NUMBER = 3;
private int endLine_ = 0;
/**
* int32 end_line = 3;
* @return The endLine.
*/
@java.lang.Override
public int getEndLine() {
return endLine_;
}
public static final int END_COL_FIELD_NUMBER = 4;
private int endCol_ = 0;
/**
* int32 end_col = 4;
* @return The endCol.
*/
@java.lang.Override
public int getEndCol() {
return endCol_;
}
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 (startLine_ != 0) {
output.writeInt32(1, startLine_);
}
if (startCol_ != 0) {
output.writeInt32(2, startCol_);
}
if (endLine_ != 0) {
output.writeInt32(3, endLine_);
}
if (endCol_ != 0) {
output.writeInt32(4, endCol_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (startLine_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, startLine_);
}
if (startCol_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, startCol_);
}
if (endLine_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, endLine_);
}
if (endCol_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, endCol_);
}
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.daml_lf_dev.DamlLf2.Location.Range)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Location.Range other = (com.daml.daml_lf_dev.DamlLf2.Location.Range) obj;
if (getStartLine()
!= other.getStartLine()) return false;
if (getStartCol()
!= other.getStartCol()) return false;
if (getEndLine()
!= other.getEndLine()) return false;
if (getEndCol()
!= other.getEndCol()) 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) + START_LINE_FIELD_NUMBER;
hash = (53 * hash) + getStartLine();
hash = (37 * hash) + START_COL_FIELD_NUMBER;
hash = (53 * hash) + getStartCol();
hash = (37 * hash) + END_LINE_FIELD_NUMBER;
hash = (53 * hash) + getEndLine();
hash = (37 * hash) + END_COL_FIELD_NUMBER;
hash = (53 * hash) + getEndCol();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range 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.daml_lf_dev.DamlLf2.Location.Range parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range 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.daml_lf_dev.DamlLf2.Location.Range parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range 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.daml_lf_dev.DamlLf2.Location.Range parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range 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.daml_lf_dev.DamlLf2.Location.Range 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;
}
/**
*
* 0-indexed start and end line and column numbers.
*
*
* Protobuf type {@code daml_lf_2.Location.Range}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Location.Range)
com.daml.daml_lf_dev.DamlLf2.Location.RangeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_Range_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_Range_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Location.Range.class, com.daml.daml_lf_dev.DamlLf2.Location.Range.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Location.Range.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
startLine_ = 0;
startCol_ = 0;
endLine_ = 0;
endCol_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_Range_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Location.Range getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Location.Range.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Location.Range build() {
com.daml.daml_lf_dev.DamlLf2.Location.Range result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Location.Range buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Location.Range result = new com.daml.daml_lf_dev.DamlLf2.Location.Range(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Location.Range result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.startLine_ = startLine_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.startCol_ = startCol_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.endLine_ = endLine_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.endCol_ = endCol_;
}
}
@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.daml_lf_dev.DamlLf2.Location.Range) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Location.Range)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Location.Range other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Location.Range.getDefaultInstance()) return this;
if (other.getStartLine() != 0) {
setStartLine(other.getStartLine());
}
if (other.getStartCol() != 0) {
setStartCol(other.getStartCol());
}
if (other.getEndLine() != 0) {
setEndLine(other.getEndLine());
}
if (other.getEndCol() != 0) {
setEndCol(other.getEndCol());
}
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 8: {
startLine_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
startCol_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
endLine_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32: {
endCol_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
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 int startLine_ ;
/**
* int32 start_line = 1;
* @return The startLine.
*/
@java.lang.Override
public int getStartLine() {
return startLine_;
}
/**
* int32 start_line = 1;
* @param value The startLine to set.
* @return This builder for chaining.
*/
public Builder setStartLine(int value) {
startLine_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* int32 start_line = 1;
* @return This builder for chaining.
*/
public Builder clearStartLine() {
bitField0_ = (bitField0_ & ~0x00000001);
startLine_ = 0;
onChanged();
return this;
}
private int startCol_ ;
/**
* int32 start_col = 2;
* @return The startCol.
*/
@java.lang.Override
public int getStartCol() {
return startCol_;
}
/**
* int32 start_col = 2;
* @param value The startCol to set.
* @return This builder for chaining.
*/
public Builder setStartCol(int value) {
startCol_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* int32 start_col = 2;
* @return This builder for chaining.
*/
public Builder clearStartCol() {
bitField0_ = (bitField0_ & ~0x00000002);
startCol_ = 0;
onChanged();
return this;
}
private int endLine_ ;
/**
* int32 end_line = 3;
* @return The endLine.
*/
@java.lang.Override
public int getEndLine() {
return endLine_;
}
/**
* int32 end_line = 3;
* @param value The endLine to set.
* @return This builder for chaining.
*/
public Builder setEndLine(int value) {
endLine_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* int32 end_line = 3;
* @return This builder for chaining.
*/
public Builder clearEndLine() {
bitField0_ = (bitField0_ & ~0x00000004);
endLine_ = 0;
onChanged();
return this;
}
private int endCol_ ;
/**
* int32 end_col = 4;
* @return The endCol.
*/
@java.lang.Override
public int getEndCol() {
return endCol_;
}
/**
* int32 end_col = 4;
* @param value The endCol to set.
* @return This builder for chaining.
*/
public Builder setEndCol(int value) {
endCol_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* int32 end_col = 4;
* @return This builder for chaining.
*/
public Builder clearEndCol() {
bitField0_ = (bitField0_ & ~0x00000008);
endCol_ = 0;
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:daml_lf_2.Location.Range)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Location.Range)
private static final com.daml.daml_lf_dev.DamlLf2.Location.Range DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Location.Range();
}
public static com.daml.daml_lf_dev.DamlLf2.Location.Range getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Range 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.daml_lf_dev.DamlLf2.Location.Range getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int MODULE_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.ModuleRef module_;
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
@java.lang.Override
public boolean hasModule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule() {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder() {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
public static final int RANGE_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Location.Range range_;
/**
* .daml_lf_2.Location.Range range = 2;
* @return Whether the range field is set.
*/
@java.lang.Override
public boolean hasRange() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .daml_lf_2.Location.Range range = 2;
* @return The range.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Location.Range getRange() {
return range_ == null ? com.daml.daml_lf_dev.DamlLf2.Location.Range.getDefaultInstance() : range_;
}
/**
* .daml_lf_2.Location.Range range = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Location.RangeOrBuilder getRangeOrBuilder() {
return range_ == null ? com.daml.daml_lf_dev.DamlLf2.Location.Range.getDefaultInstance() : range_;
}
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, getModule());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(2, getRange());
}
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, getModule());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getRange());
}
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.daml_lf_dev.DamlLf2.Location)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Location other = (com.daml.daml_lf_dev.DamlLf2.Location) obj;
if (hasModule() != other.hasModule()) return false;
if (hasModule()) {
if (!getModule()
.equals(other.getModule())) return false;
}
if (hasRange() != other.hasRange()) return false;
if (hasRange()) {
if (!getRange()
.equals(other.getRange())) 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 (hasModule()) {
hash = (37 * hash) + MODULE_FIELD_NUMBER;
hash = (53 * hash) + getModule().hashCode();
}
if (hasRange()) {
hash = (37 * hash) + RANGE_FIELD_NUMBER;
hash = (53 * hash) + getRange().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Location parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Location parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Location parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Location 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.daml_lf_dev.DamlLf2.Location parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Location parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Location parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Location 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.daml_lf_dev.DamlLf2.Location parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Location 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.daml_lf_dev.DamlLf2.Location parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Location 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.daml_lf_dev.DamlLf2.Location 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;
}
/**
*
* Source code locations
*
*
* Protobuf type {@code daml_lf_2.Location}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Location)
com.daml.daml_lf_dev.DamlLf2.LocationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Location.class, com.daml.daml_lf_dev.DamlLf2.Location.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Location.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getModuleFieldBuilder();
getRangeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
module_ = null;
if (moduleBuilder_ != null) {
moduleBuilder_.dispose();
moduleBuilder_ = null;
}
range_ = null;
if (rangeBuilder_ != null) {
rangeBuilder_.dispose();
rangeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Location_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Location getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Location.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Location build() {
com.daml.daml_lf_dev.DamlLf2.Location result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Location buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Location result = new com.daml.daml_lf_dev.DamlLf2.Location(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Location result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.module_ = moduleBuilder_ == null
? module_
: moduleBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.range_ = rangeBuilder_ == null
? range_
: rangeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.daml_lf_dev.DamlLf2.Location) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Location)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Location other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Location.getDefaultInstance()) return this;
if (other.hasModule()) {
mergeModule(other.getModule());
}
if (other.hasRange()) {
mergeRange(other.getRange());
}
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(
getModuleFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getRangeFieldBuilder().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 com.daml.daml_lf_dev.DamlLf2.ModuleRef module_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder> moduleBuilder_;
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return Whether the module field is set.
*/
public boolean hasModule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
* @return The module.
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRef getModule() {
if (moduleBuilder_ == null) {
return module_ == null ? com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
} else {
return moduleBuilder_.getMessage();
}
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder setModule(com.daml.daml_lf_dev.DamlLf2.ModuleRef value) {
if (moduleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
module_ = value;
} else {
moduleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder setModule(
com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder builderForValue) {
if (moduleBuilder_ == null) {
module_ = builderForValue.build();
} else {
moduleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder mergeModule(com.daml.daml_lf_dev.DamlLf2.ModuleRef value) {
if (moduleBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
module_ != null &&
module_ != com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance()) {
getModuleBuilder().mergeFrom(value);
} else {
module_ = value;
}
} else {
moduleBuilder_.mergeFrom(value);
}
if (module_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public Builder clearModule() {
bitField0_ = (bitField0_ & ~0x00000001);
module_ = null;
if (moduleBuilder_ != null) {
moduleBuilder_.dispose();
moduleBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder getModuleBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getModuleFieldBuilder().getBuilder();
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder getModuleOrBuilder() {
if (moduleBuilder_ != null) {
return moduleBuilder_.getMessageOrBuilder();
} else {
return module_ == null ?
com.daml.daml_lf_dev.DamlLf2.ModuleRef.getDefaultInstance() : module_;
}
}
/**
*
* (*optional*), if missing the line is within the current module.
*
*
* .daml_lf_2.ModuleRef module = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder>
getModuleFieldBuilder() {
if (moduleBuilder_ == null) {
moduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.ModuleRef, com.daml.daml_lf_dev.DamlLf2.ModuleRef.Builder, com.daml.daml_lf_dev.DamlLf2.ModuleRefOrBuilder>(
getModule(),
getParentForChildren(),
isClean());
module_ = null;
}
return moduleBuilder_;
}
private com.daml.daml_lf_dev.DamlLf2.Location.Range range_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Location.Range, com.daml.daml_lf_dev.DamlLf2.Location.Range.Builder, com.daml.daml_lf_dev.DamlLf2.Location.RangeOrBuilder> rangeBuilder_;
/**
* .daml_lf_2.Location.Range range = 2;
* @return Whether the range field is set.
*/
public boolean hasRange() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .daml_lf_2.Location.Range range = 2;
* @return The range.
*/
public com.daml.daml_lf_dev.DamlLf2.Location.Range getRange() {
if (rangeBuilder_ == null) {
return range_ == null ? com.daml.daml_lf_dev.DamlLf2.Location.Range.getDefaultInstance() : range_;
} else {
return rangeBuilder_.getMessage();
}
}
/**
* .daml_lf_2.Location.Range range = 2;
*/
public Builder setRange(com.daml.daml_lf_dev.DamlLf2.Location.Range value) {
if (rangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
range_ = value;
} else {
rangeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .daml_lf_2.Location.Range range = 2;
*/
public Builder setRange(
com.daml.daml_lf_dev.DamlLf2.Location.Range.Builder builderForValue) {
if (rangeBuilder_ == null) {
range_ = builderForValue.build();
} else {
rangeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .daml_lf_2.Location.Range range = 2;
*/
public Builder mergeRange(com.daml.daml_lf_dev.DamlLf2.Location.Range value) {
if (rangeBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
range_ != null &&
range_ != com.daml.daml_lf_dev.DamlLf2.Location.Range.getDefaultInstance()) {
getRangeBuilder().mergeFrom(value);
} else {
range_ = value;
}
} else {
rangeBuilder_.mergeFrom(value);
}
if (range_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
* .daml_lf_2.Location.Range range = 2;
*/
public Builder clearRange() {
bitField0_ = (bitField0_ & ~0x00000002);
range_ = null;
if (rangeBuilder_ != null) {
rangeBuilder_.dispose();
rangeBuilder_ = null;
}
onChanged();
return this;
}
/**
* .daml_lf_2.Location.Range range = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Location.Range.Builder getRangeBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getRangeFieldBuilder().getBuilder();
}
/**
* .daml_lf_2.Location.Range range = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Location.RangeOrBuilder getRangeOrBuilder() {
if (rangeBuilder_ != null) {
return rangeBuilder_.getMessageOrBuilder();
} else {
return range_ == null ?
com.daml.daml_lf_dev.DamlLf2.Location.Range.getDefaultInstance() : range_;
}
}
/**
* .daml_lf_2.Location.Range range = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Location.Range, com.daml.daml_lf_dev.DamlLf2.Location.Range.Builder, com.daml.daml_lf_dev.DamlLf2.Location.RangeOrBuilder>
getRangeFieldBuilder() {
if (rangeBuilder_ == null) {
rangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Location.Range, com.daml.daml_lf_dev.DamlLf2.Location.Range.Builder, com.daml.daml_lf_dev.DamlLf2.Location.RangeOrBuilder>(
getRange(),
getParentForChildren(),
isClean());
range_ = null;
}
return rangeBuilder_;
}
@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:daml_lf_2.Location)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Location)
private static final com.daml.daml_lf_dev.DamlLf2.Location DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Location();
}
public static com.daml.daml_lf_dev.DamlLf2.Location getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Location 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.daml_lf_dev.DamlLf2.Location getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExprOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr)
com.google.protobuf.MessageOrBuilder {
/**
*
* Location of the expression in the Daml code source.
* Optional
*
*
* .daml_lf_2.Location location = 1;
* @return Whether the location field is set.
*/
boolean hasLocation();
/**
*
* Location of the expression in the Daml code source.
* Optional
*
*
* .daml_lf_2.Location location = 1;
* @return The location.
*/
com.daml.daml_lf_dev.DamlLf2.Location getLocation();
/**
*
* Location of the expression in the Daml code source.
* Optional
*
*
* .daml_lf_2.Location location = 1;
*/
com.daml.daml_lf_dev.DamlLf2.LocationOrBuilder getLocationOrBuilder();
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 2;
* @return Whether the varInternedStr field is set.
*/
boolean hasVarInternedStr();
/**
*
* *Must be a valid interned identifier*
*
*
* int32 var_interned_str = 2;
* @return The varInternedStr.
*/
int getVarInternedStr();
/**
*
* Defined value ('ExpVal')
*
*
* .daml_lf_2.ValName val = 3;
* @return Whether the val field is set.
*/
boolean hasVal();
/**
*
* Defined value ('ExpVal')
*
*
* .daml_lf_2.ValName val = 3;
* @return The val.
*/
com.daml.daml_lf_dev.DamlLf2.ValName getVal();
/**
*
* Defined value ('ExpVal')
*
*
* .daml_lf_2.ValName val = 3;
*/
com.daml.daml_lf_dev.DamlLf2.ValNameOrBuilder getValOrBuilder();
/**
*
* Builtin function ('ExpBuiltin')
*
*
* .daml_lf_2.BuiltinFunction builtin = 4;
* @return Whether the builtin field is set.
*/
boolean hasBuiltin();
/**
*
* Builtin function ('ExpBuiltin')
*
*
* .daml_lf_2.BuiltinFunction builtin = 4;
* @return The enum numeric value on the wire for builtin.
*/
int getBuiltinValue();
/**
*
* Builtin function ('ExpBuiltin')
*
*
* .daml_lf_2.BuiltinFunction builtin = 4;
* @return The builtin.
*/
com.daml.daml_lf_dev.DamlLf2.BuiltinFunction getBuiltin();
/**
*
* Builtin constructor ('()', 'False' or 'True')
*
*
* .daml_lf_2.BuiltinCon builtin_con = 5;
* @return Whether the builtinCon field is set.
*/
boolean hasBuiltinCon();
/**
*
* Builtin constructor ('()', 'False' or 'True')
*
*
* .daml_lf_2.BuiltinCon builtin_con = 5;
* @return The enum numeric value on the wire for builtinCon.
*/
int getBuiltinConValue();
/**
*
* Builtin constructor ('()', 'False' or 'True')
*
*
* .daml_lf_2.BuiltinCon builtin_con = 5;
* @return The builtinCon.
*/
com.daml.daml_lf_dev.DamlLf2.BuiltinCon getBuiltinCon();
/**
*
* Builtin literal ('ExpBuiltin')
*
*
* .daml_lf_2.BuiltinLit builtin_lit = 6;
* @return Whether the builtinLit field is set.
*/
boolean hasBuiltinLit();
/**
*
* Builtin literal ('ExpBuiltin')
*
*
* .daml_lf_2.BuiltinLit builtin_lit = 6;
* @return The builtinLit.
*/
com.daml.daml_lf_dev.DamlLf2.BuiltinLit getBuiltinLit();
/**
*
* Builtin literal ('ExpBuiltin')
*
*
* .daml_lf_2.BuiltinLit builtin_lit = 6;
*/
com.daml.daml_lf_dev.DamlLf2.BuiltinLitOrBuilder getBuiltinLitOrBuilder();
/**
*
* Record construction ('ExpRecCon')
*
*
* .daml_lf_2.Expr.RecCon rec_con = 7;
* @return Whether the recCon field is set.
*/
boolean hasRecCon();
/**
*
* Record construction ('ExpRecCon')
*
*
* .daml_lf_2.Expr.RecCon rec_con = 7;
* @return The recCon.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.RecCon getRecCon();
/**
*
* Record construction ('ExpRecCon')
*
*
* .daml_lf_2.Expr.RecCon rec_con = 7;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.RecConOrBuilder getRecConOrBuilder();
/**
*
* Record projection ('ExpRecProj')
*
*
* .daml_lf_2.Expr.RecProj rec_proj = 8;
* @return Whether the recProj field is set.
*/
boolean hasRecProj();
/**
*
* Record projection ('ExpRecProj')
*
*
* .daml_lf_2.Expr.RecProj rec_proj = 8;
* @return The recProj.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.RecProj getRecProj();
/**
*
* Record projection ('ExpRecProj')
*
*
* .daml_lf_2.Expr.RecProj rec_proj = 8;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.RecProjOrBuilder getRecProjOrBuilder();
/**
*
* Record udpate ('ExpRecUpdate')
*
*
* .daml_lf_2.Expr.RecUpd rec_upd = 9;
* @return Whether the recUpd field is set.
*/
boolean hasRecUpd();
/**
*
* Record udpate ('ExpRecUpdate')
*
*
* .daml_lf_2.Expr.RecUpd rec_upd = 9;
* @return The recUpd.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd getRecUpd();
/**
*
* Record udpate ('ExpRecUpdate')
*
*
* .daml_lf_2.Expr.RecUpd rec_upd = 9;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.RecUpdOrBuilder getRecUpdOrBuilder();
/**
*
* Variant construction ('ExpVariantCon')
*
*
* .daml_lf_2.Expr.VariantCon variant_con = 10;
* @return Whether the variantCon field is set.
*/
boolean hasVariantCon();
/**
*
* Variant construction ('ExpVariantCon')
*
*
* .daml_lf_2.Expr.VariantCon variant_con = 10;
* @return The variantCon.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon getVariantCon();
/**
*
* Variant construction ('ExpVariantCon')
*
*
* .daml_lf_2.Expr.VariantCon variant_con = 10;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.VariantConOrBuilder getVariantConOrBuilder();
/**
*
* Enum construction ('ExpEnumCon')
*
*
* .daml_lf_2.Expr.EnumCon enum_con = 11;
* @return Whether the enumCon field is set.
*/
boolean hasEnumCon();
/**
*
* Enum construction ('ExpEnumCon')
*
*
* .daml_lf_2.Expr.EnumCon enum_con = 11;
* @return The enumCon.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon getEnumCon();
/**
*
* Enum construction ('ExpEnumCon')
*
*
* .daml_lf_2.Expr.EnumCon enum_con = 11;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.EnumConOrBuilder getEnumConOrBuilder();
/**
*
* Struct construction ('ExpStructCon')
*
*
* .daml_lf_2.Expr.StructCon struct_con = 12;
* @return Whether the structCon field is set.
*/
boolean hasStructCon();
/**
*
* Struct construction ('ExpStructCon')
*
*
* .daml_lf_2.Expr.StructCon struct_con = 12;
* @return The structCon.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.StructCon getStructCon();
/**
*
* Struct construction ('ExpStructCon')
*
*
* .daml_lf_2.Expr.StructCon struct_con = 12;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.StructConOrBuilder getStructConOrBuilder();
/**
*
* Struct project ('ExpStructProj')
*
*
* .daml_lf_2.Expr.StructProj struct_proj = 13;
* @return Whether the structProj field is set.
*/
boolean hasStructProj();
/**
*
* Struct project ('ExpStructProj')
*
*
* .daml_lf_2.Expr.StructProj struct_proj = 13;
* @return The structProj.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.StructProj getStructProj();
/**
*
* Struct project ('ExpStructProj')
*
*
* .daml_lf_2.Expr.StructProj struct_proj = 13;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.StructProjOrBuilder getStructProjOrBuilder();
/**
*
* Struct update ('ExpStructUpdate')
*
*
* .daml_lf_2.Expr.StructUpd struct_upd = 14;
* @return Whether the structUpd field is set.
*/
boolean hasStructUpd();
/**
*
* Struct update ('ExpStructUpdate')
*
*
* .daml_lf_2.Expr.StructUpd struct_upd = 14;
* @return The structUpd.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd getStructUpd();
/**
*
* Struct update ('ExpStructUpdate')
*
*
* .daml_lf_2.Expr.StructUpd struct_upd = 14;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.StructUpdOrBuilder getStructUpdOrBuilder();
/**
*
* Application ('ExpApp')
*
*
* .daml_lf_2.Expr.App app = 15;
* @return Whether the app field is set.
*/
boolean hasApp();
/**
*
* Application ('ExpApp')
*
*
* .daml_lf_2.Expr.App app = 15;
* @return The app.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.App getApp();
/**
*
* Application ('ExpApp')
*
*
* .daml_lf_2.Expr.App app = 15;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.AppOrBuilder getAppOrBuilder();
/**
*
* Type Application ('ExpTyApp')
*
*
* .daml_lf_2.Expr.TyApp ty_app = 16;
* @return Whether the tyApp field is set.
*/
boolean hasTyApp();
/**
*
* Type Application ('ExpTyApp')
*
*
* .daml_lf_2.Expr.TyApp ty_app = 16;
* @return The tyApp.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.TyApp getTyApp();
/**
*
* Type Application ('ExpTyApp')
*
*
* .daml_lf_2.Expr.TyApp ty_app = 16;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.TyAppOrBuilder getTyAppOrBuilder();
/**
*
* Abstraction ('ExpAbs')
*
*
* .daml_lf_2.Expr.Abs abs = 17;
* @return Whether the abs field is set.
*/
boolean hasAbs();
/**
*
* Abstraction ('ExpAbs')
*
*
* .daml_lf_2.Expr.Abs abs = 17;
* @return The abs.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.Abs getAbs();
/**
*
* Abstraction ('ExpAbs')
*
*
* .daml_lf_2.Expr.Abs abs = 17;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.AbsOrBuilder getAbsOrBuilder();
/**
*
* Type Abstraction ('ExpTyAbs')
*
*
* .daml_lf_2.Expr.TyAbs ty_abs = 18;
* @return Whether the tyAbs field is set.
*/
boolean hasTyAbs();
/**
*
* Type Abstraction ('ExpTyAbs')
*
*
* .daml_lf_2.Expr.TyAbs ty_abs = 18;
* @return The tyAbs.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.TyAbs getTyAbs();
/**
*
* Type Abstraction ('ExpTyAbs')
*
*
* .daml_lf_2.Expr.TyAbs ty_abs = 18;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.TyAbsOrBuilder getTyAbsOrBuilder();
/**
*
* Pattern Matching ('ExpCase')
*
*
* .daml_lf_2.Case case = 19;
* @return Whether the case field is set.
*/
boolean hasCase();
/**
*
* Pattern Matching ('ExpCase')
*
*
* .daml_lf_2.Case case = 19;
* @return The case.
*/
com.daml.daml_lf_dev.DamlLf2.Case getCase();
/**
*
* Pattern Matching ('ExpCase')
*
*
* .daml_lf_2.Case case = 19;
*/
com.daml.daml_lf_dev.DamlLf2.CaseOrBuilder getCaseOrBuilder();
/**
*
* Let block ('ExpLet')
*
*
* .daml_lf_2.Block let = 20;
* @return Whether the let field is set.
*/
boolean hasLet();
/**
*
* Let block ('ExpLet')
*
*
* .daml_lf_2.Block let = 20;
* @return The let.
*/
com.daml.daml_lf_dev.DamlLf2.Block getLet();
/**
*
* Let block ('ExpLet')
*
*
* .daml_lf_2.Block let = 20;
*/
com.daml.daml_lf_dev.DamlLf2.BlockOrBuilder getLetOrBuilder();
/**
*
* Empty List ('ExpNil')
*
*
* .daml_lf_2.Expr.Nil nil = 21;
* @return Whether the nil field is set.
*/
boolean hasNil();
/**
*
* Empty List ('ExpNil')
*
*
* .daml_lf_2.Expr.Nil nil = 21;
* @return The nil.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.Nil getNil();
/**
*
* Empty List ('ExpNil')
*
*
* .daml_lf_2.Expr.Nil nil = 21;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.NilOrBuilder getNilOrBuilder();
/**
*
* Non Empty list ('ExpCons')
*
*
* .daml_lf_2.Expr.Cons cons = 22;
* @return Whether the cons field is set.
*/
boolean hasCons();
/**
*
* Non Empty list ('ExpCons')
*
*
* .daml_lf_2.Expr.Cons cons = 22;
* @return The cons.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.Cons getCons();
/**
*
* Non Empty list ('ExpCons')
*
*
* .daml_lf_2.Expr.Cons cons = 22;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ConsOrBuilder getConsOrBuilder();
/**
*
* Update expression ('ExpUpdate')
*
*
* .daml_lf_2.Update update = 23;
* @return Whether the update field is set.
*/
boolean hasUpdate();
/**
*
* Update expression ('ExpUpdate')
*
*
* .daml_lf_2.Update update = 23;
* @return The update.
*/
com.daml.daml_lf_dev.DamlLf2.Update getUpdate();
/**
*
* Update expression ('ExpUpdate')
*
*
* .daml_lf_2.Update update = 23;
*/
com.daml.daml_lf_dev.DamlLf2.UpdateOrBuilder getUpdateOrBuilder();
/**
*
* empty optional value ('ExpNone')
*
*
* .daml_lf_2.Expr.OptionalNone optional_none = 25;
* @return Whether the optionalNone field is set.
*/
boolean hasOptionalNone();
/**
*
* empty optional value ('ExpNone')
*
*
* .daml_lf_2.Expr.OptionalNone optional_none = 25;
* @return The optionalNone.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.OptionalNone getOptionalNone();
/**
*
* empty optional value ('ExpNone')
*
*
* .daml_lf_2.Expr.OptionalNone optional_none = 25;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.OptionalNoneOrBuilder getOptionalNoneOrBuilder();
/**
*
* non empty optional value ('ExpSome')
*
*
* .daml_lf_2.Expr.OptionalSome optional_some = 26;
* @return Whether the optionalSome field is set.
*/
boolean hasOptionalSome();
/**
*
* non empty optional value ('ExpSome')
*
*
* .daml_lf_2.Expr.OptionalSome optional_some = 26;
* @return The optionalSome.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.OptionalSome getOptionalSome();
/**
*
* non empty optional value ('ExpSome')
*
*
* .daml_lf_2.Expr.OptionalSome optional_some = 26;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.OptionalSomeOrBuilder getOptionalSomeOrBuilder();
/**
*
* Wrap an arbitrary value in Any ('ExpToAny')
*
*
* .daml_lf_2.Expr.ToAny to_any = 27;
* @return Whether the toAny field is set.
*/
boolean hasToAny();
/**
*
* Wrap an arbitrary value in Any ('ExpToAny')
*
*
* .daml_lf_2.Expr.ToAny to_any = 27;
* @return The toAny.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ToAny getToAny();
/**
*
* Wrap an arbitrary value in Any ('ExpToAny')
*
*
* .daml_lf_2.Expr.ToAny to_any = 27;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ToAnyOrBuilder getToAnyOrBuilder();
/**
*
* Extract the given type from Any or return None on type-mismatch ('ExpFromAny')
*
*
* .daml_lf_2.Expr.FromAny from_any = 28;
* @return Whether the fromAny field is set.
*/
boolean hasFromAny();
/**
*
* Extract the given type from Any or return None on type-mismatch ('ExpFromAny')
*
*
* .daml_lf_2.Expr.FromAny from_any = 28;
* @return The fromAny.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.FromAny getFromAny();
/**
*
* Extract the given type from Any or return None on type-mismatch ('ExpFromAny')
*
*
* .daml_lf_2.Expr.FromAny from_any = 28;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.FromAnyOrBuilder getFromAnyOrBuilder();
/**
*
* A type representation
*
*
* .daml_lf_2.Type type_rep = 29;
* @return Whether the typeRep field is set.
*/
boolean hasTypeRep();
/**
*
* A type representation
*
*
* .daml_lf_2.Type type_rep = 29;
* @return The typeRep.
*/
com.daml.daml_lf_dev.DamlLf2.Type getTypeRep();
/**
*
* A type representation
*
*
* .daml_lf_2.Type type_rep = 29;
*/
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypeRepOrBuilder();
/**
*
* Wrap an arbitrary exception into an AnyException ('ExpToAnyException').
*
*
* .daml_lf_2.Expr.ToAnyException to_any_exception = 30;
* @return Whether the toAnyException field is set.
*/
boolean hasToAnyException();
/**
*
* Wrap an arbitrary exception into an AnyException ('ExpToAnyException').
*
*
* .daml_lf_2.Expr.ToAnyException to_any_exception = 30;
* @return The toAnyException.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ToAnyException getToAnyException();
/**
*
* Wrap an arbitrary exception into an AnyException ('ExpToAnyException').
*
*
* .daml_lf_2.Expr.ToAnyException to_any_exception = 30;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ToAnyExceptionOrBuilder getToAnyExceptionOrBuilder();
/**
*
* Extract an arbitrary exception from an AnyException ('ExpFromAnyException').
*
*
* .daml_lf_2.Expr.FromAnyException from_any_exception = 31;
* @return Whether the fromAnyException field is set.
*/
boolean hasFromAnyException();
/**
*
* Extract an arbitrary exception from an AnyException ('ExpFromAnyException').
*
*
* .daml_lf_2.Expr.FromAnyException from_any_exception = 31;
* @return The fromAnyException.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.FromAnyException getFromAnyException();
/**
*
* Extract an arbitrary exception from an AnyException ('ExpFromAnyException').
*
*
* .daml_lf_2.Expr.FromAnyException from_any_exception = 31;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.FromAnyExceptionOrBuilder getFromAnyExceptionOrBuilder();
/**
*
* Throw an exception ('ExpThrow').
*
*
* .daml_lf_2.Expr.Throw throw = 32;
* @return Whether the throw field is set.
*/
boolean hasThrow();
/**
*
* Throw an exception ('ExpThrow').
*
*
* .daml_lf_2.Expr.Throw throw = 32;
* @return The throw.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.Throw getThrow();
/**
*
* Throw an exception ('ExpThrow').
*
*
* .daml_lf_2.Expr.Throw throw = 32;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ThrowOrBuilder getThrowOrBuilder();
/**
*
* Convert to/from interface payloads.
*
*
* .daml_lf_2.Expr.ToInterface to_interface = 33;
* @return Whether the toInterface field is set.
*/
boolean hasToInterface();
/**
*
* Convert to/from interface payloads.
*
*
* .daml_lf_2.Expr.ToInterface to_interface = 33;
* @return The toInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ToInterface getToInterface();
/**
*
* Convert to/from interface payloads.
*
*
* .daml_lf_2.Expr.ToInterface to_interface = 33;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ToInterfaceOrBuilder getToInterfaceOrBuilder();
/**
* .daml_lf_2.Expr.FromInterface from_interface = 34;
* @return Whether the fromInterface field is set.
*/
boolean hasFromInterface();
/**
* .daml_lf_2.Expr.FromInterface from_interface = 34;
* @return The fromInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.FromInterface getFromInterface();
/**
* .daml_lf_2.Expr.FromInterface from_interface = 34;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.FromInterfaceOrBuilder getFromInterfaceOrBuilder();
/**
*
* Invoke an interface method.
*
*
* .daml_lf_2.Expr.CallInterface call_interface = 35;
* @return Whether the callInterface field is set.
*/
boolean hasCallInterface();
/**
*
* Invoke an interface method.
*
*
* .daml_lf_2.Expr.CallInterface call_interface = 35;
* @return The callInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.CallInterface getCallInterface();
/**
*
* Invoke an interface method.
*
*
* .daml_lf_2.Expr.CallInterface call_interface = 35;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.CallInterfaceOrBuilder getCallInterfaceOrBuilder();
/**
*
* Obtain a contract's signatories/observers through an interface.
*
*
* .daml_lf_2.Expr.SignatoryInterface signatory_interface = 36;
* @return Whether the signatoryInterface field is set.
*/
boolean hasSignatoryInterface();
/**
*
* Obtain a contract's signatories/observers through an interface.
*
*
* .daml_lf_2.Expr.SignatoryInterface signatory_interface = 36;
* @return The signatoryInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.SignatoryInterface getSignatoryInterface();
/**
*
* Obtain a contract's signatories/observers through an interface.
*
*
* .daml_lf_2.Expr.SignatoryInterface signatory_interface = 36;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.SignatoryInterfaceOrBuilder getSignatoryInterfaceOrBuilder();
/**
* .daml_lf_2.Expr.ObserverInterface observer_interface = 37;
* @return Whether the observerInterface field is set.
*/
boolean hasObserverInterface();
/**
* .daml_lf_2.Expr.ObserverInterface observer_interface = 37;
* @return The observerInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ObserverInterface getObserverInterface();
/**
* .daml_lf_2.Expr.ObserverInterface observer_interface = 37;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ObserverInterfaceOrBuilder getObserverInterfaceOrBuilder();
/**
*
* Invoke an interface method.
*
*
* .daml_lf_2.Expr.ViewInterface view_interface = 38;
* @return Whether the viewInterface field is set.
*/
boolean hasViewInterface();
/**
*
* Invoke an interface method.
*
*
* .daml_lf_2.Expr.ViewInterface view_interface = 38;
* @return The viewInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ViewInterface getViewInterface();
/**
*
* Invoke an interface method.
*
*
* .daml_lf_2.Expr.ViewInterface view_interface = 38;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ViewInterfaceOrBuilder getViewInterfaceOrBuilder();
/**
*
* Unsafe conversion from interface payloads.
*
*
* .daml_lf_2.Expr.UnsafeFromInterface unsafe_from_interface = 39;
* @return Whether the unsafeFromInterface field is set.
*/
boolean hasUnsafeFromInterface();
/**
*
* Unsafe conversion from interface payloads.
*
*
* .daml_lf_2.Expr.UnsafeFromInterface unsafe_from_interface = 39;
* @return The unsafeFromInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.UnsafeFromInterface getUnsafeFromInterface();
/**
*
* Unsafe conversion from interface payloads.
*
*
* .daml_lf_2.Expr.UnsafeFromInterface unsafe_from_interface = 39;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.UnsafeFromInterfaceOrBuilder getUnsafeFromInterfaceOrBuilder();
/**
*
* Obtain the type representation of a contract's template through an interface.
*
*
* .daml_lf_2.Expr.InterfaceTemplateTypeRep interface_template_type_rep = 40;
* @return Whether the interfaceTemplateTypeRep field is set.
*/
boolean hasInterfaceTemplateTypeRep();
/**
*
* Obtain the type representation of a contract's template through an interface.
*
*
* .daml_lf_2.Expr.InterfaceTemplateTypeRep interface_template_type_rep = 40;
* @return The interfaceTemplateTypeRep.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.InterfaceTemplateTypeRep getInterfaceTemplateTypeRep();
/**
*
* Obtain the type representation of a contract's template through an interface.
*
*
* .daml_lf_2.Expr.InterfaceTemplateTypeRep interface_template_type_rep = 40;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.InterfaceTemplateTypeRepOrBuilder getInterfaceTemplateTypeRepOrBuilder();
/**
*
* Upcast/downcast interface payloads.
*
*
* .daml_lf_2.Expr.ToRequiredInterface to_required_interface = 41;
* @return Whether the toRequiredInterface field is set.
*/
boolean hasToRequiredInterface();
/**
*
* Upcast/downcast interface payloads.
*
*
* .daml_lf_2.Expr.ToRequiredInterface to_required_interface = 41;
* @return The toRequiredInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ToRequiredInterface getToRequiredInterface();
/**
*
* Upcast/downcast interface payloads.
*
*
* .daml_lf_2.Expr.ToRequiredInterface to_required_interface = 41;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ToRequiredInterfaceOrBuilder getToRequiredInterfaceOrBuilder();
/**
* .daml_lf_2.Expr.FromRequiredInterface from_required_interface = 42;
* @return Whether the fromRequiredInterface field is set.
*/
boolean hasFromRequiredInterface();
/**
* .daml_lf_2.Expr.FromRequiredInterface from_required_interface = 42;
* @return The fromRequiredInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.FromRequiredInterface getFromRequiredInterface();
/**
* .daml_lf_2.Expr.FromRequiredInterface from_required_interface = 42;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.FromRequiredInterfaceOrBuilder getFromRequiredInterfaceOrBuilder();
/**
* .daml_lf_2.Expr.UnsafeFromRequiredInterface unsafe_from_required_interface = 43;
* @return Whether the unsafeFromRequiredInterface field is set.
*/
boolean hasUnsafeFromRequiredInterface();
/**
* .daml_lf_2.Expr.UnsafeFromRequiredInterface unsafe_from_required_interface = 43;
* @return The unsafeFromRequiredInterface.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.UnsafeFromRequiredInterface getUnsafeFromRequiredInterface();
/**
* .daml_lf_2.Expr.UnsafeFromRequiredInterface unsafe_from_required_interface = 43;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.UnsafeFromRequiredInterfaceOrBuilder getUnsafeFromRequiredInterfaceOrBuilder();
/**
*
* Obtain the controllers for a choice.
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.Expr.ChoiceController choice_controller = 1001;
* @return Whether the choiceController field is set.
*/
boolean hasChoiceController();
/**
*
* Obtain the controllers for a choice.
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.Expr.ChoiceController choice_controller = 1001;
* @return The choiceController.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ChoiceController getChoiceController();
/**
*
* Obtain the controllers for a choice.
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.Expr.ChoiceController choice_controller = 1001;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ChoiceControllerOrBuilder getChoiceControllerOrBuilder();
/**
*
* Obtain the observers for a choice.
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.Expr.ChoiceObserver choice_observer = 1002;
* @return Whether the choiceObserver field is set.
*/
boolean hasChoiceObserver();
/**
*
* Obtain the observers for a choice.
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.Expr.ChoiceObserver choice_observer = 1002;
* @return The choiceObserver.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ChoiceObserver getChoiceObserver();
/**
*
* Obtain the observers for a choice.
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.Expr.ChoiceObserver choice_observer = 1002;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ChoiceObserverOrBuilder getChoiceObserverOrBuilder();
/**
*
* Scenario Expression ('ExpScenario')
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.Scenario scenario = 1003;
* @return Whether the scenario field is set.
*/
boolean hasScenario();
/**
*
* Scenario Expression ('ExpScenario')
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.Scenario scenario = 1003;
* @return The scenario.
*/
com.daml.daml_lf_dev.DamlLf2.Scenario getScenario();
/**
*
* Scenario Expression ('ExpScenario')
* *Available in versions >= 2.dev*
*
*
* .daml_lf_2.Scenario scenario = 1003;
*/
com.daml.daml_lf_dev.DamlLf2.ScenarioOrBuilder getScenarioOrBuilder();
/**
*
* *Available only in 2.dev*
*
*
* .daml_lf_2.Expr.Experimental experimental = 9999;
* @return Whether the experimental field is set.
*/
boolean hasExperimental();
/**
*
* *Available only in 2.dev*
*
*
* .daml_lf_2.Expr.Experimental experimental = 9999;
* @return The experimental.
*/
com.daml.daml_lf_dev.DamlLf2.Expr.Experimental getExperimental();
/**
*
* *Available only in 2.dev*
*
*
* .daml_lf_2.Expr.Experimental experimental = 9999;
*/
com.daml.daml_lf_dev.DamlLf2.Expr.ExperimentalOrBuilder getExperimentalOrBuilder();
com.daml.daml_lf_dev.DamlLf2.Expr.SumCase getSumCase();
}
/**
*
* Expressions
*
*
* Protobuf type {@code daml_lf_2.Expr}
*/
public static final class Expr extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr)
ExprOrBuilder {
private static final long serialVersionUID = 0L;
// Use Expr.newBuilder() to construct.
private Expr(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Expr() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Expr();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.class, com.daml.daml_lf_dev.DamlLf2.Expr.Builder.class);
}
public interface RecConOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.RecCon)
com.google.protobuf.MessageOrBuilder {
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
boolean hasTycon();
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon();
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder();
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
java.util.List
getFieldsList();
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr getFields(int index);
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
int getFieldsCount();
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>
getFieldsOrBuilderList();
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder getFieldsOrBuilder(
int index);
}
/**
*
* Record construction ('ExpRecCon')
*
*
* Protobuf type {@code daml_lf_2.Expr.RecCon}
*/
public static final class RecCon extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.RecCon)
RecConOrBuilder {
private static final long serialVersionUID = 0L;
// Use RecCon.newBuilder() to construct.
private RecCon(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RecCon() {
fields_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RecCon();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecCon_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecCon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.RecCon.class, com.daml.daml_lf_dev.DamlLf2.Expr.RecCon.Builder.class);
}
private int bitField0_;
public static final int TYCON_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.Type.Con tycon_;
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
@java.lang.Override
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
public static final int FIELDS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List fields_;
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
@java.lang.Override
public java.util.List getFieldsList() {
return fields_;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>
getFieldsOrBuilderList() {
return fields_;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
@java.lang.Override
public int getFieldsCount() {
return fields_.size();
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr getFields(int index) {
return fields_.get(index);
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder 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 {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getTycon());
}
for (int i = 0; i < fields_.size(); i++) {
output.writeMessage(2, fields_.get(i));
}
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, getTycon());
}
for (int i = 0; i < fields_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, 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.daml_lf_dev.DamlLf2.Expr.RecCon)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.RecCon other = (com.daml.daml_lf_dev.DamlLf2.Expr.RecCon) obj;
if (hasTycon() != other.hasTycon()) return false;
if (hasTycon()) {
if (!getTycon()
.equals(other.getTycon())) return false;
}
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 (hasTycon()) {
hash = (37 * hash) + TYCON_FIELD_NUMBER;
hash = (53 * hash) + getTycon().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.daml_lf_dev.DamlLf2.Expr.RecCon parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecCon parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecCon parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecCon 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.daml_lf_dev.DamlLf2.Expr.RecCon parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecCon parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecCon parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecCon 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.daml_lf_dev.DamlLf2.Expr.RecCon parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecCon 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.daml_lf_dev.DamlLf2.Expr.RecCon parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecCon 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.daml_lf_dev.DamlLf2.Expr.RecCon 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;
}
/**
*
* Record construction ('ExpRecCon')
*
*
* Protobuf type {@code daml_lf_2.Expr.RecCon}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.RecCon)
com.daml.daml_lf_dev.DamlLf2.Expr.RecConOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecCon_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecCon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.RecCon.class, com.daml.daml_lf_dev.DamlLf2.Expr.RecCon.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.RecCon.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTyconFieldBuilder();
getFieldsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
if (fieldsBuilder_ == null) {
fields_ = java.util.Collections.emptyList();
} else {
fields_ = null;
fieldsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecCon_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.RecCon getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.RecCon.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.RecCon build() {
com.daml.daml_lf_dev.DamlLf2.Expr.RecCon result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.RecCon buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.RecCon result = new com.daml.daml_lf_dev.DamlLf2.Expr.RecCon(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Expr.RecCon result) {
if (fieldsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
fields_ = java.util.Collections.unmodifiableList(fields_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.fields_ = fields_;
} else {
result.fields_ = fieldsBuilder_.build();
}
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Expr.RecCon result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tycon_ = tyconBuilder_ == null
? tycon_
: tyconBuilder_.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.daml_lf_dev.DamlLf2.Expr.RecCon) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.RecCon)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.RecCon other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.RecCon.getDefaultInstance()) return this;
if (other.hasTycon()) {
mergeTycon(other.getTycon());
}
if (fieldsBuilder_ == null) {
if (!other.fields_.isEmpty()) {
if (fields_.isEmpty()) {
fields_ = other.fields_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureFieldsIsMutable();
fields_.addAll(other.fields_);
}
onChanged();
}
} else {
if (!other.fields_.isEmpty()) {
if (fieldsBuilder_.isEmpty()) {
fieldsBuilder_.dispose();
fieldsBuilder_ = null;
fields_ = other.fields_;
bitField0_ = (bitField0_ & ~0x00000002);
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: {
input.readMessage(
getTyconFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.parser(),
extensionRegistry);
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(m);
} else {
fieldsBuilder_.addMessage(m);
}
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 com.daml.daml_lf_dev.DamlLf2.Type.Con tycon_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder> tyconBuilder_;
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon() {
if (tyconBuilder_ == null) {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
} else {
return tyconBuilder_.getMessage();
}
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder setTycon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (tyconBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tycon_ = value;
} else {
tyconBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder setTycon(
com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder builderForValue) {
if (tyconBuilder_ == null) {
tycon_ = builderForValue.build();
} else {
tyconBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder mergeTycon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (tyconBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
tycon_ != null &&
tycon_ != com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance()) {
getTyconBuilder().mergeFrom(value);
} else {
tycon_ = value;
}
} else {
tyconBuilder_.mergeFrom(value);
}
if (tycon_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder clearTycon() {
bitField0_ = (bitField0_ & ~0x00000001);
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder getTyconBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTyconFieldBuilder().getBuilder();
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder() {
if (tyconBuilder_ != null) {
return tyconBuilder_.getMessageOrBuilder();
} else {
return tycon_ == null ?
com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
}
/**
*
* type of the record being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>
getTyconFieldBuilder() {
if (tyconBuilder_ == null) {
tyconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>(
getTycon(),
getParentForChildren(),
isClean());
tycon_ = null;
}
return tyconBuilder_;
}
private java.util.List fields_ =
java.util.Collections.emptyList();
private void ensureFieldsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
fields_ = new java.util.ArrayList(fields_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder, com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder> fieldsBuilder_;
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public java.util.List getFieldsList() {
if (fieldsBuilder_ == null) {
return java.util.Collections.unmodifiableList(fields_);
} else {
return fieldsBuilder_.getMessageList();
}
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public int getFieldsCount() {
if (fieldsBuilder_ == null) {
return fields_.size();
} else {
return fieldsBuilder_.getCount();
}
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr getFields(int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index);
} else {
return fieldsBuilder_.getMessage(index);
}
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public Builder setFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.set(index, value);
onChanged();
} else {
fieldsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public Builder setFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.set(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public Builder addFields(com.daml.daml_lf_dev.DamlLf2.FieldWithExpr value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(value);
onChanged();
} else {
fieldsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public Builder addFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(index, value);
onChanged();
} else {
fieldsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public Builder addFields(
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public Builder addFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public Builder addAllFields(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.FieldWithExpr> values) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fields_);
onChanged();
} else {
fieldsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public Builder clearFields() {
if (fieldsBuilder_ == null) {
fields_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
fieldsBuilder_.clear();
}
return this;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public Builder removeFields(int index) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.remove(index);
onChanged();
} else {
fieldsBuilder_.remove(index);
}
return this;
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder getFieldsBuilder(
int index) {
return getFieldsFieldBuilder().getBuilder(index);
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder getFieldsOrBuilder(
int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index); } else {
return fieldsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>
getFieldsOrBuilderList() {
if (fieldsBuilder_ != null) {
return fieldsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(fields_);
}
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder addFieldsBuilder() {
return getFieldsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.getDefaultInstance());
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder addFieldsBuilder(
int index) {
return getFieldsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.getDefaultInstance());
}
/**
*
* Field names and the associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 2;
*/
public java.util.List
getFieldsBuilderList() {
return getFieldsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder, com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>
getFieldsFieldBuilder() {
if (fieldsBuilder_ == null) {
fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder, com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>(
fields_,
((bitField0_ & 0x00000002) != 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:daml_lf_2.Expr.RecCon)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.RecCon)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.RecCon DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.RecCon();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecCon getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecCon 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.daml_lf_dev.DamlLf2.Expr.RecCon getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RecProjOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.RecProj)
com.google.protobuf.MessageOrBuilder {
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
boolean hasTycon();
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon();
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder();
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 4;
* @return The fieldInternedStr.
*/
int getFieldInternedStr();
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
* @return Whether the record field is set.
*/
boolean hasRecord();
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
* @return The record.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getRecord();
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getRecordOrBuilder();
}
/**
*
* Record projection (ExpRecProj)
*
*
* Protobuf type {@code daml_lf_2.Expr.RecProj}
*/
public static final class RecProj extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.RecProj)
RecProjOrBuilder {
private static final long serialVersionUID = 0L;
// Use RecProj.newBuilder() to construct.
private RecProj(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RecProj() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RecProj();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecProj_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecProj_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.RecProj.class, com.daml.daml_lf_dev.DamlLf2.Expr.RecProj.Builder.class);
}
private int bitField0_;
public static final int TYCON_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.Type.Con tycon_;
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
@java.lang.Override
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
public static final int FIELD_INTERNED_STR_FIELD_NUMBER = 4;
private int fieldInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 4;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
public static final int RECORD_FIELD_NUMBER = 3;
private com.daml.daml_lf_dev.DamlLf2.Expr record_;
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
* @return Whether the record field is set.
*/
@java.lang.Override
public boolean hasRecord() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
* @return The record.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getRecord() {
return record_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : record_;
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getRecordOrBuilder() {
return record_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : record_;
}
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, getTycon());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getRecord());
}
if (fieldInternedStr_ != 0) {
output.writeInt32(4, fieldInternedStr_);
}
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, getTycon());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getRecord());
}
if (fieldInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, fieldInternedStr_);
}
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.daml_lf_dev.DamlLf2.Expr.RecProj)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.RecProj other = (com.daml.daml_lf_dev.DamlLf2.Expr.RecProj) obj;
if (hasTycon() != other.hasTycon()) return false;
if (hasTycon()) {
if (!getTycon()
.equals(other.getTycon())) return false;
}
if (getFieldInternedStr()
!= other.getFieldInternedStr()) return false;
if (hasRecord() != other.hasRecord()) return false;
if (hasRecord()) {
if (!getRecord()
.equals(other.getRecord())) 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 (hasTycon()) {
hash = (37 * hash) + TYCON_FIELD_NUMBER;
hash = (53 * hash) + getTycon().hashCode();
}
hash = (37 * hash) + FIELD_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getFieldInternedStr();
if (hasRecord()) {
hash = (37 * hash) + RECORD_FIELD_NUMBER;
hash = (53 * hash) + getRecord().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj 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.daml_lf_dev.DamlLf2.Expr.RecProj parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj 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.daml_lf_dev.DamlLf2.Expr.RecProj parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj 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.daml_lf_dev.DamlLf2.Expr.RecProj parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj 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.daml_lf_dev.DamlLf2.Expr.RecProj 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;
}
/**
*
* Record projection (ExpRecProj)
*
*
* Protobuf type {@code daml_lf_2.Expr.RecProj}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.RecProj)
com.daml.daml_lf_dev.DamlLf2.Expr.RecProjOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecProj_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecProj_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.RecProj.class, com.daml.daml_lf_dev.DamlLf2.Expr.RecProj.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.RecProj.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTyconFieldBuilder();
getRecordFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
fieldInternedStr_ = 0;
record_ = null;
if (recordBuilder_ != null) {
recordBuilder_.dispose();
recordBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecProj_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.RecProj getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.RecProj.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.RecProj build() {
com.daml.daml_lf_dev.DamlLf2.Expr.RecProj result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.RecProj buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.RecProj result = new com.daml.daml_lf_dev.DamlLf2.Expr.RecProj(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Expr.RecProj result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tycon_ = tyconBuilder_ == null
? tycon_
: tyconBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.fieldInternedStr_ = fieldInternedStr_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.record_ = recordBuilder_ == null
? record_
: recordBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.daml_lf_dev.DamlLf2.Expr.RecProj) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.RecProj)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.RecProj other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.RecProj.getDefaultInstance()) return this;
if (other.hasTycon()) {
mergeTycon(other.getTycon());
}
if (other.getFieldInternedStr() != 0) {
setFieldInternedStr(other.getFieldInternedStr());
}
if (other.hasRecord()) {
mergeRecord(other.getRecord());
}
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(
getTyconFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 26: {
input.readMessage(
getRecordFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
fieldInternedStr_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 32
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.daml_lf_dev.DamlLf2.Type.Con tycon_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder> tyconBuilder_;
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon() {
if (tyconBuilder_ == null) {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
} else {
return tyconBuilder_.getMessage();
}
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder setTycon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (tyconBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tycon_ = value;
} else {
tyconBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder setTycon(
com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder builderForValue) {
if (tyconBuilder_ == null) {
tycon_ = builderForValue.build();
} else {
tyconBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder mergeTycon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (tyconBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
tycon_ != null &&
tycon_ != com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance()) {
getTyconBuilder().mergeFrom(value);
} else {
tycon_ = value;
}
} else {
tyconBuilder_.mergeFrom(value);
}
if (tycon_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder clearTycon() {
bitField0_ = (bitField0_ & ~0x00000001);
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder getTyconBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTyconFieldBuilder().getBuilder();
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder() {
if (tyconBuilder_ != null) {
return tyconBuilder_.getMessageOrBuilder();
} else {
return tycon_ == null ?
com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
}
/**
*
* type of the record being projected.
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>
getTyconFieldBuilder() {
if (tyconBuilder_ == null) {
tyconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>(
getTycon(),
getParentForChildren(),
isClean());
tycon_ = null;
}
return tyconBuilder_;
}
private int fieldInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 4;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 4;
* @param value The fieldInternedStr to set.
* @return This builder for chaining.
*/
public Builder setFieldInternedStr(int value) {
fieldInternedStr_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 4;
* @return This builder for chaining.
*/
public Builder clearFieldInternedStr() {
bitField0_ = (bitField0_ & ~0x00000002);
fieldInternedStr_ = 0;
onChanged();
return this;
}
private com.daml.daml_lf_dev.DamlLf2.Expr record_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> recordBuilder_;
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
* @return Whether the record field is set.
*/
public boolean hasRecord() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
* @return The record.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getRecord() {
if (recordBuilder_ == null) {
return record_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : record_;
} else {
return recordBuilder_.getMessage();
}
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
*/
public Builder setRecord(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (recordBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
record_ = value;
} else {
recordBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
*/
public Builder setRecord(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (recordBuilder_ == null) {
record_ = builderForValue.build();
} else {
recordBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
*/
public Builder mergeRecord(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (recordBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
record_ != null &&
record_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getRecordBuilder().mergeFrom(value);
} else {
record_ = value;
}
} else {
recordBuilder_.mergeFrom(value);
}
if (record_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
*/
public Builder clearRecord() {
bitField0_ = (bitField0_ & ~0x00000004);
record_ = null;
if (recordBuilder_ != null) {
recordBuilder_.dispose();
recordBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getRecordBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getRecordFieldBuilder().getBuilder();
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getRecordOrBuilder() {
if (recordBuilder_ != null) {
return recordBuilder_.getMessageOrBuilder();
} else {
return record_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : record_;
}
}
/**
*
* projected expression
*
*
* .daml_lf_2.Expr record = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getRecordFieldBuilder() {
if (recordBuilder_ == null) {
recordBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getRecord(),
getParentForChildren(),
isClean());
record_ = null;
}
return recordBuilder_;
}
@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:daml_lf_2.Expr.RecProj)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.RecProj)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.RecProj DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.RecProj();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecProj getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecProj 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.daml_lf_dev.DamlLf2.Expr.RecProj getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RecUpdOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.RecUpd)
com.google.protobuf.MessageOrBuilder {
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
boolean hasTycon();
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon();
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder();
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 2;
* @return The fieldInternedStr.
*/
int getFieldInternedStr();
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
* @return Whether the record field is set.
*/
boolean hasRecord();
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
* @return The record.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getRecord();
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getRecordOrBuilder();
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
* @return Whether the update field is set.
*/
boolean hasUpdate();
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
* @return The update.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getUpdate();
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getUpdateOrBuilder();
}
/**
*
* Record update ('ExpRecUp')
*
*
* Protobuf type {@code daml_lf_2.Expr.RecUpd}
*/
public static final class RecUpd extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.RecUpd)
RecUpdOrBuilder {
private static final long serialVersionUID = 0L;
// Use RecUpd.newBuilder() to construct.
private RecUpd(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RecUpd() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RecUpd();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecUpd_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecUpd_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd.class, com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd.Builder.class);
}
private int bitField0_;
public static final int TYCON_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.Type.Con tycon_;
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
@java.lang.Override
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
public static final int FIELD_INTERNED_STR_FIELD_NUMBER = 2;
private int fieldInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 2;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
public static final int RECORD_FIELD_NUMBER = 3;
private com.daml.daml_lf_dev.DamlLf2.Expr record_;
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
* @return Whether the record field is set.
*/
@java.lang.Override
public boolean hasRecord() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
* @return The record.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getRecord() {
return record_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : record_;
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getRecordOrBuilder() {
return record_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : record_;
}
public static final int UPDATE_FIELD_NUMBER = 4;
private com.daml.daml_lf_dev.DamlLf2.Expr update_;
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
* @return Whether the update field is set.
*/
@java.lang.Override
public boolean hasUpdate() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
* @return The update.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getUpdate() {
return update_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : update_;
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getUpdateOrBuilder() {
return update_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : update_;
}
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, getTycon());
}
if (fieldInternedStr_ != 0) {
output.writeInt32(2, fieldInternedStr_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getRecord());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(4, getUpdate());
}
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, getTycon());
}
if (fieldInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, fieldInternedStr_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getRecord());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getUpdate());
}
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.daml_lf_dev.DamlLf2.Expr.RecUpd)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd other = (com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd) obj;
if (hasTycon() != other.hasTycon()) return false;
if (hasTycon()) {
if (!getTycon()
.equals(other.getTycon())) return false;
}
if (getFieldInternedStr()
!= other.getFieldInternedStr()) return false;
if (hasRecord() != other.hasRecord()) return false;
if (hasRecord()) {
if (!getRecord()
.equals(other.getRecord())) return false;
}
if (hasUpdate() != other.hasUpdate()) return false;
if (hasUpdate()) {
if (!getUpdate()
.equals(other.getUpdate())) 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 (hasTycon()) {
hash = (37 * hash) + TYCON_FIELD_NUMBER;
hash = (53 * hash) + getTycon().hashCode();
}
hash = (37 * hash) + FIELD_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getFieldInternedStr();
if (hasRecord()) {
hash = (37 * hash) + RECORD_FIELD_NUMBER;
hash = (53 * hash) + getRecord().hashCode();
}
if (hasUpdate()) {
hash = (37 * hash) + UPDATE_FIELD_NUMBER;
hash = (53 * hash) + getUpdate().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd 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.daml_lf_dev.DamlLf2.Expr.RecUpd parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd 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.daml_lf_dev.DamlLf2.Expr.RecUpd parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd 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.daml_lf_dev.DamlLf2.Expr.RecUpd parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd 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.daml_lf_dev.DamlLf2.Expr.RecUpd 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;
}
/**
*
* Record update ('ExpRecUp')
*
*
* Protobuf type {@code daml_lf_2.Expr.RecUpd}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.RecUpd)
com.daml.daml_lf_dev.DamlLf2.Expr.RecUpdOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecUpd_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecUpd_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd.class, com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTyconFieldBuilder();
getRecordFieldBuilder();
getUpdateFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
fieldInternedStr_ = 0;
record_ = null;
if (recordBuilder_ != null) {
recordBuilder_.dispose();
recordBuilder_ = null;
}
update_ = null;
if (updateBuilder_ != null) {
updateBuilder_.dispose();
updateBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_RecUpd_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd build() {
com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd result = new com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tycon_ = tyconBuilder_ == null
? tycon_
: tyconBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.fieldInternedStr_ = fieldInternedStr_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.record_ = recordBuilder_ == null
? record_
: recordBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.update_ = updateBuilder_ == null
? update_
: updateBuilder_.build();
to_bitField0_ |= 0x00000004;
}
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.daml_lf_dev.DamlLf2.Expr.RecUpd) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd.getDefaultInstance()) return this;
if (other.hasTycon()) {
mergeTycon(other.getTycon());
}
if (other.getFieldInternedStr() != 0) {
setFieldInternedStr(other.getFieldInternedStr());
}
if (other.hasRecord()) {
mergeRecord(other.getRecord());
}
if (other.hasUpdate()) {
mergeUpdate(other.getUpdate());
}
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(
getTyconFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
fieldInternedStr_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
input.readMessage(
getRecordFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getUpdateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
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.daml_lf_dev.DamlLf2.Type.Con tycon_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder> tyconBuilder_;
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon() {
if (tyconBuilder_ == null) {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
} else {
return tyconBuilder_.getMessage();
}
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder setTycon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (tyconBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tycon_ = value;
} else {
tyconBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder setTycon(
com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder builderForValue) {
if (tyconBuilder_ == null) {
tycon_ = builderForValue.build();
} else {
tyconBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder mergeTycon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (tyconBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
tycon_ != null &&
tycon_ != com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance()) {
getTyconBuilder().mergeFrom(value);
} else {
tycon_ = value;
}
} else {
tyconBuilder_.mergeFrom(value);
}
if (tycon_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder clearTycon() {
bitField0_ = (bitField0_ & ~0x00000001);
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder getTyconBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTyconFieldBuilder().getBuilder();
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder() {
if (tyconBuilder_ != null) {
return tyconBuilder_.getMessageOrBuilder();
} else {
return tycon_ == null ?
com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
}
/**
*
* type of the record being updated
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>
getTyconFieldBuilder() {
if (tyconBuilder_ == null) {
tyconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>(
getTycon(),
getParentForChildren(),
isClean());
tycon_ = null;
}
return tyconBuilder_;
}
private int fieldInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 2;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 2;
* @param value The fieldInternedStr to set.
* @return This builder for chaining.
*/
public Builder setFieldInternedStr(int value) {
fieldInternedStr_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 2;
* @return This builder for chaining.
*/
public Builder clearFieldInternedStr() {
bitField0_ = (bitField0_ & ~0x00000002);
fieldInternedStr_ = 0;
onChanged();
return this;
}
private com.daml.daml_lf_dev.DamlLf2.Expr record_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> recordBuilder_;
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
* @return Whether the record field is set.
*/
public boolean hasRecord() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
* @return The record.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getRecord() {
if (recordBuilder_ == null) {
return record_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : record_;
} else {
return recordBuilder_.getMessage();
}
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
*/
public Builder setRecord(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (recordBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
record_ = value;
} else {
recordBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
*/
public Builder setRecord(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (recordBuilder_ == null) {
record_ = builderForValue.build();
} else {
recordBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
*/
public Builder mergeRecord(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (recordBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
record_ != null &&
record_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getRecordBuilder().mergeFrom(value);
} else {
record_ = value;
}
} else {
recordBuilder_.mergeFrom(value);
}
if (record_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
*/
public Builder clearRecord() {
bitField0_ = (bitField0_ & ~0x00000004);
record_ = null;
if (recordBuilder_ != null) {
recordBuilder_.dispose();
recordBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getRecordBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getRecordFieldBuilder().getBuilder();
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getRecordOrBuilder() {
if (recordBuilder_ != null) {
return recordBuilder_.getMessageOrBuilder();
} else {
return record_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : record_;
}
}
/**
*
* Actual record being updated
*
*
* .daml_lf_2.Expr record = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getRecordFieldBuilder() {
if (recordBuilder_ == null) {
recordBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getRecord(),
getParentForChildren(),
isClean());
record_ = null;
}
return recordBuilder_;
}
private com.daml.daml_lf_dev.DamlLf2.Expr update_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> updateBuilder_;
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
* @return Whether the update field is set.
*/
public boolean hasUpdate() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
* @return The update.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getUpdate() {
if (updateBuilder_ == null) {
return update_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : update_;
} else {
return updateBuilder_.getMessage();
}
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
*/
public Builder setUpdate(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (updateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
update_ = value;
} else {
updateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
*/
public Builder setUpdate(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (updateBuilder_ == null) {
update_ = builderForValue.build();
} else {
updateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
*/
public Builder mergeUpdate(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (updateBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
update_ != null &&
update_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getUpdateBuilder().mergeFrom(value);
} else {
update_ = value;
}
} else {
updateBuilder_.mergeFrom(value);
}
if (update_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
*/
public Builder clearUpdate() {
bitField0_ = (bitField0_ & ~0x00000008);
update_ = null;
if (updateBuilder_ != null) {
updateBuilder_.dispose();
updateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getUpdateBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getUpdateFieldBuilder().getBuilder();
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getUpdateOrBuilder() {
if (updateBuilder_ != null) {
return updateBuilder_.getMessageOrBuilder();
} else {
return update_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : update_;
}
}
/**
*
* Value to wich the record is udpated
*
*
* .daml_lf_2.Expr update = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getUpdateFieldBuilder() {
if (updateBuilder_ == null) {
updateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getUpdate(),
getParentForChildren(),
isClean());
update_ = null;
}
return updateBuilder_;
}
@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:daml_lf_2.Expr.RecUpd)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.RecUpd)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.RecUpd getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecUpd 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.daml_lf_dev.DamlLf2.Expr.RecUpd getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface VariantConOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.VariantCon)
com.google.protobuf.MessageOrBuilder {
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
boolean hasTycon();
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon();
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder();
/**
*
* *Must be a valid interned identifier*
*
*
* int32 variant_con_interned_str = 2;
* @return The variantConInternedStr.
*/
int getVariantConInternedStr();
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
* @return Whether the variantArg field is set.
*/
boolean hasVariantArg();
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
* @return The variantArg.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getVariantArg();
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getVariantArgOrBuilder();
}
/**
*
* Variant construction ('ExpVariantCon')
*
*
* Protobuf type {@code daml_lf_2.Expr.VariantCon}
*/
public static final class VariantCon extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.VariantCon)
VariantConOrBuilder {
private static final long serialVersionUID = 0L;
// Use VariantCon.newBuilder() to construct.
private VariantCon(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private VariantCon() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new VariantCon();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_VariantCon_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_VariantCon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon.class, com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon.Builder.class);
}
private int bitField0_;
public static final int TYCON_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.Type.Con tycon_;
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
@java.lang.Override
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
public static final int VARIANT_CON_INTERNED_STR_FIELD_NUMBER = 2;
private int variantConInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 variant_con_interned_str = 2;
* @return The variantConInternedStr.
*/
@java.lang.Override
public int getVariantConInternedStr() {
return variantConInternedStr_;
}
public static final int VARIANT_ARG_FIELD_NUMBER = 3;
private com.daml.daml_lf_dev.DamlLf2.Expr variantArg_;
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
* @return Whether the variantArg field is set.
*/
@java.lang.Override
public boolean hasVariantArg() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
* @return The variantArg.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getVariantArg() {
return variantArg_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : variantArg_;
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getVariantArgOrBuilder() {
return variantArg_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : variantArg_;
}
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, getTycon());
}
if (variantConInternedStr_ != 0) {
output.writeInt32(2, variantConInternedStr_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getVariantArg());
}
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, getTycon());
}
if (variantConInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, variantConInternedStr_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getVariantArg());
}
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.daml_lf_dev.DamlLf2.Expr.VariantCon)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon other = (com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon) obj;
if (hasTycon() != other.hasTycon()) return false;
if (hasTycon()) {
if (!getTycon()
.equals(other.getTycon())) return false;
}
if (getVariantConInternedStr()
!= other.getVariantConInternedStr()) return false;
if (hasVariantArg() != other.hasVariantArg()) return false;
if (hasVariantArg()) {
if (!getVariantArg()
.equals(other.getVariantArg())) 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 (hasTycon()) {
hash = (37 * hash) + TYCON_FIELD_NUMBER;
hash = (53 * hash) + getTycon().hashCode();
}
hash = (37 * hash) + VARIANT_CON_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getVariantConInternedStr();
if (hasVariantArg()) {
hash = (37 * hash) + VARIANT_ARG_FIELD_NUMBER;
hash = (53 * hash) + getVariantArg().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon 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.daml_lf_dev.DamlLf2.Expr.VariantCon parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon 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.daml_lf_dev.DamlLf2.Expr.VariantCon parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon 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.daml_lf_dev.DamlLf2.Expr.VariantCon parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon 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.daml_lf_dev.DamlLf2.Expr.VariantCon 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;
}
/**
*
* Variant construction ('ExpVariantCon')
*
*
* Protobuf type {@code daml_lf_2.Expr.VariantCon}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.VariantCon)
com.daml.daml_lf_dev.DamlLf2.Expr.VariantConOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_VariantCon_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_VariantCon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon.class, com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTyconFieldBuilder();
getVariantArgFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
variantConInternedStr_ = 0;
variantArg_ = null;
if (variantArgBuilder_ != null) {
variantArgBuilder_.dispose();
variantArgBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_VariantCon_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon build() {
com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon result = new com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tycon_ = tyconBuilder_ == null
? tycon_
: tyconBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.variantConInternedStr_ = variantConInternedStr_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.variantArg_ = variantArgBuilder_ == null
? variantArg_
: variantArgBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.daml_lf_dev.DamlLf2.Expr.VariantCon) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon.getDefaultInstance()) return this;
if (other.hasTycon()) {
mergeTycon(other.getTycon());
}
if (other.getVariantConInternedStr() != 0) {
setVariantConInternedStr(other.getVariantConInternedStr());
}
if (other.hasVariantArg()) {
mergeVariantArg(other.getVariantArg());
}
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(
getTyconFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
variantConInternedStr_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
input.readMessage(
getVariantArgFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
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 com.daml.daml_lf_dev.DamlLf2.Type.Con tycon_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder> tyconBuilder_;
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return Whether the tycon field is set.
*/
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
* @return The tycon.
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Con getTycon() {
if (tyconBuilder_ == null) {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
} else {
return tyconBuilder_.getMessage();
}
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder setTycon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (tyconBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tycon_ = value;
} else {
tyconBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder setTycon(
com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder builderForValue) {
if (tyconBuilder_ == null) {
tycon_ = builderForValue.build();
} else {
tyconBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder mergeTycon(com.daml.daml_lf_dev.DamlLf2.Type.Con value) {
if (tyconBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
tycon_ != null &&
tycon_ != com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance()) {
getTyconBuilder().mergeFrom(value);
} else {
tycon_ = value;
}
} else {
tyconBuilder_.mergeFrom(value);
}
if (tycon_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public Builder clearTycon() {
bitField0_ = (bitField0_ & ~0x00000001);
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder getTyconBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTyconFieldBuilder().getBuilder();
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder getTyconOrBuilder() {
if (tyconBuilder_ != null) {
return tyconBuilder_.getMessageOrBuilder();
} else {
return tycon_ == null ?
com.daml.daml_lf_dev.DamlLf2.Type.Con.getDefaultInstance() : tycon_;
}
}
/**
*
* type of the variant being constructed
*
*
* .daml_lf_2.Type.Con tycon = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>
getTyconFieldBuilder() {
if (tyconBuilder_ == null) {
tyconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type.Con, com.daml.daml_lf_dev.DamlLf2.Type.Con.Builder, com.daml.daml_lf_dev.DamlLf2.Type.ConOrBuilder>(
getTycon(),
getParentForChildren(),
isClean());
tycon_ = null;
}
return tyconBuilder_;
}
private int variantConInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 variant_con_interned_str = 2;
* @return The variantConInternedStr.
*/
@java.lang.Override
public int getVariantConInternedStr() {
return variantConInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 variant_con_interned_str = 2;
* @param value The variantConInternedStr to set.
* @return This builder for chaining.
*/
public Builder setVariantConInternedStr(int value) {
variantConInternedStr_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 variant_con_interned_str = 2;
* @return This builder for chaining.
*/
public Builder clearVariantConInternedStr() {
bitField0_ = (bitField0_ & ~0x00000002);
variantConInternedStr_ = 0;
onChanged();
return this;
}
private com.daml.daml_lf_dev.DamlLf2.Expr variantArg_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> variantArgBuilder_;
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
* @return Whether the variantArg field is set.
*/
public boolean hasVariantArg() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
* @return The variantArg.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getVariantArg() {
if (variantArgBuilder_ == null) {
return variantArg_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : variantArg_;
} else {
return variantArgBuilder_.getMessage();
}
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
*/
public Builder setVariantArg(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (variantArgBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
variantArg_ = value;
} else {
variantArgBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
*/
public Builder setVariantArg(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (variantArgBuilder_ == null) {
variantArg_ = builderForValue.build();
} else {
variantArgBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
*/
public Builder mergeVariantArg(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (variantArgBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
variantArg_ != null &&
variantArg_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getVariantArgBuilder().mergeFrom(value);
} else {
variantArg_ = value;
}
} else {
variantArgBuilder_.mergeFrom(value);
}
if (variantArg_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
*/
public Builder clearVariantArg() {
bitField0_ = (bitField0_ & ~0x00000004);
variantArg_ = null;
if (variantArgBuilder_ != null) {
variantArgBuilder_.dispose();
variantArgBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getVariantArgBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getVariantArgFieldBuilder().getBuilder();
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getVariantArgOrBuilder() {
if (variantArgBuilder_ != null) {
return variantArgBuilder_.getMessageOrBuilder();
} else {
return variantArg_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : variantArg_;
}
}
/**
*
* Argument of the variant.
*
*
* .daml_lf_2.Expr variant_arg = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getVariantArgFieldBuilder() {
if (variantArgBuilder_ == null) {
variantArgBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getVariantArg(),
getParentForChildren(),
isClean());
variantArg_ = null;
}
return variantArgBuilder_;
}
@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:daml_lf_2.Expr.VariantCon)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.VariantCon)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.VariantCon getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VariantCon 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.daml_lf_dev.DamlLf2.Expr.VariantCon getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EnumConOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.EnumCon)
com.google.protobuf.MessageOrBuilder {
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return Whether the tycon field is set.
*/
boolean hasTycon();
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return The tycon.
*/
com.daml.daml_lf_dev.DamlLf2.TypeConName getTycon();
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder getTyconOrBuilder();
/**
*
* *Must be a valid interned identifier*
*
*
* int32 enum_con_interned_str = 2;
* @return The enumConInternedStr.
*/
int getEnumConInternedStr();
}
/**
*
* Enum construction ('ExpEnumCon')
*
*
* Protobuf type {@code daml_lf_2.Expr.EnumCon}
*/
public static final class EnumCon extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.EnumCon)
EnumConOrBuilder {
private static final long serialVersionUID = 0L;
// Use EnumCon.newBuilder() to construct.
private EnumCon(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private EnumCon() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new EnumCon();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_EnumCon_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_EnumCon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon.class, com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon.Builder.class);
}
private int bitField0_;
public static final int TYCON_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.TypeConName tycon_;
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return Whether the tycon field is set.
*/
@java.lang.Override
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return The tycon.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeConName getTycon() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance() : tycon_;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder getTyconOrBuilder() {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance() : tycon_;
}
public static final int ENUM_CON_INTERNED_STR_FIELD_NUMBER = 2;
private int enumConInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 enum_con_interned_str = 2;
* @return The enumConInternedStr.
*/
@java.lang.Override
public int getEnumConInternedStr() {
return enumConInternedStr_;
}
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, getTycon());
}
if (enumConInternedStr_ != 0) {
output.writeInt32(2, enumConInternedStr_);
}
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, getTycon());
}
if (enumConInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, enumConInternedStr_);
}
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.daml_lf_dev.DamlLf2.Expr.EnumCon)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon other = (com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon) obj;
if (hasTycon() != other.hasTycon()) return false;
if (hasTycon()) {
if (!getTycon()
.equals(other.getTycon())) return false;
}
if (getEnumConInternedStr()
!= other.getEnumConInternedStr()) 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 (hasTycon()) {
hash = (37 * hash) + TYCON_FIELD_NUMBER;
hash = (53 * hash) + getTycon().hashCode();
}
hash = (37 * hash) + ENUM_CON_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getEnumConInternedStr();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon 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.daml_lf_dev.DamlLf2.Expr.EnumCon parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon 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.daml_lf_dev.DamlLf2.Expr.EnumCon parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon 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.daml_lf_dev.DamlLf2.Expr.EnumCon parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon 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.daml_lf_dev.DamlLf2.Expr.EnumCon 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;
}
/**
*
* Enum construction ('ExpEnumCon')
*
*
* Protobuf type {@code daml_lf_2.Expr.EnumCon}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.EnumCon)
com.daml.daml_lf_dev.DamlLf2.Expr.EnumConOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_EnumCon_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_EnumCon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon.class, com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTyconFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
enumConInternedStr_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_EnumCon_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon build() {
com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon result = new com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tycon_ = tyconBuilder_ == null
? tycon_
: tyconBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.enumConInternedStr_ = enumConInternedStr_;
}
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.daml_lf_dev.DamlLf2.Expr.EnumCon) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon.getDefaultInstance()) return this;
if (other.hasTycon()) {
mergeTycon(other.getTycon());
}
if (other.getEnumConInternedStr() != 0) {
setEnumConInternedStr(other.getEnumConInternedStr());
}
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(
getTyconFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
enumConInternedStr_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.daml.daml_lf_dev.DamlLf2.TypeConName tycon_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeConName, com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder, com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder> tyconBuilder_;
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return Whether the tycon field is set.
*/
public boolean hasTycon() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
* @return The tycon.
*/
public com.daml.daml_lf_dev.DamlLf2.TypeConName getTycon() {
if (tyconBuilder_ == null) {
return tycon_ == null ? com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance() : tycon_;
} else {
return tyconBuilder_.getMessage();
}
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public Builder setTycon(com.daml.daml_lf_dev.DamlLf2.TypeConName value) {
if (tyconBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tycon_ = value;
} else {
tyconBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public Builder setTycon(
com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder builderForValue) {
if (tyconBuilder_ == null) {
tycon_ = builderForValue.build();
} else {
tyconBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public Builder mergeTycon(com.daml.daml_lf_dev.DamlLf2.TypeConName value) {
if (tyconBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
tycon_ != null &&
tycon_ != com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance()) {
getTyconBuilder().mergeFrom(value);
} else {
tycon_ = value;
}
} else {
tyconBuilder_.mergeFrom(value);
}
if (tycon_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public Builder clearTycon() {
bitField0_ = (bitField0_ & ~0x00000001);
tycon_ = null;
if (tyconBuilder_ != null) {
tyconBuilder_.dispose();
tyconBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder getTyconBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTyconFieldBuilder().getBuilder();
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder getTyconOrBuilder() {
if (tyconBuilder_ != null) {
return tyconBuilder_.getMessageOrBuilder();
} else {
return tycon_ == null ?
com.daml.daml_lf_dev.DamlLf2.TypeConName.getDefaultInstance() : tycon_;
}
}
/**
*
* Name of the type constructor name
*
*
* .daml_lf_2.TypeConName tycon = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeConName, com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder, com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder>
getTyconFieldBuilder() {
if (tyconBuilder_ == null) {
tyconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.TypeConName, com.daml.daml_lf_dev.DamlLf2.TypeConName.Builder, com.daml.daml_lf_dev.DamlLf2.TypeConNameOrBuilder>(
getTycon(),
getParentForChildren(),
isClean());
tycon_ = null;
}
return tyconBuilder_;
}
private int enumConInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 enum_con_interned_str = 2;
* @return The enumConInternedStr.
*/
@java.lang.Override
public int getEnumConInternedStr() {
return enumConInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 enum_con_interned_str = 2;
* @param value The enumConInternedStr to set.
* @return This builder for chaining.
*/
public Builder setEnumConInternedStr(int value) {
enumConInternedStr_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 enum_con_interned_str = 2;
* @return This builder for chaining.
*/
public Builder clearEnumConInternedStr() {
bitField0_ = (bitField0_ & ~0x00000002);
enumConInternedStr_ = 0;
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:daml_lf_2.Expr.EnumCon)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.EnumCon)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.EnumCon getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public EnumCon 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.daml_lf_dev.DamlLf2.Expr.EnumCon getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StructConOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.StructCon)
com.google.protobuf.MessageOrBuilder {
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
java.util.List
getFieldsList();
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr getFields(int index);
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
int getFieldsCount();
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>
getFieldsOrBuilderList();
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder getFieldsOrBuilder(
int index);
}
/**
*
* Struct Construction ('ExpStructCon')
*
*
* Protobuf type {@code daml_lf_2.Expr.StructCon}
*/
public static final class StructCon extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.StructCon)
StructConOrBuilder {
private static final long serialVersionUID = 0L;
// Use StructCon.newBuilder() to construct.
private StructCon(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StructCon() {
fields_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StructCon();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructCon_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructCon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.StructCon.class, com.daml.daml_lf_dev.DamlLf2.Expr.StructCon.Builder.class);
}
public static final int FIELDS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List fields_;
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
@java.lang.Override
public java.util.List getFieldsList() {
return fields_;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>
getFieldsOrBuilderList() {
return fields_;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
@java.lang.Override
public int getFieldsCount() {
return fields_.size();
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr getFields(int index) {
return fields_.get(index);
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder 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.daml_lf_dev.DamlLf2.Expr.StructCon)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.StructCon other = (com.daml.daml_lf_dev.DamlLf2.Expr.StructCon) 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.daml_lf_dev.DamlLf2.Expr.StructCon parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructCon parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructCon parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructCon 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.daml_lf_dev.DamlLf2.Expr.StructCon parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructCon parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructCon parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructCon 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.daml_lf_dev.DamlLf2.Expr.StructCon parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructCon 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.daml_lf_dev.DamlLf2.Expr.StructCon parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructCon 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.daml_lf_dev.DamlLf2.Expr.StructCon 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;
}
/**
*
* Struct Construction ('ExpStructCon')
*
*
* Protobuf type {@code daml_lf_2.Expr.StructCon}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.StructCon)
com.daml.daml_lf_dev.DamlLf2.Expr.StructConOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructCon_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructCon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.StructCon.class, com.daml.daml_lf_dev.DamlLf2.Expr.StructCon.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.StructCon.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.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructCon_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.StructCon getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.StructCon.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.StructCon build() {
com.daml.daml_lf_dev.DamlLf2.Expr.StructCon result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.StructCon buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.StructCon result = new com.daml.daml_lf_dev.DamlLf2.Expr.StructCon(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Expr.StructCon 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.daml_lf_dev.DamlLf2.Expr.StructCon 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.daml_lf_dev.DamlLf2.Expr.StructCon) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.StructCon)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.StructCon other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.StructCon.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.daml_lf_dev.DamlLf2.FieldWithExpr m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.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.daml_lf_dev.DamlLf2.FieldWithExpr, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder, com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder> fieldsBuilder_;
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public java.util.List getFieldsList() {
if (fieldsBuilder_ == null) {
return java.util.Collections.unmodifiableList(fields_);
} else {
return fieldsBuilder_.getMessageList();
}
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public int getFieldsCount() {
if (fieldsBuilder_ == null) {
return fields_.size();
} else {
return fieldsBuilder_.getCount();
}
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr getFields(int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index);
} else {
return fieldsBuilder_.getMessage(index);
}
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public Builder setFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.set(index, value);
onChanged();
} else {
fieldsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public Builder setFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.set(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public Builder addFields(com.daml.daml_lf_dev.DamlLf2.FieldWithExpr value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(value);
onChanged();
} else {
fieldsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public Builder addFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(index, value);
onChanged();
} else {
fieldsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public Builder addFields(
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public Builder addFields(
int index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public Builder addAllFields(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.FieldWithExpr> values) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fields_);
onChanged();
} else {
fieldsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public Builder clearFields() {
if (fieldsBuilder_ == null) {
fields_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
fieldsBuilder_.clear();
}
return this;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public Builder removeFields(int index) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.remove(index);
onChanged();
} else {
fieldsBuilder_.remove(index);
}
return this;
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder getFieldsBuilder(
int index) {
return getFieldsFieldBuilder().getBuilder(index);
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder getFieldsOrBuilder(
int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index); } else {
return fieldsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>
getFieldsOrBuilderList() {
if (fieldsBuilder_ != null) {
return fieldsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(fields_);
}
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder addFieldsBuilder() {
return getFieldsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.getDefaultInstance());
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder addFieldsBuilder(
int index) {
return getFieldsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.getDefaultInstance());
}
/**
*
* Field names and their associated values.
*
*
* repeated .daml_lf_2.FieldWithExpr fields = 1;
*/
public java.util.List
getFieldsBuilderList() {
return getFieldsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder, com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>
getFieldsFieldBuilder() {
if (fieldsBuilder_ == null) {
fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.FieldWithExpr, com.daml.daml_lf_dev.DamlLf2.FieldWithExpr.Builder, com.daml.daml_lf_dev.DamlLf2.FieldWithExprOrBuilder>(
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:daml_lf_2.Expr.StructCon)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.StructCon)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.StructCon DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.StructCon();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructCon getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StructCon 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.daml_lf_dev.DamlLf2.Expr.StructCon getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StructProjOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.StructProj)
com.google.protobuf.MessageOrBuilder {
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @return The fieldInternedStr.
*/
int getFieldInternedStr();
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
* @return Whether the struct field is set.
*/
boolean hasStruct();
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
* @return The struct.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getStruct();
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getStructOrBuilder();
}
/**
*
* Struct Projection ('ExpStructProj')
*
*
* Protobuf type {@code daml_lf_2.Expr.StructProj}
*/
public static final class StructProj extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.StructProj)
StructProjOrBuilder {
private static final long serialVersionUID = 0L;
// Use StructProj.newBuilder() to construct.
private StructProj(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StructProj() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StructProj();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructProj_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructProj_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.StructProj.class, com.daml.daml_lf_dev.DamlLf2.Expr.StructProj.Builder.class);
}
private int bitField0_;
public static final int FIELD_INTERNED_STR_FIELD_NUMBER = 1;
private int fieldInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
public static final int STRUCT_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Expr struct_;
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
* @return Whether the struct field is set.
*/
@java.lang.Override
public boolean hasStruct() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
* @return The struct.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getStruct() {
return struct_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : struct_;
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getStructOrBuilder() {
return struct_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : struct_;
}
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 (fieldInternedStr_ != 0) {
output.writeInt32(1, fieldInternedStr_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getStruct());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (fieldInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, fieldInternedStr_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getStruct());
}
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.daml_lf_dev.DamlLf2.Expr.StructProj)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.StructProj other = (com.daml.daml_lf_dev.DamlLf2.Expr.StructProj) obj;
if (getFieldInternedStr()
!= other.getFieldInternedStr()) return false;
if (hasStruct() != other.hasStruct()) return false;
if (hasStruct()) {
if (!getStruct()
.equals(other.getStruct())) 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) + FIELD_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getFieldInternedStr();
if (hasStruct()) {
hash = (37 * hash) + STRUCT_FIELD_NUMBER;
hash = (53 * hash) + getStruct().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj 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.daml_lf_dev.DamlLf2.Expr.StructProj parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj 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.daml_lf_dev.DamlLf2.Expr.StructProj parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj 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.daml_lf_dev.DamlLf2.Expr.StructProj parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj 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.daml_lf_dev.DamlLf2.Expr.StructProj 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;
}
/**
*
* Struct Projection ('ExpStructProj')
*
*
* Protobuf type {@code daml_lf_2.Expr.StructProj}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.StructProj)
com.daml.daml_lf_dev.DamlLf2.Expr.StructProjOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructProj_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructProj_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.StructProj.class, com.daml.daml_lf_dev.DamlLf2.Expr.StructProj.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.StructProj.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getStructFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
fieldInternedStr_ = 0;
struct_ = null;
if (structBuilder_ != null) {
structBuilder_.dispose();
structBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructProj_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.StructProj getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.StructProj.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.StructProj build() {
com.daml.daml_lf_dev.DamlLf2.Expr.StructProj result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.StructProj buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.StructProj result = new com.daml.daml_lf_dev.DamlLf2.Expr.StructProj(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Expr.StructProj result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.fieldInternedStr_ = fieldInternedStr_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.struct_ = structBuilder_ == null
? struct_
: structBuilder_.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.daml_lf_dev.DamlLf2.Expr.StructProj) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.StructProj)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.StructProj other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.StructProj.getDefaultInstance()) return this;
if (other.getFieldInternedStr() != 0) {
setFieldInternedStr(other.getFieldInternedStr());
}
if (other.hasStruct()) {
mergeStruct(other.getStruct());
}
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 8: {
fieldInternedStr_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
input.readMessage(
getStructFieldBuilder().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 int fieldInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @param value The fieldInternedStr to set.
* @return This builder for chaining.
*/
public Builder setFieldInternedStr(int value) {
fieldInternedStr_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @return This builder for chaining.
*/
public Builder clearFieldInternedStr() {
bitField0_ = (bitField0_ & ~0x00000001);
fieldInternedStr_ = 0;
onChanged();
return this;
}
private com.daml.daml_lf_dev.DamlLf2.Expr struct_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> structBuilder_;
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
* @return Whether the struct field is set.
*/
public boolean hasStruct() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
* @return The struct.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getStruct() {
if (structBuilder_ == null) {
return struct_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : struct_;
} else {
return structBuilder_.getMessage();
}
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public Builder setStruct(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (structBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
struct_ = value;
} else {
structBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public Builder setStruct(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (structBuilder_ == null) {
struct_ = builderForValue.build();
} else {
structBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public Builder mergeStruct(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (structBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
struct_ != null &&
struct_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getStructBuilder().mergeFrom(value);
} else {
struct_ = value;
}
} else {
structBuilder_.mergeFrom(value);
}
if (struct_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public Builder clearStruct() {
bitField0_ = (bitField0_ & ~0x00000002);
struct_ = null;
if (structBuilder_ != null) {
structBuilder_.dispose();
structBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getStructBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getStructFieldBuilder().getBuilder();
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getStructOrBuilder() {
if (structBuilder_ != null) {
return structBuilder_.getMessageOrBuilder();
} else {
return struct_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : struct_;
}
}
/**
*
* struct to be projected.
*
*
* .daml_lf_2.Expr struct = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getStructFieldBuilder() {
if (structBuilder_ == null) {
structBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getStruct(),
getParentForChildren(),
isClean());
struct_ = null;
}
return structBuilder_;
}
@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:daml_lf_2.Expr.StructProj)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.StructProj)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.StructProj DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.StructProj();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructProj getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StructProj 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.daml_lf_dev.DamlLf2.Expr.StructProj getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StructUpdOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.StructUpd)
com.google.protobuf.MessageOrBuilder {
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @return The fieldInternedStr.
*/
int getFieldInternedStr();
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
* @return Whether the struct field is set.
*/
boolean hasStruct();
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
* @return The struct.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getStruct();
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getStructOrBuilder();
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
* @return Whether the update field is set.
*/
boolean hasUpdate();
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
* @return The update.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getUpdate();
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getUpdateOrBuilder();
}
/**
*
* Struct update ('ExpTuplUpdate')
*
*
* Protobuf type {@code daml_lf_2.Expr.StructUpd}
*/
public static final class StructUpd extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.StructUpd)
StructUpdOrBuilder {
private static final long serialVersionUID = 0L;
// Use StructUpd.newBuilder() to construct.
private StructUpd(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StructUpd() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StructUpd();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructUpd_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructUpd_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd.class, com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd.Builder.class);
}
private int bitField0_;
public static final int FIELD_INTERNED_STR_FIELD_NUMBER = 1;
private int fieldInternedStr_ = 0;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
public static final int STRUCT_FIELD_NUMBER = 2;
private com.daml.daml_lf_dev.DamlLf2.Expr struct_;
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
* @return Whether the struct field is set.
*/
@java.lang.Override
public boolean hasStruct() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
* @return The struct.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getStruct() {
return struct_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : struct_;
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getStructOrBuilder() {
return struct_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : struct_;
}
public static final int UPDATE_FIELD_NUMBER = 3;
private com.daml.daml_lf_dev.DamlLf2.Expr update_;
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
* @return Whether the update field is set.
*/
@java.lang.Override
public boolean hasUpdate() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
* @return The update.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getUpdate() {
return update_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : update_;
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getUpdateOrBuilder() {
return update_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : update_;
}
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 (fieldInternedStr_ != 0) {
output.writeInt32(1, fieldInternedStr_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getStruct());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getUpdate());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (fieldInternedStr_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, fieldInternedStr_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getStruct());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getUpdate());
}
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.daml_lf_dev.DamlLf2.Expr.StructUpd)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd other = (com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd) obj;
if (getFieldInternedStr()
!= other.getFieldInternedStr()) return false;
if (hasStruct() != other.hasStruct()) return false;
if (hasStruct()) {
if (!getStruct()
.equals(other.getStruct())) return false;
}
if (hasUpdate() != other.hasUpdate()) return false;
if (hasUpdate()) {
if (!getUpdate()
.equals(other.getUpdate())) 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) + FIELD_INTERNED_STR_FIELD_NUMBER;
hash = (53 * hash) + getFieldInternedStr();
if (hasStruct()) {
hash = (37 * hash) + STRUCT_FIELD_NUMBER;
hash = (53 * hash) + getStruct().hashCode();
}
if (hasUpdate()) {
hash = (37 * hash) + UPDATE_FIELD_NUMBER;
hash = (53 * hash) + getUpdate().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd 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.daml_lf_dev.DamlLf2.Expr.StructUpd parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd 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.daml_lf_dev.DamlLf2.Expr.StructUpd parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd 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.daml_lf_dev.DamlLf2.Expr.StructUpd parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd 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.daml_lf_dev.DamlLf2.Expr.StructUpd 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;
}
/**
*
* Struct update ('ExpTuplUpdate')
*
*
* Protobuf type {@code daml_lf_2.Expr.StructUpd}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.StructUpd)
com.daml.daml_lf_dev.DamlLf2.Expr.StructUpdOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructUpd_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructUpd_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd.class, com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getStructFieldBuilder();
getUpdateFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
fieldInternedStr_ = 0;
struct_ = null;
if (structBuilder_ != null) {
structBuilder_.dispose();
structBuilder_ = null;
}
update_ = null;
if (updateBuilder_ != null) {
updateBuilder_.dispose();
updateBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_StructUpd_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd build() {
com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd result = new com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.fieldInternedStr_ = fieldInternedStr_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.struct_ = structBuilder_ == null
? struct_
: structBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.update_ = updateBuilder_ == null
? update_
: updateBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.daml_lf_dev.DamlLf2.Expr.StructUpd) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd.getDefaultInstance()) return this;
if (other.getFieldInternedStr() != 0) {
setFieldInternedStr(other.getFieldInternedStr());
}
if (other.hasStruct()) {
mergeStruct(other.getStruct());
}
if (other.hasUpdate()) {
mergeUpdate(other.getUpdate());
}
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 8: {
fieldInternedStr_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
input.readMessage(
getStructFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getUpdateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
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 int fieldInternedStr_ ;
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @return The fieldInternedStr.
*/
@java.lang.Override
public int getFieldInternedStr() {
return fieldInternedStr_;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @param value The fieldInternedStr to set.
* @return This builder for chaining.
*/
public Builder setFieldInternedStr(int value) {
fieldInternedStr_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* *Must be a valid interned identifier*
*
*
* int32 field_interned_str = 1;
* @return This builder for chaining.
*/
public Builder clearFieldInternedStr() {
bitField0_ = (bitField0_ & ~0x00000001);
fieldInternedStr_ = 0;
onChanged();
return this;
}
private com.daml.daml_lf_dev.DamlLf2.Expr struct_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> structBuilder_;
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
* @return Whether the struct field is set.
*/
public boolean hasStruct() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
* @return The struct.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getStruct() {
if (structBuilder_ == null) {
return struct_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : struct_;
} else {
return structBuilder_.getMessage();
}
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public Builder setStruct(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (structBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
struct_ = value;
} else {
structBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public Builder setStruct(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (structBuilder_ == null) {
struct_ = builderForValue.build();
} else {
structBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public Builder mergeStruct(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (structBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
struct_ != null &&
struct_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getStructBuilder().mergeFrom(value);
} else {
struct_ = value;
}
} else {
structBuilder_.mergeFrom(value);
}
if (struct_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public Builder clearStruct() {
bitField0_ = (bitField0_ & ~0x00000002);
struct_ = null;
if (structBuilder_ != null) {
structBuilder_.dispose();
structBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getStructBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getStructFieldBuilder().getBuilder();
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getStructOrBuilder() {
if (structBuilder_ != null) {
return structBuilder_.getMessageOrBuilder();
} else {
return struct_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : struct_;
}
}
/**
*
* Actual struct being updated.
*
*
* .daml_lf_2.Expr struct = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getStructFieldBuilder() {
if (structBuilder_ == null) {
structBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getStruct(),
getParentForChildren(),
isClean());
struct_ = null;
}
return structBuilder_;
}
private com.daml.daml_lf_dev.DamlLf2.Expr update_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> updateBuilder_;
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
* @return Whether the update field is set.
*/
public boolean hasUpdate() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
* @return The update.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getUpdate() {
if (updateBuilder_ == null) {
return update_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : update_;
} else {
return updateBuilder_.getMessage();
}
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
*/
public Builder setUpdate(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (updateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
update_ = value;
} else {
updateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
*/
public Builder setUpdate(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (updateBuilder_ == null) {
update_ = builderForValue.build();
} else {
updateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
*/
public Builder mergeUpdate(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (updateBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
update_ != null &&
update_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getUpdateBuilder().mergeFrom(value);
} else {
update_ = value;
}
} else {
updateBuilder_.mergeFrom(value);
}
if (update_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
*/
public Builder clearUpdate() {
bitField0_ = (bitField0_ & ~0x00000004);
update_ = null;
if (updateBuilder_ != null) {
updateBuilder_.dispose();
updateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getUpdateBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getUpdateFieldBuilder().getBuilder();
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getUpdateOrBuilder() {
if (updateBuilder_ != null) {
return updateBuilder_.getMessageOrBuilder();
} else {
return update_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : update_;
}
}
/**
*
* Value to which the record is udpated.
*
*
* .daml_lf_2.Expr update = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getUpdateFieldBuilder() {
if (updateBuilder_ == null) {
updateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getUpdate(),
getParentForChildren(),
isClean());
update_ = null;
}
return updateBuilder_;
}
@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:daml_lf_2.Expr.StructUpd)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.StructUpd)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.StructUpd getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StructUpd 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.daml_lf_dev.DamlLf2.Expr.StructUpd getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AppOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.App)
com.google.protobuf.MessageOrBuilder {
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
* @return Whether the fun field is set.
*/
boolean hasFun();
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
* @return The fun.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getFun();
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getFunOrBuilder();
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
java.util.List
getArgsList();
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.Expr getArgs(int index);
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
int getArgsCount();
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getArgsOrBuilderList();
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getArgsOrBuilder(
int index);
}
/**
*
* Application ('ExpApp')
*
*
* Protobuf type {@code daml_lf_2.Expr.App}
*/
public static final class App extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.App)
AppOrBuilder {
private static final long serialVersionUID = 0L;
// Use App.newBuilder() to construct.
private App(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private App() {
args_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new App();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_App_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_App_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.App.class, com.daml.daml_lf_dev.DamlLf2.Expr.App.Builder.class);
}
private int bitField0_;
public static final int FUN_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.Expr fun_;
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
* @return Whether the fun field is set.
*/
@java.lang.Override
public boolean hasFun() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
* @return The fun.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getFun() {
return fun_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : fun_;
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getFunOrBuilder() {
return fun_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : fun_;
}
public static final int ARGS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List args_;
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
@java.lang.Override
public java.util.List getArgsList() {
return args_;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getArgsOrBuilderList() {
return args_;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
@java.lang.Override
public int getArgsCount() {
return args_.size();
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getArgs(int index) {
return args_.get(index);
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getArgsOrBuilder(
int index) {
return args_.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 {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getFun());
}
for (int i = 0; i < args_.size(); i++) {
output.writeMessage(2, args_.get(i));
}
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, getFun());
}
for (int i = 0; i < args_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, args_.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.daml_lf_dev.DamlLf2.Expr.App)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.App other = (com.daml.daml_lf_dev.DamlLf2.Expr.App) obj;
if (hasFun() != other.hasFun()) return false;
if (hasFun()) {
if (!getFun()
.equals(other.getFun())) return false;
}
if (!getArgsList()
.equals(other.getArgsList())) 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 (hasFun()) {
hash = (37 * hash) + FUN_FIELD_NUMBER;
hash = (53 * hash) + getFun().hashCode();
}
if (getArgsCount() > 0) {
hash = (37 * hash) + ARGS_FIELD_NUMBER;
hash = (53 * hash) + getArgsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App 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.daml_lf_dev.DamlLf2.Expr.App parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App 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.daml_lf_dev.DamlLf2.Expr.App parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App 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.daml_lf_dev.DamlLf2.Expr.App parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App 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.daml_lf_dev.DamlLf2.Expr.App 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;
}
/**
*
* Application ('ExpApp')
*
*
* Protobuf type {@code daml_lf_2.Expr.App}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.App)
com.daml.daml_lf_dev.DamlLf2.Expr.AppOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_App_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_App_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.App.class, com.daml.daml_lf_dev.DamlLf2.Expr.App.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.App.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFunFieldBuilder();
getArgsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
fun_ = null;
if (funBuilder_ != null) {
funBuilder_.dispose();
funBuilder_ = null;
}
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
} else {
args_ = null;
argsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_App_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.App getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.App.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.App build() {
com.daml.daml_lf_dev.DamlLf2.Expr.App result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.App buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.App result = new com.daml.daml_lf_dev.DamlLf2.Expr.App(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Expr.App result) {
if (argsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
args_ = java.util.Collections.unmodifiableList(args_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.args_ = args_;
} else {
result.args_ = argsBuilder_.build();
}
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Expr.App result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.fun_ = funBuilder_ == null
? fun_
: funBuilder_.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.daml_lf_dev.DamlLf2.Expr.App) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.App)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.App other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.App.getDefaultInstance()) return this;
if (other.hasFun()) {
mergeFun(other.getFun());
}
if (argsBuilder_ == null) {
if (!other.args_.isEmpty()) {
if (args_.isEmpty()) {
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureArgsIsMutable();
args_.addAll(other.args_);
}
onChanged();
}
} else {
if (!other.args_.isEmpty()) {
if (argsBuilder_.isEmpty()) {
argsBuilder_.dispose();
argsBuilder_ = null;
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
argsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getArgsFieldBuilder() : null;
} else {
argsBuilder_.addAllMessages(other.args_);
}
}
}
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(
getFunFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.daml.daml_lf_dev.DamlLf2.Expr m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.Expr.parser(),
extensionRegistry);
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(m);
} else {
argsBuilder_.addMessage(m);
}
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 com.daml.daml_lf_dev.DamlLf2.Expr fun_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> funBuilder_;
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
* @return Whether the fun field is set.
*/
public boolean hasFun() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
* @return The fun.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getFun() {
if (funBuilder_ == null) {
return fun_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : fun_;
} else {
return funBuilder_.getMessage();
}
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
*/
public Builder setFun(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (funBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fun_ = value;
} else {
funBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
*/
public Builder setFun(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (funBuilder_ == null) {
fun_ = builderForValue.build();
} else {
funBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
*/
public Builder mergeFun(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (funBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
fun_ != null &&
fun_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getFunBuilder().mergeFrom(value);
} else {
fun_ = value;
}
} else {
funBuilder_.mergeFrom(value);
}
if (fun_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
*/
public Builder clearFun() {
bitField0_ = (bitField0_ & ~0x00000001);
fun_ = null;
if (funBuilder_ != null) {
funBuilder_.dispose();
funBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getFunBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getFunFieldBuilder().getBuilder();
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getFunOrBuilder() {
if (funBuilder_ != null) {
return funBuilder_.getMessageOrBuilder();
} else {
return fun_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : fun_;
}
}
/**
*
* Function
*
*
* .daml_lf_2.Expr fun = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getFunFieldBuilder() {
if (funBuilder_ == null) {
funBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getFun(),
getParentForChildren(),
isClean());
fun_ = null;
}
return funBuilder_;
}
private java.util.List args_ =
java.util.Collections.emptyList();
private void ensureArgsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
args_ = new java.util.ArrayList(args_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> argsBuilder_;
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public java.util.List getArgsList() {
if (argsBuilder_ == null) {
return java.util.Collections.unmodifiableList(args_);
} else {
return argsBuilder_.getMessageList();
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public int getArgsCount() {
if (argsBuilder_ == null) {
return args_.size();
} else {
return argsBuilder_.getCount();
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getArgs(int index) {
if (argsBuilder_ == null) {
return args_.get(index);
} else {
return argsBuilder_.getMessage(index);
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.set(index, value);
onChanged();
} else {
argsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public Builder setArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.set(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public Builder addArgs(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(value);
onChanged();
} else {
argsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(index, value);
onChanged();
} else {
argsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public Builder addArgs(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public Builder addArgs(
int index, com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public Builder addAllArgs(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.Expr> values) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, args_);
onChanged();
} else {
argsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public Builder clearArgs() {
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
argsBuilder_.clear();
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public Builder removeArgs(int index) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.remove(index);
onChanged();
} else {
argsBuilder_.remove(index);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getArgsBuilder(
int index) {
return getArgsFieldBuilder().getBuilder(index);
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getArgsOrBuilder(
int index) {
if (argsBuilder_ == null) {
return args_.get(index); } else {
return argsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getArgsOrBuilderList() {
if (argsBuilder_ != null) {
return argsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(args_);
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder addArgsBuilder() {
return getArgsFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance());
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder addArgsBuilder(
int index) {
return getArgsFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance());
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Expr args = 2;
*/
public java.util.List
getArgsBuilderList() {
return getArgsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getArgsFieldBuilder() {
if (argsBuilder_ == null) {
argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
args_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
args_ = null;
}
return argsBuilder_;
}
@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:daml_lf_2.Expr.App)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.App)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.App DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.App();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.App getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public App 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.daml_lf_dev.DamlLf2.Expr.App getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TyAppOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.TyApp)
com.google.protobuf.MessageOrBuilder {
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
* @return Whether the expr field is set.
*/
boolean hasExpr();
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
* @return The expr.
*/
com.daml.daml_lf_dev.DamlLf2.Expr getExpr();
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
*/
com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getExprOrBuilder();
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
java.util.List
getTypesList();
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
com.daml.daml_lf_dev.DamlLf2.Type getTypes(int index);
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
int getTypesCount();
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getTypesOrBuilderList();
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypesOrBuilder(
int index);
}
/**
*
* Type application ('ExpTyApp')
*
*
* Protobuf type {@code daml_lf_2.Expr.TyApp}
*/
public static final class TyApp extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:daml_lf_2.Expr.TyApp)
TyAppOrBuilder {
private static final long serialVersionUID = 0L;
// Use TyApp.newBuilder() to construct.
private TyApp(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TyApp() {
types_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TyApp();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_TyApp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_TyApp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.TyApp.class, com.daml.daml_lf_dev.DamlLf2.Expr.TyApp.Builder.class);
}
private int bitField0_;
public static final int EXPR_FIELD_NUMBER = 1;
private com.daml.daml_lf_dev.DamlLf2.Expr expr_;
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
* @return Whether the expr field is set.
*/
@java.lang.Override
public boolean hasExpr() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
* @return The expr.
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr getExpr() {
return expr_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : expr_;
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getExprOrBuilder() {
return expr_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : expr_;
}
public static final int TYPES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List types_;
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
@java.lang.Override
public java.util.List getTypesList() {
return types_;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
@java.lang.Override
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getTypesOrBuilderList() {
return types_;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
@java.lang.Override
public int getTypesCount() {
return types_.size();
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Type getTypes(int index) {
return types_.get(index);
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypesOrBuilder(
int index) {
return types_.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 {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getExpr());
}
for (int i = 0; i < types_.size(); i++) {
output.writeMessage(2, types_.get(i));
}
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, getExpr());
}
for (int i = 0; i < types_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, types_.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.daml_lf_dev.DamlLf2.Expr.TyApp)) {
return super.equals(obj);
}
com.daml.daml_lf_dev.DamlLf2.Expr.TyApp other = (com.daml.daml_lf_dev.DamlLf2.Expr.TyApp) obj;
if (hasExpr() != other.hasExpr()) return false;
if (hasExpr()) {
if (!getExpr()
.equals(other.getExpr())) return false;
}
if (!getTypesList()
.equals(other.getTypesList())) 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 (hasExpr()) {
hash = (37 * hash) + EXPR_FIELD_NUMBER;
hash = (53 * hash) + getExpr().hashCode();
}
if (getTypesCount() > 0) {
hash = (37 * hash) + TYPES_FIELD_NUMBER;
hash = (53 * hash) + getTypesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp 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.daml_lf_dev.DamlLf2.Expr.TyApp parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp 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.daml_lf_dev.DamlLf2.Expr.TyApp parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp 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.daml_lf_dev.DamlLf2.Expr.TyApp parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp 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.daml_lf_dev.DamlLf2.Expr.TyApp 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;
}
/**
*
* Type application ('ExpTyApp')
*
*
* Protobuf type {@code daml_lf_2.Expr.TyApp}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:daml_lf_2.Expr.TyApp)
com.daml.daml_lf_dev.DamlLf2.Expr.TyAppOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_TyApp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_TyApp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.daml.daml_lf_dev.DamlLf2.Expr.TyApp.class, com.daml.daml_lf_dev.DamlLf2.Expr.TyApp.Builder.class);
}
// Construct using com.daml.daml_lf_dev.DamlLf2.Expr.TyApp.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getExprFieldBuilder();
getTypesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
expr_ = null;
if (exprBuilder_ != null) {
exprBuilder_.dispose();
exprBuilder_ = null;
}
if (typesBuilder_ == null) {
types_ = java.util.Collections.emptyList();
} else {
types_ = null;
typesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.daml.daml_lf_dev.DamlLf2.internal_static_daml_lf_2_Expr_TyApp_descriptor;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.TyApp getDefaultInstanceForType() {
return com.daml.daml_lf_dev.DamlLf2.Expr.TyApp.getDefaultInstance();
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.TyApp build() {
com.daml.daml_lf_dev.DamlLf2.Expr.TyApp result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.daml.daml_lf_dev.DamlLf2.Expr.TyApp buildPartial() {
com.daml.daml_lf_dev.DamlLf2.Expr.TyApp result = new com.daml.daml_lf_dev.DamlLf2.Expr.TyApp(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.daml.daml_lf_dev.DamlLf2.Expr.TyApp result) {
if (typesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
types_ = java.util.Collections.unmodifiableList(types_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.types_ = types_;
} else {
result.types_ = typesBuilder_.build();
}
}
private void buildPartial0(com.daml.daml_lf_dev.DamlLf2.Expr.TyApp result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.expr_ = exprBuilder_ == null
? expr_
: exprBuilder_.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.daml_lf_dev.DamlLf2.Expr.TyApp) {
return mergeFrom((com.daml.daml_lf_dev.DamlLf2.Expr.TyApp)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.daml.daml_lf_dev.DamlLf2.Expr.TyApp other) {
if (other == com.daml.daml_lf_dev.DamlLf2.Expr.TyApp.getDefaultInstance()) return this;
if (other.hasExpr()) {
mergeExpr(other.getExpr());
}
if (typesBuilder_ == null) {
if (!other.types_.isEmpty()) {
if (types_.isEmpty()) {
types_ = other.types_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureTypesIsMutable();
types_.addAll(other.types_);
}
onChanged();
}
} else {
if (!other.types_.isEmpty()) {
if (typesBuilder_.isEmpty()) {
typesBuilder_.dispose();
typesBuilder_ = null;
types_ = other.types_;
bitField0_ = (bitField0_ & ~0x00000002);
typesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTypesFieldBuilder() : null;
} else {
typesBuilder_.addAllMessages(other.types_);
}
}
}
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(
getExprFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.daml.daml_lf_dev.DamlLf2.Type m =
input.readMessage(
com.daml.daml_lf_dev.DamlLf2.Type.parser(),
extensionRegistry);
if (typesBuilder_ == null) {
ensureTypesIsMutable();
types_.add(m);
} else {
typesBuilder_.addMessage(m);
}
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 com.daml.daml_lf_dev.DamlLf2.Expr expr_;
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder> exprBuilder_;
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
* @return Whether the expr field is set.
*/
public boolean hasExpr() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
* @return The expr.
*/
public com.daml.daml_lf_dev.DamlLf2.Expr getExpr() {
if (exprBuilder_ == null) {
return expr_ == null ? com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : expr_;
} else {
return exprBuilder_.getMessage();
}
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
*/
public Builder setExpr(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (exprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expr_ = value;
} else {
exprBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
*/
public Builder setExpr(
com.daml.daml_lf_dev.DamlLf2.Expr.Builder builderForValue) {
if (exprBuilder_ == null) {
expr_ = builderForValue.build();
} else {
exprBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
*/
public Builder mergeExpr(com.daml.daml_lf_dev.DamlLf2.Expr value) {
if (exprBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
expr_ != null &&
expr_ != com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance()) {
getExprBuilder().mergeFrom(value);
} else {
expr_ = value;
}
} else {
exprBuilder_.mergeFrom(value);
}
if (expr_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
*/
public Builder clearExpr() {
bitField0_ = (bitField0_ & ~0x00000001);
expr_ = null;
if (exprBuilder_ != null) {
exprBuilder_.dispose();
exprBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.Expr.Builder getExprBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getExprFieldBuilder().getBuilder();
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
*/
public com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder getExprOrBuilder() {
if (exprBuilder_ != null) {
return exprBuilder_.getMessageOrBuilder();
} else {
return expr_ == null ?
com.daml.daml_lf_dev.DamlLf2.Expr.getDefaultInstance() : expr_;
}
}
/**
*
* Polymorphic expression
*
*
* .daml_lf_2.Expr expr = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>
getExprFieldBuilder() {
if (exprBuilder_ == null) {
exprBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Expr, com.daml.daml_lf_dev.DamlLf2.Expr.Builder, com.daml.daml_lf_dev.DamlLf2.ExprOrBuilder>(
getExpr(),
getParentForChildren(),
isClean());
expr_ = null;
}
return exprBuilder_;
}
private java.util.List types_ =
java.util.Collections.emptyList();
private void ensureTypesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
types_ = new java.util.ArrayList(types_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder> typesBuilder_;
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public java.util.List getTypesList() {
if (typesBuilder_ == null) {
return java.util.Collections.unmodifiableList(types_);
} else {
return typesBuilder_.getMessageList();
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public int getTypesCount() {
if (typesBuilder_ == null) {
return types_.size();
} else {
return typesBuilder_.getCount();
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type getTypes(int index) {
if (typesBuilder_ == null) {
return types_.get(index);
} else {
return typesBuilder_.getMessage(index);
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public Builder setTypes(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (typesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTypesIsMutable();
types_.set(index, value);
onChanged();
} else {
typesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public Builder setTypes(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (typesBuilder_ == null) {
ensureTypesIsMutable();
types_.set(index, builderForValue.build());
onChanged();
} else {
typesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public Builder addTypes(com.daml.daml_lf_dev.DamlLf2.Type value) {
if (typesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTypesIsMutable();
types_.add(value);
onChanged();
} else {
typesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public Builder addTypes(
int index, com.daml.daml_lf_dev.DamlLf2.Type value) {
if (typesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTypesIsMutable();
types_.add(index, value);
onChanged();
} else {
typesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public Builder addTypes(
com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (typesBuilder_ == null) {
ensureTypesIsMutable();
types_.add(builderForValue.build());
onChanged();
} else {
typesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public Builder addTypes(
int index, com.daml.daml_lf_dev.DamlLf2.Type.Builder builderForValue) {
if (typesBuilder_ == null) {
ensureTypesIsMutable();
types_.add(index, builderForValue.build());
onChanged();
} else {
typesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public Builder addAllTypes(
java.lang.Iterable extends com.daml.daml_lf_dev.DamlLf2.Type> values) {
if (typesBuilder_ == null) {
ensureTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, types_);
onChanged();
} else {
typesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public Builder clearTypes() {
if (typesBuilder_ == null) {
types_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
typesBuilder_.clear();
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public Builder removeTypes(int index) {
if (typesBuilder_ == null) {
ensureTypesIsMutable();
types_.remove(index);
onChanged();
} else {
typesBuilder_.remove(index);
}
return this;
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder getTypesBuilder(
int index) {
return getTypesFieldBuilder().getBuilder(index);
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder getTypesOrBuilder(
int index) {
if (typesBuilder_ == null) {
return types_.get(index); } else {
return typesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public java.util.List extends com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getTypesOrBuilderList() {
if (typesBuilder_ != null) {
return typesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(types_);
}
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addTypesBuilder() {
return getTypesFieldBuilder().addBuilder(
com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public com.daml.daml_lf_dev.DamlLf2.Type.Builder addTypesBuilder(
int index) {
return getTypesFieldBuilder().addBuilder(
index, com.daml.daml_lf_dev.DamlLf2.Type.getDefaultInstance());
}
/**
*
* Arguments of the function.
* *Must be non-empty*
*
*
* repeated .daml_lf_2.Type types = 2;
*/
public java.util.List
getTypesBuilderList() {
return getTypesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>
getTypesFieldBuilder() {
if (typesBuilder_ == null) {
typesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.daml.daml_lf_dev.DamlLf2.Type, com.daml.daml_lf_dev.DamlLf2.Type.Builder, com.daml.daml_lf_dev.DamlLf2.TypeOrBuilder>(
types_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
types_ = null;
}
return typesBuilder_;
}
@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:daml_lf_2.Expr.TyApp)
}
// @@protoc_insertion_point(class_scope:daml_lf_2.Expr.TyApp)
private static final com.daml.daml_lf_dev.DamlLf2.Expr.TyApp DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.daml.daml_lf_dev.DamlLf2.Expr.TyApp();
}
public static com.daml.daml_lf_dev.DamlLf2.Expr.TyApp getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TyApp 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.daml_lf_dev.DamlLf2.Expr.TyApp getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AbsOrBuilder extends
// @@protoc_insertion_point(interface_extends:daml_lf_2.Expr.Abs)
com.google.protobuf.MessageOrBuilder {
/**
*
* Abstracted Variables with their kind
* *Must be non-empty*
*
*
* repeated .daml_lf_2.VarWithType param = 1;
*/
java.util.List
getParamList();
/**
*