commonMain.aws.sdk.kotlin.services.devopsguru.model.GetCostEstimationResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of devopsguru-jvm Show documentation
Show all versions of devopsguru-jvm Show documentation
The AWS SDK for Kotlin client for DevOps Guru
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.devopsguru.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetCostEstimationResponse private constructor(builder: Builder) {
/**
* An array of `ResourceCost` objects that each contains details about the monthly cost estimate to analyze one of your Amazon Web Services resources.
*/
public val costs: List? = builder.costs
/**
* The pagination token to use to retrieve the next page of results for this operation. If there are no more pages, this value is null.
*/
public val nextToken: kotlin.String? = builder.nextToken
/**
* The collection of the Amazon Web Services resources used to create your monthly DevOps Guru cost estimate.
*/
public val resourceCollection: aws.sdk.kotlin.services.devopsguru.model.CostEstimationResourceCollectionFilter? = builder.resourceCollection
/**
* The status of creating this cost estimate. If it's still in progress, the status `ONGOING` is returned. If it is finished, the status `COMPLETED` is returned.
*/
public val status: aws.sdk.kotlin.services.devopsguru.model.CostEstimationStatus? = builder.status
/**
* The start and end time of the cost estimation.
*/
public val timeRange: aws.sdk.kotlin.services.devopsguru.model.CostEstimationTimeRange? = builder.timeRange
/**
* The estimated monthly cost to analyze the Amazon Web Services resources. This value is the sum of the estimated costs to analyze each resource in the `Costs` object in this response.
*/
public val totalCost: kotlin.Double = builder.totalCost
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.devopsguru.model.GetCostEstimationResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetCostEstimationResponse(")
append("costs=$costs,")
append("nextToken=$nextToken,")
append("resourceCollection=$resourceCollection,")
append("status=$status,")
append("timeRange=$timeRange,")
append("totalCost=$totalCost")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = costs?.hashCode() ?: 0
result = 31 * result + (nextToken?.hashCode() ?: 0)
result = 31 * result + (resourceCollection?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (timeRange?.hashCode() ?: 0)
result = 31 * result + (totalCost.hashCode())
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 GetCostEstimationResponse
if (costs != other.costs) return false
if (nextToken != other.nextToken) return false
if (resourceCollection != other.resourceCollection) return false
if (status != other.status) return false
if (timeRange != other.timeRange) return false
if (!(totalCost?.equals(other.totalCost) ?: (other.totalCost == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.devopsguru.model.GetCostEstimationResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of `ResourceCost` objects that each contains details about the monthly cost estimate to analyze one of your Amazon Web Services resources.
*/
public var costs: List? = null
/**
* The pagination token to use to retrieve the next page of results for this operation. If there are no more pages, this value is null.
*/
public var nextToken: kotlin.String? = null
/**
* The collection of the Amazon Web Services resources used to create your monthly DevOps Guru cost estimate.
*/
public var resourceCollection: aws.sdk.kotlin.services.devopsguru.model.CostEstimationResourceCollectionFilter? = null
/**
* The status of creating this cost estimate. If it's still in progress, the status `ONGOING` is returned. If it is finished, the status `COMPLETED` is returned.
*/
public var status: aws.sdk.kotlin.services.devopsguru.model.CostEstimationStatus? = null
/**
* The start and end time of the cost estimation.
*/
public var timeRange: aws.sdk.kotlin.services.devopsguru.model.CostEstimationTimeRange? = null
/**
* The estimated monthly cost to analyze the Amazon Web Services resources. This value is the sum of the estimated costs to analyze each resource in the `Costs` object in this response.
*/
public var totalCost: kotlin.Double = 0.0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.devopsguru.model.GetCostEstimationResponse) : this() {
this.costs = x.costs
this.nextToken = x.nextToken
this.resourceCollection = x.resourceCollection
this.status = x.status
this.timeRange = x.timeRange
this.totalCost = x.totalCost
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.devopsguru.model.GetCostEstimationResponse = GetCostEstimationResponse(this)
/**
* construct an [aws.sdk.kotlin.services.devopsguru.model.CostEstimationResourceCollectionFilter] inside the given [block]
*/
public fun resourceCollection(block: aws.sdk.kotlin.services.devopsguru.model.CostEstimationResourceCollectionFilter.Builder.() -> kotlin.Unit) {
this.resourceCollection = aws.sdk.kotlin.services.devopsguru.model.CostEstimationResourceCollectionFilter.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.devopsguru.model.CostEstimationTimeRange] inside the given [block]
*/
public fun timeRange(block: aws.sdk.kotlin.services.devopsguru.model.CostEstimationTimeRange.Builder.() -> kotlin.Unit) {
this.timeRange = aws.sdk.kotlin.services.devopsguru.model.CostEstimationTimeRange.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}