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

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

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

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



public class CreateServiceSpecificCredentialResponse private constructor(builder: Builder) {
    /**
     * A structure that contains information about the newly created service-specific credential.
     *
     * This is the only time that the password for this credential set is available. It cannot be recovered later. Instead, you must reset the password with ResetServiceSpecificCredential.
     */
    public val serviceSpecificCredential: aws.sdk.kotlin.services.iam.model.ServiceSpecificCredential? = builder.serviceSpecificCredential

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

    override fun toString(): kotlin.String = buildString {
        append("CreateServiceSpecificCredentialResponse(")
        append("serviceSpecificCredential=$serviceSpecificCredential")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = serviceSpecificCredential?.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 CreateServiceSpecificCredentialResponse

        if (serviceSpecificCredential != other.serviceSpecificCredential) return false

        return true
    }

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

    public class Builder {
        /**
         * A structure that contains information about the newly created service-specific credential.
         *
         * This is the only time that the password for this credential set is available. It cannot be recovered later. Instead, you must reset the password with ResetServiceSpecificCredential.
         */
        public var serviceSpecificCredential: aws.sdk.kotlin.services.iam.model.ServiceSpecificCredential? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iam.model.CreateServiceSpecificCredentialResponse) : this() {
            this.serviceSpecificCredential = x.serviceSpecificCredential
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.iam.model.ServiceSpecificCredential] inside the given [block]
         */
        public fun serviceSpecificCredential(block: aws.sdk.kotlin.services.iam.model.ServiceSpecificCredential.Builder.() -> kotlin.Unit) {
            this.serviceSpecificCredential = aws.sdk.kotlin.services.iam.model.ServiceSpecificCredential.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy