commonMain.aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorMetric.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of applicationsignals-jvm Show documentation
Show all versions of applicationsignals-jvm Show documentation
The AWS SDK for Kotlin client for Application Signals
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.applicationsignals.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* This structure contains the information about the metric that is used for the SLO.
*/
public class ServiceLevelIndicatorMetric private constructor(builder: Builder) {
/**
* This is a string-to-string map that contains information about the type of object that this SLO is related to. It can include the following fields.
* + `Type` designates the type of object that this SLO is related to.
* + `ResourceType` specifies the type of the resource. This field is used only when the value of the `Type` field is `Resource` or `AWS::Resource`.
* + `Name` specifies the name of the object. This is used only if the value of the `Type` field is `Service`, `RemoteService`, or `AWS::Service`.
* + `Identifier` identifies the resource objects of this resource. This is used only if the value of the `Type` field is `Resource` or `AWS::Resource`.
* + `Environment` specifies the location where this object is hosted, or what it belongs to.
*/
public val keyAttributes: Map? = builder.keyAttributes
/**
* If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this structure includes the information about that metric or expression.
*/
public val metricDataQueries: List = requireNotNull(builder.metricDataQueries) { "A non-null value must be provided for metricDataQueries" }
/**
* If the SLO monitors either the `LATENCY` or `AVAILABILITY` metric that Application Signals collects, this field displays which of those metrics is used.
*/
public val metricType: aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorMetricType? = builder.metricType
/**
* If the SLO monitors a specific operation of the service, this field displays that operation name.
*/
public val operationName: kotlin.String? = builder.operationName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorMetric = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceLevelIndicatorMetric(")
append("keyAttributes=$keyAttributes,")
append("metricDataQueries=$metricDataQueries,")
append("metricType=$metricType,")
append("operationName=$operationName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = keyAttributes?.hashCode() ?: 0
result = 31 * result + (metricDataQueries.hashCode())
result = 31 * result + (metricType?.hashCode() ?: 0)
result = 31 * result + (operationName?.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 ServiceLevelIndicatorMetric
if (keyAttributes != other.keyAttributes) return false
if (metricDataQueries != other.metricDataQueries) return false
if (metricType != other.metricType) return false
if (operationName != other.operationName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorMetric = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* This is a string-to-string map that contains information about the type of object that this SLO is related to. It can include the following fields.
* + `Type` designates the type of object that this SLO is related to.
* + `ResourceType` specifies the type of the resource. This field is used only when the value of the `Type` field is `Resource` or `AWS::Resource`.
* + `Name` specifies the name of the object. This is used only if the value of the `Type` field is `Service`, `RemoteService`, or `AWS::Service`.
* + `Identifier` identifies the resource objects of this resource. This is used only if the value of the `Type` field is `Resource` or `AWS::Resource`.
* + `Environment` specifies the location where this object is hosted, or what it belongs to.
*/
public var keyAttributes: Map? = null
/**
* If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this structure includes the information about that metric or expression.
*/
public var metricDataQueries: List? = null
/**
* If the SLO monitors either the `LATENCY` or `AVAILABILITY` metric that Application Signals collects, this field displays which of those metrics is used.
*/
public var metricType: aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorMetricType? = null
/**
* If the SLO monitors a specific operation of the service, this field displays that operation name.
*/
public var operationName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorMetric) : this() {
this.keyAttributes = x.keyAttributes
this.metricDataQueries = x.metricDataQueries
this.metricType = x.metricType
this.operationName = x.operationName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelIndicatorMetric = ServiceLevelIndicatorMetric(this)
internal fun correctErrors(): Builder {
if (metricDataQueries == null) metricDataQueries = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy