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

commonMain.aws.sdk.kotlin.services.deadline.model.UpdateBudgetRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.deadline.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateBudgetRequest private constructor(builder: Builder) {
    /**
     * The budget actions to add. Budget actions specify what happens when the budget runs out.
     */
    public val actionsToAdd: List? = builder.actionsToAdd
    /**
     * The budget actions to remove from the budget.
     */
    public val actionsToRemove: List? = builder.actionsToRemove
    /**
     * The dollar limit to update on the budget. Based on consumed usage.
     */
    public val approximateDollarLimit: kotlin.Float? = builder.approximateDollarLimit
    /**
     * The budget ID to update.
     */
    public val budgetId: kotlin.String? = builder.budgetId
    /**
     * The unique token which the server uses to recognize retries of the same request.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The description of the budget to update.
     *
     * This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The display name of the budget to update.
     *
     * This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
     */
    public val displayName: kotlin.String? = builder.displayName
    /**
     * The farm ID of the budget to update.
     */
    public val farmId: kotlin.String? = builder.farmId
    /**
     * The schedule to update.
     */
    public val schedule: aws.sdk.kotlin.services.deadline.model.BudgetSchedule? = builder.schedule
    /**
     * Updates the status of the budget.
     * + `ACTIVE`–The budget is being evaluated.
     * + `INACTIVE`–The budget is inactive. This can include Expired, Canceled, or deleted Deleted statuses.
     */
    public val status: aws.sdk.kotlin.services.deadline.model.BudgetStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateBudgetRequest(")
        append("actionsToAdd=$actionsToAdd,")
        append("actionsToRemove=$actionsToRemove,")
        append("approximateDollarLimit=$approximateDollarLimit,")
        append("budgetId=$budgetId,")
        append("clientToken=$clientToken,")
        append("description=*** Sensitive Data Redacted ***,")
        append("displayName=$displayName,")
        append("farmId=$farmId,")
        append("schedule=$schedule,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionsToAdd?.hashCode() ?: 0
        result = 31 * result + (actionsToRemove?.hashCode() ?: 0)
        result = 31 * result + (approximateDollarLimit?.hashCode() ?: 0)
        result = 31 * result + (budgetId?.hashCode() ?: 0)
        result = 31 * result + (clientToken?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (displayName?.hashCode() ?: 0)
        result = 31 * result + (farmId?.hashCode() ?: 0)
        result = 31 * result + (schedule?.hashCode() ?: 0)
        result = 31 * result + (status?.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 UpdateBudgetRequest

        if (actionsToAdd != other.actionsToAdd) return false
        if (actionsToRemove != other.actionsToRemove) return false
        if (!(approximateDollarLimit?.equals(other.approximateDollarLimit) ?: (other.approximateDollarLimit == null))) return false
        if (budgetId != other.budgetId) return false
        if (clientToken != other.clientToken) return false
        if (description != other.description) return false
        if (displayName != other.displayName) return false
        if (farmId != other.farmId) return false
        if (schedule != other.schedule) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The budget actions to add. Budget actions specify what happens when the budget runs out.
         */
        public var actionsToAdd: List? = null
        /**
         * The budget actions to remove from the budget.
         */
        public var actionsToRemove: List? = null
        /**
         * The dollar limit to update on the budget. Based on consumed usage.
         */
        public var approximateDollarLimit: kotlin.Float? = null
        /**
         * The budget ID to update.
         */
        public var budgetId: kotlin.String? = null
        /**
         * The unique token which the server uses to recognize retries of the same request.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The description of the budget to update.
         *
         * This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
         */
        public var description: kotlin.String? = null
        /**
         * The display name of the budget to update.
         *
         * This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
         */
        public var displayName: kotlin.String? = null
        /**
         * The farm ID of the budget to update.
         */
        public var farmId: kotlin.String? = null
        /**
         * The schedule to update.
         */
        public var schedule: aws.sdk.kotlin.services.deadline.model.BudgetSchedule? = null
        /**
         * Updates the status of the budget.
         * + `ACTIVE`–The budget is being evaluated.
         * + `INACTIVE`–The budget is inactive. This can include Expired, Canceled, or deleted Deleted statuses.
         */
        public var status: aws.sdk.kotlin.services.deadline.model.BudgetStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.UpdateBudgetRequest) : this() {
            this.actionsToAdd = x.actionsToAdd
            this.actionsToRemove = x.actionsToRemove
            this.approximateDollarLimit = x.approximateDollarLimit
            this.budgetId = x.budgetId
            this.clientToken = x.clientToken
            this.description = x.description
            this.displayName = x.displayName
            this.farmId = x.farmId
            this.schedule = x.schedule
            this.status = x.status
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy