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

commonMain.aws.sdk.kotlin.services.ssmsap.model.GetDatabaseRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssmsap.model

import aws.smithy.kotlin.runtime.SdkDsl

public class GetDatabaseRequest private constructor(builder: Builder) {
    /**
     * The ID of the application.
     */
    public val applicationId: kotlin.String? = builder.applicationId
    /**
     * The ID of the component.
     */
    public val componentId: kotlin.String? = builder.componentId
    /**
     * The Amazon Resource Name (ARN) of the database.
     */
    public val databaseArn: kotlin.String? = builder.databaseArn
    /**
     * The ID of the database.
     */
    public val databaseId: kotlin.String? = builder.databaseId

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

    override fun toString(): kotlin.String = buildString {
        append("GetDatabaseRequest(")
        append("applicationId=$applicationId,")
        append("componentId=$componentId,")
        append("databaseArn=$databaseArn,")
        append("databaseId=$databaseId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = applicationId?.hashCode() ?: 0
        result = 31 * result + (componentId?.hashCode() ?: 0)
        result = 31 * result + (databaseArn?.hashCode() ?: 0)
        result = 31 * result + (databaseId?.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 GetDatabaseRequest

        if (applicationId != other.applicationId) return false
        if (componentId != other.componentId) return false
        if (databaseArn != other.databaseArn) return false
        if (databaseId != other.databaseId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the application.
         */
        public var applicationId: kotlin.String? = null
        /**
         * The ID of the component.
         */
        public var componentId: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the database.
         */
        public var databaseArn: kotlin.String? = null
        /**
         * The ID of the database.
         */
        public var databaseId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmsap.model.GetDatabaseRequest) : this() {
            this.applicationId = x.applicationId
            this.componentId = x.componentId
            this.databaseArn = x.databaseArn
            this.databaseId = x.databaseId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy