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

commonMain.aws.sdk.kotlin.services.transfer.model.UpdateCertificateRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.transfer.model

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

public class UpdateCertificateRequest private constructor(builder: Builder) {
    /**
     * An optional date that specifies when the certificate becomes active.
     */
    public val activeDate: aws.smithy.kotlin.runtime.time.Instant? = builder.activeDate
    /**
     * The identifier of the certificate object that you are updating.
     */
    public val certificateId: kotlin.String? = builder.certificateId
    /**
     * A short description to help identify the certificate.
     */
    public val description: kotlin.String? = builder.description
    /**
     * An optional date that specifies when the certificate becomes inactive.
     */
    public val inactiveDate: aws.smithy.kotlin.runtime.time.Instant? = builder.inactiveDate

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateCertificateRequest(")
        append("activeDate=$activeDate,")
        append("certificateId=$certificateId,")
        append("description=$description,")
        append("inactiveDate=$inactiveDate")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = activeDate?.hashCode() ?: 0
        result = 31 * result + (certificateId?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (inactiveDate?.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 UpdateCertificateRequest

        if (activeDate != other.activeDate) return false
        if (certificateId != other.certificateId) return false
        if (description != other.description) return false
        if (inactiveDate != other.inactiveDate) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An optional date that specifies when the certificate becomes active.
         */
        public var activeDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The identifier of the certificate object that you are updating.
         */
        public var certificateId: kotlin.String? = null
        /**
         * A short description to help identify the certificate.
         */
        public var description: kotlin.String? = null
        /**
         * An optional date that specifies when the certificate becomes inactive.
         */
        public var inactiveDate: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.UpdateCertificateRequest) : this() {
            this.activeDate = x.activeDate
            this.certificateId = x.certificateId
            this.description = x.description
            this.inactiveDate = x.inactiveDate
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy