Class CAP2TimeInformation
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- CAP2TimeInformation
-
- All Implemented Interfaces:
DataObject
,Serializable
public class CAP2TimeInformation extends AbstractFieldsObject
API for CAP-DataTypes.TimeInformation. Generated from the following ASN.1 type definition.TimeInformation ::= CHOICE { timeIfNoTariffSwitch TimeIfNoTariffSwitch, timeIfTariffSwitch TimeIfTariffSwitch }
Used as field type by
CAP2CAMEL_CallResult.TimeDurationChargingResult
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CAP2TimeInformation.Choice
API for CAP-DataTypes.TimeInformation.Choice.
-
Field Summary
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description CAP2TimeInformation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CAP2TimeInformation
clone()
Constructs a copy of this object and everything reachable from it.static CAP2TimeInformation
copyOf(CAP2TimeInformation 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.CAP2TimeInformation.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.int
getTimeIfNoTariffSwitch()
Gets the value of the timeIfNoTariffSwitch choice.CAP2TimeIfTariffSwitch
getTimeIfTariffSwitch()
Gets the value of the timeIfTariffSwitch choice.boolean
isTimeIfNoTariffSwitchChosen()
Tests whether the choice is timeIfNoTariffSwitch.boolean
isTimeIfTariffSwitchChosen()
Tests whether the choice is timeIfTariffSwitch.void
setReadOnly()
Sets this and all its fields to be immutable.CAP2TimeInformation
setTimeIfNoTariffSwitch(int value)
Sets the value of the timeIfNoTariffSwitch choice.CAP2TimeInformation
setTimeIfTariffSwitch(CAP2TimeIfTariffSwitch value)
Sets the value of the timeIfTariffSwitch 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 CAP2TimeInformation 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 CAP2TimeInformation copyOf(CAP2TimeInformation 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:
- CAP2TimeInformation
-
getChoice
public CAP2TimeInformation.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
-
getTimeIfNoTariffSwitch
public int getTimeIfNoTariffSwitch() throws IllegalStateException
Gets the value of the timeIfNoTariffSwitch choice.- Returns:
- value of the choice, if choice is timeIfNoTariffSwitch
- Throws:
IllegalStateException
- if choice is not timeIfNoTariffSwitch
-
getTimeIfTariffSwitch
public CAP2TimeIfTariffSwitch getTimeIfTariffSwitch()
Gets the value of the timeIfTariffSwitch choice.- Returns:
- value of the choice, if choice is timeIfTariffSwitch, else null
-
isTimeIfNoTariffSwitchChosen
public boolean isTimeIfNoTariffSwitchChosen()
Tests whether the choice is timeIfNoTariffSwitch.- Returns:
- true if chosen, false if not
-
isTimeIfTariffSwitchChosen
public boolean isTimeIfTariffSwitchChosen()
Tests whether the choice is timeIfTariffSwitch.- 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
-
setTimeIfNoTariffSwitch
public CAP2TimeInformation setTimeIfNoTariffSwitch(int value) throws IllegalStateException
Sets the value of the timeIfNoTariffSwitch choice.- Parameters:
value
- the new value for the choice- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setTimeIfTariffSwitch
public CAP2TimeInformation setTimeIfTariffSwitch(CAP2TimeIfTariffSwitch value) throws IllegalStateException, NullPointerException
Sets the value of the timeIfTariffSwitch 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
-
-