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

commonMain.aws.sdk.kotlin.services.lightsail.model.GetCostEstimateRequest.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
import aws.smithy.kotlin.runtime.time.Instant

public class GetCostEstimateRequest private constructor(builder: Builder) {
    /**
     * The cost estimate end time.
     *
     * Constraints:
     * + Specified in Coordinated Universal Time (UTC).
     * + Specified in the Unix time format.For example, if you want to use an end time of October 1, 2018, at 9 PM UTC, specify `1538427600` as the end time.
     *
     * You can convert a human-friendly time to Unix time format using a converter like [Epoch converter](https://www.epochconverter.com/).
     */
    public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
    /**
     * The resource name.
     */
    public val resourceName: kotlin.String? = builder.resourceName
    /**
     * The cost estimate start time.
     *
     * Constraints:
     * + Specified in Coordinated Universal Time (UTC).
     * + Specified in the Unix time format.For example, if you want to use a start time of October 1, 2018, at 8 PM UTC, specify `1538424000` as the start time.
     *
     * You can convert a human-friendly time to Unix time format using a converter like [Epoch converter](https://www.epochconverter.com/).
     */
    public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime

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

    override fun toString(): kotlin.String = buildString {
        append("GetCostEstimateRequest(")
        append("endTime=$endTime,")
        append("resourceName=$resourceName,")
        append("startTime=$startTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = endTime?.hashCode() ?: 0
        result = 31 * result + (resourceName?.hashCode() ?: 0)
        result = 31 * result + (startTime?.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 GetCostEstimateRequest

        if (endTime != other.endTime) return false
        if (resourceName != other.resourceName) return false
        if (startTime != other.startTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The cost estimate end time.
         *
         * Constraints:
         * + Specified in Coordinated Universal Time (UTC).
         * + Specified in the Unix time format.For example, if you want to use an end time of October 1, 2018, at 9 PM UTC, specify `1538427600` as the end time.
         *
         * You can convert a human-friendly time to Unix time format using a converter like [Epoch converter](https://www.epochconverter.com/).
         */
        public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The resource name.
         */
        public var resourceName: kotlin.String? = null
        /**
         * The cost estimate start time.
         *
         * Constraints:
         * + Specified in Coordinated Universal Time (UTC).
         * + Specified in the Unix time format.For example, if you want to use a start time of October 1, 2018, at 8 PM UTC, specify `1538424000` as the start time.
         *
         * You can convert a human-friendly time to Unix time format using a converter like [Epoch converter](https://www.epochconverter.com/).
         */
        public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.GetCostEstimateRequest) : this() {
            this.endTime = x.endTime
            this.resourceName = x.resourceName
            this.startTime = x.startTime
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy