Class CAP3TransferredVolume

  • All Implemented Interfaces:
    DataObject, Serializable

    public class CAP3TransferredVolume
    extends AbstractFieldsObject
    API for CAP-datatypes.TransferredVolume. Generated from the following ASN.1 type definition.
     TransferredVolume ::=
         CHOICE {
             volumeIfNoTariffSwitch INTEGER (0..4294967295),
             volumeIfTariffSwitch   SEQUENCE {
                 volumeSinceLastTariffSwitch INTEGER (0..4294967295),
                 volumeTariffSwitchInterval  INTEGER (0..4294967295) OPTIONAL
             }
         }
     

    Used as field type by CAP3ChargingResult.

    See Also:
    Serialized Form
    • Constructor Detail

      • CAP3TransferredVolume

        public CAP3TransferredVolume()
    • Method Detail

      • copyOf

        public static CAP3TransferredVolume copyOf​(CAP3TransferredVolume from)
        Creates a new object of this type, cloning the values of common fields from the given object of any subclass of the same base type.
        Parameters:
        from - the object from which to copy
        Returns:
        CAP3TransferredVolume
      • getChoice

        public CAP3TransferredVolume.Choice getChoice()
        Gets the discriminant of the current choice.
        Returns:
        the current discriminant
      • getFieldAccessors

        public static FieldAccessor[] getFieldAccessors()
        Gets a new array of the accessors for fields of this type.
        Returns:
        FieldAccessor[]
      • getFieldsMap

        public Map<String,​Object> getFieldsMap​(boolean withAbsents)
        Gets a Map from :discriminant-name to associated-value. For a value of primitive type, the value is boxed. If choice is not set, returns a map from : to AbstractFieldsObject.FIELD_UNINITIALISED.
        Specified by:
        getFieldsMap in class AbstractFieldsObject
        Parameters:
        withAbsents - ignored, as value cannot be optional
        Returns:
        Map from :discriminant-name to associated-value
      • getVolumeIfNoTariffSwitch

        public long getVolumeIfNoTariffSwitch()
                                       throws IllegalStateException
        Gets the value of the volumeIfNoTariffSwitch choice.
        Returns:
        value of the choice, if choice is volumeIfNoTariffSwitch
        Throws:
        IllegalStateException - if choice is not volumeIfNoTariffSwitch
      • getVolumeIfTariffSwitch

        public CAP3TransferredVolume.VolumeIfTariffSwitch getVolumeIfTariffSwitch()
        Gets the value of the volumeIfTariffSwitch choice.
        Returns:
        value of the choice, if choice is volumeIfTariffSwitch, else null
      • isVolumeIfNoTariffSwitchChosen

        public boolean isVolumeIfNoTariffSwitchChosen()
        Tests whether the choice is volumeIfNoTariffSwitch.
        Returns:
        true if chosen, false if not
      • isVolumeIfTariffSwitchChosen

        public boolean isVolumeIfTariffSwitchChosen()
        Tests whether the choice is volumeIfTariffSwitch.
        Returns:
        true if chosen, false if not
      • setVolumeIfNoTariffSwitch

        public CAP3TransferredVolume setVolumeIfNoTariffSwitch​(long value)
                                                        throws IllegalStateException
        Sets the value of the volumeIfNoTariffSwitch choice.
        Parameters:
        value - the new value for the choice
        Returns:
        this
        Throws:
        IllegalStateException - if this instance has been marked as read-only