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

commonMain.aws.sdk.kotlin.services.backupgateway.model.PutHypervisorPropertyMappingsRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.37
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.backupgateway.model

import aws.smithy.kotlin.runtime.SdkDsl

public class PutHypervisorPropertyMappingsRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the hypervisor.
     */
    public val hypervisorArn: kotlin.String = requireNotNull(builder.hypervisorArn) { "A non-null value must be provided for hypervisorArn" }
    /**
     * The Amazon Resource Name (ARN) of the IAM role.
     */
    public val iamRoleArn: kotlin.String = requireNotNull(builder.iamRoleArn) { "A non-null value must be provided for iamRoleArn" }
    /**
     * This action requests the mappings of on-premises VMware tags to the Amazon Web Services tags.
     */
    public val vmwareToAwsTagMappings: List = requireNotNull(builder.vmwareToAwsTagMappings) { "A non-null value must be provided for vmwareToAwsTagMappings" }

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

    override fun toString(): kotlin.String = buildString {
        append("PutHypervisorPropertyMappingsRequest(")
        append("hypervisorArn=$hypervisorArn,")
        append("iamRoleArn=$iamRoleArn,")
        append("vmwareToAwsTagMappings=$vmwareToAwsTagMappings")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = hypervisorArn.hashCode()
        result = 31 * result + (iamRoleArn.hashCode())
        result = 31 * result + (vmwareToAwsTagMappings.hashCode())
        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 PutHypervisorPropertyMappingsRequest

        if (hypervisorArn != other.hypervisorArn) return false
        if (iamRoleArn != other.iamRoleArn) return false
        if (vmwareToAwsTagMappings != other.vmwareToAwsTagMappings) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the hypervisor.
         */
        public var hypervisorArn: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the IAM role.
         */
        public var iamRoleArn: kotlin.String? = null
        /**
         * This action requests the mappings of on-premises VMware tags to the Amazon Web Services tags.
         */
        public var vmwareToAwsTagMappings: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backupgateway.model.PutHypervisorPropertyMappingsRequest) : this() {
            this.hypervisorArn = x.hypervisorArn
            this.iamRoleArn = x.iamRoleArn
            this.vmwareToAwsTagMappings = x.vmwareToAwsTagMappings
        }

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

        internal fun correctErrors(): Builder {
            if (hypervisorArn == null) hypervisorArn = ""
            if (iamRoleArn == null) iamRoleArn = ""
            if (vmwareToAwsTagMappings == null) vmwareToAwsTagMappings = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy