commonMain.aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelObjectiveSummary.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* A structure that contains information about one service level objective (SLO) created in Application Signals.
*/
public class ServiceLevelObjectiveSummary private constructor(builder: Builder) {
/**
* The ARN of this service level objective.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The date and time that this service level objective was created. It is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.
*/
public val createdTime: aws.smithy.kotlin.runtime.time.Instant? = builder.createdTime
/**
* This is a string-to-string map. It can include the following fields.
* + `Type` designates the type of object this service level objective is for.
* + `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
/**
* The name of the service level objective.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* If this service level objective is specific to a single operation, this field displays the name of that operation.
*/
public val operationName: kotlin.String? = builder.operationName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelObjectiveSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceLevelObjectiveSummary(")
append("arn=$arn,")
append("createdTime=$createdTime,")
append("keyAttributes=$keyAttributes,")
append("name=$name,")
append("operationName=$operationName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (createdTime?.hashCode() ?: 0)
result = 31 * result + (keyAttributes?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
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 ServiceLevelObjectiveSummary
if (arn != other.arn) return false
if (createdTime != other.createdTime) return false
if (keyAttributes != other.keyAttributes) return false
if (name != other.name) return false
if (operationName != other.operationName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelObjectiveSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of this service level objective.
*/
public var arn: kotlin.String? = null
/**
* The date and time that this service level objective was created. It is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.
*/
public var createdTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* This is a string-to-string map. It can include the following fields.
* + `Type` designates the type of object this service level objective is for.
* + `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
/**
* The name of the service level objective.
*/
public var name: kotlin.String? = null
/**
* If this service level objective is specific to a single operation, this field displays the name of that operation.
*/
public var operationName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelObjectiveSummary) : this() {
this.arn = x.arn
this.createdTime = x.createdTime
this.keyAttributes = x.keyAttributes
this.name = x.name
this.operationName = x.operationName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.applicationsignals.model.ServiceLevelObjectiveSummary = ServiceLevelObjectiveSummary(this)
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy