commonMain.aws.sdk.kotlin.services.computeoptimizer.model.UpdateEnrollmentStatusRequest.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 UpdateEnrollmentStatusRequest private constructor(builder: Builder) {
/**
* Indicates whether to enroll member accounts of the organization if the account is the management account of an organization.
*/
public val includeMemberAccounts: kotlin.Boolean? = builder.includeMemberAccounts
/**
* The new enrollment status of the account.
*
* The following status options are available:
* + `Active` - Opts in your account to the Compute Optimizer service. Compute Optimizer begins analyzing the configuration and utilization metrics of your Amazon Web Services resources after you opt in. For more information, see [Metrics analyzed by Compute Optimizer](https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html) in the *Compute Optimizer User Guide*.
* + `Inactive` - Opts out your account from the Compute Optimizer service. Your account's recommendations and related metrics data will be deleted from Compute Optimizer after you opt out.
*
* The `Pending` and `Failed` options cannot be used to update the enrollment status of an account. They are returned in the response of a request to update the enrollment status of an account.
*/
public val status: aws.sdk.kotlin.services.computeoptimizer.model.Status? = builder.status
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.UpdateEnrollmentStatusRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateEnrollmentStatusRequest(")
append("includeMemberAccounts=$includeMemberAccounts,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = includeMemberAccounts?.hashCode() ?: 0
result = 31 * result + (status?.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 UpdateEnrollmentStatusRequest
if (includeMemberAccounts != other.includeMemberAccounts) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.UpdateEnrollmentStatusRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Indicates whether to enroll member accounts of the organization if the account is the management account of an organization.
*/
public var includeMemberAccounts: kotlin.Boolean? = null
/**
* The new enrollment status of the account.
*
* The following status options are available:
* + `Active` - Opts in your account to the Compute Optimizer service. Compute Optimizer begins analyzing the configuration and utilization metrics of your Amazon Web Services resources after you opt in. For more information, see [Metrics analyzed by Compute Optimizer](https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html) in the *Compute Optimizer User Guide*.
* + `Inactive` - Opts out your account from the Compute Optimizer service. Your account's recommendations and related metrics data will be deleted from Compute Optimizer after you opt out.
*
* The `Pending` and `Failed` options cannot be used to update the enrollment status of an account. They are returned in the response of a request to update the enrollment status of an account.
*/
public var status: aws.sdk.kotlin.services.computeoptimizer.model.Status? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.UpdateEnrollmentStatusRequest) : this() {
this.includeMemberAccounts = x.includeMemberAccounts
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.UpdateEnrollmentStatusRequest = UpdateEnrollmentStatusRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}