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

commonMain.aws.sdk.kotlin.services.computeoptimizer.model.RecommendationSource.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.computeoptimizer.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes the source of a recommendation, such as an Amazon EC2 instance or Auto Scaling group.
 */
public class RecommendationSource private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the recommendation source.
     */
    public val recommendationSourceArn: kotlin.String? = builder.recommendationSourceArn
    /**
     * The resource type of the recommendation source.
     */
    public val recommendationSourceType: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationSourceType? = builder.recommendationSourceType

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

    override fun toString(): kotlin.String = buildString {
        append("RecommendationSource(")
        append("recommendationSourceArn=$recommendationSourceArn,")
        append("recommendationSourceType=$recommendationSourceType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = recommendationSourceArn?.hashCode() ?: 0
        result = 31 * result + (recommendationSourceType?.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 RecommendationSource

        if (recommendationSourceArn != other.recommendationSourceArn) return false
        if (recommendationSourceType != other.recommendationSourceType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the recommendation source.
         */
        public var recommendationSourceArn: kotlin.String? = null
        /**
         * The resource type of the recommendation source.
         */
        public var recommendationSourceType: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationSourceType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationSource) : this() {
            this.recommendationSourceArn = x.recommendationSourceArn
            this.recommendationSourceType = x.recommendationSourceType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy