commonMain.aws.sdk.kotlin.services.deadline.model.GetBudgetResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
public class GetBudgetResponse private constructor(builder: Builder) {
/**
* The budget actions for the budget.
*/
public val actions: List = requireNotNull(builder.actions) { "A non-null value must be provided for actions" }
/**
* The consumed usage limit for the budget.
*/
public val approximateDollarLimit: kotlin.Float = requireNotNull(builder.approximateDollarLimit) { "A non-null value must be provided for approximateDollarLimit" }
/**
* The budget ID.
*/
public val budgetId: kotlin.String = requireNotNull(builder.budgetId) { "A non-null value must be provided for budgetId" }
/**
* The date and time the resource was created.
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
/**
* The user or system that created this resource.
*/
public val createdBy: kotlin.String = requireNotNull(builder.createdBy) { "A non-null value must be provided for createdBy" }
/**
* The description of the budget.
*
* 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.
*
* 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 = requireNotNull(builder.displayName) { "A non-null value must be provided for displayName" }
/**
* The date and time the queue stopped.
*/
public val queueStoppedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.queueStoppedAt
/**
* The budget schedule.
*/
public val schedule: aws.sdk.kotlin.services.deadline.model.BudgetSchedule? = builder.schedule
/**
* The status of the budget.
* + `ACTIVE`–Get a budget being evaluated.
* + `INACTIVE`–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*/
public val status: aws.sdk.kotlin.services.deadline.model.BudgetStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
/**
* The date and time the resource was updated.
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt
/**
* The user or system that updated this resource.
*/
public val updatedBy: kotlin.String? = builder.updatedBy
/**
* The resource that the budget is tracking usage for.
*/
public val usageTrackingResource: aws.sdk.kotlin.services.deadline.model.UsageTrackingResource? = builder.usageTrackingResource
/**
* The usages of the budget.
*/
public val usages: aws.sdk.kotlin.services.deadline.model.ConsumedUsages? = builder.usages
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.GetBudgetResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetBudgetResponse(")
append("actions=$actions,")
append("approximateDollarLimit=$approximateDollarLimit,")
append("budgetId=$budgetId,")
append("createdAt=$createdAt,")
append("createdBy=$createdBy,")
append("description=*** Sensitive Data Redacted ***,")
append("displayName=$displayName,")
append("queueStoppedAt=$queueStoppedAt,")
append("schedule=$schedule,")
append("status=$status,")
append("updatedAt=$updatedAt,")
append("updatedBy=$updatedBy,")
append("usageTrackingResource=$usageTrackingResource,")
append("usages=$usages")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = actions.hashCode()
result = 31 * result + (approximateDollarLimit.hashCode())
result = 31 * result + (budgetId.hashCode())
result = 31 * result + (createdAt.hashCode())
result = 31 * result + (createdBy.hashCode())
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (displayName.hashCode())
result = 31 * result + (queueStoppedAt?.hashCode() ?: 0)
result = 31 * result + (schedule?.hashCode() ?: 0)
result = 31 * result + (status.hashCode())
result = 31 * result + (updatedAt?.hashCode() ?: 0)
result = 31 * result + (updatedBy?.hashCode() ?: 0)
result = 31 * result + (usageTrackingResource?.hashCode() ?: 0)
result = 31 * result + (usages?.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 GetBudgetResponse
if (actions != other.actions) return false
if (!(approximateDollarLimit?.equals(other.approximateDollarLimit) ?: (other.approximateDollarLimit == null))) return false
if (budgetId != other.budgetId) return false
if (createdAt != other.createdAt) return false
if (createdBy != other.createdBy) return false
if (description != other.description) return false
if (displayName != other.displayName) return false
if (queueStoppedAt != other.queueStoppedAt) return false
if (schedule != other.schedule) return false
if (status != other.status) return false
if (updatedAt != other.updatedAt) return false
if (updatedBy != other.updatedBy) return false
if (usageTrackingResource != other.usageTrackingResource) return false
if (usages != other.usages) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.GetBudgetResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The budget actions for the budget.
*/
public var actions: List? = null
/**
* The consumed usage limit for the budget.
*/
public var approximateDollarLimit: kotlin.Float? = null
/**
* The budget ID.
*/
public var budgetId: kotlin.String? = null
/**
* The date and time the resource was created.
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user or system that created this resource.
*/
public var createdBy: kotlin.String? = null
/**
* The description of the budget.
*
* 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.
*
* 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 date and time the queue stopped.
*/
public var queueStoppedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The budget schedule.
*/
public var schedule: aws.sdk.kotlin.services.deadline.model.BudgetSchedule? = null
/**
* The status of the budget.
* + `ACTIVE`–Get a budget being evaluated.
* + `INACTIVE`–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*/
public var status: aws.sdk.kotlin.services.deadline.model.BudgetStatus? = null
/**
* The date and time the resource was updated.
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user or system that updated this resource.
*/
public var updatedBy: kotlin.String? = null
/**
* The resource that the budget is tracking usage for.
*/
public var usageTrackingResource: aws.sdk.kotlin.services.deadline.model.UsageTrackingResource? = null
/**
* The usages of the budget.
*/
public var usages: aws.sdk.kotlin.services.deadline.model.ConsumedUsages? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.GetBudgetResponse) : this() {
this.actions = x.actions
this.approximateDollarLimit = x.approximateDollarLimit
this.budgetId = x.budgetId
this.createdAt = x.createdAt
this.createdBy = x.createdBy
this.description = x.description
this.displayName = x.displayName
this.queueStoppedAt = x.queueStoppedAt
this.schedule = x.schedule
this.status = x.status
this.updatedAt = x.updatedAt
this.updatedBy = x.updatedBy
this.usageTrackingResource = x.usageTrackingResource
this.usages = x.usages
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.GetBudgetResponse = GetBudgetResponse(this)
/**
* construct an [aws.sdk.kotlin.services.deadline.model.ConsumedUsages] inside the given [block]
*/
public fun usages(block: aws.sdk.kotlin.services.deadline.model.ConsumedUsages.Builder.() -> kotlin.Unit) {
this.usages = aws.sdk.kotlin.services.deadline.model.ConsumedUsages.invoke(block)
}
internal fun correctErrors(): Builder {
if (actions == null) actions = emptyList()
if (approximateDollarLimit == null) approximateDollarLimit = 0f
if (budgetId == null) budgetId = ""
if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
if (createdBy == null) createdBy = ""
if (displayName == null) displayName = ""
if (status == null) status = BudgetStatus.SdkUnknown("no value provided")
return this
}
}
}