commonMain.aws.sdk.kotlin.services.cloudwatch.model.Range.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatch-jvm Show documentation
Show all versions of cloudwatch-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatch.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* Specifies one range of days or times to exclude from use for training an anomaly detection model.
*/
public class Range private constructor(builder: Builder) {
/**
* The end time of the range to exclude. The format is `yyyy-MM-dd'T'HH:mm:ss`. For example, `2019-07-01T23:59:59`.
*/
public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
/**
* The start time of the range to exclude. The format is `yyyy-MM-dd'T'HH:mm:ss`. For example, `2019-07-01T23:59:59`.
*/
public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatch.model.Range = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Range(")
append("endTime=$endTime,")
append("startTime=$startTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = endTime?.hashCode() ?: 0
result = 31 * result + (startTime?.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 Range
if (endTime != other.endTime) return false
if (startTime != other.startTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatch.model.Range = Builder(this).apply(block).build()
public class Builder {
/**
* The end time of the range to exclude. The format is `yyyy-MM-dd'T'HH:mm:ss`. For example, `2019-07-01T23:59:59`.
*/
public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The start time of the range to exclude. The format is `yyyy-MM-dd'T'HH:mm:ss`. For example, `2019-07-01T23:59:59`.
*/
public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.Range) : this() {
this.endTime = x.endTime
this.startTime = x.startTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatch.model.Range = Range(this)
internal fun correctErrors(): Builder {
return this
}
}
}