commonMain.aws.sdk.kotlin.services.autoscaling.model.PutNotificationConfigurationRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autoscaling-jvm Show documentation
Show all versions of autoscaling-jvm Show documentation
The AWS SDK for Kotlin client for Auto Scaling
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.autoscaling.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutNotificationConfigurationRequest private constructor(builder: Builder) {
/**
* The name of the Auto Scaling group.
*/
public val autoScalingGroupName: kotlin.String? = builder.autoScalingGroupName
/**
* The type of event that causes the notification to be sent. To query the notification types supported by Amazon EC2 Auto Scaling, call the DescribeAutoScalingNotificationTypes API.
*/
public val notificationTypes: List? = builder.notificationTypes
/**
* The Amazon Resource Name (ARN) of the Amazon SNS topic.
*/
public val topicArn: kotlin.String? = builder.topicArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.autoscaling.model.PutNotificationConfigurationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutNotificationConfigurationRequest(")
append("autoScalingGroupName=$autoScalingGroupName,")
append("notificationTypes=$notificationTypes,")
append("topicArn=$topicArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = autoScalingGroupName?.hashCode() ?: 0
result = 31 * result + (notificationTypes?.hashCode() ?: 0)
result = 31 * result + (topicArn?.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 PutNotificationConfigurationRequest
if (autoScalingGroupName != other.autoScalingGroupName) return false
if (notificationTypes != other.notificationTypes) return false
if (topicArn != other.topicArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.autoscaling.model.PutNotificationConfigurationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the Auto Scaling group.
*/
public var autoScalingGroupName: kotlin.String? = null
/**
* The type of event that causes the notification to be sent. To query the notification types supported by Amazon EC2 Auto Scaling, call the DescribeAutoScalingNotificationTypes API.
*/
public var notificationTypes: List? = null
/**
* The Amazon Resource Name (ARN) of the Amazon SNS topic.
*/
public var topicArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.autoscaling.model.PutNotificationConfigurationRequest) : this() {
this.autoScalingGroupName = x.autoScalingGroupName
this.notificationTypes = x.notificationTypes
this.topicArn = x.topicArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.autoscaling.model.PutNotificationConfigurationRequest = PutNotificationConfigurationRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}