
commonMain.aws.sdk.kotlin.services.iot.model.GetPolicyResponse.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 GetPolicy operation.
*/
public class GetPolicyResponse private constructor(builder: Builder) {
/**
* The date the policy was created.
*/
public val creationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDate
/**
* The default policy version ID.
*/
public val defaultVersionId: kotlin.String? = builder.defaultVersionId
/**
* The generation ID of the policy.
*/
public val generationId: kotlin.String? = builder.generationId
/**
* 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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.GetPolicyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetPolicyResponse(")
append("creationDate=$creationDate,")
append("defaultVersionId=$defaultVersionId,")
append("generationId=$generationId,")
append("lastModifiedDate=$lastModifiedDate,")
append("policyArn=$policyArn,")
append("policyDocument=$policyDocument,")
append("policyName=$policyName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationDate?.hashCode() ?: 0
result = 31 * result + (defaultVersionId?.hashCode() ?: 0)
result = 31 * result + (generationId?.hashCode() ?: 0)
result = 31 * result + (lastModifiedDate?.hashCode() ?: 0)
result = 31 * result + (policyArn?.hashCode() ?: 0)
result = 31 * result + (policyDocument?.hashCode() ?: 0)
result = 31 * result + (policyName?.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 GetPolicyResponse
if (creationDate != other.creationDate) return false
if (defaultVersionId != other.defaultVersionId) return false
if (generationId != other.generationId) 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
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.GetPolicyResponse = 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 default policy version ID.
*/
public var defaultVersionId: kotlin.String? = null
/**
* The generation ID of the policy.
*/
public var generationId: kotlin.String? = null
/**
* 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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.GetPolicyResponse) : this() {
this.creationDate = x.creationDate
this.defaultVersionId = x.defaultVersionId
this.generationId = x.generationId
this.lastModifiedDate = x.lastModifiedDate
this.policyArn = x.policyArn
this.policyDocument = x.policyDocument
this.policyName = x.policyName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.GetPolicyResponse = GetPolicyResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy