commonMain.aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationReferenceDataSourceRequest.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 AddApplicationReferenceDataSourceRequest private constructor(builder: Builder) {
/**
* Name of an existing application.
*/
public val applicationName: kotlin.String? = builder.applicationName
/**
* Version of the application for which you are adding the reference data source. You can use the [DescribeApplication](https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_DescribeApplication.html) operation to get the current application version. If the version specified is not the current version, the `ConcurrentModificationException` is returned.
*/
public val currentApplicationVersionId: kotlin.Long? = builder.currentApplicationVersionId
/**
* The reference data source can be an object in your Amazon S3 bucket. Amazon Kinesis Analytics reads the object and copies the data into the in-application table that is created. You provide an S3 bucket, object key name, and the resulting in-application table that is created. You must also provide an IAM role with the necessary permissions that Amazon Kinesis Analytics can assume to read the object from your S3 bucket on your behalf.
*/
public val referenceDataSource: aws.sdk.kotlin.services.kinesisanalytics.model.ReferenceDataSource? = builder.referenceDataSource
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationReferenceDataSourceRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AddApplicationReferenceDataSourceRequest(")
append("applicationName=$applicationName,")
append("currentApplicationVersionId=$currentApplicationVersionId,")
append("referenceDataSource=$referenceDataSource")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = applicationName?.hashCode() ?: 0
result = 31 * result + (currentApplicationVersionId?.hashCode() ?: 0)
result = 31 * result + (referenceDataSource?.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 AddApplicationReferenceDataSourceRequest
if (applicationName != other.applicationName) return false
if (currentApplicationVersionId != other.currentApplicationVersionId) return false
if (referenceDataSource != other.referenceDataSource) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationReferenceDataSourceRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Name of an existing application.
*/
public var applicationName: kotlin.String? = null
/**
* Version of the application for which you are adding the reference data source. You can use the [DescribeApplication](https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_DescribeApplication.html) operation to get the current application version. If the version specified is not the current version, the `ConcurrentModificationException` is returned.
*/
public var currentApplicationVersionId: kotlin.Long? = null
/**
* The reference data source can be an object in your Amazon S3 bucket. Amazon Kinesis Analytics reads the object and copies the data into the in-application table that is created. You provide an S3 bucket, object key name, and the resulting in-application table that is created. You must also provide an IAM role with the necessary permissions that Amazon Kinesis Analytics can assume to read the object from your S3 bucket on your behalf.
*/
public var referenceDataSource: aws.sdk.kotlin.services.kinesisanalytics.model.ReferenceDataSource? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationReferenceDataSourceRequest) : this() {
this.applicationName = x.applicationName
this.currentApplicationVersionId = x.currentApplicationVersionId
this.referenceDataSource = x.referenceDataSource
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesisanalytics.model.AddApplicationReferenceDataSourceRequest = AddApplicationReferenceDataSourceRequest(this)
/**
* construct an [aws.sdk.kotlin.services.kinesisanalytics.model.ReferenceDataSource] inside the given [block]
*/
public fun referenceDataSource(block: aws.sdk.kotlin.services.kinesisanalytics.model.ReferenceDataSource.Builder.() -> kotlin.Unit) {
this.referenceDataSource = aws.sdk.kotlin.services.kinesisanalytics.model.ReferenceDataSource.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}