
commonMain.aws.sdk.kotlin.services.verifiedpermissions.model.ContextDefinition.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.verifiedpermissions.model
/**
* Contains additional details about the context of the request. Verified Permissions evaluates this information in an authorization request as part of the `when` and `unless` clauses in a policy.
*
* This data type is used as a request parameter for the [IsAuthorized](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorized.html), [BatchIsAuthorized](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_BatchIsAuthorized.html), and [IsAuthorizedWithToken](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorizedWithToken.html) operations.
*
* Example: `"context":{"contextMap":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}}}`
*/
public sealed class ContextDefinition {
/**
* An list of attributes that are needed to successfully evaluate an authorization request. Each attribute in this array must include a map of a data type and its value.
*
* Example: `"contextMap":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}}`
*/
public data class ContextMap(val value: Map) : aws.sdk.kotlin.services.verifiedpermissions.model.ContextDefinition() {
}
public object SdkUnknown : aws.sdk.kotlin.services.verifiedpermissions.model.ContextDefinition() {
}
/**
* Casts this [ContextDefinition] as a [ContextMap] and retrieves its [Map] value. Throws an exception if the [ContextDefinition] is not a
* [ContextMap].
*/
public fun asContextMap(): Map = (this as ContextDefinition.ContextMap).value
/**
* Casts this [ContextDefinition] as a [ContextMap] and retrieves its [Map] value. Returns null if the [ContextDefinition] is not a [ContextMap].
*/
public fun asContextMapOrNull(): Map? = (this as? ContextDefinition.ContextMap)?.value
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy