
commonMain.aws.sdk.kotlin.services.iot.model.CertificateValidity.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* When the certificate is valid.
*/
public class CertificateValidity private constructor(builder: Builder) {
/**
* The certificate is not valid after this date.
*/
public val notAfter: aws.smithy.kotlin.runtime.time.Instant? = builder.notAfter
/**
* The certificate is not valid before this date.
*/
public val notBefore: aws.smithy.kotlin.runtime.time.Instant? = builder.notBefore
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.CertificateValidity = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CertificateValidity(")
append("notAfter=$notAfter,")
append("notBefore=$notBefore")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = notAfter?.hashCode() ?: 0
result = 31 * result + (notBefore?.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 CertificateValidity
if (notAfter != other.notAfter) return false
if (notBefore != other.notBefore) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.CertificateValidity = Builder(this).apply(block).build()
public class Builder {
/**
* The certificate is not valid after this date.
*/
public var notAfter: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The certificate is not valid before this date.
*/
public var notBefore: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.CertificateValidity) : this() {
this.notAfter = x.notAfter
this.notBefore = x.notBefore
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.CertificateValidity = CertificateValidity(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy