commonMain.aws.sdk.kotlin.services.iotanalytics.model.TimestampPartition.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotanalytics-jvm Show documentation
Show all versions of iotanalytics-jvm Show documentation
The AWS SDK for Kotlin client for IoTAnalytics
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotanalytics.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A partition dimension defined by a timestamp attribute.
*/
public class TimestampPartition private constructor(builder: Builder) {
/**
* The attribute name of the partition defined by a timestamp.
*/
public val attributeName: kotlin.String = requireNotNull(builder.attributeName) { "A non-null value must be provided for attributeName" }
/**
* The timestamp format of a partition defined by a timestamp. The default format is seconds since epoch (January 1, 1970 at midnight UTC time).
*/
public val timestampFormat: kotlin.String? = builder.timestampFormat
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotanalytics.model.TimestampPartition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TimestampPartition(")
append("attributeName=$attributeName,")
append("timestampFormat=$timestampFormat")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attributeName.hashCode()
result = 31 * result + (timestampFormat?.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 TimestampPartition
if (attributeName != other.attributeName) return false
if (timestampFormat != other.timestampFormat) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotanalytics.model.TimestampPartition = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The attribute name of the partition defined by a timestamp.
*/
public var attributeName: kotlin.String? = null
/**
* The timestamp format of a partition defined by a timestamp. The default format is seconds since epoch (January 1, 1970 at midnight UTC time).
*/
public var timestampFormat: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotanalytics.model.TimestampPartition) : this() {
this.attributeName = x.attributeName
this.timestampFormat = x.timestampFormat
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotanalytics.model.TimestampPartition = TimestampPartition(this)
internal fun correctErrors(): Builder {
if (attributeName == null) attributeName = ""
return this
}
}
}