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

commonMain.aws.sdk.kotlin.services.ssmincidents.model.GetResponsePlanResponse.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

public class GetResponsePlanResponse private constructor(builder: Builder) {
    /**
     * The actions that this response plan takes at the beginning of the incident.
     */
    public val actions: List? = builder.actions
    /**
     * The ARN of the response plan.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The Chatbot chat channel used for collaboration during an incident.
     */
    public val chatChannel: aws.sdk.kotlin.services.ssmincidents.model.ChatChannel? = builder.chatChannel
    /**
     * The long format name of the response plan. Can contain spaces.
     */
    public val displayName: kotlin.String? = builder.displayName
    /**
     * The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an incident.
     */
    public val engagements: List? = builder.engagements
    /**
     * Details used to create the incident when using this response plan.
     */
    public val incidentTemplate: aws.sdk.kotlin.services.ssmincidents.model.IncidentTemplate? = builder.incidentTemplate
    /**
     * Information about third-party services integrated into the Incident Manager response plan.
     */
    public val integrations: List? = builder.integrations
    /**
     * The short format name of the response plan. The name can't contain spaces.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }

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

    override fun toString(): kotlin.String = buildString {
        append("GetResponsePlanResponse(")
        append("actions=$actions,")
        append("arn=$arn,")
        append("chatChannel=$chatChannel,")
        append("displayName=$displayName,")
        append("engagements=$engagements,")
        append("incidentTemplate=$incidentTemplate,")
        append("integrations=$integrations,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actions?.hashCode() ?: 0
        result = 31 * result + (arn.hashCode())
        result = 31 * result + (chatChannel?.hashCode() ?: 0)
        result = 31 * result + (displayName?.hashCode() ?: 0)
        result = 31 * result + (engagements?.hashCode() ?: 0)
        result = 31 * result + (incidentTemplate?.hashCode() ?: 0)
        result = 31 * result + (integrations?.hashCode() ?: 0)
        result = 31 * result + (name.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 GetResponsePlanResponse

        if (actions != other.actions) return false
        if (arn != other.arn) return false
        if (chatChannel != other.chatChannel) return false
        if (displayName != other.displayName) return false
        if (engagements != other.engagements) return false
        if (incidentTemplate != other.incidentTemplate) return false
        if (integrations != other.integrations) return false
        if (name != other.name) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The actions that this response plan takes at the beginning of the incident.
         */
        public var actions: List? = null
        /**
         * The ARN of the response plan.
         */
        public var arn: kotlin.String? = null
        /**
         * The Chatbot chat channel used for collaboration during an incident.
         */
        public var chatChannel: aws.sdk.kotlin.services.ssmincidents.model.ChatChannel? = null
        /**
         * The long format name of the response plan. Can contain spaces.
         */
        public var displayName: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an incident.
         */
        public var engagements: List? = null
        /**
         * Details used to create the incident when using this response plan.
         */
        public var incidentTemplate: aws.sdk.kotlin.services.ssmincidents.model.IncidentTemplate? = null
        /**
         * Information about third-party services integrated into the Incident Manager response plan.
         */
        public var integrations: List? = null
        /**
         * The short format name of the response plan. The name can't contain spaces.
         */
        public var name: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.GetResponsePlanResponse) : this() {
            this.actions = x.actions
            this.arn = x.arn
            this.chatChannel = x.chatChannel
            this.displayName = x.displayName
            this.engagements = x.engagements
            this.incidentTemplate = x.incidentTemplate
            this.integrations = x.integrations
            this.name = x.name
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.ssmincidents.model.IncidentTemplate] inside the given [block]
         */
        public fun incidentTemplate(block: aws.sdk.kotlin.services.ssmincidents.model.IncidentTemplate.Builder.() -> kotlin.Unit) {
            this.incidentTemplate = aws.sdk.kotlin.services.ssmincidents.model.IncidentTemplate.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy