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

commonMain.aws.sdk.kotlin.services.deadline.model.JobAttachmentSettings.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.deadline.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The job attachment settings. These are the Amazon S3 bucket name and the Amazon S3 prefix.
 */
public class JobAttachmentSettings private constructor(builder: Builder) {
    /**
     * The root prefix.
     */
    public val rootPrefix: kotlin.String = requireNotNull(builder.rootPrefix) { "A non-null value must be provided for rootPrefix" }
    /**
     * The Amazon S3 bucket name.
     */
    public val s3BucketName: kotlin.String = requireNotNull(builder.s3BucketName) { "A non-null value must be provided for s3BucketName" }

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

    override fun toString(): kotlin.String = buildString {
        append("JobAttachmentSettings(")
        append("rootPrefix=$rootPrefix,")
        append("s3BucketName=$s3BucketName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = rootPrefix.hashCode()
        result = 31 * result + (s3BucketName.hashCode())
        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 JobAttachmentSettings

        if (rootPrefix != other.rootPrefix) return false
        if (s3BucketName != other.s3BucketName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The root prefix.
         */
        public var rootPrefix: kotlin.String? = null
        /**
         * The Amazon S3 bucket name.
         */
        public var s3BucketName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.JobAttachmentSettings) : this() {
            this.rootPrefix = x.rootPrefix
            this.s3BucketName = x.s3BucketName
        }

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

        internal fun correctErrors(): Builder {
            if (rootPrefix == null) rootPrefix = ""
            if (s3BucketName == null) s3BucketName = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy