@Generated(value="software.amazon.awssdk:codegen") public final class InstanceState extends Object implements SdkPojo, Serializable, ToCopyableBuilder<InstanceState.Builder,InstanceState>
Describes the current state of an instance.
Modifier and Type | Class and Description |
---|---|
static interface |
InstanceState.Builder |
Modifier and Type | Method and Description |
---|---|
static InstanceState.Builder |
builder() |
Integer |
code()
The state of the instance as a 16-bit unsigned integer.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
InstanceStateName |
name()
The current state of the instance.
|
String |
nameAsString()
The current state of the instance.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends InstanceState.Builder> |
serializableBuilderClass() |
InstanceState.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
copy
public Integer code()
The state of the instance as a 16-bit unsigned integer.
The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.
The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.
The valid values for instance-state-code will all be in the range of the low byte and they are:
0
: pending
16
: running
32
: shutting-down
48
: terminated
64
: stopping
80
: stopped
You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.
The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.
The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.
The valid values for instance-state-code will all be in the range of the low byte and they are:
0
: pending
16
: running
32
: shutting-down
48
: terminated
64
: stopping
80
: stopped
You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.
public InstanceStateName name()
The current state of the instance.
If the service returns an enum value that is not available in the current SDK version, name
will return
InstanceStateName.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
nameAsString()
.
InstanceStateName
public String nameAsString()
The current state of the instance.
If the service returns an enum value that is not available in the current SDK version, name
will return
InstanceStateName.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
nameAsString()
.
InstanceStateName
public InstanceState.Builder toBuilder()
toBuilder
in interface ToCopyableBuilder<InstanceState.Builder,InstanceState>
public static InstanceState.Builder builder()
public static Class<? extends InstanceState.Builder> serializableBuilderClass()
public boolean equalsBySdkFields(Object obj)
equalsBySdkFields
in interface SdkPojo
public String toString()
Copyright © 2020. All rights reserved.