
commonMain.aws.sdk.kotlin.services.iot.model.PolicyVersion.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* Describes a policy version.
*/
public class PolicyVersion private constructor(builder: Builder) {
/**
* The date and time the policy was created.
*/
public val createDate: aws.smithy.kotlin.runtime.time.Instant? = builder.createDate
/**
* Specifies whether the policy version is the default.
*/
public val isDefaultVersion: kotlin.Boolean = builder.isDefaultVersion
/**
* The policy version ID.
*/
public val versionId: kotlin.String? = builder.versionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.PolicyVersion = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PolicyVersion(")
append("createDate=$createDate,")
append("isDefaultVersion=$isDefaultVersion,")
append("versionId=$versionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createDate?.hashCode() ?: 0
result = 31 * result + (isDefaultVersion.hashCode())
result = 31 * result + (versionId?.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 PolicyVersion
if (createDate != other.createDate) return false
if (isDefaultVersion != other.isDefaultVersion) return false
if (versionId != other.versionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.PolicyVersion = Builder(this).apply(block).build()
public class Builder {
/**
* The date and time the policy was created.
*/
public var createDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Specifies whether the policy version is the default.
*/
public var isDefaultVersion: kotlin.Boolean = false
/**
* The policy version ID.
*/
public var versionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.PolicyVersion) : this() {
this.createDate = x.createDate
this.isDefaultVersion = x.isDefaultVersion
this.versionId = x.versionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.PolicyVersion = PolicyVersion(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy