
commonMain.aws.sdk.kotlin.services.iam.model.GetAccessKeyLastUsedResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iam.model
/**
* Contains the response to a successful GetAccessKeyLastUsed request. It is also returned as a member of the AccessKeyMetaData structure returned by the ListAccessKeys action.
*/
public class GetAccessKeyLastUsedResponse private constructor(builder: Builder) {
/**
* Contains information about the last time the access key was used.
*/
public val accessKeyLastUsed: aws.sdk.kotlin.services.iam.model.AccessKeyLastUsed? = builder.accessKeyLastUsed
/**
* The name of the IAM user that owns this access key.
*/
public val userName: kotlin.String? = builder.userName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iam.model.GetAccessKeyLastUsedResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetAccessKeyLastUsedResponse(")
append("accessKeyLastUsed=$accessKeyLastUsed,")
append("userName=$userName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accessKeyLastUsed?.hashCode() ?: 0
result = 31 * result + (userName?.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 GetAccessKeyLastUsedResponse
if (accessKeyLastUsed != other.accessKeyLastUsed) return false
if (userName != other.userName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.GetAccessKeyLastUsedResponse = Builder(this).apply(block).build()
public class Builder {
/**
* Contains information about the last time the access key was used.
*/
public var accessKeyLastUsed: aws.sdk.kotlin.services.iam.model.AccessKeyLastUsed? = null
/**
* The name of the IAM user that owns this access key.
*/
public var userName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iam.model.GetAccessKeyLastUsedResponse) : this() {
this.accessKeyLastUsed = x.accessKeyLastUsed
this.userName = x.userName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iam.model.GetAccessKeyLastUsedResponse = GetAccessKeyLastUsedResponse(this)
/**
* construct an [aws.sdk.kotlin.services.iam.model.AccessKeyLastUsed] inside the given [block]
*/
public fun accessKeyLastUsed(block: aws.sdk.kotlin.services.iam.model.AccessKeyLastUsed.Builder.() -> kotlin.Unit) {
this.accessKeyLastUsed = aws.sdk.kotlin.services.iam.model.AccessKeyLastUsed.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy