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

commonMain.aws.sdk.kotlin.services.dataexchange.model.AssetDetails.kt Maven / Gradle / Ivy

There is a newer version: 1.3.32
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.dataexchange.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Details about the asset.
 */
public class AssetDetails private constructor(builder: Builder) {
    /**
     * Information about the API Gateway API asset.
     */
    public val apiGatewayApiAsset: aws.sdk.kotlin.services.dataexchange.model.ApiGatewayApiAsset? = builder.apiGatewayApiAsset
    /**
     * The AWS Lake Formation data permission that is the asset.
     */
    public val lakeFormationDataPermissionAsset: aws.sdk.kotlin.services.dataexchange.model.LakeFormationDataPermissionAsset? = builder.lakeFormationDataPermissionAsset
    /**
     * The Amazon Redshift datashare that is the asset.
     */
    public val redshiftDataShareAsset: aws.sdk.kotlin.services.dataexchange.model.RedshiftDataShareAsset? = builder.redshiftDataShareAsset
    /**
     * The Amazon S3 data access that is the asset.
     */
    public val s3DataAccessAsset: aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAsset? = builder.s3DataAccessAsset
    /**
     * The Amazon S3 object that is the asset.
     */
    public val s3SnapshotAsset: aws.sdk.kotlin.services.dataexchange.model.S3SnapshotAsset? = builder.s3SnapshotAsset

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

    override fun toString(): kotlin.String = buildString {
        append("AssetDetails(")
        append("apiGatewayApiAsset=$apiGatewayApiAsset,")
        append("lakeFormationDataPermissionAsset=$lakeFormationDataPermissionAsset,")
        append("redshiftDataShareAsset=$redshiftDataShareAsset,")
        append("s3DataAccessAsset=$s3DataAccessAsset,")
        append("s3SnapshotAsset=$s3SnapshotAsset")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = apiGatewayApiAsset?.hashCode() ?: 0
        result = 31 * result + (lakeFormationDataPermissionAsset?.hashCode() ?: 0)
        result = 31 * result + (redshiftDataShareAsset?.hashCode() ?: 0)
        result = 31 * result + (s3DataAccessAsset?.hashCode() ?: 0)
        result = 31 * result + (s3SnapshotAsset?.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 AssetDetails

        if (apiGatewayApiAsset != other.apiGatewayApiAsset) return false
        if (lakeFormationDataPermissionAsset != other.lakeFormationDataPermissionAsset) return false
        if (redshiftDataShareAsset != other.redshiftDataShareAsset) return false
        if (s3DataAccessAsset != other.s3DataAccessAsset) return false
        if (s3SnapshotAsset != other.s3SnapshotAsset) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Information about the API Gateway API asset.
         */
        public var apiGatewayApiAsset: aws.sdk.kotlin.services.dataexchange.model.ApiGatewayApiAsset? = null
        /**
         * The AWS Lake Formation data permission that is the asset.
         */
        public var lakeFormationDataPermissionAsset: aws.sdk.kotlin.services.dataexchange.model.LakeFormationDataPermissionAsset? = null
        /**
         * The Amazon Redshift datashare that is the asset.
         */
        public var redshiftDataShareAsset: aws.sdk.kotlin.services.dataexchange.model.RedshiftDataShareAsset? = null
        /**
         * The Amazon S3 data access that is the asset.
         */
        public var s3DataAccessAsset: aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAsset? = null
        /**
         * The Amazon S3 object that is the asset.
         */
        public var s3SnapshotAsset: aws.sdk.kotlin.services.dataexchange.model.S3SnapshotAsset? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.AssetDetails) : this() {
            this.apiGatewayApiAsset = x.apiGatewayApiAsset
            this.lakeFormationDataPermissionAsset = x.lakeFormationDataPermissionAsset
            this.redshiftDataShareAsset = x.redshiftDataShareAsset
            this.s3DataAccessAsset = x.s3DataAccessAsset
            this.s3SnapshotAsset = x.s3SnapshotAsset
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.dataexchange.model.ApiGatewayApiAsset] inside the given [block]
         */
        public fun apiGatewayApiAsset(block: aws.sdk.kotlin.services.dataexchange.model.ApiGatewayApiAsset.Builder.() -> kotlin.Unit) {
            this.apiGatewayApiAsset = aws.sdk.kotlin.services.dataexchange.model.ApiGatewayApiAsset.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.dataexchange.model.LakeFormationDataPermissionAsset] inside the given [block]
         */
        public fun lakeFormationDataPermissionAsset(block: aws.sdk.kotlin.services.dataexchange.model.LakeFormationDataPermissionAsset.Builder.() -> kotlin.Unit) {
            this.lakeFormationDataPermissionAsset = aws.sdk.kotlin.services.dataexchange.model.LakeFormationDataPermissionAsset.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.dataexchange.model.RedshiftDataShareAsset] inside the given [block]
         */
        public fun redshiftDataShareAsset(block: aws.sdk.kotlin.services.dataexchange.model.RedshiftDataShareAsset.Builder.() -> kotlin.Unit) {
            this.redshiftDataShareAsset = aws.sdk.kotlin.services.dataexchange.model.RedshiftDataShareAsset.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAsset] inside the given [block]
         */
        public fun s3DataAccessAsset(block: aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAsset.Builder.() -> kotlin.Unit) {
            this.s3DataAccessAsset = aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAsset.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.dataexchange.model.S3SnapshotAsset] inside the given [block]
         */
        public fun s3SnapshotAsset(block: aws.sdk.kotlin.services.dataexchange.model.S3SnapshotAsset.Builder.() -> kotlin.Unit) {
            this.s3SnapshotAsset = aws.sdk.kotlin.services.dataexchange.model.S3SnapshotAsset.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy