@Generated(value="software.amazon.awssdk:codegen") public final class ContextEntry extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ContextEntry.Builder,ContextEntry>
Contains information about a condition context key. It includes the name of the key and specifies the value (or
values, if the context key supports multiple values) to use in the simulation. This information is used when
evaluating the Condition
elements of the input policies.
This data type is used as an input parameter to SimulateCustomPolicy and SimulatePrincipalPolicy.
Modifier and Type | Class and Description |
---|---|
static interface |
ContextEntry.Builder |
Modifier and Type | Method and Description |
---|---|
static ContextEntry.Builder |
builder() |
String |
contextKeyName()
The full name of a condition context key, including the service prefix.
|
ContextKeyTypeEnum |
contextKeyType()
The data type of the value (or values) specified in the
ContextKeyValues parameter. |
String |
contextKeyTypeAsString()
The data type of the value (or values) specified in the
ContextKeyValues parameter. |
List<String> |
contextKeyValues()
The value (or values, if the condition context key supports multiple values) to provide to the simulation when
the key is referenced by a
Condition element in an input policy. |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj)
Indicates whether some other object is "equal to" this one by SDK fields.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasContextKeyValues()
Returns true if the ContextKeyValues property was specified by the sender (it may be empty), or false if the
sender did not specify the value (it will be empty).
|
int |
hashCode() |
List<SdkField<?>> |
sdkFields() |
static Class<? extends ContextEntry.Builder> |
serializableBuilderClass() |
ContextEntry.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString()
Returns a string representation of this object.
|
copy
public final String contextKeyName()
The full name of a condition context key, including the service prefix. For example, aws:SourceIp
or
s3:VersionId
.
aws:SourceIp
or s3:VersionId
.public final boolean hasContextKeyValues()
public final List<String> contextKeyValues()
The value (or values, if the condition context key supports multiple values) to provide to the simulation when
the key is referenced by a Condition
element in an input policy.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasContextKeyValues()
to see if a value was sent in this field.
Condition
element in an input policy.public final ContextKeyTypeEnum contextKeyType()
The data type of the value (or values) specified in the ContextKeyValues
parameter.
If the service returns an enum value that is not available in the current SDK version, contextKeyType
will return ContextKeyTypeEnum.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from contextKeyTypeAsString()
.
ContextKeyValues
parameter.ContextKeyTypeEnum
public final String contextKeyTypeAsString()
The data type of the value (or values) specified in the ContextKeyValues
parameter.
If the service returns an enum value that is not available in the current SDK version, contextKeyType
will return ContextKeyTypeEnum.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from contextKeyTypeAsString()
.
ContextKeyValues
parameter.ContextKeyTypeEnum
public ContextEntry.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<ContextEntry.Builder,ContextEntry>
public static ContextEntry.Builder builder()
public static Class<? extends ContextEntry.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
SdkPojo
SdkPojo
class,
and is generated based on a service model.
If an SdkPojo
class does not have any inherited fields, equalsBySdkFields
and equals
are essentially the same.
equalsBySdkFields
in interface SdkPojo
obj
- the object to be compared withpublic final String toString()
Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.