commonMain.aws.sdk.kotlin.services.computeoptimizer.model.DeleteRecommendationPreferencesRequest.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
public class DeleteRecommendationPreferencesRequest private constructor(builder: Builder) {
/**
* The name of the recommendation preference to delete.
*/
public val recommendationPreferenceNames: List? = builder.recommendationPreferenceNames
/**
* The target resource type of the recommendation preference to delete.
*
* The `Ec2Instance` option encompasses standalone instances and instances that are part of Auto Scaling groups. The `AutoScalingGroup` option encompasses only instances that are part of an Auto Scaling group.
*/
public val resourceType: aws.sdk.kotlin.services.computeoptimizer.model.ResourceType? = builder.resourceType
/**
* An object that describes the scope of the recommendation preference to delete.
*
* You can delete recommendation preferences that are created at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see [Activating enhanced infrastructure metrics](https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) in the *Compute Optimizer User Guide*.
*/
public val scope: aws.sdk.kotlin.services.computeoptimizer.model.Scope? = builder.scope
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.DeleteRecommendationPreferencesRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeleteRecommendationPreferencesRequest(")
append("recommendationPreferenceNames=$recommendationPreferenceNames,")
append("resourceType=$resourceType,")
append("scope=$scope")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = recommendationPreferenceNames?.hashCode() ?: 0
result = 31 * result + (resourceType?.hashCode() ?: 0)
result = 31 * result + (scope?.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 DeleteRecommendationPreferencesRequest
if (recommendationPreferenceNames != other.recommendationPreferenceNames) return false
if (resourceType != other.resourceType) return false
if (scope != other.scope) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.DeleteRecommendationPreferencesRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the recommendation preference to delete.
*/
public var recommendationPreferenceNames: List? = null
/**
* The target resource type of the recommendation preference to delete.
*
* The `Ec2Instance` option encompasses standalone instances and instances that are part of Auto Scaling groups. The `AutoScalingGroup` option encompasses only instances that are part of an Auto Scaling group.
*/
public var resourceType: aws.sdk.kotlin.services.computeoptimizer.model.ResourceType? = null
/**
* An object that describes the scope of the recommendation preference to delete.
*
* You can delete recommendation preferences that are created at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see [Activating enhanced infrastructure metrics](https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) in the *Compute Optimizer User Guide*.
*/
public var scope: aws.sdk.kotlin.services.computeoptimizer.model.Scope? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.DeleteRecommendationPreferencesRequest) : this() {
this.recommendationPreferenceNames = x.recommendationPreferenceNames
this.resourceType = x.resourceType
this.scope = x.scope
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.DeleteRecommendationPreferencesRequest = DeleteRecommendationPreferencesRequest(this)
/**
* construct an [aws.sdk.kotlin.services.computeoptimizer.model.Scope] inside the given [block]
*/
public fun scope(block: aws.sdk.kotlin.services.computeoptimizer.model.Scope.Builder.() -> kotlin.Unit) {
this.scope = aws.sdk.kotlin.services.computeoptimizer.model.Scope.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}