
commonMain.aws.sdk.kotlin.services.eks.model.AssociatedAccessPolicy.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.eks.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* An access policy association.
*/
public class AssociatedAccessPolicy private constructor(builder: Builder) {
/**
* The scope of the access policy.
*/
public val accessScope: aws.sdk.kotlin.services.eks.model.AccessScope? = builder.accessScope
/**
* The date and time the `AccessPolicy` was associated with an `AccessEntry`.
*/
public val associatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.associatedAt
/**
* The Unix epoch timestamp for the last modification to the object.
*/
public val modifiedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.modifiedAt
/**
* The ARN of the `AccessPolicy`.
*/
public val policyArn: kotlin.String? = builder.policyArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eks.model.AssociatedAccessPolicy = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssociatedAccessPolicy(")
append("accessScope=$accessScope,")
append("associatedAt=$associatedAt,")
append("modifiedAt=$modifiedAt,")
append("policyArn=$policyArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accessScope?.hashCode() ?: 0
result = 31 * result + (associatedAt?.hashCode() ?: 0)
result = 31 * result + (modifiedAt?.hashCode() ?: 0)
result = 31 * result + (policyArn?.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 AssociatedAccessPolicy
if (accessScope != other.accessScope) return false
if (associatedAt != other.associatedAt) return false
if (modifiedAt != other.modifiedAt) return false
if (policyArn != other.policyArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.eks.model.AssociatedAccessPolicy = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The scope of the access policy.
*/
public var accessScope: aws.sdk.kotlin.services.eks.model.AccessScope? = null
/**
* The date and time the `AccessPolicy` was associated with an `AccessEntry`.
*/
public var associatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The Unix epoch timestamp for the last modification to the object.
*/
public var modifiedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The ARN of the `AccessPolicy`.
*/
public var policyArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.eks.model.AssociatedAccessPolicy) : this() {
this.accessScope = x.accessScope
this.associatedAt = x.associatedAt
this.modifiedAt = x.modifiedAt
this.policyArn = x.policyArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.eks.model.AssociatedAccessPolicy = AssociatedAccessPolicy(this)
/**
* construct an [aws.sdk.kotlin.services.eks.model.AccessScope] inside the given [block]
*/
public fun accessScope(block: aws.sdk.kotlin.services.eks.model.AccessScope.Builder.() -> kotlin.Unit) {
this.accessScope = aws.sdk.kotlin.services.eks.model.AccessScope.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy