commonMain.aws.sdk.kotlin.services.devopsguru.model.ServiceHealth.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of devopsguru-jvm Show documentation
Show all versions of devopsguru-jvm Show documentation
The AWS SDK for Kotlin client for DevOps Guru
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.devopsguru.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Represents the health of an Amazon Web Services service.
*/
public class ServiceHealth private constructor(builder: Builder) {
/**
* Number of resources that DevOps Guru is monitoring in an analyzed Amazon Web Services service.
*/
public val analyzedResourceCount: kotlin.Long? = builder.analyzedResourceCount
/**
* Represents the health of an Amazon Web Services service. This is a `ServiceInsightHealth` that contains the number of open proactive and reactive insights for this service.
*/
public val insight: aws.sdk.kotlin.services.devopsguru.model.ServiceInsightHealth? = builder.insight
/**
* The name of the Amazon Web Services service.
*/
public val serviceName: aws.sdk.kotlin.services.devopsguru.model.ServiceName? = builder.serviceName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.devopsguru.model.ServiceHealth = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceHealth(")
append("analyzedResourceCount=$analyzedResourceCount,")
append("insight=$insight,")
append("serviceName=$serviceName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = analyzedResourceCount?.hashCode() ?: 0
result = 31 * result + (insight?.hashCode() ?: 0)
result = 31 * result + (serviceName?.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 ServiceHealth
if (analyzedResourceCount != other.analyzedResourceCount) return false
if (insight != other.insight) return false
if (serviceName != other.serviceName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.devopsguru.model.ServiceHealth = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Number of resources that DevOps Guru is monitoring in an analyzed Amazon Web Services service.
*/
public var analyzedResourceCount: kotlin.Long? = null
/**
* Represents the health of an Amazon Web Services service. This is a `ServiceInsightHealth` that contains the number of open proactive and reactive insights for this service.
*/
public var insight: aws.sdk.kotlin.services.devopsguru.model.ServiceInsightHealth? = null
/**
* The name of the Amazon Web Services service.
*/
public var serviceName: aws.sdk.kotlin.services.devopsguru.model.ServiceName? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.devopsguru.model.ServiceHealth) : this() {
this.analyzedResourceCount = x.analyzedResourceCount
this.insight = x.insight
this.serviceName = x.serviceName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.devopsguru.model.ServiceHealth = ServiceHealth(this)
/**
* construct an [aws.sdk.kotlin.services.devopsguru.model.ServiceInsightHealth] inside the given [block]
*/
public fun insight(block: aws.sdk.kotlin.services.devopsguru.model.ServiceInsightHealth.Builder.() -> kotlin.Unit) {
this.insight = aws.sdk.kotlin.services.devopsguru.model.ServiceInsightHealth.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}