commonMain.aws.sdk.kotlin.services.computeoptimizer.model.RdsdbRecommendation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of computeoptimizer-jvm Show documentation
Show all versions of computeoptimizer-jvm Show documentation
The AWS SDK for Kotlin client for Compute Optimizer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.computeoptimizer.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Describes an Amazon RDS recommendation.
*/
public class RdsdbRecommendation private constructor(builder: Builder) {
/**
* The Amazon Web Services account ID of the Amazon RDS.
*/
public val accountId: kotlin.String? = builder.accountId
/**
* The DB instance class of the current RDS instance.
*/
public val currentDbInstanceClass: kotlin.String? = builder.currentDbInstanceClass
/**
* The configuration of the current RDS storage.
*/
public val currentStorageConfiguration: aws.sdk.kotlin.services.computeoptimizer.model.DbStorageConfiguration? = builder.currentStorageConfiguration
/**
* Describes the effective recommendation preferences for Amazon RDS.
*/
public val effectiveRecommendationPreferences: aws.sdk.kotlin.services.computeoptimizer.model.RdsEffectiveRecommendationPreferences? = builder.effectiveRecommendationPreferences
/**
* The engine of the RDS instance.
*/
public val engine: kotlin.String? = builder.engine
/**
* The database engine version.
*/
public val engineVersion: kotlin.String? = builder.engineVersion
/**
* This indicates if the RDS instance is idle or not.
*/
public val idle: aws.sdk.kotlin.services.computeoptimizer.model.Idle? = builder.idle
/**
* The finding classification of an Amazon RDS instance.
*
* Findings for Amazon RDS instance include:
* + **`Underprovisioned`** — When Compute Optimizer detects that there’s not enough resource specifications, an Amazon RDS is considered under-provisioned.
* + **`Overprovisioned`** — When Compute Optimizer detects that there’s excessive resource specifications, an Amazon RDS is considered over-provisioned.
* + **`Optimized`** — When the specifications of your Amazon RDS instance meet the performance requirements of your workload, the service is considered optimized.
*/
public val instanceFinding: aws.sdk.kotlin.services.computeoptimizer.model.RdsInstanceFinding? = builder.instanceFinding
/**
* The reason for the finding classification of an Amazon RDS instance.
*/
public val instanceFindingReasonCodes: List? = builder.instanceFindingReasonCodes
/**
* An array of objects that describe the recommendation options for the Amazon RDS instance.
*/
public val instanceRecommendationOptions: List? = builder.instanceRecommendationOptions
/**
* The timestamp of when the Amazon RDS recommendation was last generated.
*/
public val lastRefreshTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.lastRefreshTimestamp
/**
* The number of days the Amazon RDS utilization metrics were analyzed.
*/
public val lookbackPeriodInDays: kotlin.Double = builder.lookbackPeriodInDays
/**
* The ARN of the current Amazon RDS.
*
* The following is the format of the ARN:
*
* `arn:aws:rds:{region}:{accountId}:db:{resourceName}`
*/
public val resourceArn: kotlin.String? = builder.resourceArn
/**
* The finding classification of Amazon RDS storage.
*
* Findings for Amazon RDS instance include:
* + **`Underprovisioned`** — When Compute Optimizer detects that there’s not enough storage, an Amazon RDS is considered under-provisioned.
* + **`Overprovisioned`** — When Compute Optimizer detects that there’s excessive storage, an Amazon RDS is considered over-provisioned.
* + **`Optimized`** — When the storage of your Amazon RDS meet the performance requirements of your workload, the service is considered optimized.
*/
public val storageFinding: aws.sdk.kotlin.services.computeoptimizer.model.RdsStorageFinding? = builder.storageFinding
/**
* The reason for the finding classification of Amazon RDS storage.
*/
public val storageFindingReasonCodes: List? = builder.storageFindingReasonCodes
/**
* An array of objects that describe the recommendation options for Amazon RDS storage.
*/
public val storageRecommendationOptions: List? = builder.storageRecommendationOptions
/**
* A list of tags assigned to your Amazon RDS recommendations.
*/
public val tags: List? = builder.tags
/**
* An array of objects that describe the utilization metrics of the Amazon RDS.
*/
public val utilizationMetrics: List? = builder.utilizationMetrics
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.RdsdbRecommendation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RdsdbRecommendation(")
append("accountId=$accountId,")
append("currentDbInstanceClass=$currentDbInstanceClass,")
append("currentStorageConfiguration=$currentStorageConfiguration,")
append("effectiveRecommendationPreferences=$effectiveRecommendationPreferences,")
append("engine=$engine,")
append("engineVersion=$engineVersion,")
append("idle=$idle,")
append("instanceFinding=$instanceFinding,")
append("instanceFindingReasonCodes=$instanceFindingReasonCodes,")
append("instanceRecommendationOptions=$instanceRecommendationOptions,")
append("lastRefreshTimestamp=$lastRefreshTimestamp,")
append("lookbackPeriodInDays=$lookbackPeriodInDays,")
append("resourceArn=$resourceArn,")
append("storageFinding=$storageFinding,")
append("storageFindingReasonCodes=$storageFindingReasonCodes,")
append("storageRecommendationOptions=$storageRecommendationOptions,")
append("tags=$tags,")
append("utilizationMetrics=$utilizationMetrics")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accountId?.hashCode() ?: 0
result = 31 * result + (currentDbInstanceClass?.hashCode() ?: 0)
result = 31 * result + (currentStorageConfiguration?.hashCode() ?: 0)
result = 31 * result + (effectiveRecommendationPreferences?.hashCode() ?: 0)
result = 31 * result + (engine?.hashCode() ?: 0)
result = 31 * result + (engineVersion?.hashCode() ?: 0)
result = 31 * result + (idle?.hashCode() ?: 0)
result = 31 * result + (instanceFinding?.hashCode() ?: 0)
result = 31 * result + (instanceFindingReasonCodes?.hashCode() ?: 0)
result = 31 * result + (instanceRecommendationOptions?.hashCode() ?: 0)
result = 31 * result + (lastRefreshTimestamp?.hashCode() ?: 0)
result = 31 * result + (lookbackPeriodInDays.hashCode())
result = 31 * result + (resourceArn?.hashCode() ?: 0)
result = 31 * result + (storageFinding?.hashCode() ?: 0)
result = 31 * result + (storageFindingReasonCodes?.hashCode() ?: 0)
result = 31 * result + (storageRecommendationOptions?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (utilizationMetrics?.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 RdsdbRecommendation
if (accountId != other.accountId) return false
if (currentDbInstanceClass != other.currentDbInstanceClass) return false
if (currentStorageConfiguration != other.currentStorageConfiguration) return false
if (effectiveRecommendationPreferences != other.effectiveRecommendationPreferences) return false
if (engine != other.engine) return false
if (engineVersion != other.engineVersion) return false
if (idle != other.idle) return false
if (instanceFinding != other.instanceFinding) return false
if (instanceFindingReasonCodes != other.instanceFindingReasonCodes) return false
if (instanceRecommendationOptions != other.instanceRecommendationOptions) return false
if (lastRefreshTimestamp != other.lastRefreshTimestamp) return false
if (!(lookbackPeriodInDays?.equals(other.lookbackPeriodInDays) ?: (other.lookbackPeriodInDays == null))) return false
if (resourceArn != other.resourceArn) return false
if (storageFinding != other.storageFinding) return false
if (storageFindingReasonCodes != other.storageFindingReasonCodes) return false
if (storageRecommendationOptions != other.storageRecommendationOptions) return false
if (tags != other.tags) return false
if (utilizationMetrics != other.utilizationMetrics) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.RdsdbRecommendation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Web Services account ID of the Amazon RDS.
*/
public var accountId: kotlin.String? = null
/**
* The DB instance class of the current RDS instance.
*/
public var currentDbInstanceClass: kotlin.String? = null
/**
* The configuration of the current RDS storage.
*/
public var currentStorageConfiguration: aws.sdk.kotlin.services.computeoptimizer.model.DbStorageConfiguration? = null
/**
* Describes the effective recommendation preferences for Amazon RDS.
*/
public var effectiveRecommendationPreferences: aws.sdk.kotlin.services.computeoptimizer.model.RdsEffectiveRecommendationPreferences? = null
/**
* The engine of the RDS instance.
*/
public var engine: kotlin.String? = null
/**
* The database engine version.
*/
public var engineVersion: kotlin.String? = null
/**
* This indicates if the RDS instance is idle or not.
*/
public var idle: aws.sdk.kotlin.services.computeoptimizer.model.Idle? = null
/**
* The finding classification of an Amazon RDS instance.
*
* Findings for Amazon RDS instance include:
* + **`Underprovisioned`** — When Compute Optimizer detects that there’s not enough resource specifications, an Amazon RDS is considered under-provisioned.
* + **`Overprovisioned`** — When Compute Optimizer detects that there’s excessive resource specifications, an Amazon RDS is considered over-provisioned.
* + **`Optimized`** — When the specifications of your Amazon RDS instance meet the performance requirements of your workload, the service is considered optimized.
*/
public var instanceFinding: aws.sdk.kotlin.services.computeoptimizer.model.RdsInstanceFinding? = null
/**
* The reason for the finding classification of an Amazon RDS instance.
*/
public var instanceFindingReasonCodes: List? = null
/**
* An array of objects that describe the recommendation options for the Amazon RDS instance.
*/
public var instanceRecommendationOptions: List? = null
/**
* The timestamp of when the Amazon RDS recommendation was last generated.
*/
public var lastRefreshTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The number of days the Amazon RDS utilization metrics were analyzed.
*/
public var lookbackPeriodInDays: kotlin.Double = 0.0
/**
* The ARN of the current Amazon RDS.
*
* The following is the format of the ARN:
*
* `arn:aws:rds:{region}:{accountId}:db:{resourceName}`
*/
public var resourceArn: kotlin.String? = null
/**
* The finding classification of Amazon RDS storage.
*
* Findings for Amazon RDS instance include:
* + **`Underprovisioned`** — When Compute Optimizer detects that there’s not enough storage, an Amazon RDS is considered under-provisioned.
* + **`Overprovisioned`** — When Compute Optimizer detects that there’s excessive storage, an Amazon RDS is considered over-provisioned.
* + **`Optimized`** — When the storage of your Amazon RDS meet the performance requirements of your workload, the service is considered optimized.
*/
public var storageFinding: aws.sdk.kotlin.services.computeoptimizer.model.RdsStorageFinding? = null
/**
* The reason for the finding classification of Amazon RDS storage.
*/
public var storageFindingReasonCodes: List? = null
/**
* An array of objects that describe the recommendation options for Amazon RDS storage.
*/
public var storageRecommendationOptions: List? = null
/**
* A list of tags assigned to your Amazon RDS recommendations.
*/
public var tags: List? = null
/**
* An array of objects that describe the utilization metrics of the Amazon RDS.
*/
public var utilizationMetrics: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.RdsdbRecommendation) : this() {
this.accountId = x.accountId
this.currentDbInstanceClass = x.currentDbInstanceClass
this.currentStorageConfiguration = x.currentStorageConfiguration
this.effectiveRecommendationPreferences = x.effectiveRecommendationPreferences
this.engine = x.engine
this.engineVersion = x.engineVersion
this.idle = x.idle
this.instanceFinding = x.instanceFinding
this.instanceFindingReasonCodes = x.instanceFindingReasonCodes
this.instanceRecommendationOptions = x.instanceRecommendationOptions
this.lastRefreshTimestamp = x.lastRefreshTimestamp
this.lookbackPeriodInDays = x.lookbackPeriodInDays
this.resourceArn = x.resourceArn
this.storageFinding = x.storageFinding
this.storageFindingReasonCodes = x.storageFindingReasonCodes
this.storageRecommendationOptions = x.storageRecommendationOptions
this.tags = x.tags
this.utilizationMetrics = x.utilizationMetrics
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.RdsdbRecommendation = RdsdbRecommendation(this)
/**
* construct an [aws.sdk.kotlin.services.computeoptimizer.model.DbStorageConfiguration] inside the given [block]
*/
public fun currentStorageConfiguration(block: aws.sdk.kotlin.services.computeoptimizer.model.DbStorageConfiguration.Builder.() -> kotlin.Unit) {
this.currentStorageConfiguration = aws.sdk.kotlin.services.computeoptimizer.model.DbStorageConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.computeoptimizer.model.RdsEffectiveRecommendationPreferences] inside the given [block]
*/
public fun effectiveRecommendationPreferences(block: aws.sdk.kotlin.services.computeoptimizer.model.RdsEffectiveRecommendationPreferences.Builder.() -> kotlin.Unit) {
this.effectiveRecommendationPreferences = aws.sdk.kotlin.services.computeoptimizer.model.RdsEffectiveRecommendationPreferences.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}