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

commonMain.aws.sdk.kotlin.services.signer.model.SignPayloadResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.signer.model

import aws.smithy.kotlin.runtime.SdkDsl

public class SignPayloadResponse private constructor(builder: Builder) {
    /**
     * Unique identifier of the signing job.
     */
    public val jobId: kotlin.String? = builder.jobId
    /**
     * The AWS account ID of the job owner.
     */
    public val jobOwner: kotlin.String? = builder.jobOwner
    /**
     * Information including the signing profile ARN and the signing job ID.
     */
    public val metadata: Map? = builder.metadata
    /**
     * A cryptographic signature.
     */
    public val signature: kotlin.ByteArray? = builder.signature

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

    override fun toString(): kotlin.String = buildString {
        append("SignPayloadResponse(")
        append("jobId=$jobId,")
        append("jobOwner=$jobOwner,")
        append("metadata=$metadata,")
        append("signature=$signature")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = jobId?.hashCode() ?: 0
        result = 31 * result + (jobOwner?.hashCode() ?: 0)
        result = 31 * result + (metadata?.hashCode() ?: 0)
        result = 31 * result + (signature?.contentHashCode() ?: 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 SignPayloadResponse

        if (jobId != other.jobId) return false
        if (jobOwner != other.jobOwner) return false
        if (metadata != other.metadata) return false
        if (signature != null) {
            if (other.signature == null) return false
            if (!signature.contentEquals(other.signature)) return false
        } else if (other.signature != null) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Unique identifier of the signing job.
         */
        public var jobId: kotlin.String? = null
        /**
         * The AWS account ID of the job owner.
         */
        public var jobOwner: kotlin.String? = null
        /**
         * Information including the signing profile ARN and the signing job ID.
         */
        public var metadata: Map? = null
        /**
         * A cryptographic signature.
         */
        public var signature: kotlin.ByteArray? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.signer.model.SignPayloadResponse) : this() {
            this.jobId = x.jobId
            this.jobOwner = x.jobOwner
            this.metadata = x.metadata
            this.signature = x.signature
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy