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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.model.MySqlDataProviderSettings.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.databasemigrationservice.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Provides information that defines a MySQL data provider.
 */
public class MySqlDataProviderSettings private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the certificate used for SSL connection.
     */
    public val certificateArn: kotlin.String? = builder.certificateArn
    /**
     * The port value for the MySQL data provider.
     */
    public val port: kotlin.Int? = builder.port
    /**
     * The name of the MySQL server.
     */
    public val serverName: kotlin.String? = builder.serverName
    /**
     * The SSL mode used to connect to the MySQL data provider. The default value is `none`.
     */
    public val sslMode: aws.sdk.kotlin.services.databasemigrationservice.model.DmsSslModeValue? = builder.sslMode

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

    override fun toString(): kotlin.String = buildString {
        append("MySqlDataProviderSettings(")
        append("certificateArn=$certificateArn,")
        append("port=$port,")
        append("serverName=$serverName,")
        append("sslMode=$sslMode")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = certificateArn?.hashCode() ?: 0
        result = 31 * result + (port ?: 0)
        result = 31 * result + (serverName?.hashCode() ?: 0)
        result = 31 * result + (sslMode?.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 MySqlDataProviderSettings

        if (certificateArn != other.certificateArn) return false
        if (port != other.port) return false
        if (serverName != other.serverName) return false
        if (sslMode != other.sslMode) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the certificate used for SSL connection.
         */
        public var certificateArn: kotlin.String? = null
        /**
         * The port value for the MySQL data provider.
         */
        public var port: kotlin.Int? = null
        /**
         * The name of the MySQL server.
         */
        public var serverName: kotlin.String? = null
        /**
         * The SSL mode used to connect to the MySQL data provider. The default value is `none`.
         */
        public var sslMode: aws.sdk.kotlin.services.databasemigrationservice.model.DmsSslModeValue? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.databasemigrationservice.model.MySqlDataProviderSettings) : this() {
            this.certificateArn = x.certificateArn
            this.port = x.port
            this.serverName = x.serverName
            this.sslMode = x.sslMode
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy