commonMain.aws.sdk.kotlin.services.shield.model.TimeRange.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shield Show documentation
Show all versions of shield Show documentation
The AWS SDK for Kotlin client for Shield
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.shield.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* The time range.
*/
public class TimeRange private constructor(builder: Builder) {
/**
* The start time, in Unix time in seconds.
*/
public val fromInclusive: aws.smithy.kotlin.runtime.time.Instant? = builder.fromInclusive
/**
* The end time, in Unix time in seconds.
*/
public val toExclusive: aws.smithy.kotlin.runtime.time.Instant? = builder.toExclusive
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.shield.model.TimeRange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TimeRange(")
append("fromInclusive=$fromInclusive,")
append("toExclusive=$toExclusive)")
}
override fun hashCode(): kotlin.Int {
var result = fromInclusive?.hashCode() ?: 0
result = 31 * result + (toExclusive?.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 (fromInclusive != other.fromInclusive) return false
if (toExclusive != other.toExclusive) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.shield.model.TimeRange = Builder(this).apply(block).build()
public class Builder {
/**
* The start time, in Unix time in seconds.
*/
public var fromInclusive: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The end time, in Unix time in seconds.
*/
public var toExclusive: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.shield.model.TimeRange) : this() {
this.fromInclusive = x.fromInclusive
this.toExclusive = x.toExclusive
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.shield.model.TimeRange = TimeRange(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy