
commonMain.aws.sdk.kotlin.services.iot.model.GetPolicyVersionResponse.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
/**
* The output from the GetPolicyVersion operation.
*/
public class GetPolicyVersionResponse private constructor(builder: Builder) {
/**
* The date the policy was created.
*/
public val creationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDate
/**
* The generation ID of the policy version.
*/
public val generationId: kotlin.String? = builder.generationId
/**
* Specifies whether the policy version is the default.
*/
public val isDefaultVersion: kotlin.Boolean = builder.isDefaultVersion
/**
* The date the policy was last modified.
*/
public val lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedDate
/**
* 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 name.
*/
public val policyName: kotlin.String? = builder.policyName
/**
* 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.GetPolicyVersionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetPolicyVersionResponse(")
append("creationDate=$creationDate,")
append("generationId=$generationId,")
append("isDefaultVersion=$isDefaultVersion,")
append("lastModifiedDate=$lastModifiedDate,")
append("policyArn=$policyArn,")
append("policyDocument=$policyDocument,")
append("policyName=$policyName,")
append("policyVersionId=$policyVersionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationDate?.hashCode() ?: 0
result = 31 * result + (generationId?.hashCode() ?: 0)
result = 31 * result + (isDefaultVersion.hashCode())
result = 31 * result + (lastModifiedDate?.hashCode() ?: 0)
result = 31 * result + (policyArn?.hashCode() ?: 0)
result = 31 * result + (policyDocument?.hashCode() ?: 0)
result = 31 * result + (policyName?.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 GetPolicyVersionResponse
if (creationDate != other.creationDate) return false
if (generationId != other.generationId) return false
if (isDefaultVersion != other.isDefaultVersion) return false
if (lastModifiedDate != other.lastModifiedDate) return false
if (policyArn != other.policyArn) return false
if (policyDocument != other.policyDocument) return false
if (policyName != other.policyName) return false
if (policyVersionId != other.policyVersionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.GetPolicyVersionResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The date the policy was created.
*/
public var creationDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The generation ID of the policy version.
*/
public var generationId: kotlin.String? = null
/**
* Specifies whether the policy version is the default.
*/
public var isDefaultVersion: kotlin.Boolean = false
/**
* The date the policy was last modified.
*/
public var lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The policy ARN.
*/
public var policyArn: kotlin.String? = null
/**
* The JSON document that describes the policy.
*/
public var policyDocument: kotlin.String? = null
/**
* The policy name.
*/
public var policyName: 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.GetPolicyVersionResponse) : this() {
this.creationDate = x.creationDate
this.generationId = x.generationId
this.isDefaultVersion = x.isDefaultVersion
this.lastModifiedDate = x.lastModifiedDate
this.policyArn = x.policyArn
this.policyDocument = x.policyDocument
this.policyName = x.policyName
this.policyVersionId = x.policyVersionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.GetPolicyVersionResponse = GetPolicyVersionResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy