
commonMain.aws.sdk.kotlin.services.budgets.model.Action.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.budgets.model
/**
* A budget action resource.
*/
public class Action private constructor(builder: Builder) {
/**
* A system-generated universally unique identifier (UUID) for the action.
*/
public val actionId: kotlin.String? = builder.actionId
/**
* 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
/**
* Where you specify 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
/**
* The status of the action.
*/
public val status: aws.sdk.kotlin.services.budgets.model.ActionStatus? = builder.status
/**
* 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.Action = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Action(")
append("actionId=$actionId,")
append("actionThreshold=$actionThreshold,")
append("actionType=$actionType,")
append("approvalModel=$approvalModel,")
append("budgetName=$budgetName,")
append("definition=$definition,")
append("executionRoleArn=$executionRoleArn,")
append("notificationType=$notificationType,")
append("status=$status,")
append("subscribers=$subscribers)")
}
override fun hashCode(): kotlin.Int {
var result = actionId?.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 + (status?.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 Action
if (actionId != other.actionId) 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 (status != other.status) return false
if (subscribers != other.subscribers) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.budgets.model.Action = Builder(this).apply(block).build()
public class Builder {
/**
* A system-generated universally unique identifier (UUID) for the action.
*/
public var actionId: 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
/**
* Where you specify 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
/**
* The status of the action.
*/
public var status: aws.sdk.kotlin.services.budgets.model.ActionStatus? = null
/**
* A list of subscribers.
*/
public var subscribers: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.budgets.model.Action) : this() {
this.actionId = x.actionId
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.status = x.status
this.subscribers = x.subscribers
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.budgets.model.Action = Action(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