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

commonMain.aws.sdk.kotlin.services.lightsail.model.CostEstimate.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lightsail.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes the estimated cost for resources in your Lightsail for Research account.
 */
public class CostEstimate private constructor(builder: Builder) {
    /**
     * The cost estimate result that's associated with a time period.
     */
    public val resultsByTime: List? = builder.resultsByTime
    /**
     * The types of usage that are included in the estimate, such as costs, usage, or data transfer.
     */
    public val usageType: kotlin.String? = builder.usageType

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

    override fun toString(): kotlin.String = buildString {
        append("CostEstimate(")
        append("resultsByTime=$resultsByTime,")
        append("usageType=$usageType")
        append(")")
    }

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

        if (resultsByTime != other.resultsByTime) return false
        if (usageType != other.usageType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The cost estimate result that's associated with a time period.
         */
        public var resultsByTime: List? = null
        /**
         * The types of usage that are included in the estimate, such as costs, usage, or data transfer.
         */
        public var usageType: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.CostEstimate) : this() {
            this.resultsByTime = x.resultsByTime
            this.usageType = x.usageType
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy