Class CAP3TransferredVolume
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CAP3TransferredVolume.Choice
API for CAP-datatypes.TransferredVolume.Choice.static class
CAP3TransferredVolume.VolumeIfTariffSwitch
API for CAP-datatypes.TransferredVolume.volumeIfTariffSwitch.
-
Field Summary
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description CAP3TransferredVolume()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CAP3TransferredVolume
clone()
Constructs a copy of this object and everything reachable from it.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.CAP3TransferredVolume.Choice
getChoice()
Gets the discriminant of the current choice.static FieldAccessor[]
getFieldAccessors()
Gets a new array of the accessors for fields of this type.Map<String,Object>
getFieldsMap(boolean withAbsents)
Gets a Map from :discriminant-name to associated-value.long
getVolumeIfNoTariffSwitch()
Gets the value of the volumeIfNoTariffSwitch choice.CAP3TransferredVolume.VolumeIfTariffSwitch
getVolumeIfTariffSwitch()
Gets the value of the volumeIfTariffSwitch choice.boolean
isVolumeIfNoTariffSwitchChosen()
Tests whether the choice is volumeIfNoTariffSwitch.boolean
isVolumeIfTariffSwitchChosen()
Tests whether the choice is volumeIfTariffSwitch.void
setReadOnly()
Sets this and all its fields to be immutable.CAP3TransferredVolume
setVolumeIfNoTariffSwitch(long value)
Sets the value of the volumeIfNoTariffSwitch choice.CAP3TransferredVolume
setVolumeIfTariffSwitch(CAP3TransferredVolume.VolumeIfTariffSwitch value)
Sets the value of the volumeIfTariffSwitch choice.-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, isReadOnly
-
-
-
-
Method Detail
-
clone
public CAP3TransferredVolume clone()
Constructs a copy of this object and everything reachable from it.- Specified by:
clone
in interfaceDataObject
- Specified by:
clone
in classAbstractDataObject
- Returns:
- copy of object
-
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 classAbstractFieldsObject
- 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
-
setReadOnly
public void setReadOnly()
Sets this and all its fields to be immutable.- Specified by:
setReadOnly
in interfaceDataObject
- Overrides:
setReadOnly
in classAbstractDataObject
-
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
-
setVolumeIfTariffSwitch
public CAP3TransferredVolume setVolumeIfTariffSwitch(CAP3TransferredVolume.VolumeIfTariffSwitch value) throws IllegalStateException, NullPointerException
Sets the value of the volumeIfTariffSwitch choice.- Parameters:
value
- the new value for the choice- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-onlyNullPointerException
- if the given value is null
-
-