All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.iam.model.GenerateServiceLastAccessedDetailsRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iam.model



public class GenerateServiceLastAccessedDetailsRequest private constructor(builder: Builder) {
    /**
     * The ARN of the IAM resource (user, group, role, or managed policy) used to generate information about when the resource was last used in an attempt to access an Amazon Web Services service.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The level of detail that you want to generate. You can specify whether you want to generate information about the last attempt to access services or actions. If you specify service-level granularity, this operation generates only service data. If you specify action-level granularity, it generates service and action data. If you don't include this optional parameter, the operation generates service data.
     */
    public val granularity: aws.sdk.kotlin.services.iam.model.AccessAdvisorUsageGranularityType? = builder.granularity

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iam.model.GenerateServiceLastAccessedDetailsRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GenerateServiceLastAccessedDetailsRequest(")
        append("arn=$arn,")
        append("granularity=$granularity")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (granularity?.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 GenerateServiceLastAccessedDetailsRequest

        if (arn != other.arn) return false
        if (granularity != other.granularity) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.GenerateServiceLastAccessedDetailsRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The ARN of the IAM resource (user, group, role, or managed policy) used to generate information about when the resource was last used in an attempt to access an Amazon Web Services service.
         */
        public var arn: kotlin.String? = null
        /**
         * The level of detail that you want to generate. You can specify whether you want to generate information about the last attempt to access services or actions. If you specify service-level granularity, this operation generates only service data. If you specify action-level granularity, it generates service and action data. If you don't include this optional parameter, the operation generates service data.
         */
        public var granularity: aws.sdk.kotlin.services.iam.model.AccessAdvisorUsageGranularityType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iam.model.GenerateServiceLastAccessedDetailsRequest) : this() {
            this.arn = x.arn
            this.granularity = x.granularity
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.iam.model.GenerateServiceLastAccessedDetailsRequest = GenerateServiceLastAccessedDetailsRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy