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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.model.DmsTransferSettings.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

/**
 * The settings in JSON format for the DMS Transfer type source endpoint.
 */
public class DmsTransferSettings private constructor(builder: Builder) {
    /**
     * The name of the S3 bucket to use.
     */
    public val bucketName: kotlin.String? = builder.bucketName
    /**
     * The Amazon Resource Name (ARN) used by the service access IAM role. The role must allow the `iam:PassRole` action.
     */
    public val serviceAccessRoleArn: kotlin.String? = builder.serviceAccessRoleArn

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

    override fun toString(): kotlin.String = buildString {
        append("DmsTransferSettings(")
        append("bucketName=$bucketName,")
        append("serviceAccessRoleArn=$serviceAccessRoleArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bucketName?.hashCode() ?: 0
        result = 31 * result + (serviceAccessRoleArn?.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 DmsTransferSettings

        if (bucketName != other.bucketName) return false
        if (serviceAccessRoleArn != other.serviceAccessRoleArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the S3 bucket to use.
         */
        public var bucketName: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) used by the service access IAM role. The role must allow the `iam:PassRole` action.
         */
        public var serviceAccessRoleArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.databasemigrationservice.model.DmsTransferSettings) : this() {
            this.bucketName = x.bucketName
            this.serviceAccessRoleArn = x.serviceAccessRoleArn
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy