Class PathElement
- java.lang.Object
-
- software.amazon.awssdk.services.accessanalyzer.model.PathElement
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<PathElement.Builder,PathElement>
@Generated("software.amazon.awssdk:codegen") public final class PathElement extends Object implements SdkPojo, Serializable, ToCopyableBuilder<PathElement.Builder,PathElement>
A single element in a path through the JSON representation of a policy.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePathElement.Builderstatic classPathElement.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PathElement.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static PathElementfromIndex(Integer index)Create an instance of this class withindex()initialized to the given value.static PathElementfromKey(String key)Create an instance of this class withkey()initialized to the given value.static PathElementfromSubstring(Consumer<Substring.Builder> substring)Create an instance of this class withsubstring()initialized to the given value.static PathElementfromSubstring(Substring substring)Create an instance of this class withsubstring()initialized to the given value.static PathElementfromValue(String value)Create an instance of this class withvalue()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Integerindex()Refers to an index in a JSON array.Stringkey()Refers to a key in a JSON object.List<SdkField<?>>sdkFields()static Class<? extends PathElement.Builder>serializableBuilderClass()Substringsubstring()Refers to a substring of a literal string in a JSON object.PathElement.BuildertoBuilder()StringtoString()Returns a string representation of this object.PathElement.Typetype()Retrieve an enum value representing which member of this object is populated.Stringvalue()Refers to the value associated with a given key in a JSON object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
index
public final Integer index()
Refers to an index in a JSON array.
- Returns:
- Refers to an index in a JSON array.
-
key
public final String key()
Refers to a key in a JSON object.
- Returns:
- Refers to a key in a JSON object.
-
substring
public final Substring substring()
Refers to a substring of a literal string in a JSON object.
- Returns:
- Refers to a substring of a literal string in a JSON object.
-
value
public final String value()
Refers to the value associated with a given key in a JSON object.
- Returns:
- Refers to the value associated with a given key in a JSON object.
-
toBuilder
public PathElement.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<PathElement.Builder,PathElement>
-
builder
public static PathElement.Builder builder()
-
serializableBuilderClass
public static Class<? extends PathElement.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
fromIndex
public static PathElement fromIndex(Integer index)
Create an instance of this class withindex()initialized to the given value.Refers to an index in a JSON array.
- Parameters:
index- Refers to an index in a JSON array.
-
fromKey
public static PathElement fromKey(String key)
Create an instance of this class withkey()initialized to the given value.Refers to a key in a JSON object.
- Parameters:
key- Refers to a key in a JSON object.
-
fromSubstring
public static PathElement fromSubstring(Substring substring)
Create an instance of this class withsubstring()initialized to the given value.Refers to a substring of a literal string in a JSON object.
- Parameters:
substring- Refers to a substring of a literal string in a JSON object.
-
fromSubstring
public static PathElement fromSubstring(Consumer<Substring.Builder> substring)
Create an instance of this class withsubstring()initialized to the given value.Refers to a substring of a literal string in a JSON object.
- Parameters:
substring- Refers to a substring of a literal string in a JSON object.
-
fromValue
public static PathElement fromValue(String value)
Create an instance of this class withvalue()initialized to the given value.Refers to the value associated with a given key in a JSON object.
- Parameters:
value- Refers to the value associated with a given key in a JSON object.
-
type
public PathElement.Type type()
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will bePathElement.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will bePathElement.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
-