
commonMain.aws.sdk.kotlin.services.applicationsignals.model.CreateServiceLevelObjectiveRequest.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 CreateServiceLevelObjectiveRequest private constructor(builder: Builder) {
/**
* Use this array to create *burn rates* for this SLO. Each burn rate is a metric that indicates how fast the service is consuming the error budget, relative to the attainment goal of the SLO.
*/
public val burnRateConfigurations: List? = builder.burnRateConfigurations
/**
* An optional description for this SLO.
*/
public val description: kotlin.String? = builder.description
/**
* This structure contains the attributes that determine the goal of the SLO.
*/
public val goal: aws.sdk.kotlin.services.applicationsignals.model.Goal? = builder.goal
/**
* A name for this SLO.
*/
public val name: kotlin.String? = builder.name
/**
* If this SLO is a request-based SLO, this structure defines the information about what performance metric this SLO will monitor.
*
* You can't specify both `RequestBasedSliConfig` and `SliConfig` in the same operation.
*/
public val requestBasedSliConfig: aws.sdk.kotlin.services.applicationsignals.model.RequestBasedServiceLevelIndicatorConfig? = builder.requestBasedSliConfig
/**
* If this SLO is a period-based SLO, this structure defines the information about what performance metric this SLO will monitor.
*
* You can't specify both `RequestBasedSliConfig` and `SliConfig` in the same operation.
*/
public val sliConfig: aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorConfig? = builder.sliConfig
/**
* A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the `cloudwatch:TagResource` permission.
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.applicationsignals.model.CreateServiceLevelObjectiveRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateServiceLevelObjectiveRequest(")
append("burnRateConfigurations=$burnRateConfigurations,")
append("description=$description,")
append("goal=$goal,")
append("name=$name,")
append("requestBasedSliConfig=$requestBasedSliConfig,")
append("sliConfig=$sliConfig,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = burnRateConfigurations?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (goal?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (requestBasedSliConfig?.hashCode() ?: 0)
result = 31 * result + (sliConfig?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateServiceLevelObjectiveRequest
if (burnRateConfigurations != other.burnRateConfigurations) return false
if (description != other.description) return false
if (goal != other.goal) return false
if (name != other.name) return false
if (requestBasedSliConfig != other.requestBasedSliConfig) return false
if (sliConfig != other.sliConfig) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.applicationsignals.model.CreateServiceLevelObjectiveRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Use this array to create *burn rates* for this SLO. Each burn rate is a metric that indicates how fast the service is consuming the error budget, relative to the attainment goal of the SLO.
*/
public var burnRateConfigurations: List? = null
/**
* An optional description for this SLO.
*/
public var description: kotlin.String? = null
/**
* This structure contains the attributes that determine the goal of the SLO.
*/
public var goal: aws.sdk.kotlin.services.applicationsignals.model.Goal? = null
/**
* A name for this SLO.
*/
public var name: kotlin.String? = null
/**
* If this SLO is a request-based SLO, this structure defines the information about what performance metric this SLO will monitor.
*
* You can't specify both `RequestBasedSliConfig` and `SliConfig` in the same operation.
*/
public var requestBasedSliConfig: aws.sdk.kotlin.services.applicationsignals.model.RequestBasedServiceLevelIndicatorConfig? = null
/**
* If this SLO is a period-based SLO, this structure defines the information about what performance metric this SLO will monitor.
*
* You can't specify both `RequestBasedSliConfig` and `SliConfig` in the same operation.
*/
public var sliConfig: aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorConfig? = null
/**
* A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the `cloudwatch:TagResource` permission.
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.applicationsignals.model.CreateServiceLevelObjectiveRequest) : this() {
this.burnRateConfigurations = x.burnRateConfigurations
this.description = x.description
this.goal = x.goal
this.name = x.name
this.requestBasedSliConfig = x.requestBasedSliConfig
this.sliConfig = x.sliConfig
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.applicationsignals.model.CreateServiceLevelObjectiveRequest = CreateServiceLevelObjectiveRequest(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.RequestBasedServiceLevelIndicatorConfig] inside the given [block]
*/
public fun requestBasedSliConfig(block: aws.sdk.kotlin.services.applicationsignals.model.RequestBasedServiceLevelIndicatorConfig.Builder.() -> kotlin.Unit) {
this.requestBasedSliConfig = aws.sdk.kotlin.services.applicationsignals.model.RequestBasedServiceLevelIndicatorConfig.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