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

commonMain.aws.sdk.kotlin.services.transfer.model.ImportCertificateRequest.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 ImportCertificateRequest 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
    /**
     * + For the CLI, provide a file path for a certificate in URI format. For example, `--certificate file://encryption-cert.pem`. Alternatively, you can provide the raw content.
     * + For the SDK, specify the raw content of a certificate file. For example, `--certificate "`cat encryption-cert.pem`"`.
     */
    public val certificate: kotlin.String? = builder.certificate
    /**
     * An optional list of certificates that make up the chain for the certificate that's being imported.
     */
    public val certificateChain: kotlin.String? = builder.certificateChain
    /**
     * A short description that helps 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
    /**
     * + For the CLI, provide a file path for a private key in URI format.For example, `--private-key file://encryption-key.pem`. Alternatively, you can provide the raw content of the private key file.
     * + For the SDK, specify the raw content of a private key file. For example, `--private-key "`cat encryption-key.pem`"`
     */
    public val privateKey: kotlin.String? = builder.privateKey
    /**
     * Key-value pairs that can be used to group and search for certificates.
     */
    public val tags: List? = builder.tags
    /**
     * Specifies how this certificate is used. It can be used in the following ways:
     * + `SIGNING`: For signing AS2 messages
     * + `ENCRYPTION`: For encrypting AS2 messages
     * + `TLS`: For securing AS2 communications sent over HTTPS
     */
    public val usage: aws.sdk.kotlin.services.transfer.model.CertificateUsageType? = builder.usage

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

    override fun toString(): kotlin.String = buildString {
        append("ImportCertificateRequest(")
        append("activeDate=$activeDate,")
        append("certificate=*** Sensitive Data Redacted ***,")
        append("certificateChain=*** Sensitive Data Redacted ***,")
        append("description=$description,")
        append("inactiveDate=$inactiveDate,")
        append("privateKey=*** Sensitive Data Redacted ***,")
        append("tags=$tags,")
        append("usage=$usage")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = activeDate?.hashCode() ?: 0
        result = 31 * result + (certificate?.hashCode() ?: 0)
        result = 31 * result + (certificateChain?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (inactiveDate?.hashCode() ?: 0)
        result = 31 * result + (privateKey?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (usage?.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 ImportCertificateRequest

        if (activeDate != other.activeDate) return false
        if (certificate != other.certificate) return false
        if (certificateChain != other.certificateChain) return false
        if (description != other.description) return false
        if (inactiveDate != other.inactiveDate) return false
        if (privateKey != other.privateKey) return false
        if (tags != other.tags) return false
        if (usage != other.usage) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transfer.model.ImportCertificateRequest = 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
        /**
         * + For the CLI, provide a file path for a certificate in URI format. For example, `--certificate file://encryption-cert.pem`. Alternatively, you can provide the raw content.
         * + For the SDK, specify the raw content of a certificate file. For example, `--certificate "`cat encryption-cert.pem`"`.
         */
        public var certificate: kotlin.String? = null
        /**
         * An optional list of certificates that make up the chain for the certificate that's being imported.
         */
        public var certificateChain: kotlin.String? = null
        /**
         * A short description that helps 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
        /**
         * + For the CLI, provide a file path for a private key in URI format.For example, `--private-key file://encryption-key.pem`. Alternatively, you can provide the raw content of the private key file.
         * + For the SDK, specify the raw content of a private key file. For example, `--private-key "`cat encryption-key.pem`"`
         */
        public var privateKey: kotlin.String? = null
        /**
         * Key-value pairs that can be used to group and search for certificates.
         */
        public var tags: List? = null
        /**
         * Specifies how this certificate is used. It can be used in the following ways:
         * + `SIGNING`: For signing AS2 messages
         * + `ENCRYPTION`: For encrypting AS2 messages
         * + `TLS`: For securing AS2 communications sent over HTTPS
         */
        public var usage: aws.sdk.kotlin.services.transfer.model.CertificateUsageType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.ImportCertificateRequest) : this() {
            this.activeDate = x.activeDate
            this.certificate = x.certificate
            this.certificateChain = x.certificateChain
            this.description = x.description
            this.inactiveDate = x.inactiveDate
            this.privateKey = x.privateKey
            this.tags = x.tags
            this.usage = x.usage
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy