
commonMain.aws.sdk.kotlin.services.lightsail.model.ResourceBudgetEstimate.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
/**
* Describes the estimated cost or usage that a budget tracks.
*/
public class ResourceBudgetEstimate private constructor(builder: Builder) {
/**
* The cost estimate for the specified budget.
*/
public val costEstimates: List? = builder.costEstimates
/**
* The estimate end time.
*/
public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
/**
* The resource name.
*/
public val resourceName: kotlin.String? = builder.resourceName
/**
* The type of resource the budget will track.
*/
public val resourceType: aws.sdk.kotlin.services.lightsail.model.ResourceType? = builder.resourceType
/**
* The estimate start time.
*/
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.ResourceBudgetEstimate = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResourceBudgetEstimate(")
append("costEstimates=$costEstimates,")
append("endTime=$endTime,")
append("resourceName=$resourceName,")
append("resourceType=$resourceType,")
append("startTime=$startTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = costEstimates?.hashCode() ?: 0
result = 31 * result + (endTime?.hashCode() ?: 0)
result = 31 * result + (resourceName?.hashCode() ?: 0)
result = 31 * result + (resourceType?.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 ResourceBudgetEstimate
if (costEstimates != other.costEstimates) return false
if (endTime != other.endTime) return false
if (resourceName != other.resourceName) return false
if (resourceType != other.resourceType) return false
if (startTime != other.startTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.ResourceBudgetEstimate = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The cost estimate for the specified budget.
*/
public var costEstimates: List? = null
/**
* The estimate end time.
*/
public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The resource name.
*/
public var resourceName: kotlin.String? = null
/**
* The type of resource the budget will track.
*/
public var resourceType: aws.sdk.kotlin.services.lightsail.model.ResourceType? = null
/**
* The estimate start time.
*/
public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.ResourceBudgetEstimate) : this() {
this.costEstimates = x.costEstimates
this.endTime = x.endTime
this.resourceName = x.resourceName
this.resourceType = x.resourceType
this.startTime = x.startTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.ResourceBudgetEstimate = ResourceBudgetEstimate(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy