Class ValueOuterClass.Value

  • All Implemented Interfaces:
    ValueOuterClass.ValueOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.Serializable
    Enclosing class:
    ValueOuterClass

    public static final class ValueOuterClass.Value
    extends com.google.protobuf.GeneratedMessageV3
    implements ValueOuterClass.ValueOrBuilder
     Encodes values that the ledger accepts as command arguments and emits as contract arguments.
    
     The values encoding use different classes of non-empty strings as identifiers. Those classes are
     defined as follows:
     - NameStrings are strings with length <= 1000 that match the regexp ``[A-Za-z\$_][A-Za-z0-9\$_]*``.
     - PackageIdStrings are strings with length <= 64 that match the regexp ``[A-Za-z0-9\-_ ]+``.
     - PartyIdStrings are strings with length <= 255 that match the regexp ``[A-Za-z0-9:\-_ ]+``.
     - LedgerStrings are strings with length <= 255 that match the regexp ``[A-Za-z0-9#:\-_/ ]+``.
     - ApplicationIdStrings are strings with length <= 255 that match the regexp ``[A-Za-z0-9#:\-_/ @\|]+``.
     
    Protobuf type com.daml.ledger.api.v1.Value
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasRecord

        public boolean hasRecord()
        .com.daml.ledger.api.v1.Record record = 1 [json_name = "record"];
        Specified by:
        hasRecord in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the record field is set.
      • hasVariant

        public boolean hasVariant()
        .com.daml.ledger.api.v1.Variant variant = 2 [json_name = "variant"];
        Specified by:
        hasVariant in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the variant field is set.
      • hasContractId

        public boolean hasContractId()
         Identifier of an on-ledger contract. Commands which reference an unknown or already archived contract ID will fail.
         Must be a valid LedgerString.
         
        string contract_id = 3 [json_name = "contractId"];
        Specified by:
        hasContractId in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the contractId field is set.
      • getContractId

        public java.lang.String getContractId()
         Identifier of an on-ledger contract. Commands which reference an unknown or already archived contract ID will fail.
         Must be a valid LedgerString.
         
        string contract_id = 3 [json_name = "contractId"];
        Specified by:
        getContractId in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The contractId.
      • getContractIdBytes

        public com.google.protobuf.ByteString getContractIdBytes()
         Identifier of an on-ledger contract. Commands which reference an unknown or already archived contract ID will fail.
         Must be a valid LedgerString.
         
        string contract_id = 3 [json_name = "contractId"];
        Specified by:
        getContractIdBytes in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The bytes for contractId.
      • hasList

        public boolean hasList()
         Represents a homogeneous list of values.
         
        .com.daml.ledger.api.v1.List list = 4 [json_name = "list"];
        Specified by:
        hasList in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the list field is set.
      • hasInt64

        public boolean hasInt64()
        sint64 int64 = 5 [json_name = "int64", jstype = JS_STRING];
        Specified by:
        hasInt64 in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the int64 field is set.
      • hasNumeric

        public boolean hasNumeric()
         A Numeric, that is a decimal value with precision 38 (at most 38 significant digits) and a
         scale between 0 and 37 (significant digits on the right of the decimal point).
         The field has to match the regex
           [+-]?\d{1,38}(.\d{0,37})?
         and should be representable by a Numeric without loss of precision.
         
        string numeric = 6 [json_name = "numeric"];
        Specified by:
        hasNumeric in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the numeric field is set.
      • getNumeric

        public java.lang.String getNumeric()
         A Numeric, that is a decimal value with precision 38 (at most 38 significant digits) and a
         scale between 0 and 37 (significant digits on the right of the decimal point).
         The field has to match the regex
           [+-]?\d{1,38}(.\d{0,37})?
         and should be representable by a Numeric without loss of precision.
         
        string numeric = 6 [json_name = "numeric"];
        Specified by:
        getNumeric in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The numeric.
      • getNumericBytes

        public com.google.protobuf.ByteString getNumericBytes()
         A Numeric, that is a decimal value with precision 38 (at most 38 significant digits) and a
         scale between 0 and 37 (significant digits on the right of the decimal point).
         The field has to match the regex
           [+-]?\d{1,38}(.\d{0,37})?
         and should be representable by a Numeric without loss of precision.
         
        string numeric = 6 [json_name = "numeric"];
        Specified by:
        getNumericBytes in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The bytes for numeric.
      • hasText

        public boolean hasText()
         A string.
         
        string text = 8 [json_name = "text"];
        Specified by:
        hasText in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the text field is set.
      • getTextBytes

        public com.google.protobuf.ByteString getTextBytes()
         A string.
         
        string text = 8 [json_name = "text"];
        Specified by:
        getTextBytes in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The bytes for text.
      • hasTimestamp

        public boolean hasTimestamp()
         Microseconds since the UNIX epoch. Can go backwards. Fixed
         since the vast majority of values will be greater than
         2^28, since currently the number of microseconds since the
         epoch is greater than that. Range: 0001-01-01T00:00:00Z to
         9999-12-31T23:59:59.999999Z, so that we can convert to/from
         https://www.ietf.org/rfc/rfc3339.txt
         
        sfixed64 timestamp = 9 [json_name = "timestamp", jstype = JS_STRING];
        Specified by:
        hasTimestamp in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the timestamp field is set.
      • getTimestamp

        public long getTimestamp()
         Microseconds since the UNIX epoch. Can go backwards. Fixed
         since the vast majority of values will be greater than
         2^28, since currently the number of microseconds since the
         epoch is greater than that. Range: 0001-01-01T00:00:00Z to
         9999-12-31T23:59:59.999999Z, so that we can convert to/from
         https://www.ietf.org/rfc/rfc3339.txt
         
        sfixed64 timestamp = 9 [json_name = "timestamp", jstype = JS_STRING];
        Specified by:
        getTimestamp in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The timestamp.
      • hasParty

        public boolean hasParty()
         An agent operating on the ledger.
         Must be a valid PartyIdString.
         
        string party = 11 [json_name = "party"];
        Specified by:
        hasParty in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the party field is set.
      • getParty

        public java.lang.String getParty()
         An agent operating on the ledger.
         Must be a valid PartyIdString.
         
        string party = 11 [json_name = "party"];
        Specified by:
        getParty in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The party.
      • getPartyBytes

        public com.google.protobuf.ByteString getPartyBytes()
         An agent operating on the ledger.
         Must be a valid PartyIdString.
         
        string party = 11 [json_name = "party"];
        Specified by:
        getPartyBytes in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The bytes for party.
      • hasBool

        public boolean hasBool()
         True or false.
         
        bool bool = 12 [json_name = "bool"];
        Specified by:
        hasBool in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the bool field is set.
      • hasUnit

        public boolean hasUnit()
         This value is used for example for choices that don't take any arguments.
         
        .google.protobuf.Empty unit = 13 [json_name = "unit"];
        Specified by:
        hasUnit in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the unit field is set.
      • getUnit

        public com.google.protobuf.Empty getUnit()
         This value is used for example for choices that don't take any arguments.
         
        .google.protobuf.Empty unit = 13 [json_name = "unit"];
        Specified by:
        getUnit in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The unit.
      • getUnitOrBuilder

        public com.google.protobuf.EmptyOrBuilder getUnitOrBuilder()
         This value is used for example for choices that don't take any arguments.
         
        .google.protobuf.Empty unit = 13 [json_name = "unit"];
        Specified by:
        getUnitOrBuilder in interface ValueOuterClass.ValueOrBuilder
      • hasDate

        public boolean hasDate()
         Days since the unix epoch. Can go backwards. Limited from
         0001-01-01 to 9999-12-31, also to be compatible with
         https://www.ietf.org/rfc/rfc3339.txt
         
        int32 date = 14 [json_name = "date"];
        Specified by:
        hasDate in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the date field is set.
      • getDate

        public int getDate()
         Days since the unix epoch. Can go backwards. Limited from
         0001-01-01 to 9999-12-31, also to be compatible with
         https://www.ietf.org/rfc/rfc3339.txt
         
        int32 date = 14 [json_name = "date"];
        Specified by:
        getDate in interface ValueOuterClass.ValueOrBuilder
        Returns:
        The date.
      • hasOptional

        public boolean hasOptional()
         The Optional type, None or Some
         
        .com.daml.ledger.api.v1.Optional optional = 15 [json_name = "optional"];
        Specified by:
        hasOptional in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the optional field is set.
      • hasMap

        public boolean hasMap()
         The Map type
         
        .com.daml.ledger.api.v1.Map map = 16 [json_name = "map"];
        Specified by:
        hasMap in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the map field is set.
      • hasEnum

        public boolean hasEnum()
         The Enum type
         
        .com.daml.ledger.api.v1.Enum enum = 17 [json_name = "enum"];
        Specified by:
        hasEnum in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the enum field is set.
      • hasGenMap

        public boolean hasGenMap()
         The GenMap type
         
        .com.daml.ledger.api.v1.GenMap gen_map = 18 [json_name = "genMap"];
        Specified by:
        hasGenMap in interface ValueOuterClass.ValueOrBuilder
        Returns:
        Whether the genMap field is set.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(java.nio.ByteBuffer data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(java.nio.ByteBuffer data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(com.google.protobuf.ByteString data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(com.google.protobuf.ByteString data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(byte[] data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(byte[] data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(java.io.InputStream input)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(java.io.InputStream input,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static ValueOuterClass.Value parseDelimitedFrom​(java.io.InputStream input)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static ValueOuterClass.Value parseDelimitedFrom​(java.io.InputStream input,
                                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(com.google.protobuf.CodedInputStream input)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static ValueOuterClass.Value parseFrom​(com.google.protobuf.CodedInputStream input,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public ValueOuterClass.Value.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public ValueOuterClass.Value.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected ValueOuterClass.Value.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<ValueOuterClass.Value> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public ValueOuterClass.Value getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder