
commonMain.aws.sdk.kotlin.services.iot.model.TestAuthorizationRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
public class TestAuthorizationRequest private constructor(builder: Builder) {
/**
* A list of authorization info objects. Simulating authorization will create a response for each `authInfo` object in the list.
*/
public val authInfos: List? = builder.authInfos
/**
* The MQTT client ID.
*/
public val clientId: kotlin.String? = builder.clientId
/**
* The Cognito identity pool ID.
*/
public val cognitoIdentityPoolId: kotlin.String? = builder.cognitoIdentityPoolId
/**
* When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
*/
public val policyNamesToAdd: List? = builder.policyNamesToAdd
/**
* When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
*/
public val policyNamesToSkip: List? = builder.policyNamesToSkip
/**
* The principal. Valid principals are CertificateArn (arn:aws:iot:*region*:*accountId*:cert/*certificateId*), thingGroupArn (arn:aws:iot:*region*:*accountId*:thinggroup/*groupName*) and CognitoId (*region*:*id*).
*/
public val principal: kotlin.String? = builder.principal
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.TestAuthorizationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TestAuthorizationRequest(")
append("authInfos=$authInfos,")
append("clientId=$clientId,")
append("cognitoIdentityPoolId=$cognitoIdentityPoolId,")
append("policyNamesToAdd=$policyNamesToAdd,")
append("policyNamesToSkip=$policyNamesToSkip,")
append("principal=$principal")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authInfos?.hashCode() ?: 0
result = 31 * result + (clientId?.hashCode() ?: 0)
result = 31 * result + (cognitoIdentityPoolId?.hashCode() ?: 0)
result = 31 * result + (policyNamesToAdd?.hashCode() ?: 0)
result = 31 * result + (policyNamesToSkip?.hashCode() ?: 0)
result = 31 * result + (principal?.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 TestAuthorizationRequest
if (authInfos != other.authInfos) return false
if (clientId != other.clientId) return false
if (cognitoIdentityPoolId != other.cognitoIdentityPoolId) return false
if (policyNamesToAdd != other.policyNamesToAdd) return false
if (policyNamesToSkip != other.policyNamesToSkip) return false
if (principal != other.principal) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.TestAuthorizationRequest = Builder(this).apply(block).build()
public class Builder {
/**
* A list of authorization info objects. Simulating authorization will create a response for each `authInfo` object in the list.
*/
public var authInfos: List? = null
/**
* The MQTT client ID.
*/
public var clientId: kotlin.String? = null
/**
* The Cognito identity pool ID.
*/
public var cognitoIdentityPoolId: kotlin.String? = null
/**
* When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
*/
public var policyNamesToAdd: List? = null
/**
* When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
*/
public var policyNamesToSkip: List? = null
/**
* The principal. Valid principals are CertificateArn (arn:aws:iot:*region*:*accountId*:cert/*certificateId*), thingGroupArn (arn:aws:iot:*region*:*accountId*:thinggroup/*groupName*) and CognitoId (*region*:*id*).
*/
public var principal: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.TestAuthorizationRequest) : this() {
this.authInfos = x.authInfos
this.clientId = x.clientId
this.cognitoIdentityPoolId = x.cognitoIdentityPoolId
this.policyNamesToAdd = x.policyNamesToAdd
this.policyNamesToSkip = x.policyNamesToSkip
this.principal = x.principal
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.TestAuthorizationRequest = TestAuthorizationRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy