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

commonMain.aws.sdk.kotlin.services.budgets.model.CreateBudgetActionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.budgets.model



public class CreateBudgetActionRequest private constructor(builder: Builder) {
    /**
     * The account ID of the user. It's a 12-digit number.
     */
    public val accountId: kotlin.String? = builder.accountId
    /**
     * The trigger threshold of the action.
     */
    public val actionThreshold: aws.sdk.kotlin.services.budgets.model.ActionThreshold? = builder.actionThreshold
    /**
     * The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.
     */
    public val actionType: aws.sdk.kotlin.services.budgets.model.ActionType? = builder.actionType
    /**
     * This specifies if the action needs manual or automatic approval.
     */
    public val approvalModel: aws.sdk.kotlin.services.budgets.model.ApprovalModel? = builder.approvalModel
    /**
     * A string that represents the budget name. The ":" and "\" characters aren't allowed.
     */
    public val budgetName: kotlin.String? = builder.budgetName
    /**
     * Specifies all of the type-specific parameters.
     */
    public val definition: aws.sdk.kotlin.services.budgets.model.Definition? = builder.definition
    /**
     * The role passed for action execution and reversion. Roles and actions must be in the same account.
     */
    public val executionRoleArn: kotlin.String? = builder.executionRoleArn
    /**
     * The type of a notification. It must be ACTUAL or FORECASTED.
     */
    public val notificationType: aws.sdk.kotlin.services.budgets.model.NotificationType? = builder.notificationType
    /**
     * A list of subscribers.
     */
    public val subscribers: List? = builder.subscribers

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

    override fun toString(): kotlin.String = buildString {
        append("CreateBudgetActionRequest(")
        append("accountId=$accountId,")
        append("actionThreshold=$actionThreshold,")
        append("actionType=$actionType,")
        append("approvalModel=$approvalModel,")
        append("budgetName=$budgetName,")
        append("definition=$definition,")
        append("executionRoleArn=$executionRoleArn,")
        append("notificationType=$notificationType,")
        append("subscribers=$subscribers)")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountId?.hashCode() ?: 0
        result = 31 * result + (actionThreshold?.hashCode() ?: 0)
        result = 31 * result + (actionType?.hashCode() ?: 0)
        result = 31 * result + (approvalModel?.hashCode() ?: 0)
        result = 31 * result + (budgetName?.hashCode() ?: 0)
        result = 31 * result + (definition?.hashCode() ?: 0)
        result = 31 * result + (executionRoleArn?.hashCode() ?: 0)
        result = 31 * result + (notificationType?.hashCode() ?: 0)
        result = 31 * result + (subscribers?.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 CreateBudgetActionRequest

        if (accountId != other.accountId) return false
        if (actionThreshold != other.actionThreshold) return false
        if (actionType != other.actionType) return false
        if (approvalModel != other.approvalModel) return false
        if (budgetName != other.budgetName) return false
        if (definition != other.definition) return false
        if (executionRoleArn != other.executionRoleArn) return false
        if (notificationType != other.notificationType) return false
        if (subscribers != other.subscribers) return false

        return true
    }

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

    public class Builder {
        /**
         * The account ID of the user. It's a 12-digit number.
         */
        public var accountId: kotlin.String? = null
        /**
         * The trigger threshold of the action.
         */
        public var actionThreshold: aws.sdk.kotlin.services.budgets.model.ActionThreshold? = null
        /**
         * The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.
         */
        public var actionType: aws.sdk.kotlin.services.budgets.model.ActionType? = null
        /**
         * This specifies if the action needs manual or automatic approval.
         */
        public var approvalModel: aws.sdk.kotlin.services.budgets.model.ApprovalModel? = null
        /**
         * A string that represents the budget name. The ":" and "\" characters aren't allowed.
         */
        public var budgetName: kotlin.String? = null
        /**
         * Specifies all of the type-specific parameters.
         */
        public var definition: aws.sdk.kotlin.services.budgets.model.Definition? = null
        /**
         * The role passed for action execution and reversion. Roles and actions must be in the same account.
         */
        public var executionRoleArn: kotlin.String? = null
        /**
         * The type of a notification. It must be ACTUAL or FORECASTED.
         */
        public var notificationType: aws.sdk.kotlin.services.budgets.model.NotificationType? = null
        /**
         * A list of subscribers.
         */
        public var subscribers: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.budgets.model.CreateBudgetActionRequest) : this() {
            this.accountId = x.accountId
            this.actionThreshold = x.actionThreshold
            this.actionType = x.actionType
            this.approvalModel = x.approvalModel
            this.budgetName = x.budgetName
            this.definition = x.definition
            this.executionRoleArn = x.executionRoleArn
            this.notificationType = x.notificationType
            this.subscribers = x.subscribers
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.budgets.model.ActionThreshold] inside the given [block]
         */
        public fun actionThreshold(block: aws.sdk.kotlin.services.budgets.model.ActionThreshold.Builder.() -> kotlin.Unit) {
            this.actionThreshold = aws.sdk.kotlin.services.budgets.model.ActionThreshold.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.budgets.model.Definition] inside the given [block]
         */
        public fun definition(block: aws.sdk.kotlin.services.budgets.model.Definition.Builder.() -> kotlin.Unit) {
            this.definition = aws.sdk.kotlin.services.budgets.model.Definition.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy