All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// 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 incident associated with an incident created by an Incident Manager response plan.
 */
public class PagerDutyIncidentDetail private constructor(builder: Builder) {
    /**
     * Indicates whether to resolve the PagerDuty incident when you resolve the associated Incident Manager incident.
     */
    public val autoResolve: kotlin.Boolean? = builder.autoResolve
    /**
     * The ID of the incident associated with the PagerDuty service for the response plan.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The ID of the Amazon Web Services Secrets Manager secret that stores your PagerDuty key, either a General Access REST API Key or User Token REST API Key, and other user credentials.
     */
    public val secretId: kotlin.String? = builder.secretId

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PagerDutyIncidentDetail(")
        append("autoResolve=$autoResolve,")
        append("id=$id,")
        append("secretId=$secretId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = autoResolve?.hashCode() ?: 0
        result = 31 * result + (id.hashCode())
        result = 31 * result + (secretId?.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 PagerDutyIncidentDetail

        if (autoResolve != other.autoResolve) return false
        if (id != other.id) return false
        if (secretId != other.secretId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Indicates whether to resolve the PagerDuty incident when you resolve the associated Incident Manager incident.
         */
        public var autoResolve: kotlin.Boolean? = null
        /**
         * The ID of the incident associated with the PagerDuty service for the response plan.
         */
        public var id: kotlin.String? = null
        /**
         * The ID of the Amazon Web Services Secrets Manager secret that stores your PagerDuty key, either a General Access REST API Key or User Token REST API Key, and other user credentials.
         */
        public var secretId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail) : this() {
            this.autoResolve = x.autoResolve
            this.id = x.id
            this.secretId = x.secretId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail = PagerDutyIncidentDetail(this)

        internal fun correctErrors(): Builder {
            if (id == null) id = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy