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

commonMain.aws.sdk.kotlin.services.databrew.model.DatetimeOptions.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.databrew.model



/**
 * Represents additional options for correct interpretation of datetime parameters used in the Amazon S3 path of a dataset.
 */
public class DatetimeOptions private constructor(builder: Builder) {
    /**
     * Required option, that defines the datetime format used for a date parameter in the Amazon S3 path. Should use only supported datetime specifiers and separation characters, all literal a-z or A-Z characters should be escaped with single quotes. E.g. "MM.dd.yyyy-'at'-HH:mm".
     */
    public val format: kotlin.String? = builder.format
    /**
     * Optional value for a non-US locale code, needed for correct interpretation of some date formats.
     */
    public val localeCode: kotlin.String? = builder.localeCode
    /**
     * Optional value for a timezone offset of the datetime parameter value in the Amazon S3 path. Shouldn't be used if Format for this parameter includes timezone fields. If no offset specified, UTC is assumed.
     */
    public val timezoneOffset: kotlin.String? = builder.timezoneOffset

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

    override fun toString(): kotlin.String = buildString {
        append("DatetimeOptions(")
        append("format=$format,")
        append("localeCode=$localeCode,")
        append("timezoneOffset=$timezoneOffset)")
    }

    override fun hashCode(): kotlin.Int {
        var result = format?.hashCode() ?: 0
        result = 31 * result + (localeCode?.hashCode() ?: 0)
        result = 31 * result + (timezoneOffset?.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 DatetimeOptions

        if (format != other.format) return false
        if (localeCode != other.localeCode) return false
        if (timezoneOffset != other.timezoneOffset) return false

        return true
    }

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

    public class Builder {
        /**
         * Required option, that defines the datetime format used for a date parameter in the Amazon S3 path. Should use only supported datetime specifiers and separation characters, all literal a-z or A-Z characters should be escaped with single quotes. E.g. "MM.dd.yyyy-'at'-HH:mm".
         */
        public var format: kotlin.String? = null
        /**
         * Optional value for a non-US locale code, needed for correct interpretation of some date formats.
         */
        public var localeCode: kotlin.String? = null
        /**
         * Optional value for a timezone offset of the datetime parameter value in the Amazon S3 path. Shouldn't be used if Format for this parameter includes timezone fields. If no offset specified, UTC is assumed.
         */
        public var timezoneOffset: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.databrew.model.DatetimeOptions) : this() {
            this.format = x.format
            this.localeCode = x.localeCode
            this.timezoneOffset = x.timezoneOffset
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.databrew.model.DatetimeOptions = DatetimeOptions(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy