commonMain.aws.sdk.kotlin.services.codedeploy.model.TimeRange.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codedeploy-jvm Show documentation
Show all versions of codedeploy-jvm Show documentation
The AWS SDK for Kotlin client for CodeDeploy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codedeploy.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Information about a time range.
*/
public class TimeRange private constructor(builder: Builder) {
/**
* The end time of the time range.
*
* Specify null to leave the end time open-ended.
*/
public val end: aws.smithy.kotlin.runtime.time.Instant? = builder.end
/**
* The start time of the time range.
*
* Specify null to leave the start time open-ended.
*/
public val start: aws.smithy.kotlin.runtime.time.Instant? = builder.start
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codedeploy.model.TimeRange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TimeRange(")
append("end=$end,")
append("start=$start")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = end?.hashCode() ?: 0
result = 31 * result + (start?.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 TimeRange
if (end != other.end) return false
if (start != other.start) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codedeploy.model.TimeRange = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The end time of the time range.
*
* Specify null to leave the end time open-ended.
*/
public var end: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The start time of the time range.
*
* Specify null to leave the start time open-ended.
*/
public var start: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.TimeRange) : this() {
this.end = x.end
this.start = x.start
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codedeploy.model.TimeRange = TimeRange(this)
internal fun correctErrors(): Builder {
return this
}
}
}