Class CS1FilteringTimeOut
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- CS1FilteringTimeOut
-
- All Implemented Interfaces:
DataObject
,Serializable
public class CS1FilteringTimeOut extends AbstractFieldsObject
API for Core-INAP-CS1-DataTypes.FilteringTimeOut. Generated from the following ASN.1 type definition.FilteringTimeOut ::= CHOICE { duration Duration, stopTime DateAndTime }
Used as field type by
CS1ActivateServiceFilteringArg
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CS1FilteringTimeOut.Choice
API for Core-INAP-CS1-DataTypes.FilteringTimeOut.Choice.
-
Field Summary
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description CS1FilteringTimeOut()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CS1FilteringTimeOut
clone()
Constructs a copy of this object and everything reachable from it.static CS1FilteringTimeOut
copyOf(CS1FilteringTimeOut 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.CS1FilteringTimeOut.Choice
getChoice()
Gets the discriminant of the current choice.int
getDuration()
Gets the value of the duration 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.DateAndTime
getStopTime()
Gets the value of the stopTime choice.boolean
isDurationChosen()
Tests whether the choice is duration.boolean
isStopTimeChosen()
Tests whether the choice is stopTime.CS1FilteringTimeOut
setDuration(int value)
Sets the value of the duration choice.void
setReadOnly()
Sets this and all its fields to be immutable.CS1FilteringTimeOut
setStopTime(DateAndTime value)
Sets the value of the stopTime 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 CS1FilteringTimeOut 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 CS1FilteringTimeOut copyOf(CS1FilteringTimeOut 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:
- CS1FilteringTimeOut
-
getChoice
public CS1FilteringTimeOut.Choice getChoice()
Gets the discriminant of the current choice.- Returns:
- the current discriminant
-
getDuration
public int getDuration() throws IllegalStateException
Gets the value of the duration choice.- Returns:
- value of the choice, if choice is duration
- Throws:
IllegalStateException
- if choice is not duration
-
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
-
getStopTime
public DateAndTime getStopTime()
Gets the value of the stopTime choice.- Returns:
- value of the choice, if choice is stopTime, else null
-
isDurationChosen
public boolean isDurationChosen()
Tests whether the choice is duration.- Returns:
- true if chosen, false if not
-
isStopTimeChosen
public boolean isStopTimeChosen()
Tests whether the choice is stopTime.- Returns:
- true if chosen, false if not
-
setDuration
public CS1FilteringTimeOut setDuration(int value) throws IllegalStateException
Sets the value of the duration choice.- Parameters:
value
- the new value for the choice- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setReadOnly
public void setReadOnly()
Sets this and all its fields to be immutable.- Specified by:
setReadOnly
in interfaceDataObject
- Overrides:
setReadOnly
in classAbstractDataObject
-
setStopTime
public CS1FilteringTimeOut setStopTime(DateAndTime value) throws IllegalStateException, NullPointerException
Sets the value of the stopTime 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
-
-