/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Additional options for the Amazon Kinesis streaming data source. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class KinesisStreamingSourceOptions implements Serializable, Cloneable, StructuredPojo { /** ** The URL of the Kinesis endpoint. *
*/ private String endpointUrl; /** ** The name of the Kinesis data stream. *
*/ private String streamName; /** ** An optional classification. *
*/ private String classification; /** ** Specifies the delimiter character. *
*/ private String delimiter; /** *
* 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. *
*/ private String startingPosition; /** *
* The maximum time spent in the job executor to fetch a record from the Kinesis data stream per shard, specified in
* milliseconds (ms). The default value is 1000
.
*
* The maximum number of records to fetch per shard in the Kinesis data stream. The default value is
* 100000
.
*
* The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default
* value is 10000
.
*
* 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.
*
* 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.
*
* The minimum time interval between two ListShards API calls for your script to consider resharding. The default
* value is 1s
.
*
* The maximum number of retries for Kinesis Data Streams API requests. The default value is 3
.
*
* The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value
* is 1000
.
*
* The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API call. The
* default value is 10000
.
*
* 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"
.
*
* The Amazon Resource Name (ARN) of the Kinesis data stream. *
*/ private String streamArn; /** *
* 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"
.
*
* 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"
.
*
* 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. *
*/ private String addRecordTimestamp; /** ** 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. *
*/ private String emitConsumerLagMetrics; /** *
* 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").
*
* The URL of the Kinesis endpoint. *
* * @param endpointUrl * The URL of the Kinesis endpoint. */ public void setEndpointUrl(String endpointUrl) { this.endpointUrl = endpointUrl; } /** ** The URL of the Kinesis endpoint. *
* * @return The URL of the Kinesis endpoint. */ public String getEndpointUrl() { return this.endpointUrl; } /** ** The URL of the Kinesis endpoint. *
* * @param endpointUrl * The URL of the Kinesis endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public KinesisStreamingSourceOptions withEndpointUrl(String endpointUrl) { setEndpointUrl(endpointUrl); return this; } /** ** The name of the Kinesis data stream. *
* * @param streamName * The name of the Kinesis data stream. */ public void setStreamName(String streamName) { this.streamName = streamName; } /** ** The name of the Kinesis data stream. *
* * @return The name of the Kinesis data stream. */ public String getStreamName() { return this.streamName; } /** ** The name of the Kinesis data stream. *
* * @param streamName * The name of the Kinesis data stream. * @return Returns a reference to this object so that method calls can be chained together. */ public KinesisStreamingSourceOptions withStreamName(String streamName) { setStreamName(streamName); return this; } /** ** An optional classification. *
* * @param classification * An optional classification. */ public void setClassification(String classification) { this.classification = classification; } /** ** An optional classification. *
* * @return An optional classification. */ public String getClassification() { return this.classification; } /** ** An optional classification. *
* * @param classification * An optional classification. * @return Returns a reference to this object so that method calls can be chained together. */ public KinesisStreamingSourceOptions withClassification(String classification) { setClassification(classification); return this; } /** ** Specifies the delimiter character. *
* * @param delimiter * Specifies the delimiter character. */ public void setDelimiter(String delimiter) { this.delimiter = delimiter; } /** ** Specifies the delimiter character. *
* * @return Specifies the delimiter character. */ public String getDelimiter() { return this.delimiter; } /** ** Specifies the delimiter character. *
* * @param delimiter * Specifies the delimiter character. * @return Returns a reference to this object so that method calls can be chained together. */ public KinesisStreamingSourceOptions withDelimiter(String delimiter) { setDelimiter(delimiter); return this; } /** *
* 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. *
* * @param startingPosition * 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. * @see StartingPosition */ public void setStartingPosition(String startingPosition) { this.startingPosition = startingPosition; } /** *
* 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. *
* * @return 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. * @see StartingPosition */ public String getStartingPosition() { return this.startingPosition; } /** *
* 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. *
* * @param startingPosition * 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. * @return Returns a reference to this object so that method calls can be chained together. * @see StartingPosition */ public KinesisStreamingSourceOptions withStartingPosition(String startingPosition) { setStartingPosition(startingPosition); return this; } /** *
* 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. *
* * @param startingPosition * 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. * @return Returns a reference to this object so that method calls can be chained together. * @see StartingPosition */ public KinesisStreamingSourceOptions withStartingPosition(StartingPosition startingPosition) { this.startingPosition = startingPosition.toString(); return this; } /** *
* The maximum time spent in the job executor to fetch a record from the Kinesis data stream per shard, specified in
* milliseconds (ms). The default value is 1000
.
*
1000
.
*/
public void setMaxFetchTimeInMs(Long maxFetchTimeInMs) {
this.maxFetchTimeInMs = maxFetchTimeInMs;
}
/**
*
* The maximum time spent in the job executor to fetch a record from the Kinesis data stream per shard, specified in
* milliseconds (ms). The default value is 1000
.
*
1000
.
*/
public Long getMaxFetchTimeInMs() {
return this.maxFetchTimeInMs;
}
/**
*
* The maximum time spent in the job executor to fetch a record from the Kinesis data stream per shard, specified in
* milliseconds (ms). The default value is 1000
.
*
1000
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withMaxFetchTimeInMs(Long maxFetchTimeInMs) {
setMaxFetchTimeInMs(maxFetchTimeInMs);
return this;
}
/**
*
* The maximum number of records to fetch per shard in the Kinesis data stream. The default value is
* 100000
.
*
100000
.
*/
public void setMaxFetchRecordsPerShard(Long maxFetchRecordsPerShard) {
this.maxFetchRecordsPerShard = maxFetchRecordsPerShard;
}
/**
*
* The maximum number of records to fetch per shard in the Kinesis data stream. The default value is
* 100000
.
*
100000
.
*/
public Long getMaxFetchRecordsPerShard() {
return this.maxFetchRecordsPerShard;
}
/**
*
* The maximum number of records to fetch per shard in the Kinesis data stream. The default value is
* 100000
.
*
100000
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withMaxFetchRecordsPerShard(Long maxFetchRecordsPerShard) {
setMaxFetchRecordsPerShard(maxFetchRecordsPerShard);
return this;
}
/**
*
* The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default
* value is 10000
.
*
10000
.
*/
public void setMaxRecordPerRead(Long maxRecordPerRead) {
this.maxRecordPerRead = maxRecordPerRead;
}
/**
*
* The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default
* value is 10000
.
*
10000
.
*/
public Long getMaxRecordPerRead() {
return this.maxRecordPerRead;
}
/**
*
* The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default
* value is 10000
.
*
10000
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withMaxRecordPerRead(Long maxRecordPerRead) {
setMaxRecordPerRead(maxRecordPerRead);
return this;
}
/**
*
* 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.
*
"False"
* . This option is only configurable for Glue version 2.0 and above.
*/
public void setAddIdleTimeBetweenReads(Boolean addIdleTimeBetweenReads) {
this.addIdleTimeBetweenReads = addIdleTimeBetweenReads;
}
/**
*
* 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.
*
"False"
. This option is only configurable for Glue version 2.0 and above.
*/
public Boolean getAddIdleTimeBetweenReads() {
return this.addIdleTimeBetweenReads;
}
/**
*
* 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.
*
"False"
* . This option is only configurable for Glue version 2.0 and above.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withAddIdleTimeBetweenReads(Boolean addIdleTimeBetweenReads) {
setAddIdleTimeBetweenReads(addIdleTimeBetweenReads);
return this;
}
/**
*
* 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.
*
"False"
. This option is only configurable for Glue version 2.0 and above.
*/
public Boolean isAddIdleTimeBetweenReads() {
return this.addIdleTimeBetweenReads;
}
/**
*
* 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.
*
1000
. This option is only configurable for Glue version 2.0 and above.
*/
public void setIdleTimeBetweenReadsInMs(Long idleTimeBetweenReadsInMs) {
this.idleTimeBetweenReadsInMs = idleTimeBetweenReadsInMs;
}
/**
*
* 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.
*
1000
. This option is only configurable for Glue version 2.0 and above.
*/
public Long getIdleTimeBetweenReadsInMs() {
return this.idleTimeBetweenReadsInMs;
}
/**
*
* 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.
*
1000
. This option is only configurable for Glue version 2.0 and above.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withIdleTimeBetweenReadsInMs(Long idleTimeBetweenReadsInMs) {
setIdleTimeBetweenReadsInMs(idleTimeBetweenReadsInMs);
return this;
}
/**
*
* The minimum time interval between two ListShards API calls for your script to consider resharding. The default
* value is 1s
.
*
1s
.
*/
public void setDescribeShardInterval(Long describeShardInterval) {
this.describeShardInterval = describeShardInterval;
}
/**
*
* The minimum time interval between two ListShards API calls for your script to consider resharding. The default
* value is 1s
.
*
1s
.
*/
public Long getDescribeShardInterval() {
return this.describeShardInterval;
}
/**
*
* The minimum time interval between two ListShards API calls for your script to consider resharding. The default
* value is 1s
.
*
1s
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withDescribeShardInterval(Long describeShardInterval) {
setDescribeShardInterval(describeShardInterval);
return this;
}
/**
*
* The maximum number of retries for Kinesis Data Streams API requests. The default value is 3
.
*
3
.
*/
public void setNumRetries(Integer numRetries) {
this.numRetries = numRetries;
}
/**
*
* The maximum number of retries for Kinesis Data Streams API requests. The default value is 3
.
*
3
.
*/
public Integer getNumRetries() {
return this.numRetries;
}
/**
*
* The maximum number of retries for Kinesis Data Streams API requests. The default value is 3
.
*
3
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withNumRetries(Integer numRetries) {
setNumRetries(numRetries);
return this;
}
/**
*
* The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value
* is 1000
.
*
1000
.
*/
public void setRetryIntervalMs(Long retryIntervalMs) {
this.retryIntervalMs = retryIntervalMs;
}
/**
*
* The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value
* is 1000
.
*
1000
.
*/
public Long getRetryIntervalMs() {
return this.retryIntervalMs;
}
/**
*
* The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value
* is 1000
.
*
1000
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withRetryIntervalMs(Long retryIntervalMs) {
setRetryIntervalMs(retryIntervalMs);
return this;
}
/**
*
* The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API call. The
* default value is 10000
.
*
10000
.
*/
public void setMaxRetryIntervalMs(Long maxRetryIntervalMs) {
this.maxRetryIntervalMs = maxRetryIntervalMs;
}
/**
*
* The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API call. The
* default value is 10000
.
*
10000
.
*/
public Long getMaxRetryIntervalMs() {
return this.maxRetryIntervalMs;
}
/**
*
* The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API call. The
* default value is 10000
.
*
10000
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withMaxRetryIntervalMs(Long maxRetryIntervalMs) {
setMaxRetryIntervalMs(maxRetryIntervalMs);
return this;
}
/**
*
* 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"
.
*
"False"
.
*/
public void setAvoidEmptyBatches(Boolean avoidEmptyBatches) {
this.avoidEmptyBatches = avoidEmptyBatches;
}
/**
*
* 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"
.
*
"False"
.
*/
public Boolean getAvoidEmptyBatches() {
return this.avoidEmptyBatches;
}
/**
*
* 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"
.
*
"False"
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withAvoidEmptyBatches(Boolean avoidEmptyBatches) {
setAvoidEmptyBatches(avoidEmptyBatches);
return this;
}
/**
*
* 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"
.
*
"False"
.
*/
public Boolean isAvoidEmptyBatches() {
return this.avoidEmptyBatches;
}
/**
* * The Amazon Resource Name (ARN) of the Kinesis data stream. *
* * @param streamArn * The Amazon Resource Name (ARN) of the Kinesis data stream. */ public void setStreamArn(String streamArn) { this.streamArn = streamArn; } /** ** The Amazon Resource Name (ARN) of the Kinesis data stream. *
* * @return The Amazon Resource Name (ARN) of the Kinesis data stream. */ public String getStreamArn() { return this.streamArn; } /** ** The Amazon Resource Name (ARN) of the Kinesis data stream. *
* * @param streamArn * The Amazon Resource Name (ARN) of the Kinesis data stream. * @return Returns a reference to this object so that method calls can be chained together. */ public KinesisStreamingSourceOptions withStreamArn(String streamArn) { setStreamArn(streamArn); return this; } /** *
* 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"
.
*
"awsSTSSessionName"
.
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
*
* 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"
.
*
"awsSTSSessionName"
.
*/
public String getRoleArn() {
return this.roleArn;
}
/**
*
* 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"
.
*
"awsSTSSessionName"
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withRoleArn(String roleArn) {
setRoleArn(roleArn);
return this;
}
/**
*
* 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"
.
*
"awsSTSRoleARN"
.
*/
public void setRoleSessionName(String roleSessionName) {
this.roleSessionName = roleSessionName;
}
/**
*
* 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"
.
*
"awsSTSRoleARN"
.
*/
public String getRoleSessionName() {
return this.roleSessionName;
}
/**
*
* 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"
.
*
"awsSTSRoleARN"
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withRoleSessionName(String roleSessionName) {
setRoleSessionName(roleSessionName);
return this;
}
/**
* * 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. *
* * @param addRecordTimestamp * 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 void setAddRecordTimestamp(String addRecordTimestamp) { this.addRecordTimestamp = addRecordTimestamp; } /** ** 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. *
* * @return 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 String getAddRecordTimestamp() { return this.addRecordTimestamp; } /** ** 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. *
* * @param addRecordTimestamp * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public KinesisStreamingSourceOptions withAddRecordTimestamp(String addRecordTimestamp) { setAddRecordTimestamp(addRecordTimestamp); return this; } /** ** 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. *
* * @param emitConsumerLagMetrics * 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 void setEmitConsumerLagMetrics(String emitConsumerLagMetrics) { this.emitConsumerLagMetrics = emitConsumerLagMetrics; } /** ** 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. *
* * @return 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 String getEmitConsumerLagMetrics() { return this.emitConsumerLagMetrics; } /** ** 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. *
* * @param emitConsumerLagMetrics * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public KinesisStreamingSourceOptions withEmitConsumerLagMetrics(String emitConsumerLagMetrics) { setEmitConsumerLagMetrics(emitConsumerLagMetrics); return this; } /** *
* 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").
*
yyyy-mm-ddTHH:MM:SSZ
(where Z represents a
* UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00+08:00").
*/
public void setStartingTimestamp(java.util.Date startingTimestamp) {
this.startingTimestamp = startingTimestamp;
}
/**
*
* 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").
*
yyyy-mm-ddTHH:MM:SSZ
(where Z represents
* a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00+08:00").
*/
public java.util.Date getStartingTimestamp() {
return this.startingTimestamp;
}
/**
*
* 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").
*
yyyy-mm-ddTHH:MM:SSZ
(where Z represents a
* UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00+08:00").
* @return Returns a reference to this object so that method calls can be chained together.
*/
public KinesisStreamingSourceOptions withStartingTimestamp(java.util.Date startingTimestamp) {
setStartingTimestamp(startingTimestamp);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getEndpointUrl() != null)
sb.append("EndpointUrl: ").append(getEndpointUrl()).append(",");
if (getStreamName() != null)
sb.append("StreamName: ").append(getStreamName()).append(",");
if (getClassification() != null)
sb.append("Classification: ").append(getClassification()).append(",");
if (getDelimiter() != null)
sb.append("Delimiter: ").append(getDelimiter()).append(",");
if (getStartingPosition() != null)
sb.append("StartingPosition: ").append(getStartingPosition()).append(",");
if (getMaxFetchTimeInMs() != null)
sb.append("MaxFetchTimeInMs: ").append(getMaxFetchTimeInMs()).append(",");
if (getMaxFetchRecordsPerShard() != null)
sb.append("MaxFetchRecordsPerShard: ").append(getMaxFetchRecordsPerShard()).append(",");
if (getMaxRecordPerRead() != null)
sb.append("MaxRecordPerRead: ").append(getMaxRecordPerRead()).append(",");
if (getAddIdleTimeBetweenReads() != null)
sb.append("AddIdleTimeBetweenReads: ").append(getAddIdleTimeBetweenReads()).append(",");
if (getIdleTimeBetweenReadsInMs() != null)
sb.append("IdleTimeBetweenReadsInMs: ").append(getIdleTimeBetweenReadsInMs()).append(",");
if (getDescribeShardInterval() != null)
sb.append("DescribeShardInterval: ").append(getDescribeShardInterval()).append(",");
if (getNumRetries() != null)
sb.append("NumRetries: ").append(getNumRetries()).append(",");
if (getRetryIntervalMs() != null)
sb.append("RetryIntervalMs: ").append(getRetryIntervalMs()).append(",");
if (getMaxRetryIntervalMs() != null)
sb.append("MaxRetryIntervalMs: ").append(getMaxRetryIntervalMs()).append(",");
if (getAvoidEmptyBatches() != null)
sb.append("AvoidEmptyBatches: ").append(getAvoidEmptyBatches()).append(",");
if (getStreamArn() != null)
sb.append("StreamArn: ").append(getStreamArn()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn()).append(",");
if (getRoleSessionName() != null)
sb.append("RoleSessionName: ").append(getRoleSessionName()).append(",");
if (getAddRecordTimestamp() != null)
sb.append("AddRecordTimestamp: ").append(getAddRecordTimestamp()).append(",");
if (getEmitConsumerLagMetrics() != null)
sb.append("EmitConsumerLagMetrics: ").append(getEmitConsumerLagMetrics()).append(",");
if (getStartingTimestamp() != null)
sb.append("StartingTimestamp: ").append(getStartingTimestamp());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof KinesisStreamingSourceOptions == false)
return false;
KinesisStreamingSourceOptions other = (KinesisStreamingSourceOptions) obj;
if (other.getEndpointUrl() == null ^ this.getEndpointUrl() == null)
return false;
if (other.getEndpointUrl() != null && other.getEndpointUrl().equals(this.getEndpointUrl()) == false)
return false;
if (other.getStreamName() == null ^ this.getStreamName() == null)
return false;
if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false)
return false;
if (other.getClassification() == null ^ this.getClassification() == null)
return false;
if (other.getClassification() != null && other.getClassification().equals(this.getClassification()) == false)
return false;
if (other.getDelimiter() == null ^ this.getDelimiter() == null)
return false;
if (other.getDelimiter() != null && other.getDelimiter().equals(this.getDelimiter()) == false)
return false;
if (other.getStartingPosition() == null ^ this.getStartingPosition() == null)
return false;
if (other.getStartingPosition() != null && other.getStartingPosition().equals(this.getStartingPosition()) == false)
return false;
if (other.getMaxFetchTimeInMs() == null ^ this.getMaxFetchTimeInMs() == null)
return false;
if (other.getMaxFetchTimeInMs() != null && other.getMaxFetchTimeInMs().equals(this.getMaxFetchTimeInMs()) == false)
return false;
if (other.getMaxFetchRecordsPerShard() == null ^ this.getMaxFetchRecordsPerShard() == null)
return false;
if (other.getMaxFetchRecordsPerShard() != null && other.getMaxFetchRecordsPerShard().equals(this.getMaxFetchRecordsPerShard()) == false)
return false;
if (other.getMaxRecordPerRead() == null ^ this.getMaxRecordPerRead() == null)
return false;
if (other.getMaxRecordPerRead() != null && other.getMaxRecordPerRead().equals(this.getMaxRecordPerRead()) == false)
return false;
if (other.getAddIdleTimeBetweenReads() == null ^ this.getAddIdleTimeBetweenReads() == null)
return false;
if (other.getAddIdleTimeBetweenReads() != null && other.getAddIdleTimeBetweenReads().equals(this.getAddIdleTimeBetweenReads()) == false)
return false;
if (other.getIdleTimeBetweenReadsInMs() == null ^ this.getIdleTimeBetweenReadsInMs() == null)
return false;
if (other.getIdleTimeBetweenReadsInMs() != null && other.getIdleTimeBetweenReadsInMs().equals(this.getIdleTimeBetweenReadsInMs()) == false)
return false;
if (other.getDescribeShardInterval() == null ^ this.getDescribeShardInterval() == null)
return false;
if (other.getDescribeShardInterval() != null && other.getDescribeShardInterval().equals(this.getDescribeShardInterval()) == false)
return false;
if (other.getNumRetries() == null ^ this.getNumRetries() == null)
return false;
if (other.getNumRetries() != null && other.getNumRetries().equals(this.getNumRetries()) == false)
return false;
if (other.getRetryIntervalMs() == null ^ this.getRetryIntervalMs() == null)
return false;
if (other.getRetryIntervalMs() != null && other.getRetryIntervalMs().equals(this.getRetryIntervalMs()) == false)
return false;
if (other.getMaxRetryIntervalMs() == null ^ this.getMaxRetryIntervalMs() == null)
return false;
if (other.getMaxRetryIntervalMs() != null && other.getMaxRetryIntervalMs().equals(this.getMaxRetryIntervalMs()) == false)
return false;
if (other.getAvoidEmptyBatches() == null ^ this.getAvoidEmptyBatches() == null)
return false;
if (other.getAvoidEmptyBatches() != null && other.getAvoidEmptyBatches().equals(this.getAvoidEmptyBatches()) == false)
return false;
if (other.getStreamArn() == null ^ this.getStreamArn() == null)
return false;
if (other.getStreamArn() != null && other.getStreamArn().equals(this.getStreamArn()) == false)
return false;
if (other.getRoleArn() == null ^ this.getRoleArn() == null)
return false;
if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
return false;
if (other.getRoleSessionName() == null ^ this.getRoleSessionName() == null)
return false;
if (other.getRoleSessionName() != null && other.getRoleSessionName().equals(this.getRoleSessionName()) == false)
return false;
if (other.getAddRecordTimestamp() == null ^ this.getAddRecordTimestamp() == null)
return false;
if (other.getAddRecordTimestamp() != null && other.getAddRecordTimestamp().equals(this.getAddRecordTimestamp()) == false)
return false;
if (other.getEmitConsumerLagMetrics() == null ^ this.getEmitConsumerLagMetrics() == null)
return false;
if (other.getEmitConsumerLagMetrics() != null && other.getEmitConsumerLagMetrics().equals(this.getEmitConsumerLagMetrics()) == false)
return false;
if (other.getStartingTimestamp() == null ^ this.getStartingTimestamp() == null)
return false;
if (other.getStartingTimestamp() != null && other.getStartingTimestamp().equals(this.getStartingTimestamp()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEndpointUrl() == null) ? 0 : getEndpointUrl().hashCode());
hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode());
hashCode = prime * hashCode + ((getClassification() == null) ? 0 : getClassification().hashCode());
hashCode = prime * hashCode + ((getDelimiter() == null) ? 0 : getDelimiter().hashCode());
hashCode = prime * hashCode + ((getStartingPosition() == null) ? 0 : getStartingPosition().hashCode());
hashCode = prime * hashCode + ((getMaxFetchTimeInMs() == null) ? 0 : getMaxFetchTimeInMs().hashCode());
hashCode = prime * hashCode + ((getMaxFetchRecordsPerShard() == null) ? 0 : getMaxFetchRecordsPerShard().hashCode());
hashCode = prime * hashCode + ((getMaxRecordPerRead() == null) ? 0 : getMaxRecordPerRead().hashCode());
hashCode = prime * hashCode + ((getAddIdleTimeBetweenReads() == null) ? 0 : getAddIdleTimeBetweenReads().hashCode());
hashCode = prime * hashCode + ((getIdleTimeBetweenReadsInMs() == null) ? 0 : getIdleTimeBetweenReadsInMs().hashCode());
hashCode = prime * hashCode + ((getDescribeShardInterval() == null) ? 0 : getDescribeShardInterval().hashCode());
hashCode = prime * hashCode + ((getNumRetries() == null) ? 0 : getNumRetries().hashCode());
hashCode = prime * hashCode + ((getRetryIntervalMs() == null) ? 0 : getRetryIntervalMs().hashCode());
hashCode = prime * hashCode + ((getMaxRetryIntervalMs() == null) ? 0 : getMaxRetryIntervalMs().hashCode());
hashCode = prime * hashCode + ((getAvoidEmptyBatches() == null) ? 0 : getAvoidEmptyBatches().hashCode());
hashCode = prime * hashCode + ((getStreamArn() == null) ? 0 : getStreamArn().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
hashCode = prime * hashCode + ((getRoleSessionName() == null) ? 0 : getRoleSessionName().hashCode());
hashCode = prime * hashCode + ((getAddRecordTimestamp() == null) ? 0 : getAddRecordTimestamp().hashCode());
hashCode = prime * hashCode + ((getEmitConsumerLagMetrics() == null) ? 0 : getEmitConsumerLagMetrics().hashCode());
hashCode = prime * hashCode + ((getStartingTimestamp() == null) ? 0 : getStartingTimestamp().hashCode());
return hashCode;
}
@Override
public KinesisStreamingSourceOptions clone() {
try {
return (KinesisStreamingSourceOptions) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.glue.model.transform.KinesisStreamingSourceOptionsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}