
commonMain.aws.sdk.kotlin.services.verifiedpermissions.model.EntityReference.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.verifiedpermissions.model
/**
* Contains information about a principal or resource that can be referenced in a Cedar policy.
*
* This data type is used as part of the [PolicyFilter](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_PolicyFilter.html) structure that is used as a request parameter for the [ListPolicies](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListPolicies.html) operation..
*/
public sealed class EntityReference {
/**
* The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
*/
public data class Identifier(val value: aws.sdk.kotlin.services.verifiedpermissions.model.EntityIdentifier) : aws.sdk.kotlin.services.verifiedpermissions.model.EntityReference() {
}
/**
* Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.
*/
public data class Unspecified(val value: kotlin.Boolean) : aws.sdk.kotlin.services.verifiedpermissions.model.EntityReference() {
}
public object SdkUnknown : aws.sdk.kotlin.services.verifiedpermissions.model.EntityReference() {
}
/**
* Casts this [EntityReference] as a [Identifier] and retrieves its [aws.sdk.kotlin.services.verifiedpermissions.model.EntityIdentifier] value. Throws an exception if the [EntityReference] is not a
* [Identifier].
*/
public fun asIdentifier(): aws.sdk.kotlin.services.verifiedpermissions.model.EntityIdentifier = (this as EntityReference.Identifier).value
/**
* Casts this [EntityReference] as a [Identifier] and retrieves its [aws.sdk.kotlin.services.verifiedpermissions.model.EntityIdentifier] value. Returns null if the [EntityReference] is not a [Identifier].
*/
public fun asIdentifierOrNull(): aws.sdk.kotlin.services.verifiedpermissions.model.EntityIdentifier? = (this as? EntityReference.Identifier)?.value
/**
* Casts this [EntityReference] as a [Unspecified] and retrieves its [kotlin.Boolean] value. Throws an exception if the [EntityReference] is not a
* [Unspecified].
*/
public fun asUnspecified(): kotlin.Boolean = (this as EntityReference.Unspecified).value
/**
* Casts this [EntityReference] as a [Unspecified] and retrieves its [kotlin.Boolean] value. Returns null if the [EntityReference] is not a [Unspecified].
*/
public fun asUnspecifiedOrNull(): kotlin.Boolean? = (this as? EntityReference.Unspecified)?.value
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy