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

commonMain.aws.sdk.kotlin.services.codeguruprofiler.model.AddNotificationChannelsRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codeguruprofiler.model



/**
 * The structure representing the AddNotificationChannelsRequest.
 */
public class AddNotificationChannelsRequest private constructor(builder: Builder) {
    /**
     * One or 2 channels to report to when anomalies are detected.
     */
    public val channels: List? = builder.channels
    /**
     * The name of the profiling group that we are setting up notifications for.
     */
    public val profilingGroupName: kotlin.String? = requireNotNull(builder.profilingGroupName) { "A non-null value must be provided for profilingGroupName" }

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

    override fun toString(): kotlin.String = buildString {
        append("AddNotificationChannelsRequest(")
        append("channels=$channels,")
        append("profilingGroupName=$profilingGroupName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = channels?.hashCode() ?: 0
        result = 31 * result + (profilingGroupName?.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 AddNotificationChannelsRequest

        if (channels != other.channels) return false
        if (profilingGroupName != other.profilingGroupName) return false

        return true
    }

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

    public class Builder {
        /**
         * One or 2 channels to report to when anomalies are detected.
         */
        public var channels: List? = null
        /**
         * The name of the profiling group that we are setting up notifications for.
         */
        public var profilingGroupName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeguruprofiler.model.AddNotificationChannelsRequest) : this() {
            this.channels = x.channels
            this.profilingGroupName = x.profilingGroupName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codeguruprofiler.model.AddNotificationChannelsRequest = AddNotificationChannelsRequest(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy