
commonMain.aws.sdk.kotlin.services.iot.model.CreatePolicyVersionResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* The output of the CreatePolicyVersion operation.
*/
public class CreatePolicyVersionResponse private constructor(builder: Builder) {
/**
* Specifies whether the policy version is the default.
*/
public val isDefaultVersion: kotlin.Boolean = builder.isDefaultVersion
/**
* The policy ARN.
*/
public val policyArn: kotlin.String? = builder.policyArn
/**
* The JSON document that describes the policy.
*/
public val policyDocument: kotlin.String? = builder.policyDocument
/**
* The policy version ID.
*/
public val policyVersionId: kotlin.String? = builder.policyVersionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.CreatePolicyVersionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreatePolicyVersionResponse(")
append("isDefaultVersion=$isDefaultVersion,")
append("policyArn=$policyArn,")
append("policyDocument=$policyDocument,")
append("policyVersionId=$policyVersionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = isDefaultVersion.hashCode()
result = 31 * result + (policyArn?.hashCode() ?: 0)
result = 31 * result + (policyDocument?.hashCode() ?: 0)
result = 31 * result + (policyVersionId?.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 CreatePolicyVersionResponse
if (isDefaultVersion != other.isDefaultVersion) return false
if (policyArn != other.policyArn) return false
if (policyDocument != other.policyDocument) return false
if (policyVersionId != other.policyVersionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.CreatePolicyVersionResponse = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies whether the policy version is the default.
*/
public var isDefaultVersion: kotlin.Boolean = false
/**
* The policy ARN.
*/
public var policyArn: kotlin.String? = null
/**
* The JSON document that describes the policy.
*/
public var policyDocument: kotlin.String? = null
/**
* The policy version ID.
*/
public var policyVersionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.CreatePolicyVersionResponse) : this() {
this.isDefaultVersion = x.isDefaultVersion
this.policyArn = x.policyArn
this.policyDocument = x.policyDocument
this.policyVersionId = x.policyVersionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.CreatePolicyVersionResponse = CreatePolicyVersionResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy