
commonMain.aws.sdk.kotlin.services.applicationsignals.model.UpdateServiceLevelObjectiveRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.applicationsignals.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateServiceLevelObjectiveRequest private constructor(builder: Builder) {
/**
* An optional description for the SLO.
*/
public val description: kotlin.String? = builder.description
/**
* A structure that contains the attributes that determine the goal of the SLO. This includes the time period for evaluation and the attainment threshold.
*/
public val goal: aws.sdk.kotlin.services.applicationsignals.model.Goal? = builder.goal
/**
* The Amazon Resource Name (ARN) or name of the service level objective that you want to update.
*/
public val id: kotlin.String? = builder.id
/**
* A structure that contains information about what performance metric this SLO will monitor.
*/
public val sliConfig: aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorConfig? = builder.sliConfig
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.applicationsignals.model.UpdateServiceLevelObjectiveRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateServiceLevelObjectiveRequest(")
append("description=$description,")
append("goal=$goal,")
append("id=$id,")
append("sliConfig=$sliConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (goal?.hashCode() ?: 0)
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (sliConfig?.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 UpdateServiceLevelObjectiveRequest
if (description != other.description) return false
if (goal != other.goal) return false
if (id != other.id) return false
if (sliConfig != other.sliConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.applicationsignals.model.UpdateServiceLevelObjectiveRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An optional description for the SLO.
*/
public var description: kotlin.String? = null
/**
* A structure that contains the attributes that determine the goal of the SLO. This includes the time period for evaluation and the attainment threshold.
*/
public var goal: aws.sdk.kotlin.services.applicationsignals.model.Goal? = null
/**
* The Amazon Resource Name (ARN) or name of the service level objective that you want to update.
*/
public var id: kotlin.String? = null
/**
* A structure that contains information about what performance metric this SLO will monitor.
*/
public var sliConfig: aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.applicationsignals.model.UpdateServiceLevelObjectiveRequest) : this() {
this.description = x.description
this.goal = x.goal
this.id = x.id
this.sliConfig = x.sliConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.applicationsignals.model.UpdateServiceLevelObjectiveRequest = UpdateServiceLevelObjectiveRequest(this)
/**
* construct an [aws.sdk.kotlin.services.applicationsignals.model.Goal] inside the given [block]
*/
public fun goal(block: aws.sdk.kotlin.services.applicationsignals.model.Goal.Builder.() -> kotlin.Unit) {
this.goal = aws.sdk.kotlin.services.applicationsignals.model.Goal.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorConfig] inside the given [block]
*/
public fun sliConfig(block: aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorConfig.Builder.() -> kotlin.Unit) {
this.sliConfig = aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy