commonMain.aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssmincidents-jvm Show documentation
Show all versions of ssmincidents-jvm Show documentation
The AWS SDK for Kotlin client for SSM Incidents
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmincidents.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Details about the PagerDuty service where the response plan creates an incident.
*/
public class PagerDutyIncidentConfiguration private constructor(builder: Builder) {
/**
* The ID of the PagerDuty service that the response plan associates with an incident when it launches.
*/
public val serviceId: kotlin.String = requireNotNull(builder.serviceId) { "A non-null value must be provided for serviceId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PagerDutyIncidentConfiguration(")
append("serviceId=$serviceId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = serviceId.hashCode()
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 PagerDutyIncidentConfiguration
if (serviceId != other.serviceId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the PagerDuty service that the response plan associates with an incident when it launches.
*/
public var serviceId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentConfiguration) : this() {
this.serviceId = x.serviceId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentConfiguration = PagerDutyIncidentConfiguration(this)
internal fun correctErrors(): Builder {
if (serviceId == null) serviceId = ""
return this
}
}
}