All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.drs.model.RecoveryInstance.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.drs.model



/**
 * A Recovery Instance is a replica of a Source Server running on EC2.
 */
public class RecoveryInstance private constructor(builder: Builder) {
    /**
     * The ARN of the Recovery Instance.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The Data Replication Info of the Recovery Instance.
     */
    public val dataReplicationInfo: aws.sdk.kotlin.services.drs.model.RecoveryInstanceDataReplicationInfo? = builder.dataReplicationInfo
    /**
     * The EC2 instance ID of the Recovery Instance.
     */
    public val ec2InstanceId: kotlin.String? = builder.ec2InstanceId
    /**
     * The state of the EC2 instance for this Recovery Instance.
     */
    public val ec2InstanceState: aws.sdk.kotlin.services.drs.model.Ec2InstanceState? = builder.ec2InstanceState
    /**
     * An object representing failback related information of the Recovery Instance.
     */
    public val failback: aws.sdk.kotlin.services.drs.model.RecoveryInstanceFailback? = builder.failback
    /**
     * Whether this Recovery Instance was created for a drill or for an actual Recovery event.
     */
    public val isDrill: kotlin.Boolean? = builder.isDrill
    /**
     * The ID of the Job that created the Recovery Instance.
     */
    public val jobId: kotlin.String? = builder.jobId
    /**
     * Environment (On Premises / AWS) of the instance that the recovery instance originated from.
     */
    public val originEnvironment: aws.sdk.kotlin.services.drs.model.OriginEnvironment? = builder.originEnvironment
    /**
     * The date and time of the Point in Time (PIT) snapshot that this Recovery Instance was launched from.
     */
    public val pointInTimeSnapshotDateTime: kotlin.String? = builder.pointInTimeSnapshotDateTime
    /**
     * The ID of the Recovery Instance.
     */
    public val recoveryInstanceId: kotlin.String? = builder.recoveryInstanceId
    /**
     * Properties of the Recovery Instance machine.
     */
    public val recoveryInstanceProperties: aws.sdk.kotlin.services.drs.model.RecoveryInstanceProperties? = builder.recoveryInstanceProperties
    /**
     * The Source Server ID that this Recovery Instance is associated with.
     */
    public val sourceServerId: kotlin.String? = builder.sourceServerId
    /**
     * An array of tags that are associated with the Recovery Instance.
     */
    public val tags: Map? = builder.tags

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.drs.model.RecoveryInstance = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("RecoveryInstance(")
        append("arn=$arn,")
        append("dataReplicationInfo=$dataReplicationInfo,")
        append("ec2InstanceId=$ec2InstanceId,")
        append("ec2InstanceState=$ec2InstanceState,")
        append("failback=$failback,")
        append("isDrill=$isDrill,")
        append("jobId=$jobId,")
        append("originEnvironment=$originEnvironment,")
        append("pointInTimeSnapshotDateTime=$pointInTimeSnapshotDateTime,")
        append("recoveryInstanceId=$recoveryInstanceId,")
        append("recoveryInstanceProperties=$recoveryInstanceProperties,")
        append("sourceServerId=$sourceServerId,")
        append("tags=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (dataReplicationInfo?.hashCode() ?: 0)
        result = 31 * result + (ec2InstanceId?.hashCode() ?: 0)
        result = 31 * result + (ec2InstanceState?.hashCode() ?: 0)
        result = 31 * result + (failback?.hashCode() ?: 0)
        result = 31 * result + (isDrill?.hashCode() ?: 0)
        result = 31 * result + (jobId?.hashCode() ?: 0)
        result = 31 * result + (originEnvironment?.hashCode() ?: 0)
        result = 31 * result + (pointInTimeSnapshotDateTime?.hashCode() ?: 0)
        result = 31 * result + (recoveryInstanceId?.hashCode() ?: 0)
        result = 31 * result + (recoveryInstanceProperties?.hashCode() ?: 0)
        result = 31 * result + (sourceServerId?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 RecoveryInstance

        if (arn != other.arn) return false
        if (dataReplicationInfo != other.dataReplicationInfo) return false
        if (ec2InstanceId != other.ec2InstanceId) return false
        if (ec2InstanceState != other.ec2InstanceState) return false
        if (failback != other.failback) return false
        if (isDrill != other.isDrill) return false
        if (jobId != other.jobId) return false
        if (originEnvironment != other.originEnvironment) return false
        if (pointInTimeSnapshotDateTime != other.pointInTimeSnapshotDateTime) return false
        if (recoveryInstanceId != other.recoveryInstanceId) return false
        if (recoveryInstanceProperties != other.recoveryInstanceProperties) return false
        if (sourceServerId != other.sourceServerId) return false
        if (tags != other.tags) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.drs.model.RecoveryInstance = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The ARN of the Recovery Instance.
         */
        public var arn: kotlin.String? = null
        /**
         * The Data Replication Info of the Recovery Instance.
         */
        public var dataReplicationInfo: aws.sdk.kotlin.services.drs.model.RecoveryInstanceDataReplicationInfo? = null
        /**
         * The EC2 instance ID of the Recovery Instance.
         */
        public var ec2InstanceId: kotlin.String? = null
        /**
         * The state of the EC2 instance for this Recovery Instance.
         */
        public var ec2InstanceState: aws.sdk.kotlin.services.drs.model.Ec2InstanceState? = null
        /**
         * An object representing failback related information of the Recovery Instance.
         */
        public var failback: aws.sdk.kotlin.services.drs.model.RecoveryInstanceFailback? = null
        /**
         * Whether this Recovery Instance was created for a drill or for an actual Recovery event.
         */
        public var isDrill: kotlin.Boolean? = null
        /**
         * The ID of the Job that created the Recovery Instance.
         */
        public var jobId: kotlin.String? = null
        /**
         * Environment (On Premises / AWS) of the instance that the recovery instance originated from.
         */
        public var originEnvironment: aws.sdk.kotlin.services.drs.model.OriginEnvironment? = null
        /**
         * The date and time of the Point in Time (PIT) snapshot that this Recovery Instance was launched from.
         */
        public var pointInTimeSnapshotDateTime: kotlin.String? = null
        /**
         * The ID of the Recovery Instance.
         */
        public var recoveryInstanceId: kotlin.String? = null
        /**
         * Properties of the Recovery Instance machine.
         */
        public var recoveryInstanceProperties: aws.sdk.kotlin.services.drs.model.RecoveryInstanceProperties? = null
        /**
         * The Source Server ID that this Recovery Instance is associated with.
         */
        public var sourceServerId: kotlin.String? = null
        /**
         * An array of tags that are associated with the Recovery Instance.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.drs.model.RecoveryInstance) : this() {
            this.arn = x.arn
            this.dataReplicationInfo = x.dataReplicationInfo
            this.ec2InstanceId = x.ec2InstanceId
            this.ec2InstanceState = x.ec2InstanceState
            this.failback = x.failback
            this.isDrill = x.isDrill
            this.jobId = x.jobId
            this.originEnvironment = x.originEnvironment
            this.pointInTimeSnapshotDateTime = x.pointInTimeSnapshotDateTime
            this.recoveryInstanceId = x.recoveryInstanceId
            this.recoveryInstanceProperties = x.recoveryInstanceProperties
            this.sourceServerId = x.sourceServerId
            this.tags = x.tags
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.drs.model.RecoveryInstance = RecoveryInstance(this)

        /**
         * construct an [aws.sdk.kotlin.services.drs.model.RecoveryInstanceDataReplicationInfo] inside the given [block]
         */
        public fun dataReplicationInfo(block: aws.sdk.kotlin.services.drs.model.RecoveryInstanceDataReplicationInfo.Builder.() -> kotlin.Unit) {
            this.dataReplicationInfo = aws.sdk.kotlin.services.drs.model.RecoveryInstanceDataReplicationInfo.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.drs.model.RecoveryInstanceFailback] inside the given [block]
         */
        public fun failback(block: aws.sdk.kotlin.services.drs.model.RecoveryInstanceFailback.Builder.() -> kotlin.Unit) {
            this.failback = aws.sdk.kotlin.services.drs.model.RecoveryInstanceFailback.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.drs.model.RecoveryInstanceProperties] inside the given [block]
         */
        public fun recoveryInstanceProperties(block: aws.sdk.kotlin.services.drs.model.RecoveryInstanceProperties.Builder.() -> kotlin.Unit) {
            this.recoveryInstanceProperties = aws.sdk.kotlin.services.drs.model.RecoveryInstanceProperties.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy