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

commonMain.aws.sdk.kotlin.services.transfer.model.As2ConnectorConfig.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

/**
 * Contains the details for an AS2 connector object. The connector object is used for AS2 outbound processes, to connect the Transfer Family customer with the trading partner.
 */
public class As2ConnectorConfig private constructor(builder: Builder) {
    /**
     * Provides Basic authentication support to the AS2 Connectors API. To use Basic authentication, you must provide the name or Amazon Resource Name (ARN) of a secret in Secrets Manager.
     *
     * The default value for this parameter is `null`, which indicates that Basic authentication is not enabled for the connector.
     *
     * If the connector should use Basic authentication, the secret needs to be in the following format:
     *
     * `{ "Username": "user-name", "Password": "user-password" }`
     *
     * Replace `user-name` and `user-password` with the credentials for the actual user that is being authenticated.
     *
     * Note the following:
     * + You are storing these credentials in Secrets Manager, *not passing them directly* into this API.
     * + If you are using the API, SDKs, or CloudFormation to configure your connector, then you must create the secret before you can enable Basic authentication. However, if you are using the Amazon Web Services management console, you can have the system create the secret for you.
     *
     * If you have previously enabled Basic authentication for a connector, you can disable it by using the `UpdateConnector` API call. For example, if you are using the CLI, you can run the following command to remove Basic authentication:
     *
     * `update-connector --connector-id my-connector-id --as2-config 'BasicAuthSecretId=""'`
     */
    public val basicAuthSecretId: kotlin.String? = builder.basicAuthSecretId
    /**
     * Specifies whether the AS2 file is compressed.
     */
    public val compression: aws.sdk.kotlin.services.transfer.model.CompressionEnum? = builder.compression
    /**
     * The algorithm that is used to encrypt the file.
     *
     * Note the following:
     * + Do not use the `DES_EDE3_CBC` algorithm unless you must support a legacy client that requires it, as it is a weak encryption algorithm.
     * + You can only specify `NONE` if the URL for your connector uses HTTPS. Using HTTPS ensures that no traffic is sent in clear text.
     */
    public val encryptionAlgorithm: aws.sdk.kotlin.services.transfer.model.EncryptionAlg? = builder.encryptionAlgorithm
    /**
     * A unique identifier for the AS2 local profile.
     */
    public val localProfileId: kotlin.String? = builder.localProfileId
    /**
     * Used for outbound requests (from an Transfer Family server to a partner AS2 server) to determine whether the partner response for transfers is synchronous or asynchronous. Specify either of the following values:
     * + `SYNC`: The system expects a synchronous MDN response, confirming that the file was transferred successfully (or not).
     * + `NONE`: Specifies that no MDN response is required.
     */
    public val mdnResponse: aws.sdk.kotlin.services.transfer.model.MdnResponse? = builder.mdnResponse
    /**
     * The signing algorithm for the MDN response.
     *
     * If set to DEFAULT (or not set at all), the value for `SigningAlgorithm` is used.
     */
    public val mdnSigningAlgorithm: aws.sdk.kotlin.services.transfer.model.MdnSigningAlg? = builder.mdnSigningAlgorithm
    /**
     * Used as the `Subject` HTTP header attribute in AS2 messages that are being sent with the connector.
     */
    public val messageSubject: kotlin.String? = builder.messageSubject
    /**
     * A unique identifier for the partner profile for the connector.
     */
    public val partnerProfileId: kotlin.String? = builder.partnerProfileId
    /**
     * The algorithm that is used to sign the AS2 messages sent with the connector.
     */
    public val signingAlgorithm: aws.sdk.kotlin.services.transfer.model.SigningAlg? = builder.signingAlgorithm

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

    override fun toString(): kotlin.String = buildString {
        append("As2ConnectorConfig(")
        append("basicAuthSecretId=$basicAuthSecretId,")
        append("compression=$compression,")
        append("encryptionAlgorithm=$encryptionAlgorithm,")
        append("localProfileId=$localProfileId,")
        append("mdnResponse=$mdnResponse,")
        append("mdnSigningAlgorithm=$mdnSigningAlgorithm,")
        append("messageSubject=$messageSubject,")
        append("partnerProfileId=$partnerProfileId,")
        append("signingAlgorithm=$signingAlgorithm")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = basicAuthSecretId?.hashCode() ?: 0
        result = 31 * result + (compression?.hashCode() ?: 0)
        result = 31 * result + (encryptionAlgorithm?.hashCode() ?: 0)
        result = 31 * result + (localProfileId?.hashCode() ?: 0)
        result = 31 * result + (mdnResponse?.hashCode() ?: 0)
        result = 31 * result + (mdnSigningAlgorithm?.hashCode() ?: 0)
        result = 31 * result + (messageSubject?.hashCode() ?: 0)
        result = 31 * result + (partnerProfileId?.hashCode() ?: 0)
        result = 31 * result + (signingAlgorithm?.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 As2ConnectorConfig

        if (basicAuthSecretId != other.basicAuthSecretId) return false
        if (compression != other.compression) return false
        if (encryptionAlgorithm != other.encryptionAlgorithm) return false
        if (localProfileId != other.localProfileId) return false
        if (mdnResponse != other.mdnResponse) return false
        if (mdnSigningAlgorithm != other.mdnSigningAlgorithm) return false
        if (messageSubject != other.messageSubject) return false
        if (partnerProfileId != other.partnerProfileId) return false
        if (signingAlgorithm != other.signingAlgorithm) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Provides Basic authentication support to the AS2 Connectors API. To use Basic authentication, you must provide the name or Amazon Resource Name (ARN) of a secret in Secrets Manager.
         *
         * The default value for this parameter is `null`, which indicates that Basic authentication is not enabled for the connector.
         *
         * If the connector should use Basic authentication, the secret needs to be in the following format:
         *
         * `{ "Username": "user-name", "Password": "user-password" }`
         *
         * Replace `user-name` and `user-password` with the credentials for the actual user that is being authenticated.
         *
         * Note the following:
         * + You are storing these credentials in Secrets Manager, *not passing them directly* into this API.
         * + If you are using the API, SDKs, or CloudFormation to configure your connector, then you must create the secret before you can enable Basic authentication. However, if you are using the Amazon Web Services management console, you can have the system create the secret for you.
         *
         * If you have previously enabled Basic authentication for a connector, you can disable it by using the `UpdateConnector` API call. For example, if you are using the CLI, you can run the following command to remove Basic authentication:
         *
         * `update-connector --connector-id my-connector-id --as2-config 'BasicAuthSecretId=""'`
         */
        public var basicAuthSecretId: kotlin.String? = null
        /**
         * Specifies whether the AS2 file is compressed.
         */
        public var compression: aws.sdk.kotlin.services.transfer.model.CompressionEnum? = null
        /**
         * The algorithm that is used to encrypt the file.
         *
         * Note the following:
         * + Do not use the `DES_EDE3_CBC` algorithm unless you must support a legacy client that requires it, as it is a weak encryption algorithm.
         * + You can only specify `NONE` if the URL for your connector uses HTTPS. Using HTTPS ensures that no traffic is sent in clear text.
         */
        public var encryptionAlgorithm: aws.sdk.kotlin.services.transfer.model.EncryptionAlg? = null
        /**
         * A unique identifier for the AS2 local profile.
         */
        public var localProfileId: kotlin.String? = null
        /**
         * Used for outbound requests (from an Transfer Family server to a partner AS2 server) to determine whether the partner response for transfers is synchronous or asynchronous. Specify either of the following values:
         * + `SYNC`: The system expects a synchronous MDN response, confirming that the file was transferred successfully (or not).
         * + `NONE`: Specifies that no MDN response is required.
         */
        public var mdnResponse: aws.sdk.kotlin.services.transfer.model.MdnResponse? = null
        /**
         * The signing algorithm for the MDN response.
         *
         * If set to DEFAULT (or not set at all), the value for `SigningAlgorithm` is used.
         */
        public var mdnSigningAlgorithm: aws.sdk.kotlin.services.transfer.model.MdnSigningAlg? = null
        /**
         * Used as the `Subject` HTTP header attribute in AS2 messages that are being sent with the connector.
         */
        public var messageSubject: kotlin.String? = null
        /**
         * A unique identifier for the partner profile for the connector.
         */
        public var partnerProfileId: kotlin.String? = null
        /**
         * The algorithm that is used to sign the AS2 messages sent with the connector.
         */
        public var signingAlgorithm: aws.sdk.kotlin.services.transfer.model.SigningAlg? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.As2ConnectorConfig) : this() {
            this.basicAuthSecretId = x.basicAuthSecretId
            this.compression = x.compression
            this.encryptionAlgorithm = x.encryptionAlgorithm
            this.localProfileId = x.localProfileId
            this.mdnResponse = x.mdnResponse
            this.mdnSigningAlgorithm = x.mdnSigningAlgorithm
            this.messageSubject = x.messageSubject
            this.partnerProfileId = x.partnerProfileId
            this.signingAlgorithm = x.signingAlgorithm
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy