
commonMain.aws.sdk.kotlin.services.iot.model.AuthResult.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* The authorizer result.
*/
public class AuthResult private constructor(builder: Builder) {
/**
* The policies and statements that allowed the specified action.
*/
public val allowed: aws.sdk.kotlin.services.iot.model.Allowed? = builder.allowed
/**
* The final authorization decision of this scenario. Multiple statements are taken into account when determining the authorization decision. An explicit deny statement can override multiple allow statements.
*/
public val authDecision: aws.sdk.kotlin.services.iot.model.AuthDecision? = builder.authDecision
/**
* Authorization information.
*/
public val authInfo: aws.sdk.kotlin.services.iot.model.AuthInfo? = builder.authInfo
/**
* The policies and statements that denied the specified action.
*/
public val denied: aws.sdk.kotlin.services.iot.model.Denied? = builder.denied
/**
* Contains any missing context values found while evaluating policy.
*/
public val missingContextValues: List? = builder.missingContextValues
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.AuthResult = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AuthResult(")
append("allowed=$allowed,")
append("authDecision=$authDecision,")
append("authInfo=$authInfo,")
append("denied=$denied,")
append("missingContextValues=$missingContextValues")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allowed?.hashCode() ?: 0
result = 31 * result + (authDecision?.hashCode() ?: 0)
result = 31 * result + (authInfo?.hashCode() ?: 0)
result = 31 * result + (denied?.hashCode() ?: 0)
result = 31 * result + (missingContextValues?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as AuthResult
if (allowed != other.allowed) return false
if (authDecision != other.authDecision) return false
if (authInfo != other.authInfo) return false
if (denied != other.denied) return false
if (missingContextValues != other.missingContextValues) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.AuthResult = Builder(this).apply(block).build()
public class Builder {
/**
* The policies and statements that allowed the specified action.
*/
public var allowed: aws.sdk.kotlin.services.iot.model.Allowed? = null
/**
* The final authorization decision of this scenario. Multiple statements are taken into account when determining the authorization decision. An explicit deny statement can override multiple allow statements.
*/
public var authDecision: aws.sdk.kotlin.services.iot.model.AuthDecision? = null
/**
* Authorization information.
*/
public var authInfo: aws.sdk.kotlin.services.iot.model.AuthInfo? = null
/**
* The policies and statements that denied the specified action.
*/
public var denied: aws.sdk.kotlin.services.iot.model.Denied? = null
/**
* Contains any missing context values found while evaluating policy.
*/
public var missingContextValues: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.AuthResult) : this() {
this.allowed = x.allowed
this.authDecision = x.authDecision
this.authInfo = x.authInfo
this.denied = x.denied
this.missingContextValues = x.missingContextValues
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.AuthResult = AuthResult(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.Allowed] inside the given [block]
*/
public fun allowed(block: aws.sdk.kotlin.services.iot.model.Allowed.Builder.() -> kotlin.Unit) {
this.allowed = aws.sdk.kotlin.services.iot.model.Allowed.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.iot.model.AuthInfo] inside the given [block]
*/
public fun authInfo(block: aws.sdk.kotlin.services.iot.model.AuthInfo.Builder.() -> kotlin.Unit) {
this.authInfo = aws.sdk.kotlin.services.iot.model.AuthInfo.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.iot.model.Denied] inside the given [block]
*/
public fun denied(block: aws.sdk.kotlin.services.iot.model.Denied.Builder.() -> kotlin.Unit) {
this.denied = aws.sdk.kotlin.services.iot.model.Denied.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy