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

commonMain.aws.sdk.kotlin.services.s3control.model.S3ManifestOutputLocation.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.s3control.model



/**
 * Location details for where the generated manifest should be written.
 */
public class S3ManifestOutputLocation private constructor(builder: Builder) {
    /**
     * The bucket ARN the generated manifest should be written to.
     *
     * **Directory buckets** - Directory buckets aren't supported as the buckets to store the generated manifest.
     */
    public val bucket: kotlin.String = requireNotNull(builder.bucket) { "A non-null value must be provided for bucket" }
    /**
     * The Account ID that owns the bucket the generated manifest is written to.
     */
    public val expectedManifestBucketOwner: kotlin.String? = builder.expectedManifestBucketOwner
    /**
     * Specifies what encryption should be used when the generated manifest objects are written.
     */
    public val manifestEncryption: aws.sdk.kotlin.services.s3control.model.GeneratedManifestEncryption? = builder.manifestEncryption
    /**
     * The format of the generated manifest.
     */
    public val manifestFormat: aws.sdk.kotlin.services.s3control.model.GeneratedManifestFormat = requireNotNull(builder.manifestFormat) { "A non-null value must be provided for manifestFormat" }
    /**
     * Prefix identifying one or more objects to which the manifest applies.
     */
    public val manifestPrefix: kotlin.String? = builder.manifestPrefix

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

    override fun toString(): kotlin.String = buildString {
        append("S3ManifestOutputLocation(")
        append("bucket=$bucket,")
        append("expectedManifestBucketOwner=$expectedManifestBucketOwner,")
        append("manifestEncryption=$manifestEncryption,")
        append("manifestFormat=$manifestFormat,")
        append("manifestPrefix=$manifestPrefix")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bucket.hashCode()
        result = 31 * result + (expectedManifestBucketOwner?.hashCode() ?: 0)
        result = 31 * result + (manifestEncryption?.hashCode() ?: 0)
        result = 31 * result + (manifestFormat.hashCode())
        result = 31 * result + (manifestPrefix?.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 S3ManifestOutputLocation

        if (bucket != other.bucket) return false
        if (expectedManifestBucketOwner != other.expectedManifestBucketOwner) return false
        if (manifestEncryption != other.manifestEncryption) return false
        if (manifestFormat != other.manifestFormat) return false
        if (manifestPrefix != other.manifestPrefix) return false

        return true
    }

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

    public class Builder {
        /**
         * The bucket ARN the generated manifest should be written to.
         *
         * **Directory buckets** - Directory buckets aren't supported as the buckets to store the generated manifest.
         */
        public var bucket: kotlin.String? = null
        /**
         * The Account ID that owns the bucket the generated manifest is written to.
         */
        public var expectedManifestBucketOwner: kotlin.String? = null
        /**
         * Specifies what encryption should be used when the generated manifest objects are written.
         */
        public var manifestEncryption: aws.sdk.kotlin.services.s3control.model.GeneratedManifestEncryption? = null
        /**
         * The format of the generated manifest.
         */
        public var manifestFormat: aws.sdk.kotlin.services.s3control.model.GeneratedManifestFormat? = null
        /**
         * Prefix identifying one or more objects to which the manifest applies.
         */
        public var manifestPrefix: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3control.model.S3ManifestOutputLocation) : this() {
            this.bucket = x.bucket
            this.expectedManifestBucketOwner = x.expectedManifestBucketOwner
            this.manifestEncryption = x.manifestEncryption
            this.manifestFormat = x.manifestFormat
            this.manifestPrefix = x.manifestPrefix
        }

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

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

        internal fun correctErrors(): Builder {
            if (bucket == null) bucket = ""
            if (manifestFormat == null) manifestFormat = GeneratedManifestFormat.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy