
commonMain.aws.sdk.kotlin.services.arczonalshift.model.ZonalShiftInResource.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.arczonalshift.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* A complex structure that lists the zonal shifts for a managed resource and their statuses for the resource.
*/
public class ZonalShiftInResource private constructor(builder: Builder) {
/**
* An `appliedStatus` for a zonal shift for a resource can have one of two values: `APPLIED` or `NOT_APPLIED`.
*/
public val appliedStatus: aws.sdk.kotlin.services.arczonalshift.model.AppliedStatus? = builder.appliedStatus
/**
* The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the AWS Region.
*/
public val awayFrom: kotlin.String? = builder.awayFrom
/**
* A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.
*/
public val comment: kotlin.String? = builder.comment
/**
* The expiry time (expiration time) for the zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.
*
* When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift, for example, if you're ready to restore traffic to the Availability Zone. Or you can update the zonal shift to specify another length of time to expire in.
*/
public val expiryTime: aws.smithy.kotlin.runtime.time.Instant? = builder.expiryTime
/**
* The identifier for the resource to include in a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.
*
* At this time, you can only start a zonal shift for Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.
*/
public val resourceIdentifier: kotlin.String? = builder.resourceIdentifier
/**
* The time (UTC) when the zonal shift is started.
*/
public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
/**
* The identifier of a zonal shift.
*/
public val zonalShiftId: kotlin.String? = builder.zonalShiftId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.arczonalshift.model.ZonalShiftInResource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ZonalShiftInResource(")
append("appliedStatus=$appliedStatus,")
append("awayFrom=$awayFrom,")
append("comment=$comment,")
append("expiryTime=$expiryTime,")
append("resourceIdentifier=$resourceIdentifier,")
append("startTime=$startTime,")
append("zonalShiftId=$zonalShiftId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = appliedStatus?.hashCode() ?: 0
result = 31 * result + (awayFrom?.hashCode() ?: 0)
result = 31 * result + (comment?.hashCode() ?: 0)
result = 31 * result + (expiryTime?.hashCode() ?: 0)
result = 31 * result + (resourceIdentifier?.hashCode() ?: 0)
result = 31 * result + (startTime?.hashCode() ?: 0)
result = 31 * result + (zonalShiftId?.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 ZonalShiftInResource
if (appliedStatus != other.appliedStatus) return false
if (awayFrom != other.awayFrom) return false
if (comment != other.comment) return false
if (expiryTime != other.expiryTime) return false
if (resourceIdentifier != other.resourceIdentifier) return false
if (startTime != other.startTime) return false
if (zonalShiftId != other.zonalShiftId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.arczonalshift.model.ZonalShiftInResource = Builder(this).apply(block).build()
public class Builder {
/**
* An `appliedStatus` for a zonal shift for a resource can have one of two values: `APPLIED` or `NOT_APPLIED`.
*/
public var appliedStatus: aws.sdk.kotlin.services.arczonalshift.model.AppliedStatus? = null
/**
* The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the AWS Region.
*/
public var awayFrom: kotlin.String? = null
/**
* A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.
*/
public var comment: kotlin.String? = null
/**
* The expiry time (expiration time) for the zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.
*
* When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift, for example, if you're ready to restore traffic to the Availability Zone. Or you can update the zonal shift to specify another length of time to expire in.
*/
public var expiryTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The identifier for the resource to include in a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.
*
* At this time, you can only start a zonal shift for Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.
*/
public var resourceIdentifier: kotlin.String? = null
/**
* The time (UTC) when the zonal shift is started.
*/
public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The identifier of a zonal shift.
*/
public var zonalShiftId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.arczonalshift.model.ZonalShiftInResource) : this() {
this.appliedStatus = x.appliedStatus
this.awayFrom = x.awayFrom
this.comment = x.comment
this.expiryTime = x.expiryTime
this.resourceIdentifier = x.resourceIdentifier
this.startTime = x.startTime
this.zonalShiftId = x.zonalShiftId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.arczonalshift.model.ZonalShiftInResource = ZonalShiftInResource(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy