commonMain.aws.sdk.kotlin.services.glue.model.StatisticAnnotation.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A Statistic Annotation.
*/
public class StatisticAnnotation private constructor(builder: Builder) {
/**
* The inclusion annotation applied to the statistic.
*/
public val inclusionAnnotation: aws.sdk.kotlin.services.glue.model.TimestampedInclusionAnnotation? = builder.inclusionAnnotation
/**
* The Profile ID.
*/
public val profileId: kotlin.String? = builder.profileId
/**
* The Statistic ID.
*/
public val statisticId: kotlin.String? = builder.statisticId
/**
* The timestamp when the annotated statistic was recorded.
*/
public val statisticRecordedOn: aws.smithy.kotlin.runtime.time.Instant? = builder.statisticRecordedOn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.StatisticAnnotation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StatisticAnnotation(")
append("inclusionAnnotation=$inclusionAnnotation,")
append("profileId=$profileId,")
append("statisticId=$statisticId,")
append("statisticRecordedOn=$statisticRecordedOn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = inclusionAnnotation?.hashCode() ?: 0
result = 31 * result + (profileId?.hashCode() ?: 0)
result = 31 * result + (statisticId?.hashCode() ?: 0)
result = 31 * result + (statisticRecordedOn?.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 StatisticAnnotation
if (inclusionAnnotation != other.inclusionAnnotation) return false
if (profileId != other.profileId) return false
if (statisticId != other.statisticId) return false
if (statisticRecordedOn != other.statisticRecordedOn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.StatisticAnnotation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The inclusion annotation applied to the statistic.
*/
public var inclusionAnnotation: aws.sdk.kotlin.services.glue.model.TimestampedInclusionAnnotation? = null
/**
* The Profile ID.
*/
public var profileId: kotlin.String? = null
/**
* The Statistic ID.
*/
public var statisticId: kotlin.String? = null
/**
* The timestamp when the annotated statistic was recorded.
*/
public var statisticRecordedOn: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.StatisticAnnotation) : this() {
this.inclusionAnnotation = x.inclusionAnnotation
this.profileId = x.profileId
this.statisticId = x.statisticId
this.statisticRecordedOn = x.statisticRecordedOn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.StatisticAnnotation = StatisticAnnotation(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.TimestampedInclusionAnnotation] inside the given [block]
*/
public fun inclusionAnnotation(block: aws.sdk.kotlin.services.glue.model.TimestampedInclusionAnnotation.Builder.() -> kotlin.Unit) {
this.inclusionAnnotation = aws.sdk.kotlin.services.glue.model.TimestampedInclusionAnnotation.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}