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

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

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

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



public class ResyncMfaDeviceRequest private constructor(builder: Builder) {
    /**
     * An authentication code emitted by the device.
     *
     * The format for this parameter is a sequence of six digits.
     */
    public val authenticationCode1: kotlin.String? = builder.authenticationCode1
    /**
     * A subsequent authentication code emitted by the device.
     *
     * The format for this parameter is a sequence of six digits.
     */
    public val authenticationCode2: kotlin.String? = builder.authenticationCode2
    /**
     * Serial number that uniquely identifies the MFA device.
     *
     * This parameter allows (through its [regex pattern](http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
     */
    public val serialNumber: kotlin.String? = builder.serialNumber
    /**
     * The name of the user whose MFA device you want to resynchronize.
     *
     * This parameter allows (through its [regex pattern](http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
     */
    public val userName: kotlin.String? = builder.userName

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

    override fun toString(): kotlin.String = buildString {
        append("ResyncMfaDeviceRequest(")
        append("authenticationCode1=$authenticationCode1,")
        append("authenticationCode2=$authenticationCode2,")
        append("serialNumber=$serialNumber,")
        append("userName=$userName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = authenticationCode1?.hashCode() ?: 0
        result = 31 * result + (authenticationCode2?.hashCode() ?: 0)
        result = 31 * result + (serialNumber?.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 ResyncMfaDeviceRequest

        if (authenticationCode1 != other.authenticationCode1) return false
        if (authenticationCode2 != other.authenticationCode2) return false
        if (serialNumber != other.serialNumber) return false
        if (userName != other.userName) return false

        return true
    }

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

    public class Builder {
        /**
         * An authentication code emitted by the device.
         *
         * The format for this parameter is a sequence of six digits.
         */
        public var authenticationCode1: kotlin.String? = null
        /**
         * A subsequent authentication code emitted by the device.
         *
         * The format for this parameter is a sequence of six digits.
         */
        public var authenticationCode2: kotlin.String? = null
        /**
         * Serial number that uniquely identifies the MFA device.
         *
         * This parameter allows (through its [regex pattern](http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
         */
        public var serialNumber: kotlin.String? = null
        /**
         * The name of the user whose MFA device you want to resynchronize.
         *
         * This parameter allows (through its [regex pattern](http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
         */
        public var userName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iam.model.ResyncMfaDeviceRequest) : this() {
            this.authenticationCode1 = x.authenticationCode1
            this.authenticationCode2 = x.authenticationCode2
            this.serialNumber = x.serialNumber
            this.userName = x.userName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy