PathElement

sealed class PathElement

A single element in a path through the JSON representation of a policy.

Inheritors

Types

Link copied to clipboard
data class Index(val value: Int) : PathElement

Refers to an index in a JSON array.

Link copied to clipboard
data class Key(val value: String) : PathElement

Refers to a key in a JSON object.

Link copied to clipboard
Link copied to clipboard
data class Substring(val value: Substring) : PathElement

Refers to a substring of a literal string in a JSON object.

Link copied to clipboard
data class Value(val value: String) : PathElement

Refers to the value associated with a given key in a JSON object.

Functions

Link copied to clipboard
fun asIndex(): Int

Casts this PathElement as a Index and retrieves its kotlin.Int value. Throws an exception if the PathElement is not a Index.

Link copied to clipboard

Casts this PathElement as a Index and retrieves its kotlin.Int value. Returns null if the PathElement is not a Index.

Link copied to clipboard
fun asKey(): String

Casts this PathElement as a Key and retrieves its kotlin.String value. Throws an exception if the PathElement is not a Key.

Link copied to clipboard

Casts this PathElement as a Key and retrieves its kotlin.String value. Returns null if the PathElement is not a Key.

Link copied to clipboard

Casts this PathElement as a Substring and retrieves its aws.sdk.kotlin.services.accessanalyzer.model.Substring value. Throws an exception if the PathElement is not a Substring.

Link copied to clipboard

Casts this PathElement as a Substring and retrieves its aws.sdk.kotlin.services.accessanalyzer.model.Substring value. Returns null if the PathElement is not a Substring.

Link copied to clipboard

Casts this PathElement as a Value and retrieves its kotlin.String value. Throws an exception if the PathElement is not a Value.

Link copied to clipboard

Casts this PathElement as a Value and retrieves its kotlin.String value. Returns null if the PathElement is not a Value.