Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Additional options for the Amazon Kinesis streaming data source.
*/
public class KinesisStreamingSourceOptions private constructor(builder: Builder) {
/**
* Adds a time delay between two consecutive getRecords operations. The default value is `"False"`. This option is only configurable for Glue version 2.0 and above.
*/
public val addIdleTimeBetweenReads: kotlin.Boolean? = builder.addIdleTimeBetweenReads
/**
* When this option is set to 'true', the data output will contain an additional column named "__src_timestamp" that indicates the time when the corresponding record received by the stream. The default value is 'false'. This option is supported in Glue version 4.0 or later.
*/
public val addRecordTimestamp: kotlin.String? = builder.addRecordTimestamp
/**
* Avoids creating an empty microbatch job by checking for unread data in the Kinesis data stream before the batch is started. The default value is `"False"`.
*/
public val avoidEmptyBatches: kotlin.Boolean? = builder.avoidEmptyBatches
/**
* An optional classification.
*/
public val classification: kotlin.String? = builder.classification
/**
* Specifies the delimiter character.
*/
public val delimiter: kotlin.String? = builder.delimiter
/**
* The minimum time interval between two ListShards API calls for your script to consider resharding. The default value is `1s`.
*/
public val describeShardInterval: kotlin.Long? = builder.describeShardInterval
/**
* When this option is set to 'true', for each batch, it will emit the metrics for the duration between the oldest record received by the stream and the time it arrives in Glue to CloudWatch. The metric's name is "glue.driver.streaming.maxConsumerLagInMs". The default value is 'false'. This option is supported in Glue version 4.0 or later.
*/
public val emitConsumerLagMetrics: kotlin.String? = builder.emitConsumerLagMetrics
/**
* The URL of the Kinesis endpoint.
*/
public val endpointUrl: kotlin.String? = builder.endpointUrl
/**
* The minimum time delay between two consecutive getRecords operations, specified in ms. The default value is `1000`. This option is only configurable for Glue version 2.0 and above.
*/
public val idleTimeBetweenReadsInMs: kotlin.Long? = builder.idleTimeBetweenReadsInMs
/**
* The maximum number of records to fetch per shard in the Kinesis data stream per microbatch. Note: The client can exceed this limit if the streaming job has already read extra records from Kinesis (in the same get-records call). If `MaxFetchRecordsPerShard` needs to be strict then it needs to be a multiple of `MaxRecordPerRead`. The default value is `100000`.
*/
public val maxFetchRecordsPerShard: kotlin.Long? = builder.maxFetchRecordsPerShard
/**
* The maximum time spent for the job executor to read records for the current batch from the Kinesis data stream, specified in milliseconds (ms). Multiple `GetRecords` API calls may be made within this time. The default value is `1000`.
*/
public val maxFetchTimeInMs: kotlin.Long? = builder.maxFetchTimeInMs
/**
* The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default value is `10000`.
*/
public val maxRecordPerRead: kotlin.Long? = builder.maxRecordPerRead
/**
* The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API call. The default value is `10000`.
*/
public val maxRetryIntervalMs: kotlin.Long? = builder.maxRetryIntervalMs
/**
* The maximum number of retries for Kinesis Data Streams API requests. The default value is `3`.
*/
public val numRetries: kotlin.Int? = builder.numRetries
/**
* The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value is `1000`.
*/
public val retryIntervalMs: kotlin.Long? = builder.retryIntervalMs
/**
* The Amazon Resource Name (ARN) of the role to assume using AWS Security Token Service (AWS STS). This role must have permissions for describe or read record operations for the Kinesis data stream. You must use this parameter when accessing a data stream in a different account. Used in conjunction with `"awsSTSSessionName"`.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* An identifier for the session assuming the role using AWS STS. You must use this parameter when accessing a data stream in a different account. Used in conjunction with `"awsSTSRoleARN"`.
*/
public val roleSessionName: kotlin.String? = builder.roleSessionName
/**
* The starting position in the Kinesis data stream to read data from. The possible values are `"latest"`, `"trim_horizon"`, `"earliest"`, or a timestamp string in UTC format in the pattern `yyyy-mm-ddTHH:MM:SSZ` (where `Z` represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00-04:00"). The default value is `"latest"`.
*
* Note: Using a value that is a timestamp string in UTC format for "startingPosition" is supported only for Glue version 4.0 or later.
*/
public val startingPosition: aws.sdk.kotlin.services.glue.model.StartingPosition? = builder.startingPosition
/**
* The timestamp of the record in the Kinesis data stream to start reading data from. The possible values are a timestamp string in UTC format of the pattern `yyyy-mm-ddTHH:MM:SSZ` (where Z represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00+08:00").
*/
public val startingTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.startingTimestamp
/**
* The Amazon Resource Name (ARN) of the Kinesis data stream.
*/
public val streamArn: kotlin.String? = builder.streamArn
/**
* The name of the Kinesis data stream.
*/
public val streamName: kotlin.String? = builder.streamName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("KinesisStreamingSourceOptions(")
append("addIdleTimeBetweenReads=$addIdleTimeBetweenReads,")
append("addRecordTimestamp=$addRecordTimestamp,")
append("avoidEmptyBatches=$avoidEmptyBatches,")
append("classification=$classification,")
append("delimiter=$delimiter,")
append("describeShardInterval=$describeShardInterval,")
append("emitConsumerLagMetrics=$emitConsumerLagMetrics,")
append("endpointUrl=$endpointUrl,")
append("idleTimeBetweenReadsInMs=$idleTimeBetweenReadsInMs,")
append("maxFetchRecordsPerShard=$maxFetchRecordsPerShard,")
append("maxFetchTimeInMs=$maxFetchTimeInMs,")
append("maxRecordPerRead=$maxRecordPerRead,")
append("maxRetryIntervalMs=$maxRetryIntervalMs,")
append("numRetries=$numRetries,")
append("retryIntervalMs=$retryIntervalMs,")
append("roleArn=$roleArn,")
append("roleSessionName=$roleSessionName,")
append("startingPosition=$startingPosition,")
append("startingTimestamp=$startingTimestamp,")
append("streamArn=$streamArn,")
append("streamName=$streamName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = addIdleTimeBetweenReads?.hashCode() ?: 0
result = 31 * result + (addRecordTimestamp?.hashCode() ?: 0)
result = 31 * result + (avoidEmptyBatches?.hashCode() ?: 0)
result = 31 * result + (classification?.hashCode() ?: 0)
result = 31 * result + (delimiter?.hashCode() ?: 0)
result = 31 * result + (describeShardInterval?.hashCode() ?: 0)
result = 31 * result + (emitConsumerLagMetrics?.hashCode() ?: 0)
result = 31 * result + (endpointUrl?.hashCode() ?: 0)
result = 31 * result + (idleTimeBetweenReadsInMs?.hashCode() ?: 0)
result = 31 * result + (maxFetchRecordsPerShard?.hashCode() ?: 0)
result = 31 * result + (maxFetchTimeInMs?.hashCode() ?: 0)
result = 31 * result + (maxRecordPerRead?.hashCode() ?: 0)
result = 31 * result + (maxRetryIntervalMs?.hashCode() ?: 0)
result = 31 * result + (numRetries ?: 0)
result = 31 * result + (retryIntervalMs?.hashCode() ?: 0)
result = 31 * result + (roleArn?.hashCode() ?: 0)
result = 31 * result + (roleSessionName?.hashCode() ?: 0)
result = 31 * result + (startingPosition?.hashCode() ?: 0)
result = 31 * result + (startingTimestamp?.hashCode() ?: 0)
result = 31 * result + (streamArn?.hashCode() ?: 0)
result = 31 * result + (streamName?.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 KinesisStreamingSourceOptions
if (addIdleTimeBetweenReads != other.addIdleTimeBetweenReads) return false
if (addRecordTimestamp != other.addRecordTimestamp) return false
if (avoidEmptyBatches != other.avoidEmptyBatches) return false
if (classification != other.classification) return false
if (delimiter != other.delimiter) return false
if (describeShardInterval != other.describeShardInterval) return false
if (emitConsumerLagMetrics != other.emitConsumerLagMetrics) return false
if (endpointUrl != other.endpointUrl) return false
if (idleTimeBetweenReadsInMs != other.idleTimeBetweenReadsInMs) return false
if (maxFetchRecordsPerShard != other.maxFetchRecordsPerShard) return false
if (maxFetchTimeInMs != other.maxFetchTimeInMs) return false
if (maxRecordPerRead != other.maxRecordPerRead) return false
if (maxRetryIntervalMs != other.maxRetryIntervalMs) return false
if (numRetries != other.numRetries) return false
if (retryIntervalMs != other.retryIntervalMs) return false
if (roleArn != other.roleArn) return false
if (roleSessionName != other.roleSessionName) return false
if (startingPosition != other.startingPosition) return false
if (startingTimestamp != other.startingTimestamp) return false
if (streamArn != other.streamArn) return false
if (streamName != other.streamName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Adds a time delay between two consecutive getRecords operations. The default value is `"False"`. This option is only configurable for Glue version 2.0 and above.
*/
public var addIdleTimeBetweenReads: kotlin.Boolean? = null
/**
* When this option is set to 'true', the data output will contain an additional column named "__src_timestamp" that indicates the time when the corresponding record received by the stream. The default value is 'false'. This option is supported in Glue version 4.0 or later.
*/
public var addRecordTimestamp: kotlin.String? = null
/**
* Avoids creating an empty microbatch job by checking for unread data in the Kinesis data stream before the batch is started. The default value is `"False"`.
*/
public var avoidEmptyBatches: kotlin.Boolean? = null
/**
* An optional classification.
*/
public var classification: kotlin.String? = null
/**
* Specifies the delimiter character.
*/
public var delimiter: kotlin.String? = null
/**
* The minimum time interval between two ListShards API calls for your script to consider resharding. The default value is `1s`.
*/
public var describeShardInterval: kotlin.Long? = null
/**
* When this option is set to 'true', for each batch, it will emit the metrics for the duration between the oldest record received by the stream and the time it arrives in Glue to CloudWatch. The metric's name is "glue.driver.streaming.maxConsumerLagInMs". The default value is 'false'. This option is supported in Glue version 4.0 or later.
*/
public var emitConsumerLagMetrics: kotlin.String? = null
/**
* The URL of the Kinesis endpoint.
*/
public var endpointUrl: kotlin.String? = null
/**
* The minimum time delay between two consecutive getRecords operations, specified in ms. The default value is `1000`. This option is only configurable for Glue version 2.0 and above.
*/
public var idleTimeBetweenReadsInMs: kotlin.Long? = null
/**
* The maximum number of records to fetch per shard in the Kinesis data stream per microbatch. Note: The client can exceed this limit if the streaming job has already read extra records from Kinesis (in the same get-records call). If `MaxFetchRecordsPerShard` needs to be strict then it needs to be a multiple of `MaxRecordPerRead`. The default value is `100000`.
*/
public var maxFetchRecordsPerShard: kotlin.Long? = null
/**
* The maximum time spent for the job executor to read records for the current batch from the Kinesis data stream, specified in milliseconds (ms). Multiple `GetRecords` API calls may be made within this time. The default value is `1000`.
*/
public var maxFetchTimeInMs: kotlin.Long? = null
/**
* The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default value is `10000`.
*/
public var maxRecordPerRead: kotlin.Long? = null
/**
* The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API call. The default value is `10000`.
*/
public var maxRetryIntervalMs: kotlin.Long? = null
/**
* The maximum number of retries for Kinesis Data Streams API requests. The default value is `3`.
*/
public var numRetries: kotlin.Int? = null
/**
* The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value is `1000`.
*/
public var retryIntervalMs: kotlin.Long? = null
/**
* The Amazon Resource Name (ARN) of the role to assume using AWS Security Token Service (AWS STS). This role must have permissions for describe or read record operations for the Kinesis data stream. You must use this parameter when accessing a data stream in a different account. Used in conjunction with `"awsSTSSessionName"`.
*/
public var roleArn: kotlin.String? = null
/**
* An identifier for the session assuming the role using AWS STS. You must use this parameter when accessing a data stream in a different account. Used in conjunction with `"awsSTSRoleARN"`.
*/
public var roleSessionName: kotlin.String? = null
/**
* The starting position in the Kinesis data stream to read data from. The possible values are `"latest"`, `"trim_horizon"`, `"earliest"`, or a timestamp string in UTC format in the pattern `yyyy-mm-ddTHH:MM:SSZ` (where `Z` represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00-04:00"). The default value is `"latest"`.
*
* Note: Using a value that is a timestamp string in UTC format for "startingPosition" is supported only for Glue version 4.0 or later.
*/
public var startingPosition: aws.sdk.kotlin.services.glue.model.StartingPosition? = null
/**
* The timestamp of the record in the Kinesis data stream to start reading data from. The possible values are a timestamp string in UTC format of the pattern `yyyy-mm-ddTHH:MM:SSZ` (where Z represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00+08:00").
*/
public var startingTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The Amazon Resource Name (ARN) of the Kinesis data stream.
*/
public var streamArn: kotlin.String? = null
/**
* The name of the Kinesis data stream.
*/
public var streamName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions) : this() {
this.addIdleTimeBetweenReads = x.addIdleTimeBetweenReads
this.addRecordTimestamp = x.addRecordTimestamp
this.avoidEmptyBatches = x.avoidEmptyBatches
this.classification = x.classification
this.delimiter = x.delimiter
this.describeShardInterval = x.describeShardInterval
this.emitConsumerLagMetrics = x.emitConsumerLagMetrics
this.endpointUrl = x.endpointUrl
this.idleTimeBetweenReadsInMs = x.idleTimeBetweenReadsInMs
this.maxFetchRecordsPerShard = x.maxFetchRecordsPerShard
this.maxFetchTimeInMs = x.maxFetchTimeInMs
this.maxRecordPerRead = x.maxRecordPerRead
this.maxRetryIntervalMs = x.maxRetryIntervalMs
this.numRetries = x.numRetries
this.retryIntervalMs = x.retryIntervalMs
this.roleArn = x.roleArn
this.roleSessionName = x.roleSessionName
this.startingPosition = x.startingPosition
this.startingTimestamp = x.startingTimestamp
this.streamArn = x.streamArn
this.streamName = x.streamName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions = KinesisStreamingSourceOptions(this)
internal fun correctErrors(): Builder {
return this
}
}
}