commonMain.aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationCloudWatchLoggingOptionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesisanalytics-jvm Show documentation
Show all versions of kinesisanalytics-jvm Show documentation
The AWS SDK for Kotlin client for Kinesis Analytics
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kinesisanalytics.model
import aws.smithy.kotlin.runtime.SdkDsl
public class AddApplicationCloudWatchLoggingOptionRequest private constructor(builder: Builder) {
/**
* The Kinesis Analytics application name.
*/
public val applicationName: kotlin.String? = builder.applicationName
/**
* Provides the CloudWatch log stream Amazon Resource Name (ARN) and the IAM role ARN. Note: To write application messages to CloudWatch, the IAM role that is used must have the `PutLogEvents` policy action enabled.
*/
public val cloudWatchLoggingOption: aws.sdk.kotlin.services.kinesisanalytics.model.CloudWatchLoggingOption? = builder.cloudWatchLoggingOption
/**
* The version ID of the Kinesis Analytics application.
*/
public val currentApplicationVersionId: kotlin.Long? = builder.currentApplicationVersionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationCloudWatchLoggingOptionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AddApplicationCloudWatchLoggingOptionRequest(")
append("applicationName=$applicationName,")
append("cloudWatchLoggingOption=$cloudWatchLoggingOption,")
append("currentApplicationVersionId=$currentApplicationVersionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = applicationName?.hashCode() ?: 0
result = 31 * result + (cloudWatchLoggingOption?.hashCode() ?: 0)
result = 31 * result + (currentApplicationVersionId?.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 AddApplicationCloudWatchLoggingOptionRequest
if (applicationName != other.applicationName) return false
if (cloudWatchLoggingOption != other.cloudWatchLoggingOption) return false
if (currentApplicationVersionId != other.currentApplicationVersionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationCloudWatchLoggingOptionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Kinesis Analytics application name.
*/
public var applicationName: kotlin.String? = null
/**
* Provides the CloudWatch log stream Amazon Resource Name (ARN) and the IAM role ARN. Note: To write application messages to CloudWatch, the IAM role that is used must have the `PutLogEvents` policy action enabled.
*/
public var cloudWatchLoggingOption: aws.sdk.kotlin.services.kinesisanalytics.model.CloudWatchLoggingOption? = null
/**
* The version ID of the Kinesis Analytics application.
*/
public var currentApplicationVersionId: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationCloudWatchLoggingOptionRequest) : this() {
this.applicationName = x.applicationName
this.cloudWatchLoggingOption = x.cloudWatchLoggingOption
this.currentApplicationVersionId = x.currentApplicationVersionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationCloudWatchLoggingOptionRequest = AddApplicationCloudWatchLoggingOptionRequest(this)
/**
* construct an [aws.sdk.kotlin.services.kinesisanalytics.model.CloudWatchLoggingOption] inside the given [block]
*/
public fun cloudWatchLoggingOption(block: aws.sdk.kotlin.services.kinesisanalytics.model.CloudWatchLoggingOption.Builder.() -> kotlin.Unit) {
this.cloudWatchLoggingOption = aws.sdk.kotlin.services.kinesisanalytics.model.CloudWatchLoggingOption.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}