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

commonMain.aws.sdk.kotlin.services.sms.model.CreateReplicationJobRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sms.model

import aws.smithy.kotlin.runtime.time.Instant

public class CreateReplicationJobRequest private constructor(builder: Builder) {
    /**
     * The description of the replication job.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Indicates whether the replication job produces encrypted AMIs.
     */
    public val encrypted: kotlin.Boolean? = builder.encrypted
    /**
     * The time between consecutive replication runs, in hours.
     */
    public val frequency: kotlin.Int? = builder.frequency
    /**
     * The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:
     * + KMS key ID
     * + KMS key alias
     * + ARN referring to the KMS key ID
     * + ARN referring to the KMS key alias
     *
     *  If encrypted is *true* but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.
     */
    public val kmsKeyId: kotlin.String? = builder.kmsKeyId
    /**
     * The license type to be used for the AMI created by a successful replication run.
     */
    public val licenseType: aws.sdk.kotlin.services.sms.model.LicenseType? = builder.licenseType
    /**
     * The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is reached and a new AMI is created.
     */
    public val numberOfRecentAmisToKeep: kotlin.Int? = builder.numberOfRecentAmisToKeep
    /**
     * The name of the IAM role to be used by the Server Migration Service.
     */
    public val roleName: kotlin.String? = builder.roleName
    /**
     * Indicates whether to run the replication job one time.
     */
    public val runOnce: kotlin.Boolean? = builder.runOnce
    /**
     * The seed replication time.
     */
    public val seedReplicationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.seedReplicationTime
    /**
     * The ID of the server.
     */
    public val serverId: kotlin.String? = builder.serverId

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

    override fun toString(): kotlin.String = buildString {
        append("CreateReplicationJobRequest(")
        append("description=$description,")
        append("encrypted=$encrypted,")
        append("frequency=$frequency,")
        append("kmsKeyId=$kmsKeyId,")
        append("licenseType=$licenseType,")
        append("numberOfRecentAmisToKeep=$numberOfRecentAmisToKeep,")
        append("roleName=$roleName,")
        append("runOnce=$runOnce,")
        append("seedReplicationTime=$seedReplicationTime,")
        append("serverId=$serverId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (encrypted?.hashCode() ?: 0)
        result = 31 * result + (frequency ?: 0)
        result = 31 * result + (kmsKeyId?.hashCode() ?: 0)
        result = 31 * result + (licenseType?.hashCode() ?: 0)
        result = 31 * result + (numberOfRecentAmisToKeep ?: 0)
        result = 31 * result + (roleName?.hashCode() ?: 0)
        result = 31 * result + (runOnce?.hashCode() ?: 0)
        result = 31 * result + (seedReplicationTime?.hashCode() ?: 0)
        result = 31 * result + (serverId?.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 CreateReplicationJobRequest

        if (description != other.description) return false
        if (encrypted != other.encrypted) return false
        if (frequency != other.frequency) return false
        if (kmsKeyId != other.kmsKeyId) return false
        if (licenseType != other.licenseType) return false
        if (numberOfRecentAmisToKeep != other.numberOfRecentAmisToKeep) return false
        if (roleName != other.roleName) return false
        if (runOnce != other.runOnce) return false
        if (seedReplicationTime != other.seedReplicationTime) return false
        if (serverId != other.serverId) return false

        return true
    }

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

    public class Builder {
        /**
         * The description of the replication job.
         */
        public var description: kotlin.String? = null
        /**
         * Indicates whether the replication job produces encrypted AMIs.
         */
        public var encrypted: kotlin.Boolean? = null
        /**
         * The time between consecutive replication runs, in hours.
         */
        public var frequency: kotlin.Int? = null
        /**
         * The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:
         * + KMS key ID
         * + KMS key alias
         * + ARN referring to the KMS key ID
         * + ARN referring to the KMS key alias
         *
         *  If encrypted is *true* but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.
         */
        public var kmsKeyId: kotlin.String? = null
        /**
         * The license type to be used for the AMI created by a successful replication run.
         */
        public var licenseType: aws.sdk.kotlin.services.sms.model.LicenseType? = null
        /**
         * The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is reached and a new AMI is created.
         */
        public var numberOfRecentAmisToKeep: kotlin.Int? = null
        /**
         * The name of the IAM role to be used by the Server Migration Service.
         */
        public var roleName: kotlin.String? = null
        /**
         * Indicates whether to run the replication job one time.
         */
        public var runOnce: kotlin.Boolean? = null
        /**
         * The seed replication time.
         */
        public var seedReplicationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ID of the server.
         */
        public var serverId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sms.model.CreateReplicationJobRequest) : this() {
            this.description = x.description
            this.encrypted = x.encrypted
            this.frequency = x.frequency
            this.kmsKeyId = x.kmsKeyId
            this.licenseType = x.licenseType
            this.numberOfRecentAmisToKeep = x.numberOfRecentAmisToKeep
            this.roleName = x.roleName
            this.runOnce = x.runOnce
            this.seedReplicationTime = x.seedReplicationTime
            this.serverId = x.serverId
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy