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

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

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

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

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Contains the response to a successful GetCredentialReport request.
 */
public class GetCredentialReportResponse private constructor(builder: Builder) {
    /**
     * Contains the credential report. The report is Base64-encoded.
     */
    public val content: kotlin.ByteArray? = builder.content
    /**
     * The date and time when the credential report was created, in [ISO 8601 date-time format](http://www.iso.org/iso/iso8601).
     */
    public val generatedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.generatedTime
    /**
     * The format (MIME type) of the credential report.
     */
    public val reportFormat: aws.sdk.kotlin.services.iam.model.ReportFormatType? = builder.reportFormat

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

    override fun toString(): kotlin.String = buildString {
        append("GetCredentialReportResponse(")
        append("content=$content,")
        append("generatedTime=$generatedTime,")
        append("reportFormat=$reportFormat")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = content?.contentHashCode() ?: 0
        result = 31 * result + (generatedTime?.hashCode() ?: 0)
        result = 31 * result + (reportFormat?.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 GetCredentialReportResponse

        if (content != null) {
            if (other.content == null) return false
            if (!content.contentEquals(other.content)) return false
        } else if (other.content != null) return false
        if (generatedTime != other.generatedTime) return false
        if (reportFormat != other.reportFormat) return false

        return true
    }

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

    public class Builder {
        /**
         * Contains the credential report. The report is Base64-encoded.
         */
        public var content: kotlin.ByteArray? = null
        /**
         * The date and time when the credential report was created, in [ISO 8601 date-time format](http://www.iso.org/iso/iso8601).
         */
        public var generatedTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The format (MIME type) of the credential report.
         */
        public var reportFormat: aws.sdk.kotlin.services.iam.model.ReportFormatType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iam.model.GetCredentialReportResponse) : this() {
            this.content = x.content
            this.generatedTime = x.generatedTime
            this.reportFormat = x.reportFormat
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy