smithy4s.com.amazonaws.kinesis.Kinesis.scala Maven / Gradle / Ivy
Show all versions of kinesis4cats-smithy4s-client_3 Show documentation
package com.amazonaws.kinesis
import smithy4s.Endpoint
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.Service
import smithy4s.ShapeId
import smithy4s.Timestamp
import smithy4s.Transformation
import smithy4s.kinds.PolyFunction5
import smithy4s.kinds.toPolyFunction5.const5
import smithy4s.schema.ErrorSchema
import smithy4s.schema.OperationSchema
import smithy4s.schema.Schema.bijection
import smithy4s.schema.Schema.union
import smithy4s.schema.Schema.unit
import smithy4s.schema.StreamingSchema
/** Amazon Kinesis Data Streams Service API Reference
* Amazon Kinesis Data Streams is a managed service that scales elastically for real-time
* processing of streaming big data.
*/
trait KinesisGen[F[_, _, _, _, _]] {
self =>
/** Adds or updates tags for the specified Kinesis data stream. You can assign up to 50
* tags to a data stream.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* If tags have already been assigned to the stream, AddTagsToStream
* overwrites any existing tags that correspond to the specified tag keys.
*
* AddTagsToStream has a limit of five transactions per second per
* account.
* @param StreamName
* The name of the stream.
* @param Tags
* A set of up to 10 key-value pairs to use to create the tags.
* @param StreamARN
* The ARN of the stream.
*/
def addTagsToStream(tags: Map[TagKey, TagValue], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[AddTagsToStreamInput, KinesisOperation.AddTagsToStreamError, Unit, Nothing, Nothing]
/** Creates a Kinesis data stream. A stream captures and transports data records that are
* continuously emitted from different data sources or producers.
* Scale-out within a stream is explicitly supported by means of shards, which are uniquely
* identified groups of data records in a stream.
* You can create your data stream using either on-demand or provisioned capacity mode.
* Data streams with an on-demand mode require no capacity planning and automatically scale
* to handle gigabytes of write and read throughput per minute. With the on-demand mode,
* Kinesis Data Streams automatically manages the shards in order to provide the necessary
* throughput. For the data streams with a provisioned mode, you must specify the number of
* shards for the data stream. Each shard can support reads up to five transactions per
* second, up to a maximum data read total of 2 MiB per second. Each shard can support
* writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per
* second. If the amount of data input increases or decreases, you can add or remove
* shards.
* The stream name identifies the stream. The name is scoped to the Amazon Web Services
* account used by the application. It is also scoped by Amazon Web Services Region. That
* is, two streams in two different accounts can have the same name, and two streams in the
* same account, but in two different Regions, can have the same name.
*
* CreateStream
is an asynchronous operation. Upon receiving a
* CreateStream
request, Kinesis Data Streams immediately returns and sets
* the stream status to CREATING
. After the stream is created, Kinesis Data
* Streams sets the stream status to ACTIVE
. You should perform read and write
* operations only on an ACTIVE
stream.
* You receive a LimitExceededException
when making a
* CreateStream
request when you try to do one of the following:
*
* -
*
Have more than five streams in the CREATING
state at any point in
* time.
*
* -
*
Create more shards than are authorized for your account.
*
*
* For the default shard limit for an Amazon Web Services account, see Amazon
* Kinesis Data Streams Limits in the Amazon Kinesis Data Streams
* Developer Guide. To increase this limit, contact Amazon Web Services
* Support.
* You can use DescribeStreamSummary to check the stream status, which
* is returned in StreamStatus
.
*
* CreateStream has a limit of five transactions per second per
* account.
* @param StreamName
* A name to identify the stream. The stream name is scoped to the Amazon Web Services
* account used by the application that creates the stream. It is also scoped by Amazon Web Services Region. That is, two streams in two different Amazon Web Services accounts
* can have the same name. Two streams in the same Amazon Web Services account but in two
* different Regions can also have the same name.
* @param ShardCount
* The number of shards that the stream will use. The throughput of the stream is a
* function of the number of shards; more shards are required for greater provisioned
* throughput.
* @param StreamModeDetails
* Indicates the capacity mode of the data stream. Currently, in Kinesis Data Streams,
* you can choose between an on-demand capacity mode and a
* provisioned capacity mode for your data
* streams.
*/
def createStream(streamName: StreamName, shardCount: Option[PositiveIntegerObject] = None, streamModeDetails: Option[StreamModeDetails] = None): F[CreateStreamInput, KinesisOperation.CreateStreamError, Unit, Nothing, Nothing]
/** Decreases the Kinesis data stream's retention period, which is the length of time data
* records are accessible after they are added to the stream. The minimum value of a
* stream's retention period is 24 hours.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* This operation may result in lost data. For example, if the stream's retention period
* is 48 hours and is decreased to 24 hours, any data already in the stream that is older
* than 24 hours is inaccessible.
* @param StreamName
* The name of the stream to modify.
* @param RetentionPeriodHours
* The new retention period of the stream, in hours. Must be less than the current
* retention period.
* @param StreamARN
* The ARN of the stream.
*/
def decreaseStreamRetentionPeriod(retentionPeriodHours: RetentionPeriodHours, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[DecreaseStreamRetentionPeriodInput, KinesisOperation.DecreaseStreamRetentionPeriodError, Unit, Nothing, Nothing]
/** Deletes a Kinesis data stream and all its shards and data. You must shut down any
* applications that are operating on the stream before you delete the stream. If an
* application attempts to operate on a deleted stream, it receives the exception
* ResourceNotFoundException
.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* If the stream is in the ACTIVE
state, you can delete it. After a
* DeleteStream
request, the specified stream is in the
* DELETING
state until Kinesis Data Streams completes the
* deletion.
*
* Note: Kinesis Data Streams might continue to accept
* data read and write operations, such as PutRecord, PutRecords, and GetRecords, on a stream in the
* DELETING
state until the stream deletion is complete.
* When you delete a stream, any shards in that stream are also deleted, and any tags are
* dissociated from the stream.
* You can use the DescribeStreamSummary operation to check the state
* of the stream, which is returned in StreamStatus
.
*
* DeleteStream has a limit of five transactions per second per
* account.
* @param StreamName
* The name of the stream to delete.
* @param EnforceConsumerDeletion
* If this parameter is unset (null
) or if you set it to false
,
* and the stream has registered consumers, the call to DeleteStream
fails
* with a ResourceInUseException
.
* @param StreamARN
* The ARN of the stream.
*/
def deleteStream(streamName: Option[StreamName] = None, enforceConsumerDeletion: Option[BooleanObject] = None, streamARN: Option[StreamARN] = None): F[DeleteStreamInput, KinesisOperation.DeleteStreamError, Unit, Nothing, Nothing]
/** To deregister a consumer, provide its ARN. Alternatively, you can provide the ARN of
* the data stream and the name you gave the consumer when you registered it. You may also
* provide all three parameters, as long as they don't conflict with each other. If you
* don't know the name or ARN of the consumer that you want to deregister, you can use the
* ListStreamConsumers operation to get a list of the descriptions of
* all the consumers that are currently registered with a given data stream. The
* description of a consumer contains its name and ARN.
* This operation has a limit of five transactions per second per stream.
* @param StreamARN
* The ARN of the Kinesis data stream that the consumer is registered with. For more
* information, see Amazon Resource Names (ARNs) and Amazon Web Services Service
* Namespaces.
* @param ConsumerName
* The name that you gave to the consumer.
* @param ConsumerARN
* The ARN returned by Kinesis Data Streams when you registered the consumer. If you
* don't know the ARN of the consumer that you want to deregister, you can use the
* ListStreamConsumers operation to get a list of the descriptions of all the consumers
* that are currently registered with a given data stream. The description of a consumer
* contains its ARN.
*/
def deregisterStreamConsumer(streamARN: Option[StreamARN] = None, consumerName: Option[ConsumerName] = None, consumerARN: Option[ConsumerARN] = None): F[DeregisterStreamConsumerInput, KinesisOperation.DeregisterStreamConsumerError, Unit, Nothing, Nothing]
/** Describes the shard limits and usage for the account.
* If you update your account limits, the old limits might be returned for a few
* minutes.
* This operation has a limit of one transaction per second per account.
*/
def describeLimits(): F[DescribeLimitsInput, KinesisOperation.DescribeLimitsError, DescribeLimitsOutput, Nothing, Nothing]
/** Describes the specified Kinesis data stream.
*
* This API has been revised. It's highly recommended that you use the DescribeStreamSummary API to get a summarized description of the
* specified Kinesis data stream and the ListShards API to list the
* shards in a specified data stream and obtain information about each shard.
*
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* The information returned includes the stream name, Amazon Resource Name (ARN),
* creation time, enhanced metric configuration, and shard map. The shard map is an array
* of shard objects. For each shard object, there is the hash key and sequence number
* ranges that the shard spans, and the IDs of any earlier shards that played in a role in
* creating the shard. Every record ingested in the stream is identified by a sequence
* number, which is assigned when the record is put into the stream.
* You can limit the number of shards returned by each call. For more information, see
* Retrieving
* Shards from a Stream in the Amazon Kinesis Data Streams Developer
* Guide.
* There are no guarantees about the chronological order shards returned. To process
* shards in chronological order, use the ID of the parent shard to track the lineage to
* the oldest shard.
* This operation has a limit of 10 transactions per second per account.
* @param StreamName
* The name of the stream to describe.
* @param Limit
* The maximum number of shards to return in a single call. The default value is 100. If
* you specify a value greater than 100, at most 100 results are returned.
* @param ExclusiveStartShardId
* The shard ID of the shard to start with.
* Specify this parameter to indicate that you want to describe the stream starting with
* the shard whose ID immediately follows ExclusiveStartShardId
.
* If you don't specify this parameter, the default behavior for
* DescribeStream
is to describe the stream starting with the first shard
* in the stream.
* @param StreamARN
* The ARN of the stream.
*/
def describeStream(streamName: Option[StreamName] = None, limit: Option[DescribeStreamInputLimit] = None, exclusiveStartShardId: Option[ShardId] = None, streamARN: Option[StreamARN] = None): F[DescribeStreamInput, KinesisOperation.DescribeStreamError, DescribeStreamOutput, Nothing, Nothing]
/** To get the description of a registered consumer, provide the ARN of the consumer.
* Alternatively, you can provide the ARN of the data stream and the name you gave the
* consumer when you registered it. You may also provide all three parameters, as long as
* they don't conflict with each other. If you don't know the name or ARN of the consumer
* that you want to describe, you can use the ListStreamConsumers
* operation to get a list of the descriptions of all the consumers that are currently
* registered with a given data stream.
* This operation has a limit of 20 transactions per second per stream.
* @param StreamARN
* The ARN of the Kinesis data stream that the consumer is registered with. For more
* information, see Amazon Resource Names (ARNs) and Amazon Web Services Service
* Namespaces.
* @param ConsumerName
* The name that you gave to the consumer.
* @param ConsumerARN
* The ARN returned by Kinesis Data Streams when you registered the consumer.
*/
def describeStreamConsumer(streamARN: Option[StreamARN] = None, consumerName: Option[ConsumerName] = None, consumerARN: Option[ConsumerARN] = None): F[DescribeStreamConsumerInput, KinesisOperation.DescribeStreamConsumerError, DescribeStreamConsumerOutput, Nothing, Nothing]
/** Provides a summarized description of the specified Kinesis data stream without the
* shard list.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* The information returned includes the stream name, Amazon Resource Name (ARN), status,
* record retention period, approximate creation time, monitoring, encryption details, and
* open shard count.
*
* DescribeStreamSummary has a limit of 20 transactions per second per
* account.
* @param StreamName
* The name of the stream to describe.
* @param StreamARN
* The ARN of the stream.
*/
def describeStreamSummary(streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[DescribeStreamSummaryInput, KinesisOperation.DescribeStreamSummaryError, DescribeStreamSummaryOutput, Nothing, Nothing]
/** Disables enhanced monitoring.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* @param StreamName
* The name of the Kinesis data stream for which to disable enhanced monitoring.
* @param ShardLevelMetrics
* List of shard-level metrics to disable.
* The following are the valid shard-level metrics. The value "ALL
" disables
* every metric.
*
* -
*
* IncomingBytes
*
*
* -
*
* IncomingRecords
*
*
* -
*
* OutgoingBytes
*
*
* -
*
* OutgoingRecords
*
*
* -
*
* WriteProvisionedThroughputExceeded
*
*
* -
*
* ReadProvisionedThroughputExceeded
*
*
* -
*
* IteratorAgeMilliseconds
*
*
* -
*
* ALL
*
*
*
* For more information, see Monitoring the Amazon
* Kinesis Data Streams Service with Amazon CloudWatch in the Amazon
* Kinesis Data Streams Developer Guide.
* @param StreamARN
* The ARN of the stream.
*/
def disableEnhancedMonitoring(shardLevelMetrics: List[MetricsName], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[DisableEnhancedMonitoringInput, KinesisOperation.DisableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing]
/** Enables enhanced Kinesis data stream monitoring for shard-level metrics.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* @param StreamName
* The name of the stream for which to enable enhanced monitoring.
* @param ShardLevelMetrics
* List of shard-level metrics to enable.
* The following are the valid shard-level metrics. The value "ALL
" enables
* every metric.
*
* -
*
* IncomingBytes
*
*
* -
*
* IncomingRecords
*
*
* -
*
* OutgoingBytes
*
*
* -
*
* OutgoingRecords
*
*
* -
*
* WriteProvisionedThroughputExceeded
*
*
* -
*
* ReadProvisionedThroughputExceeded
*
*
* -
*
* IteratorAgeMilliseconds
*
*
* -
*
* ALL
*
*
*
* For more information, see Monitoring the Amazon
* Kinesis Data Streams Service with Amazon CloudWatch in the Amazon
* Kinesis Data Streams Developer Guide.
* @param StreamARN
* The ARN of the stream.
*/
def enableEnhancedMonitoring(shardLevelMetrics: List[MetricsName], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[EnableEnhancedMonitoringInput, KinesisOperation.EnableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing]
/** Gets data records from a Kinesis data stream's shard.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter in addition to the ShardIterator
parameter.
*
* Specify a shard iterator using the ShardIterator
parameter. The shard
* iterator specifies the position in the shard from which you want to start reading data
* records sequentially. If there are no records available in the portion of the shard that
* the iterator points to, GetRecords returns an empty list. It might
* take multiple calls to get to a portion of the shard that contains records.
* You can scale by provisioning multiple shards per stream while considering service
* limits (for more information, see Amazon Kinesis Data Streams
* Limits in the Amazon Kinesis Data Streams Developer
* Guide). Your application should have one thread per shard, each reading
* continuously from its stream. To read from a stream continually, call GetRecords in a loop. Use GetShardIterator to get the
* shard iterator to specify in the first GetRecords call. GetRecords returns a new shard iterator in
* NextShardIterator
. Specify the shard iterator returned in
* NextShardIterator
in subsequent calls to GetRecords.
* If the shard has been closed, the shard iterator can't return more data and GetRecords returns null
in NextShardIterator
.
* You can terminate the loop when the shard is closed, or when the shard iterator reaches
* the record with the sequence number or other attribute that marks it as the last record
* to process.
* Each data record can be up to 1 MiB in size, and each shard can read up to 2 MiB per
* second. You can ensure that your calls don't exceed the maximum supported size or
* throughput by using the Limit
parameter to specify the maximum number of
* records that GetRecords can return. Consider your average record size
* when determining this limit. The maximum number of records that can be returned per call
* is 10,000.
* The size of the data returned by GetRecords varies depending on the
* utilization of the shard. It is recommended that consumer applications retrieve records
* via the GetRecords
command using the 5 TPS limit to remain caught up.
* Retrieving records less frequently can lead to consumer applications falling behind. The
* maximum size of data that GetRecords can return is 10 MiB. If a call
* returns this amount of data, subsequent calls made within the next 5 seconds throw
* ProvisionedThroughputExceededException
. If there is insufficient
* provisioned throughput on the stream, subsequent calls made within the next 1 second
* throw ProvisionedThroughputExceededException
. GetRecords
* doesn't return any data when it throws an exception. For this reason, we recommend that
* you wait 1 second between calls to GetRecords. However, it's possible
* that the application will get exceptions for longer than 1 second.
* To detect whether the application is falling behind in processing, you can use the
* MillisBehindLatest
response attribute. You can also monitor the stream
* using CloudWatch metrics and other mechanisms (see Monitoring in the Amazon
* Kinesis Data Streams Developer Guide).
* Each Amazon Kinesis record includes a value, ApproximateArrivalTimestamp
,
* that is set when a stream successfully receives and stores a record. This is commonly
* referred to as a server-side time stamp, whereas a client-side time stamp is set when a
* data producer creates or sends the record to a stream (a data producer is any data
* source putting data records into a stream, for example with PutRecords). The time stamp has millisecond precision. There are no guarantees about the time
* stamp accuracy, or that the time stamp is always increasing. For example, records in a
* shard or across a stream might have time stamps that are out of order.
* This operation has a limit of five transactions per second per shard.
* @param ShardIterator
* The position in the shard from which you want to start sequentially reading data
* records. A shard iterator specifies this position using the sequence number of a data
* record in the shard.
* @param Limit
* The maximum number of records to return. Specify a value of up to 10,000. If you
* specify a value that is greater than 10,000, GetRecords throws
* InvalidArgumentException
. The default value is 10,000.
* @param StreamARN
* The ARN of the stream.
*/
def getRecords(shardIterator: ShardIterator, limit: Option[GetRecordsInputLimit] = None, streamARN: Option[StreamARN] = None): F[GetRecordsInput, KinesisOperation.GetRecordsError, GetRecordsOutput, Nothing, Nothing]
/** Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it is
* returned to the requester.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* A shard iterator specifies the shard position from which to start reading data records
* sequentially. The position is specified using the sequence number of a data record in a
* shard. A sequence number is the identifier associated with every record ingested in the
* stream, and is assigned when a record is put into the stream. Each stream has one or
* more shards.
* You must specify the shard iterator type. For example, you can set the
* ShardIteratorType
parameter to read exactly from the position denoted
* by a specific sequence number by using the AT_SEQUENCE_NUMBER
shard
* iterator type. Alternatively, the parameter can read right after the sequence number by
* using the AFTER_SEQUENCE_NUMBER
shard iterator type, using sequence numbers
* returned by earlier calls to PutRecord, PutRecords,
* GetRecords, or DescribeStream. In the request,
* you can specify the shard iterator type AT_TIMESTAMP
to read records from
* an arbitrary point in time, TRIM_HORIZON
to cause
* ShardIterator
to point to the last untrimmed record in the shard in the
* system (the oldest data record in the shard), or LATEST
so that you always
* read the most recent data in the shard.
* When you read repeatedly from a stream, use a GetShardIterator
* request to get the first shard iterator for use in your first GetRecords request and for subsequent reads use the shard iterator returned by the GetRecords request in NextShardIterator
. A new shard
* iterator is returned by every GetRecords request in
* NextShardIterator
, which you use in the ShardIterator
* parameter of the next GetRecords request.
* If a GetShardIterator request is made too often, you receive a
* ProvisionedThroughputExceededException
. For more information about
* throughput limits, see GetRecords, and Streams Limits in the
* Amazon Kinesis Data Streams Developer Guide.
* If the shard is closed, GetShardIterator returns a valid iterator
* for the last sequence number of the shard. A shard can be closed as a result of using
* SplitShard or MergeShards.
*
* GetShardIterator has a limit of five transactions per second per
* account per open shard.
* @param StreamARN
* The ARN of the stream.
* @param Timestamp
* The time stamp of the data record from which to start reading. Used with shard
* iterator type AT_TIMESTAMP. A time stamp is the Unix epoch date with precision in
* milliseconds. For example, 2016-04-04T19:58:46.480-00:00
or
* 1459799926.480
. If a record with this exact time stamp does not exist,
* the iterator returned is for the next (later) record. If the time stamp is older than
* the current trim horizon, the iterator returned is for the oldest untrimmed data record
* (TRIM_HORIZON).
* @param ShardId
* The shard ID of the Kinesis Data Streams shard to get the iterator for.
* @param StreamName
* The name of the Amazon Kinesis data stream.
* @param ShardIteratorType
* Determines how the shard iterator is used to start reading data records from the
* shard.
* The following are the valid Amazon Kinesis shard iterator types:
*
* -
*
AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific
* sequence number, provided in the value
* StartingSequenceNumber
.
*
* -
*
AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted by a
* specific sequence number, provided in the value
* StartingSequenceNumber
.
*
* -
*
AT_TIMESTAMP - Start reading from the position denoted by a specific time
* stamp, provided in the value Timestamp
.
*
* -
*
TRIM_HORIZON - Start reading at the last untrimmed record in the shard in the
* system, which is the oldest data record in the shard.
*
* -
*
LATEST - Start reading just after the most recent record in the shard, so that
* you always read the most recent data in the shard.
*
*
* @param StartingSequenceNumber
* The sequence number of the data record in the shard from which to start reading. Used
* with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER.
*/
def getShardIterator(shardId: ShardId, shardIteratorType: ShardIteratorType, streamName: Option[StreamName] = None, startingSequenceNumber: Option[SequenceNumber] = None, timestamp: Option[Timestamp] = None, streamARN: Option[StreamARN] = None): F[GetShardIteratorInput, KinesisOperation.GetShardIteratorError, GetShardIteratorOutput, Nothing, Nothing]
/** Increases the Kinesis data stream's retention period, which is the length of time data
* records are accessible after they are added to the stream. The maximum value of a
* stream's retention period is 8760 hours (365 days).
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* If you choose a longer stream retention period, this operation increases the time
* period during which records that have not yet expired are accessible. However, it does
* not make previous, expired data (older than the stream's previous retention period)
* accessible after the operation has been called. For example, if a stream's retention
* period is set to 24 hours and is increased to 168 hours, any data that is older than 24
* hours remains inaccessible to consumer applications.
* @param StreamName
* The name of the stream to modify.
* @param RetentionPeriodHours
* The new retention period of the stream, in hours. Must be more than the current
* retention period.
* @param StreamARN
* The ARN of the stream.
*/
def increaseStreamRetentionPeriod(retentionPeriodHours: RetentionPeriodHours, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[IncreaseStreamRetentionPeriodInput, KinesisOperation.IncreaseStreamRetentionPeriodError, Unit, Nothing, Nothing]
/** Lists the shards in a stream and provides information about each shard. This operation
* has a limit of 1000 transactions per second per data stream.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* This action does not list expired shards. For information about expired shards, see
* Data Routing, Data Persistence, and Shard State after a Reshard.
*
* This API is a new operation that is used by the Amazon Kinesis Client Library
* (KCL). If you have a fine-grained IAM policy that only allows specific operations,
* you must update your policy to allow calls to this API. For more information, see
* Controlling Access to Amazon Kinesis Data Streams Resources Using
* IAM.
*
* @param StreamARN
* The ARN of the stream.
* @param MaxResults
* The maximum number of shards to return in a single call to ListShards
.
* The maximum number of shards to return in a single call. The default value is 1000. If
* you specify a value greater than 1000, at most 1000 results are returned.
* When the number of shards to be listed is greater than the value of
* MaxResults
, the response contains a NextToken
value that
* you can use in a subsequent call to ListShards
to list the next set of
* shards.
* @param ExclusiveStartShardId
* Specify this parameter to indicate that you want to list the shards starting with the
* shard whose ID immediately follows ExclusiveStartShardId
.
* If you don't specify this parameter, the default behavior is for
* ListShards
to list the shards starting with the first one in the
* stream.
* You cannot specify this parameter if you specify NextToken
.
* @param StreamCreationTimestamp
* Specify this input parameter to distinguish data streams that have the same name. For
* example, if you create a data stream and then delete it, and you later create another
* data stream with the same name, you can use this input parameter to specify which of the
* two streams you want to list the shards for.
* You cannot specify this parameter if you specify the NextToken
* parameter.
* @param StreamName
* The name of the data stream whose shards you want to list.
* You cannot specify this parameter if you specify the NextToken
* parameter.
* @param NextToken
* When the number of shards in the data stream is greater than the default value for the
* MaxResults
parameter, or if you explicitly specify a value for
* MaxResults
that is less than the number of shards in the data stream,
* the response includes a pagination token named NextToken
. You can specify
* this NextToken
value in a subsequent call to ListShards
to
* list the next set of shards.
* Don't specify StreamName
or StreamCreationTimestamp
if you
* specify NextToken
because the latter unambiguously identifies the
* stream.
* You can optionally specify a value for the MaxResults
parameter when you
* specify NextToken
. If you specify a MaxResults
value that is
* less than the number of shards that the operation returns if you don't specify
* MaxResults
, the response will contain a new NextToken
* value. You can use the new NextToken
value in a subsequent call to the
* ListShards
operation.
*
* Tokens expire after 300 seconds. When you obtain a value for
* NextToken
in the response to a call to ListShards
, you
* have 300 seconds to use that value. If you specify an expired token in a call to
* ListShards
, you get ExpiredNextTokenException
.
*
* @param ShardFilter
* Enables you to filter out the response of the ListShards
API. You can
* only specify one filter at a time.
* If you use the ShardFilter
parameter when invoking the ListShards API,
* the Type
is the required property and must be specified. If you specify the
* AT_TRIM_HORIZON
, FROM_TRIM_HORIZON
, or
* AT_LATEST
types, you do not need to specify either the
* ShardId
or the Timestamp
optional properties.
* If you specify the AFTER_SHARD_ID
type, you must also provide the value
* for the optional ShardId
property. The ShardId
property is
* identical in fuctionality to the ExclusiveStartShardId
parameter of the
* ListShards
API. When ShardId
property is specified, the
* response includes the shards starting with the shard whose ID immediately follows the
* ShardId
that you provided.
* If you specify the AT_TIMESTAMP
or FROM_TIMESTAMP_ID
type,
* you must also provide the value for the optional Timestamp
property. If you
* specify the AT_TIMESTAMP type, then all shards that were open at the provided timestamp
* are returned. If you specify the FROM_TIMESTAMP type, then all shards starting from the
* provided timestamp to TIP are returned.
*/
def listShards(streamName: Option[StreamName] = None, nextToken: Option[NextToken] = None, exclusiveStartShardId: Option[ShardId] = None, maxResults: Option[ListShardsInputLimit] = None, streamCreationTimestamp: Option[Timestamp] = None, shardFilter: Option[ShardFilter] = None, streamARN: Option[StreamARN] = None): F[ListShardsInput, KinesisOperation.ListShardsError, ListShardsOutput, Nothing, Nothing]
/** Lists the consumers registered to receive data from a stream using enhanced fan-out,
* and provides information about each consumer.
* This operation has a limit of 5 transactions per second per stream.
* @param StreamARN
* The ARN of the Kinesis data stream for which you want to list the registered
* consumers. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service
* Namespaces.
* @param NextToken
* When the number of consumers that are registered with the data stream is greater than
* the default value for the MaxResults
parameter, or if you explicitly
* specify a value for MaxResults
that is less than the number of consumers
* that are registered with the data stream, the response includes a pagination token named
* NextToken
. You can specify this NextToken
value in a
* subsequent call to ListStreamConsumers
to list the next set of registered
* consumers.
* Don't specify StreamName
or StreamCreationTimestamp
if you
* specify NextToken
because the latter unambiguously identifies the
* stream.
* You can optionally specify a value for the MaxResults
parameter when you
* specify NextToken
. If you specify a MaxResults
value that is
* less than the number of consumers that the operation returns if you don't specify
* MaxResults
, the response will contain a new NextToken
* value. You can use the new NextToken
value in a subsequent call to the
* ListStreamConsumers
operation to list the next set of consumers.
*
* Tokens expire after 300 seconds. When you obtain a value for
* NextToken
in the response to a call to
* ListStreamConsumers
, you have 300 seconds to use that value. If you
* specify an expired token in a call to ListStreamConsumers
, you get
* ExpiredNextTokenException
.
*
* @param MaxResults
* The maximum number of consumers that you want a single call of
* ListStreamConsumers
to return. The default value is 100. If you specify
* a value greater than 100, at most 100 results are returned.
* @param StreamCreationTimestamp
* Specify this input parameter to distinguish data streams that have the same name. For
* example, if you create a data stream and then delete it, and you later create another
* data stream with the same name, you can use this input parameter to specify which of the
* two streams you want to list the consumers for.
* You can't specify this parameter if you specify the NextToken parameter.
*/
def listStreamConsumers(streamARN: StreamARN, nextToken: Option[NextToken] = None, maxResults: Option[ListStreamConsumersInputLimit] = None, streamCreationTimestamp: Option[Timestamp] = None): F[ListStreamConsumersInput, KinesisOperation.ListStreamConsumersError, ListStreamConsumersOutput, Nothing, Nothing]
/** Lists your Kinesis data streams.
* The number of streams may be too large to return from a single call to
* ListStreams
. You can limit the number of returned streams using the
* Limit
parameter. If you do not specify a value for the
* Limit
parameter, Kinesis Data Streams uses the default limit, which is
* currently 100.
* You can detect if there are more streams available to list by using the
* HasMoreStreams
flag from the returned output. If there are more streams
* available, you can request more streams by using the name of the last stream returned by
* the ListStreams
request in the ExclusiveStartStreamName
* parameter in a subsequent request to ListStreams
. The group of stream names
* returned by the subsequent request is then added to the list. You can continue this
* process until all the stream names have been collected in the list.
*
* ListStreams has a limit of five transactions per second per
* account.
* @param Limit
* The maximum number of streams to list. The default value is 100. If you specify a
* value greater than 100, at most 100 results are returned.
* @param ExclusiveStartStreamName
* The name of the stream to start the list with.
* @param NextToken
*
*/
def listStreams(limit: Option[ListStreamsInputLimit] = None, exclusiveStartStreamName: Option[StreamName] = None, nextToken: Option[NextToken] = None): F[ListStreamsInput, KinesisOperation.ListStreamsError, ListStreamsOutput, Nothing, Nothing]
/** Lists the tags for the specified Kinesis data stream. This operation has a limit of
* five transactions per second per account.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* @param StreamName
* The name of the stream.
* @param ExclusiveStartTagKey
* The key to use as the starting point for the list of tags. If this parameter is set,
* ListTagsForStream
gets all tags that occur after
* ExclusiveStartTagKey
.
* @param Limit
* The number of tags to return. If this number is less than the total number of tags
* associated with the stream, HasMoreTags
is set to true
. To
* list additional tags, set ExclusiveStartTagKey
to the last key in the
* response.
* @param StreamARN
* The ARN of the stream.
*/
def listTagsForStream(streamName: Option[StreamName] = None, exclusiveStartTagKey: Option[TagKey] = None, limit: Option[ListTagsForStreamInputLimit] = None, streamARN: Option[StreamARN] = None): F[ListTagsForStreamInput, KinesisOperation.ListTagsForStreamError, ListTagsForStreamOutput, Nothing, Nothing]
/** Merges two adjacent shards in a Kinesis data stream and combines them into a single
* shard to reduce the stream's capacity to ingest and transport data. This API is only
* supported for the data streams with the provisioned capacity mode. Two shards are
* considered adjacent if the union of the hash key ranges for the two shards form a
* contiguous set with no gaps. For example, if you have two shards, one with a hash key
* range of 276...381 and the other with a hash key range of 382...454, then you could
* merge these two shards into a single shard that would have a hash key range of
* 276...454. After the merge, the single child shard receives data for all hash key values
* covered by the two parent shards.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
*
* MergeShards
is called when there is a need to reduce the overall capacity
* of a stream because of excess capacity that is not being used. You must specify the
* shard to be merged and the adjacent shard for a stream. For more information about
* merging shards, see Merge Two
* Shards in the Amazon Kinesis Data Streams Developer
* Guide.
* If the stream is in the ACTIVE
state, you can call
* MergeShards
. If a stream is in the CREATING
,
* UPDATING
, or DELETING
state, MergeShards
* returns a ResourceInUseException
. If the specified stream does not exist,
* MergeShards
returns a ResourceNotFoundException
.
* You can use DescribeStreamSummary to check the state of the stream,
* which is returned in StreamStatus
.
*
* MergeShards
is an asynchronous operation. Upon receiving a
* MergeShards
request, Amazon Kinesis Data Streams immediately returns a
* response and sets the StreamStatus
to UPDATING
. After the
* operation is completed, Kinesis Data Streams sets the StreamStatus
to
* ACTIVE
. Read and write operations continue to work while the stream is
* in the UPDATING
state.
* You use DescribeStreamSummary and the ListShards
* APIs to determine the shard IDs that are specified in the MergeShards
* request.
* If you try to operate on too many streams in parallel using CreateStream, DeleteStream, MergeShards
,
* or SplitShard, you receive a LimitExceededException
.
*
* MergeShards
has a limit of five transactions per second per account.
* @param StreamName
* The name of the stream for the merge.
* @param ShardToMerge
* The shard ID of the shard to combine with the adjacent shard for the merge.
* @param AdjacentShardToMerge
* The shard ID of the adjacent shard for the merge.
* @param StreamARN
* The ARN of the stream.
*/
def mergeShards(shardToMerge: ShardId, adjacentShardToMerge: ShardId, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[MergeShardsInput, KinesisOperation.MergeShardsError, Unit, Nothing, Nothing]
/** Writes a single data record into an Amazon Kinesis data stream. Call
* PutRecord
to send data into the stream for real-time ingestion and
* subsequent processing, one record at a time. Each shard can support writes up to 1,000
* records per second, up to a maximum data write total of 1 MiB per second.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* You must specify the name of the stream that captures, stores, and transports the
* data; a partition key; and the data blob itself.
* The data blob can be any type of data; for example, a segment from a log file,
* geographic/location data, website clickstream data, and so on.
* The partition key is used by Kinesis Data Streams to distribute data across shards.
* Kinesis Data Streams segregates the data records that belong to a stream into multiple
* shards, using the partition key associated with each data record to determine the shard
* to which a given data record belongs.
* Partition keys are Unicode strings, with a maximum length limit of 256 characters for
* each key. An MD5 hash function is used to map partition keys to 128-bit integer values
* and to map associated data records to shards using the hash key ranges of the shards.
* You can override hashing the partition key to determine the shard by explicitly
* specifying a hash value using the ExplicitHashKey
parameter. For more
* information, see Adding Data to a Stream in the Amazon Kinesis Data Streams
* Developer Guide.
*
* PutRecord
returns the shard ID of where the data record was placed and the
* sequence number that was assigned to the data record.
* Sequence numbers increase over time and are specific to a shard within a stream, not
* across all shards within a stream. To guarantee strictly increasing ordering, write
* serially to a shard and use the SequenceNumberForOrdering
parameter. For
* more information, see Adding Data to a Stream in the Amazon Kinesis Data Streams
* Developer Guide.
*
* After you write a record to a stream, you cannot modify that record or its order
* within the stream.
*
* If a PutRecord
request cannot be processed because of insufficient
* provisioned throughput on the shard involved in the request, PutRecord
* throws ProvisionedThroughputExceededException
.
* By default, data records are accessible for 24 hours from the time that they are added
* to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod to modify this retention period.
* @param StreamARN
* The ARN of the stream.
* @param ExplicitHashKey
* The hash value used to explicitly determine the shard the data record is assigned to
* by overriding the partition key hash.
* @param PartitionKey
* Determines which shard in the stream the data record is assigned to. Partition keys
* are Unicode strings with a maximum length limit of 256 characters for each key. Amazon
* Kinesis Data Streams uses the partition key as input to a hash function that maps the
* partition key and associated data to a specific shard. Specifically, an MD5 hash
* function is used to map partition keys to 128-bit integer values and to map associated
* data records to shards. As a result of this hashing mechanism, all data records with the
* same partition key map to the same shard within the stream.
* @param SequenceNumberForOrdering
* Guarantees strictly increasing sequence numbers, for puts from the same client and to
* the same partition key. Usage: set the SequenceNumberForOrdering
of record
* n to the sequence number of record n-1 (as
* returned in the result when putting record n-1). If this parameter
* is not set, records are coarsely ordered based on arrival time.
* @param StreamName
* The name of the stream to put the data record into.
* @param Data
* The data blob to put into the record, which is base64-encoded when the blob is
* serialized. When the data blob (the payload before base64-encoding) is added to the
* partition key size, the total size must not exceed the maximum record size (1
* MiB).
*/
def putRecord(data: Data, partitionKey: PartitionKey, streamName: Option[StreamName] = None, explicitHashKey: Option[HashKey] = None, sequenceNumberForOrdering: Option[SequenceNumber] = None, streamARN: Option[StreamARN] = None): F[PutRecordInput, KinesisOperation.PutRecordError, PutRecordOutput, Nothing, Nothing]
/** Writes multiple data records into a Kinesis data stream in a single call (also
* referred to as a PutRecords
request). Use this operation to send data into
* the stream for data ingestion and processing.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* Each PutRecords
request can support up to 500 records. Each record in the
* request can be as large as 1 MiB, up to a limit of 5 MiB for the entire request,
* including partition keys. Each shard can support writes up to 1,000 records per second,
* up to a maximum data write total of 1 MiB per second.
* You must specify the name of the stream that captures, stores, and transports the
* data; and an array of request Records
, with each record in the array
* requiring a partition key and data blob. The record size limit applies to the total size
* of the partition key and data blob.
* The data blob can be any type of data; for example, a segment from a log file,
* geographic/location data, website clickstream data, and so on.
* The partition key is used by Kinesis Data Streams as input to a hash function that
* maps the partition key and associated data to a specific shard. An MD5 hash function is
* used to map partition keys to 128-bit integer values and to map associated data records
* to shards. As a result of this hashing mechanism, all data records with the same
* partition key map to the same shard within the stream. For more information, see Adding Data to a Stream in the Amazon Kinesis Data Streams
* Developer Guide.
* Each record in the Records
array may include an optional parameter,
* ExplicitHashKey
, which overrides the partition key to shard mapping.
* This parameter allows a data producer to determine explicitly the shard where the record
* is stored. For more information, see Adding Multiple Records with PutRecords in the Amazon Kinesis
* Data Streams Developer Guide.
* The PutRecords
response includes an array of response
* Records
. Each record in the response array directly correlates with a
* record in the request array using natural ordering, from the top to the bottom of the
* request and response. The response Records
array always includes the same
* number of records as the request array.
* The response Records
array includes both successfully and unsuccessfully
* processed records. Kinesis Data Streams attempts to process all records in each
* PutRecords
request. A single record failure does not stop the
* processing of subsequent records. As a result, PutRecords doesn't guarantee the ordering
* of records. If you need to read records in the same order they are written to the
* stream, use PutRecord instead of PutRecords
, and write to
* the same shard.
* A successfully processed record includes ShardId
and
* SequenceNumber
values. The ShardId
parameter identifies
* the shard in the stream where the record is stored. The SequenceNumber
* parameter is an identifier assigned to the put record, unique to all records in the
* stream.
* An unsuccessfully processed record includes ErrorCode
and
* ErrorMessage
values. ErrorCode
reflects the type of error
* and can be one of the following values:
* ProvisionedThroughputExceededException
or InternalFailure
.
* ErrorMessage
provides more detailed information about the
* ProvisionedThroughputExceededException
exception including the account
* ID, stream name, and shard ID of the record that was throttled. For more information
* about partially successful responses, see Adding Multiple Records with PutRecords in the Amazon Kinesis
* Data Streams Developer Guide.
*
* After you write a record to a stream, you cannot modify that record or its order
* within the stream.
*
* By default, data records are accessible for 24 hours from the time that they are added
* to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod to modify this retention period.
* @param Records
* The records associated with the request.
* @param StreamName
* The stream name associated with the request.
* @param StreamARN
* The ARN of the stream.
*/
def putRecords(records: List[PutRecordsRequestEntry], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[PutRecordsInput, KinesisOperation.PutRecordsError, PutRecordsOutput, Nothing, Nothing]
/** Registers a consumer with a Kinesis data stream. When you use this operation, the
* consumer you register can then call SubscribeToShard to receive data
* from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every
* shard you subscribe to. This rate is unaffected by the total number of consumers that
* read from the same stream.
* You can register up to 20 consumers per stream. A given consumer can only be
* registered with one stream at a time.
* For an example of how to use this operations, see Enhanced Fan-Out
* Using the Kinesis Data Streams API.
* The use of this operation has a limit of five transactions per second per account.
* Also, only 5 consumers can be created simultaneously. In other words, you cannot have
* more than 5 consumers in a CREATING
status at the same time. Registering a
* 6th consumer while there are 5 in a CREATING
status results in a
* LimitExceededException
.
* @param StreamARN
* The ARN of the Kinesis data stream that you want to register the consumer with. For
* more info, see Amazon Resource Names (ARNs) and Amazon Web Services Service
* Namespaces.
* @param ConsumerName
* For a given Kinesis data stream, each consumer must have a unique name. However,
* consumer names don't have to be unique across data streams.
*/
def registerStreamConsumer(streamARN: StreamARN, consumerName: ConsumerName): F[RegisterStreamConsumerInput, KinesisOperation.RegisterStreamConsumerError, RegisterStreamConsumerOutput, Nothing, Nothing]
/** Removes tags from the specified Kinesis data stream. Removed tags are deleted and
* cannot be recovered after this operation successfully completes.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* If you specify a tag that does not exist, it is ignored.
*
* RemoveTagsFromStream has a limit of five transactions per second per
* account.
* @param StreamName
* The name of the stream.
* @param TagKeys
* A list of tag keys. Each corresponding tag is removed from the stream.
* @param StreamARN
* The ARN of the stream.
*/
def removeTagsFromStream(tagKeys: List[TagKey], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[RemoveTagsFromStreamInput, KinesisOperation.RemoveTagsFromStreamError, Unit, Nothing, Nothing]
/** Splits a shard into two new shards in the Kinesis data stream, to increase the
* stream's capacity to ingest and transport data. SplitShard
is called when
* there is a need to increase the overall capacity of a stream because of an expected
* increase in the volume of data records being ingested. This API is only supported for
* the data streams with the provisioned capacity mode.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* You can also use SplitShard
when a shard appears to be approaching its
* maximum utilization; for example, the producers sending data into the specific shard are
* suddenly sending more than previously anticipated. You can also call
* SplitShard
to increase stream capacity, so that more Kinesis Data
* Streams applications can simultaneously read data from the stream for real-time
* processing.
* You must specify the shard to be split and the new hash key, which is the position in
* the shard where the shard gets split in two. In many cases, the new hash key might be
* the average of the beginning and ending hash key, but it can be any hash key value in
* the range being mapped into the shard. For more information, see Split a
* Shard in the Amazon Kinesis Data Streams Developer
* Guide.
* You can use DescribeStreamSummary and the ListShards APIs to determine the shard ID and hash key values for the ShardToSplit
* and NewStartingHashKey
parameters that are specified in the
* SplitShard
request.
*
* SplitShard
is an asynchronous operation. Upon receiving a
* SplitShard
request, Kinesis Data Streams immediately returns a response
* and sets the stream status to UPDATING
. After the operation is completed,
* Kinesis Data Streams sets the stream status to ACTIVE
. Read and write
* operations continue to work while the stream is in the UPDATING
state.
* You can use DescribeStreamSummary to check the status of the stream,
* which is returned in StreamStatus
. If the stream is in the
* ACTIVE
state, you can call SplitShard
.
*
* If the specified stream does not exist, DescribeStreamSummary
* returns a ResourceNotFoundException
. If you try to create more shards than
* are authorized for your account, you receive a LimitExceededException
.
* For the default shard limit for an Amazon Web Services account, see Kinesis
* Data Streams Limits in the Amazon Kinesis Data Streams Developer
* Guide. To increase this limit, contact Amazon Web Services
* Support.
* If you try to operate on too many streams simultaneously using CreateStream, DeleteStream, MergeShards, and/or SplitShard, you receive a
* LimitExceededException
.
*
* SplitShard
has a limit of five transactions per second per account.
* @param StreamName
* The name of the stream for the shard split.
* @param ShardToSplit
* The shard ID of the shard to split.
* @param NewStartingHashKey
* A hash key value for the starting hash key of one of the child shards created by the
* split. The hash key range for a given shard constitutes a set of ordered contiguous
* positive integers. The value for NewStartingHashKey
must be in the range of
* hash keys being mapped into the shard. The NewStartingHashKey
hash key
* value and all higher hash key values in hash key range are distributed to one of the
* child shards. All the lower hash key values in the range are distributed to the other
* child shard.
* @param StreamARN
* The ARN of the stream.
*/
def splitShard(shardToSplit: ShardId, newStartingHashKey: HashKey, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[SplitShardInput, KinesisOperation.SplitShardError, Unit, Nothing, Nothing]
/** Enables or updates server-side encryption using an Amazon Web Services KMS key for a
* specified stream.
* Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis
* Data Streams returns immediately and sets the status of the stream to
* UPDATING
. After the update is complete, Kinesis Data Streams sets the
* status of the stream back to ACTIVE
. Updating or applying encryption
* normally takes a few seconds to complete, but it can take minutes. You can continue to
* read and write data to your stream while its status is UPDATING
. Once the
* status of the stream is ACTIVE
, encryption begins for records written to
* the stream.
* API Limits: You can successfully apply a new Amazon Web Services KMS key for
* server-side encryption 25 times in a rolling 24-hour period.
* Note: It can take up to 5 seconds after the stream is in an ACTIVE
status
* before all records written to the stream are encrypted. After you enable encryption, you
* can verify that encryption is applied by inspecting the API response from
* PutRecord
or PutRecords
.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* @param StreamName
* The name of the stream for which to start encrypting records.
* @param EncryptionType
* The encryption type to use. The only valid value is KMS
.
* @param KeyId
* The GUID for the customer-managed Amazon Web Services KMS key to use for encryption.
* This value can be a globally unique identifier, a fully specified Amazon Resource Name
* (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also
* use a master key owned by Kinesis Data Streams by specifying the alias
* aws/kinesis
.
*
* -
*
Key ARN example:
* arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
*
*
* -
*
Alias ARN example:
* arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
*
*
* -
*
Globally unique key ID example:
* 12345678-1234-1234-1234-123456789012
*
*
* -
*
Alias name example: alias/MyAliasName
*
*
* -
*
Master key owned by Kinesis Data Streams:
* alias/aws/kinesis
*
*
*
* @param StreamARN
* The ARN of the stream.
*/
def startStreamEncryption(encryptionType: EncryptionType, keyId: KeyId, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[StartStreamEncryptionInput, KinesisOperation.StartStreamEncryptionError, Unit, Nothing, Nothing]
/** Disables server-side encryption for a specified stream.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* Stopping encryption is an asynchronous operation. Upon receiving the request, Kinesis
* Data Streams returns immediately and sets the status of the stream to
* UPDATING
. After the update is complete, Kinesis Data Streams sets the
* status of the stream back to ACTIVE
. Stopping encryption normally takes a
* few seconds to complete, but it can take minutes. You can continue to read and write
* data to your stream while its status is UPDATING
. Once the status of the
* stream is ACTIVE
, records written to the stream are no longer encrypted by
* Kinesis Data Streams.
* API Limits: You can successfully disable server-side encryption 25 times in a rolling
* 24-hour period.
* Note: It can take up to 5 seconds after the stream is in an ACTIVE
status
* before all records written to the stream are no longer subject to encryption. After you
* disabled encryption, you can verify that encryption is not applied by inspecting the API
* response from PutRecord
or PutRecords
.
* @param StreamName
* The name of the stream on which to stop encrypting records.
* @param EncryptionType
* The encryption type. The only valid value is KMS
.
* @param KeyId
* The GUID for the customer-managed Amazon Web Services KMS key to use for encryption.
* This value can be a globally unique identifier, a fully specified Amazon Resource Name
* (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also
* use a master key owned by Kinesis Data Streams by specifying the alias
* aws/kinesis
.
*
* -
*
Key ARN example:
* arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
*
*
* -
*
Alias ARN example:
* arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
*
*
* -
*
Globally unique key ID example:
* 12345678-1234-1234-1234-123456789012
*
*
* -
*
Alias name example: alias/MyAliasName
*
*
* -
*
Master key owned by Kinesis Data Streams:
* alias/aws/kinesis
*
*
*
* @param StreamARN
* The ARN of the stream.
*/
def stopStreamEncryption(encryptionType: EncryptionType, keyId: KeyId, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[StopStreamEncryptionInput, KinesisOperation.StopStreamEncryptionError, Unit, Nothing, Nothing]
/** This operation establishes an HTTP/2 connection between the consumer you specify in
* the ConsumerARN
parameter and the shard you specify in the
* ShardId
parameter. After the connection is successfully established,
* Kinesis Data Streams pushes records from the shard to the consumer over this connection.
* Before you call this operation, call RegisterStreamConsumer to
* register the consumer with Kinesis Data Streams.
* When the SubscribeToShard
call succeeds, your consumer starts receiving
* events of type SubscribeToShardEvent over the HTTP/2 connection for up
* to 5 minutes, after which time you need to call SubscribeToShard
again to
* renew the subscription if you want to continue to receive records.
* You can make one call to SubscribeToShard
per second per registered
* consumer per shard. For example, if you have a 4000 shard stream and two registered
* stream consumers, you can make one SubscribeToShard
request per second for
* each combination of shard and registered consumer, allowing you to subscribe both
* consumers to all 4000 shards in one second.
* If you call SubscribeToShard
again with the same ConsumerARN
* and ShardId
within 5 seconds of a successful call, you'll get a
* ResourceInUseException
. If you call SubscribeToShard
5
* seconds or more after a successful call, the second call takes over the subscription and
* the previous connection expires or fails with a
* ResourceInUseException
.
* For an example of how to use this operations, see Enhanced Fan-Out
* Using the Kinesis Data Streams API.
* @param ConsumerARN
* For this parameter, use the value you obtained when you called RegisterStreamConsumer.
* @param ShardId
* The ID of the shard you want to subscribe to. To see a list of all the shards for a
* given stream, use ListShards.
* @param StartingPosition
* The starting position in the data stream from which to start streaming.
*/
def subscribeToShard(consumerARN: ConsumerARN, shardId: ShardId, startingPosition: StartingPosition): F[SubscribeToShardInput, KinesisOperation.SubscribeToShardError, SubscribeToShardOutput, Nothing, SubscribeToShardEventStream]
/** Updates the shard count of the specified stream to the specified number of shards.
* This API is only supported for the data streams with the provisioned capacity
* mode.
*
* When invoking this API, it is recommended you use the StreamARN
input
* parameter rather than the StreamName
input parameter.
*
* Updating the shard count is an asynchronous operation. Upon receiving the request,
* Kinesis Data Streams returns immediately and sets the status of the stream to
* UPDATING
. After the update is complete, Kinesis Data Streams sets the
* status of the stream back to ACTIVE
. Depending on the size of the stream,
* the scaling action could take a few minutes to complete. You can continue to read and
* write data to your stream while its status is UPDATING
.
* To update the shard count, Kinesis Data Streams performs splits or merges on
* individual shards. This can cause short-lived shards to be created, in addition to the
* final shards. These short-lived shards count towards your total shard limit for your
* account in the Region.
* When using this operation, we recommend that you specify a target shard count that is
* a multiple of 25% (25%, 50%, 75%, 100%). You can specify any target value within your
* shard limit. However, if you specify a target that isn't a multiple of 25%, the scaling
* action might take longer to complete.
* This operation has the following default limits. By default, you cannot do the
* following:
*
* -
*
Scale more than ten times per rolling 24-hour period per stream
*
* -
*
Scale up to more than double your current shard count for a stream
*
* -
*
Scale down below half your current shard count for a stream
*
* -
*
Scale up to more than 10000 shards in a stream
*
* -
*
Scale a stream with more than 10000 shards down unless the result is less than
* 10000 shards
*
* -
*
Scale up to more than the shard limit for your account
*
*
* For the default limits for an Amazon Web Services account, see Streams
* Limits in the Amazon Kinesis Data Streams Developer
* Guide. To request an increase in the call rate limit, the shard limit for
* this API, or your overall shard limit, use the limits form.
* @param StreamName
* The name of the stream.
* @param TargetShardCount
* The new number of shards. This value has the following default limits. By default, you
* cannot do the following:
*
* -
*
Set this value to more than double your current shard count for a
* stream.
*
* -
*
Set this value below half your current shard count for a stream.
*
* -
*
Set this value to more than 10000 shards in a stream (the default limit for
* shard count per stream is 10000 per account per region), unless you request a
* limit increase.
*
* -
*
Scale a stream with more than 10000 shards down unless you set this value to
* less than 10000 shards.
*
*
* @param ScalingType
* The scaling type. Uniform scaling creates shards of equal size.
* @param StreamARN
* The ARN of the stream.
*/
def updateShardCount(targetShardCount: PositiveIntegerObject, scalingType: ScalingType, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): F[UpdateShardCountInput, KinesisOperation.UpdateShardCountError, UpdateShardCountOutput, Nothing, Nothing]
/** Updates the capacity mode of the data stream. Currently, in Kinesis Data Streams, you
* can choose between an on-demand capacity mode and a
* provisioned capacity mode for your data stream.
*
* @param StreamARN
* Specifies the ARN of the data stream whose capacity mode you want to update.
* @param StreamModeDetails
* Specifies the capacity mode to which you want to set your data stream. Currently, in
* Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.
*/
def updateStreamMode(streamARN: StreamARN, streamModeDetails: StreamModeDetails): F[UpdateStreamModeInput, KinesisOperation.UpdateStreamModeError, Unit, Nothing, Nothing]
def transform: Transformation.PartiallyApplied[KinesisGen[F]] = Transformation.of[KinesisGen[F]](this)
}
object KinesisGen extends Service.Mixin[KinesisGen, KinesisOperation] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "Kinesis_20131202")
val version: String = "2013-12-02"
val hints: Hints = Hints(
aws.auth.Sigv4(name = "kinesis"),
smithy.api.Title("Amazon Kinesis"),
aws.protocols.AwsJson1_1(http = Some(List("http/1.1", "h2")), eventStreamHttp = Some(List("h2"))),
smithy.api.Documentation("Amazon Kinesis Data Streams Service API Reference \n Amazon Kinesis Data Streams is a managed service that scales elastically for real-time\n processing of streaming big data.
"),
aws.api.Service(sdkId = "Kinesis", arnNamespace = Some(aws.api.ArnNamespace("kinesis")), cloudFormationName = Some(aws.api.CloudFormationName("Kinesis")), cloudTrailEventSource = Some("kinesis.amazonaws.com"), docId = None, endpointPrefix = Some("kinesis")),
smithy.api.XmlNamespace(uri = smithy.api.NonEmptyString("http://kinesis.amazonaws.com/doc/2013-12-02"), prefix = None),
).lazily
def apply[F[_]](implicit F: Impl[F]): F.type = F
object ErrorAware {
def apply[F[_, _]](implicit F: ErrorAware[F]): F.type = F
type Default[F[+_, +_]] = Constant[smithy4s.kinds.stubs.Kind2[F]#toKind5]
}
val endpoints: Vector[smithy4s.Endpoint[KinesisOperation, ?, ?, ?, ?, ?]] = Vector(
KinesisOperation.AddTagsToStream,
KinesisOperation.CreateStream,
KinesisOperation.DecreaseStreamRetentionPeriod,
KinesisOperation.DeleteStream,
KinesisOperation.DeregisterStreamConsumer,
KinesisOperation.DescribeLimits,
KinesisOperation.DescribeStream,
KinesisOperation.DescribeStreamConsumer,
KinesisOperation.DescribeStreamSummary,
KinesisOperation.DisableEnhancedMonitoring,
KinesisOperation.EnableEnhancedMonitoring,
KinesisOperation.GetRecords,
KinesisOperation.GetShardIterator,
KinesisOperation.IncreaseStreamRetentionPeriod,
KinesisOperation.ListShards,
KinesisOperation.ListStreamConsumers,
KinesisOperation.ListStreams,
KinesisOperation.ListTagsForStream,
KinesisOperation.MergeShards,
KinesisOperation.PutRecord,
KinesisOperation.PutRecords,
KinesisOperation.RegisterStreamConsumer,
KinesisOperation.RemoveTagsFromStream,
KinesisOperation.SplitShard,
KinesisOperation.StartStreamEncryption,
KinesisOperation.StopStreamEncryption,
KinesisOperation.SubscribeToShard,
KinesisOperation.UpdateShardCount,
KinesisOperation.UpdateStreamMode,
)
def input[I, E, O, SI, SO](op: KinesisOperation[I, E, O, SI, SO]): I = op.input
def ordinal[I, E, O, SI, SO](op: KinesisOperation[I, E, O, SI, SO]): Int = op.ordinal
override def endpoint[I, E, O, SI, SO](op: KinesisOperation[I, E, O, SI, SO]) = op.endpoint
class Constant[P[-_, +_, +_, +_, +_]](value: P[Any, Nothing, Nothing, Nothing, Nothing]) extends KinesisOperation.Transformed[KinesisOperation, P](reified, const5(value))
type Default[F[+_]] = Constant[smithy4s.kinds.stubs.Kind1[F]#toKind5]
def reified: KinesisGen[KinesisOperation] = KinesisOperation.reified
def mapK5[P[_, _, _, _, _], P1[_, _, _, _, _]](alg: KinesisGen[P], f: PolyFunction5[P, P1]): KinesisGen[P1] = new KinesisOperation.Transformed(alg, f)
def fromPolyFunction[P[_, _, _, _, _]](f: PolyFunction5[KinesisOperation, P]): KinesisGen[P] = new KinesisOperation.Transformed(reified, f)
def toPolyFunction[P[_, _, _, _, _]](impl: KinesisGen[P]): PolyFunction5[KinesisOperation, P] = KinesisOperation.toPolyFunction(impl)
type AddTagsToStreamError = KinesisOperation.AddTagsToStreamError
val AddTagsToStreamError = KinesisOperation.AddTagsToStreamError
type CreateStreamError = KinesisOperation.CreateStreamError
val CreateStreamError = KinesisOperation.CreateStreamError
type DecreaseStreamRetentionPeriodError = KinesisOperation.DecreaseStreamRetentionPeriodError
val DecreaseStreamRetentionPeriodError = KinesisOperation.DecreaseStreamRetentionPeriodError
type DeleteStreamError = KinesisOperation.DeleteStreamError
val DeleteStreamError = KinesisOperation.DeleteStreamError
type DeregisterStreamConsumerError = KinesisOperation.DeregisterStreamConsumerError
val DeregisterStreamConsumerError = KinesisOperation.DeregisterStreamConsumerError
type DescribeLimitsError = KinesisOperation.DescribeLimitsError
val DescribeLimitsError = KinesisOperation.DescribeLimitsError
type DescribeStreamError = KinesisOperation.DescribeStreamError
val DescribeStreamError = KinesisOperation.DescribeStreamError
type DescribeStreamConsumerError = KinesisOperation.DescribeStreamConsumerError
val DescribeStreamConsumerError = KinesisOperation.DescribeStreamConsumerError
type DescribeStreamSummaryError = KinesisOperation.DescribeStreamSummaryError
val DescribeStreamSummaryError = KinesisOperation.DescribeStreamSummaryError
type DisableEnhancedMonitoringError = KinesisOperation.DisableEnhancedMonitoringError
val DisableEnhancedMonitoringError = KinesisOperation.DisableEnhancedMonitoringError
type EnableEnhancedMonitoringError = KinesisOperation.EnableEnhancedMonitoringError
val EnableEnhancedMonitoringError = KinesisOperation.EnableEnhancedMonitoringError
type GetRecordsError = KinesisOperation.GetRecordsError
val GetRecordsError = KinesisOperation.GetRecordsError
type GetShardIteratorError = KinesisOperation.GetShardIteratorError
val GetShardIteratorError = KinesisOperation.GetShardIteratorError
type IncreaseStreamRetentionPeriodError = KinesisOperation.IncreaseStreamRetentionPeriodError
val IncreaseStreamRetentionPeriodError = KinesisOperation.IncreaseStreamRetentionPeriodError
type ListShardsError = KinesisOperation.ListShardsError
val ListShardsError = KinesisOperation.ListShardsError
type ListStreamConsumersError = KinesisOperation.ListStreamConsumersError
val ListStreamConsumersError = KinesisOperation.ListStreamConsumersError
type ListStreamsError = KinesisOperation.ListStreamsError
val ListStreamsError = KinesisOperation.ListStreamsError
type ListTagsForStreamError = KinesisOperation.ListTagsForStreamError
val ListTagsForStreamError = KinesisOperation.ListTagsForStreamError
type MergeShardsError = KinesisOperation.MergeShardsError
val MergeShardsError = KinesisOperation.MergeShardsError
type PutRecordError = KinesisOperation.PutRecordError
val PutRecordError = KinesisOperation.PutRecordError
type PutRecordsError = KinesisOperation.PutRecordsError
val PutRecordsError = KinesisOperation.PutRecordsError
type RegisterStreamConsumerError = KinesisOperation.RegisterStreamConsumerError
val RegisterStreamConsumerError = KinesisOperation.RegisterStreamConsumerError
type RemoveTagsFromStreamError = KinesisOperation.RemoveTagsFromStreamError
val RemoveTagsFromStreamError = KinesisOperation.RemoveTagsFromStreamError
type SplitShardError = KinesisOperation.SplitShardError
val SplitShardError = KinesisOperation.SplitShardError
type StartStreamEncryptionError = KinesisOperation.StartStreamEncryptionError
val StartStreamEncryptionError = KinesisOperation.StartStreamEncryptionError
type StopStreamEncryptionError = KinesisOperation.StopStreamEncryptionError
val StopStreamEncryptionError = KinesisOperation.StopStreamEncryptionError
type SubscribeToShardError = KinesisOperation.SubscribeToShardError
val SubscribeToShardError = KinesisOperation.SubscribeToShardError
type UpdateShardCountError = KinesisOperation.UpdateShardCountError
val UpdateShardCountError = KinesisOperation.UpdateShardCountError
type UpdateStreamModeError = KinesisOperation.UpdateStreamModeError
val UpdateStreamModeError = KinesisOperation.UpdateStreamModeError
}
sealed trait KinesisOperation[Input, Err, Output, StreamedInput, StreamedOutput] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[Input, Err, Output, StreamedInput, StreamedOutput]
def ordinal: Int
def input: Input
def endpoint: Endpoint[KinesisOperation, Input, Err, Output, StreamedInput, StreamedOutput]
}
object KinesisOperation {
object reified extends KinesisGen[KinesisOperation] {
def addTagsToStream(tags: Map[TagKey, TagValue], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): AddTagsToStream = AddTagsToStream(AddTagsToStreamInput(tags, streamName, streamARN))
def createStream(streamName: StreamName, shardCount: Option[PositiveIntegerObject] = None, streamModeDetails: Option[StreamModeDetails] = None): CreateStream = CreateStream(CreateStreamInput(streamName, shardCount, streamModeDetails))
def decreaseStreamRetentionPeriod(retentionPeriodHours: RetentionPeriodHours, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): DecreaseStreamRetentionPeriod = DecreaseStreamRetentionPeriod(DecreaseStreamRetentionPeriodInput(retentionPeriodHours, streamName, streamARN))
def deleteStream(streamName: Option[StreamName] = None, enforceConsumerDeletion: Option[BooleanObject] = None, streamARN: Option[StreamARN] = None): DeleteStream = DeleteStream(DeleteStreamInput(streamName, enforceConsumerDeletion, streamARN))
def deregisterStreamConsumer(streamARN: Option[StreamARN] = None, consumerName: Option[ConsumerName] = None, consumerARN: Option[ConsumerARN] = None): DeregisterStreamConsumer = DeregisterStreamConsumer(DeregisterStreamConsumerInput(streamARN, consumerName, consumerARN))
def describeLimits(): DescribeLimits = DescribeLimits(DescribeLimitsInput())
def describeStream(streamName: Option[StreamName] = None, limit: Option[DescribeStreamInputLimit] = None, exclusiveStartShardId: Option[ShardId] = None, streamARN: Option[StreamARN] = None): DescribeStream = DescribeStream(DescribeStreamInput(streamName, limit, exclusiveStartShardId, streamARN))
def describeStreamConsumer(streamARN: Option[StreamARN] = None, consumerName: Option[ConsumerName] = None, consumerARN: Option[ConsumerARN] = None): DescribeStreamConsumer = DescribeStreamConsumer(DescribeStreamConsumerInput(streamARN, consumerName, consumerARN))
def describeStreamSummary(streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): DescribeStreamSummary = DescribeStreamSummary(DescribeStreamSummaryInput(streamName, streamARN))
def disableEnhancedMonitoring(shardLevelMetrics: List[MetricsName], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): DisableEnhancedMonitoring = DisableEnhancedMonitoring(DisableEnhancedMonitoringInput(shardLevelMetrics, streamName, streamARN))
def enableEnhancedMonitoring(shardLevelMetrics: List[MetricsName], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): EnableEnhancedMonitoring = EnableEnhancedMonitoring(EnableEnhancedMonitoringInput(shardLevelMetrics, streamName, streamARN))
def getRecords(shardIterator: ShardIterator, limit: Option[GetRecordsInputLimit] = None, streamARN: Option[StreamARN] = None): GetRecords = GetRecords(GetRecordsInput(shardIterator, limit, streamARN))
def getShardIterator(shardId: ShardId, shardIteratorType: ShardIteratorType, streamName: Option[StreamName] = None, startingSequenceNumber: Option[SequenceNumber] = None, timestamp: Option[Timestamp] = None, streamARN: Option[StreamARN] = None): GetShardIterator = GetShardIterator(GetShardIteratorInput(shardId, shardIteratorType, streamName, startingSequenceNumber, timestamp, streamARN))
def increaseStreamRetentionPeriod(retentionPeriodHours: RetentionPeriodHours, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): IncreaseStreamRetentionPeriod = IncreaseStreamRetentionPeriod(IncreaseStreamRetentionPeriodInput(retentionPeriodHours, streamName, streamARN))
def listShards(streamName: Option[StreamName] = None, nextToken: Option[NextToken] = None, exclusiveStartShardId: Option[ShardId] = None, maxResults: Option[ListShardsInputLimit] = None, streamCreationTimestamp: Option[Timestamp] = None, shardFilter: Option[ShardFilter] = None, streamARN: Option[StreamARN] = None): ListShards = ListShards(ListShardsInput(streamName, nextToken, exclusiveStartShardId, maxResults, streamCreationTimestamp, shardFilter, streamARN))
def listStreamConsumers(streamARN: StreamARN, nextToken: Option[NextToken] = None, maxResults: Option[ListStreamConsumersInputLimit] = None, streamCreationTimestamp: Option[Timestamp] = None): ListStreamConsumers = ListStreamConsumers(ListStreamConsumersInput(streamARN, nextToken, maxResults, streamCreationTimestamp))
def listStreams(limit: Option[ListStreamsInputLimit] = None, exclusiveStartStreamName: Option[StreamName] = None, nextToken: Option[NextToken] = None): ListStreams = ListStreams(ListStreamsInput(limit, exclusiveStartStreamName, nextToken))
def listTagsForStream(streamName: Option[StreamName] = None, exclusiveStartTagKey: Option[TagKey] = None, limit: Option[ListTagsForStreamInputLimit] = None, streamARN: Option[StreamARN] = None): ListTagsForStream = ListTagsForStream(ListTagsForStreamInput(streamName, exclusiveStartTagKey, limit, streamARN))
def mergeShards(shardToMerge: ShardId, adjacentShardToMerge: ShardId, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): MergeShards = MergeShards(MergeShardsInput(shardToMerge, adjacentShardToMerge, streamName, streamARN))
def putRecord(data: Data, partitionKey: PartitionKey, streamName: Option[StreamName] = None, explicitHashKey: Option[HashKey] = None, sequenceNumberForOrdering: Option[SequenceNumber] = None, streamARN: Option[StreamARN] = None): PutRecord = PutRecord(PutRecordInput(data, partitionKey, streamName, explicitHashKey, sequenceNumberForOrdering, streamARN))
def putRecords(records: List[PutRecordsRequestEntry], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): PutRecords = PutRecords(PutRecordsInput(records, streamName, streamARN))
def registerStreamConsumer(streamARN: StreamARN, consumerName: ConsumerName): RegisterStreamConsumer = RegisterStreamConsumer(RegisterStreamConsumerInput(streamARN, consumerName))
def removeTagsFromStream(tagKeys: List[TagKey], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): RemoveTagsFromStream = RemoveTagsFromStream(RemoveTagsFromStreamInput(tagKeys, streamName, streamARN))
def splitShard(shardToSplit: ShardId, newStartingHashKey: HashKey, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): SplitShard = SplitShard(SplitShardInput(shardToSplit, newStartingHashKey, streamName, streamARN))
def startStreamEncryption(encryptionType: EncryptionType, keyId: KeyId, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): StartStreamEncryption = StartStreamEncryption(StartStreamEncryptionInput(encryptionType, keyId, streamName, streamARN))
def stopStreamEncryption(encryptionType: EncryptionType, keyId: KeyId, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): StopStreamEncryption = StopStreamEncryption(StopStreamEncryptionInput(encryptionType, keyId, streamName, streamARN))
def subscribeToShard(consumerARN: ConsumerARN, shardId: ShardId, startingPosition: StartingPosition): SubscribeToShard = SubscribeToShard(SubscribeToShardInput(consumerARN, shardId, startingPosition))
def updateShardCount(targetShardCount: PositiveIntegerObject, scalingType: ScalingType, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): UpdateShardCount = UpdateShardCount(UpdateShardCountInput(targetShardCount, scalingType, streamName, streamARN))
def updateStreamMode(streamARN: StreamARN, streamModeDetails: StreamModeDetails): UpdateStreamMode = UpdateStreamMode(UpdateStreamModeInput(streamARN, streamModeDetails))
}
class Transformed[P[_, _, _, _, _], P1[_ ,_ ,_ ,_ ,_]](alg: KinesisGen[P], f: PolyFunction5[P, P1]) extends KinesisGen[P1] {
def addTagsToStream(tags: Map[TagKey, TagValue], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[AddTagsToStreamInput, KinesisOperation.AddTagsToStreamError, Unit, Nothing, Nothing] = f[AddTagsToStreamInput, KinesisOperation.AddTagsToStreamError, Unit, Nothing, Nothing](alg.addTagsToStream(tags, streamName, streamARN))
def createStream(streamName: StreamName, shardCount: Option[PositiveIntegerObject] = None, streamModeDetails: Option[StreamModeDetails] = None): P1[CreateStreamInput, KinesisOperation.CreateStreamError, Unit, Nothing, Nothing] = f[CreateStreamInput, KinesisOperation.CreateStreamError, Unit, Nothing, Nothing](alg.createStream(streamName, shardCount, streamModeDetails))
def decreaseStreamRetentionPeriod(retentionPeriodHours: RetentionPeriodHours, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[DecreaseStreamRetentionPeriodInput, KinesisOperation.DecreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] = f[DecreaseStreamRetentionPeriodInput, KinesisOperation.DecreaseStreamRetentionPeriodError, Unit, Nothing, Nothing](alg.decreaseStreamRetentionPeriod(retentionPeriodHours, streamName, streamARN))
def deleteStream(streamName: Option[StreamName] = None, enforceConsumerDeletion: Option[BooleanObject] = None, streamARN: Option[StreamARN] = None): P1[DeleteStreamInput, KinesisOperation.DeleteStreamError, Unit, Nothing, Nothing] = f[DeleteStreamInput, KinesisOperation.DeleteStreamError, Unit, Nothing, Nothing](alg.deleteStream(streamName, enforceConsumerDeletion, streamARN))
def deregisterStreamConsumer(streamARN: Option[StreamARN] = None, consumerName: Option[ConsumerName] = None, consumerARN: Option[ConsumerARN] = None): P1[DeregisterStreamConsumerInput, KinesisOperation.DeregisterStreamConsumerError, Unit, Nothing, Nothing] = f[DeregisterStreamConsumerInput, KinesisOperation.DeregisterStreamConsumerError, Unit, Nothing, Nothing](alg.deregisterStreamConsumer(streamARN, consumerName, consumerARN))
def describeLimits(): P1[DescribeLimitsInput, KinesisOperation.DescribeLimitsError, DescribeLimitsOutput, Nothing, Nothing] = f[DescribeLimitsInput, KinesisOperation.DescribeLimitsError, DescribeLimitsOutput, Nothing, Nothing](alg.describeLimits())
def describeStream(streamName: Option[StreamName] = None, limit: Option[DescribeStreamInputLimit] = None, exclusiveStartShardId: Option[ShardId] = None, streamARN: Option[StreamARN] = None): P1[DescribeStreamInput, KinesisOperation.DescribeStreamError, DescribeStreamOutput, Nothing, Nothing] = f[DescribeStreamInput, KinesisOperation.DescribeStreamError, DescribeStreamOutput, Nothing, Nothing](alg.describeStream(streamName, limit, exclusiveStartShardId, streamARN))
def describeStreamConsumer(streamARN: Option[StreamARN] = None, consumerName: Option[ConsumerName] = None, consumerARN: Option[ConsumerARN] = None): P1[DescribeStreamConsumerInput, KinesisOperation.DescribeStreamConsumerError, DescribeStreamConsumerOutput, Nothing, Nothing] = f[DescribeStreamConsumerInput, KinesisOperation.DescribeStreamConsumerError, DescribeStreamConsumerOutput, Nothing, Nothing](alg.describeStreamConsumer(streamARN, consumerName, consumerARN))
def describeStreamSummary(streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[DescribeStreamSummaryInput, KinesisOperation.DescribeStreamSummaryError, DescribeStreamSummaryOutput, Nothing, Nothing] = f[DescribeStreamSummaryInput, KinesisOperation.DescribeStreamSummaryError, DescribeStreamSummaryOutput, Nothing, Nothing](alg.describeStreamSummary(streamName, streamARN))
def disableEnhancedMonitoring(shardLevelMetrics: List[MetricsName], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[DisableEnhancedMonitoringInput, KinesisOperation.DisableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] = f[DisableEnhancedMonitoringInput, KinesisOperation.DisableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing](alg.disableEnhancedMonitoring(shardLevelMetrics, streamName, streamARN))
def enableEnhancedMonitoring(shardLevelMetrics: List[MetricsName], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[EnableEnhancedMonitoringInput, KinesisOperation.EnableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] = f[EnableEnhancedMonitoringInput, KinesisOperation.EnableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing](alg.enableEnhancedMonitoring(shardLevelMetrics, streamName, streamARN))
def getRecords(shardIterator: ShardIterator, limit: Option[GetRecordsInputLimit] = None, streamARN: Option[StreamARN] = None): P1[GetRecordsInput, KinesisOperation.GetRecordsError, GetRecordsOutput, Nothing, Nothing] = f[GetRecordsInput, KinesisOperation.GetRecordsError, GetRecordsOutput, Nothing, Nothing](alg.getRecords(shardIterator, limit, streamARN))
def getShardIterator(shardId: ShardId, shardIteratorType: ShardIteratorType, streamName: Option[StreamName] = None, startingSequenceNumber: Option[SequenceNumber] = None, timestamp: Option[Timestamp] = None, streamARN: Option[StreamARN] = None): P1[GetShardIteratorInput, KinesisOperation.GetShardIteratorError, GetShardIteratorOutput, Nothing, Nothing] = f[GetShardIteratorInput, KinesisOperation.GetShardIteratorError, GetShardIteratorOutput, Nothing, Nothing](alg.getShardIterator(shardId, shardIteratorType, streamName, startingSequenceNumber, timestamp, streamARN))
def increaseStreamRetentionPeriod(retentionPeriodHours: RetentionPeriodHours, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[IncreaseStreamRetentionPeriodInput, KinesisOperation.IncreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] = f[IncreaseStreamRetentionPeriodInput, KinesisOperation.IncreaseStreamRetentionPeriodError, Unit, Nothing, Nothing](alg.increaseStreamRetentionPeriod(retentionPeriodHours, streamName, streamARN))
def listShards(streamName: Option[StreamName] = None, nextToken: Option[NextToken] = None, exclusiveStartShardId: Option[ShardId] = None, maxResults: Option[ListShardsInputLimit] = None, streamCreationTimestamp: Option[Timestamp] = None, shardFilter: Option[ShardFilter] = None, streamARN: Option[StreamARN] = None): P1[ListShardsInput, KinesisOperation.ListShardsError, ListShardsOutput, Nothing, Nothing] = f[ListShardsInput, KinesisOperation.ListShardsError, ListShardsOutput, Nothing, Nothing](alg.listShards(streamName, nextToken, exclusiveStartShardId, maxResults, streamCreationTimestamp, shardFilter, streamARN))
def listStreamConsumers(streamARN: StreamARN, nextToken: Option[NextToken] = None, maxResults: Option[ListStreamConsumersInputLimit] = None, streamCreationTimestamp: Option[Timestamp] = None): P1[ListStreamConsumersInput, KinesisOperation.ListStreamConsumersError, ListStreamConsumersOutput, Nothing, Nothing] = f[ListStreamConsumersInput, KinesisOperation.ListStreamConsumersError, ListStreamConsumersOutput, Nothing, Nothing](alg.listStreamConsumers(streamARN, nextToken, maxResults, streamCreationTimestamp))
def listStreams(limit: Option[ListStreamsInputLimit] = None, exclusiveStartStreamName: Option[StreamName] = None, nextToken: Option[NextToken] = None): P1[ListStreamsInput, KinesisOperation.ListStreamsError, ListStreamsOutput, Nothing, Nothing] = f[ListStreamsInput, KinesisOperation.ListStreamsError, ListStreamsOutput, Nothing, Nothing](alg.listStreams(limit, exclusiveStartStreamName, nextToken))
def listTagsForStream(streamName: Option[StreamName] = None, exclusiveStartTagKey: Option[TagKey] = None, limit: Option[ListTagsForStreamInputLimit] = None, streamARN: Option[StreamARN] = None): P1[ListTagsForStreamInput, KinesisOperation.ListTagsForStreamError, ListTagsForStreamOutput, Nothing, Nothing] = f[ListTagsForStreamInput, KinesisOperation.ListTagsForStreamError, ListTagsForStreamOutput, Nothing, Nothing](alg.listTagsForStream(streamName, exclusiveStartTagKey, limit, streamARN))
def mergeShards(shardToMerge: ShardId, adjacentShardToMerge: ShardId, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[MergeShardsInput, KinesisOperation.MergeShardsError, Unit, Nothing, Nothing] = f[MergeShardsInput, KinesisOperation.MergeShardsError, Unit, Nothing, Nothing](alg.mergeShards(shardToMerge, adjacentShardToMerge, streamName, streamARN))
def putRecord(data: Data, partitionKey: PartitionKey, streamName: Option[StreamName] = None, explicitHashKey: Option[HashKey] = None, sequenceNumberForOrdering: Option[SequenceNumber] = None, streamARN: Option[StreamARN] = None): P1[PutRecordInput, KinesisOperation.PutRecordError, PutRecordOutput, Nothing, Nothing] = f[PutRecordInput, KinesisOperation.PutRecordError, PutRecordOutput, Nothing, Nothing](alg.putRecord(data, partitionKey, streamName, explicitHashKey, sequenceNumberForOrdering, streamARN))
def putRecords(records: List[PutRecordsRequestEntry], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[PutRecordsInput, KinesisOperation.PutRecordsError, PutRecordsOutput, Nothing, Nothing] = f[PutRecordsInput, KinesisOperation.PutRecordsError, PutRecordsOutput, Nothing, Nothing](alg.putRecords(records, streamName, streamARN))
def registerStreamConsumer(streamARN: StreamARN, consumerName: ConsumerName): P1[RegisterStreamConsumerInput, KinesisOperation.RegisterStreamConsumerError, RegisterStreamConsumerOutput, Nothing, Nothing] = f[RegisterStreamConsumerInput, KinesisOperation.RegisterStreamConsumerError, RegisterStreamConsumerOutput, Nothing, Nothing](alg.registerStreamConsumer(streamARN, consumerName))
def removeTagsFromStream(tagKeys: List[TagKey], streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[RemoveTagsFromStreamInput, KinesisOperation.RemoveTagsFromStreamError, Unit, Nothing, Nothing] = f[RemoveTagsFromStreamInput, KinesisOperation.RemoveTagsFromStreamError, Unit, Nothing, Nothing](alg.removeTagsFromStream(tagKeys, streamName, streamARN))
def splitShard(shardToSplit: ShardId, newStartingHashKey: HashKey, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[SplitShardInput, KinesisOperation.SplitShardError, Unit, Nothing, Nothing] = f[SplitShardInput, KinesisOperation.SplitShardError, Unit, Nothing, Nothing](alg.splitShard(shardToSplit, newStartingHashKey, streamName, streamARN))
def startStreamEncryption(encryptionType: EncryptionType, keyId: KeyId, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[StartStreamEncryptionInput, KinesisOperation.StartStreamEncryptionError, Unit, Nothing, Nothing] = f[StartStreamEncryptionInput, KinesisOperation.StartStreamEncryptionError, Unit, Nothing, Nothing](alg.startStreamEncryption(encryptionType, keyId, streamName, streamARN))
def stopStreamEncryption(encryptionType: EncryptionType, keyId: KeyId, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[StopStreamEncryptionInput, KinesisOperation.StopStreamEncryptionError, Unit, Nothing, Nothing] = f[StopStreamEncryptionInput, KinesisOperation.StopStreamEncryptionError, Unit, Nothing, Nothing](alg.stopStreamEncryption(encryptionType, keyId, streamName, streamARN))
def subscribeToShard(consumerARN: ConsumerARN, shardId: ShardId, startingPosition: StartingPosition): P1[SubscribeToShardInput, KinesisOperation.SubscribeToShardError, SubscribeToShardOutput, Nothing, SubscribeToShardEventStream] = f[SubscribeToShardInput, KinesisOperation.SubscribeToShardError, SubscribeToShardOutput, Nothing, SubscribeToShardEventStream](alg.subscribeToShard(consumerARN, shardId, startingPosition))
def updateShardCount(targetShardCount: PositiveIntegerObject, scalingType: ScalingType, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None): P1[UpdateShardCountInput, KinesisOperation.UpdateShardCountError, UpdateShardCountOutput, Nothing, Nothing] = f[UpdateShardCountInput, KinesisOperation.UpdateShardCountError, UpdateShardCountOutput, Nothing, Nothing](alg.updateShardCount(targetShardCount, scalingType, streamName, streamARN))
def updateStreamMode(streamARN: StreamARN, streamModeDetails: StreamModeDetails): P1[UpdateStreamModeInput, KinesisOperation.UpdateStreamModeError, Unit, Nothing, Nothing] = f[UpdateStreamModeInput, KinesisOperation.UpdateStreamModeError, Unit, Nothing, Nothing](alg.updateStreamMode(streamARN, streamModeDetails))
}
def toPolyFunction[P[_, _, _, _, _]](impl: KinesisGen[P]): PolyFunction5[KinesisOperation, P] = new PolyFunction5[KinesisOperation, P] {
def apply[I, E, O, SI, SO](op: KinesisOperation[I, E, O, SI, SO]): P[I, E, O, SI, SO] = op.run(impl)
}
final case class AddTagsToStream(input: AddTagsToStreamInput) extends KinesisOperation[AddTagsToStreamInput, KinesisOperation.AddTagsToStreamError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[AddTagsToStreamInput, KinesisOperation.AddTagsToStreamError, Unit, Nothing, Nothing] = impl.addTagsToStream(input.tags, input.streamName, input.streamARN)
def ordinal: Int = 0
def endpoint: smithy4s.Endpoint[KinesisOperation,AddTagsToStreamInput, KinesisOperation.AddTagsToStreamError, Unit, Nothing, Nothing] = AddTagsToStream
}
object AddTagsToStream extends smithy4s.Endpoint[KinesisOperation,AddTagsToStreamInput, KinesisOperation.AddTagsToStreamError, Unit, Nothing, Nothing] {
val schema: OperationSchema[AddTagsToStreamInput, KinesisOperation.AddTagsToStreamError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "AddTagsToStream"))
.withInput(AddTagsToStreamInput.schema)
.withError(AddTagsToStreamError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Adds or updates tags for the specified Kinesis data stream. You can assign up to 50\n tags to a data stream.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n If tags have already been assigned to the stream, AddTagsToStream
\n overwrites any existing tags that correspond to the specified tag keys.
\n \n AddTagsToStream has a limit of five transactions per second per\n account.
"))
def wrap(input: AddTagsToStreamInput): AddTagsToStream = AddTagsToStream(input)
}
sealed trait AddTagsToStreamError extends scala.Product with scala.Serializable { self =>
@inline final def widen: AddTagsToStreamError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = AddTagsToStreamError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = AddTagsToStreamError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = AddTagsToStreamError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = AddTagsToStreamError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = AddTagsToStreamError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: AddTagsToStreamError.Visitor[A]): A = this match {
case value: AddTagsToStreamError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: AddTagsToStreamError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: AddTagsToStreamError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: AddTagsToStreamError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: AddTagsToStreamError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object AddTagsToStreamError extends ErrorSchema.Companion[AddTagsToStreamError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): AddTagsToStreamError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): AddTagsToStreamError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): AddTagsToStreamError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): AddTagsToStreamError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): AddTagsToStreamError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "AddTagsToStreamError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends AddTagsToStreamError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends AddTagsToStreamError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends AddTagsToStreamError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends AddTagsToStreamError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends AddTagsToStreamError { final def $ordinal: Int = 4 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[AddTagsToStreamError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), AddTagsToStreamError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[AddTagsToStreamError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[AddTagsToStreamError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), AddTagsToStreamError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[AddTagsToStreamError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[AddTagsToStreamError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), AddTagsToStreamError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[AddTagsToStreamError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[AddTagsToStreamError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), AddTagsToStreamError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[AddTagsToStreamError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[AddTagsToStreamError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), AddTagsToStreamError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[AddTagsToStreamError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[AddTagsToStreamError] = union(
AddTagsToStreamError.AccessDeniedExceptionCase.alt,
AddTagsToStreamError.InvalidArgumentExceptionCase.alt,
AddTagsToStreamError.ResourceInUseExceptionCase.alt,
AddTagsToStreamError.LimitExceededExceptionCase.alt,
AddTagsToStreamError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[AddTagsToStreamError] = throwable match {
case e: AccessDeniedException => Some(AddTagsToStreamError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(AddTagsToStreamError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(AddTagsToStreamError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(AddTagsToStreamError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(AddTagsToStreamError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: AddTagsToStreamError): Throwable = e match {
case AddTagsToStreamError.AccessDeniedExceptionCase(e) => e
case AddTagsToStreamError.InvalidArgumentExceptionCase(e) => e
case AddTagsToStreamError.ResourceInUseExceptionCase(e) => e
case AddTagsToStreamError.LimitExceededExceptionCase(e) => e
case AddTagsToStreamError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class CreateStream(input: CreateStreamInput) extends KinesisOperation[CreateStreamInput, KinesisOperation.CreateStreamError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[CreateStreamInput, KinesisOperation.CreateStreamError, Unit, Nothing, Nothing] = impl.createStream(input.streamName, input.shardCount, input.streamModeDetails)
def ordinal: Int = 1
def endpoint: smithy4s.Endpoint[KinesisOperation,CreateStreamInput, KinesisOperation.CreateStreamError, Unit, Nothing, Nothing] = CreateStream
}
object CreateStream extends smithy4s.Endpoint[KinesisOperation,CreateStreamInput, KinesisOperation.CreateStreamError, Unit, Nothing, Nothing] {
val schema: OperationSchema[CreateStreamInput, KinesisOperation.CreateStreamError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "CreateStream"))
.withInput(CreateStreamInput.schema)
.withError(CreateStreamError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Creates a Kinesis data stream. A stream captures and transports data records that are\n continuously emitted from different data sources or producers.\n Scale-out within a stream is explicitly supported by means of shards, which are uniquely\n identified groups of data records in a stream.
\n You can create your data stream using either on-demand or provisioned capacity mode.\n Data streams with an on-demand mode require no capacity planning and automatically scale\n to handle gigabytes of write and read throughput per minute. With the on-demand mode,\n Kinesis Data Streams automatically manages the shards in order to provide the necessary\n throughput. For the data streams with a provisioned mode, you must specify the number of\n shards for the data stream. Each shard can support reads up to five transactions per\n second, up to a maximum data read total of 2 MiB per second. Each shard can support\n writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per\n second. If the amount of data input increases or decreases, you can add or remove\n shards.
\n The stream name identifies the stream. The name is scoped to the Amazon Web Services\n account used by the application. It is also scoped by Amazon Web Services Region. That\n is, two streams in two different accounts can have the same name, and two streams in the\n same account, but in two different Regions, can have the same name.
\n \n CreateStream
is an asynchronous operation. Upon receiving a\n CreateStream
request, Kinesis Data Streams immediately returns and sets\n the stream status to CREATING
. After the stream is created, Kinesis Data\n Streams sets the stream status to ACTIVE
. You should perform read and write\n operations only on an ACTIVE
stream.
\n You receive a LimitExceededException
when making a\n CreateStream
request when you try to do one of the following:
\n \n - \n
Have more than five streams in the CREATING
state at any point in\n time.
\n \n - \n
Create more shards than are authorized for your account.
\n \n
\n For the default shard limit for an Amazon Web Services account, see Amazon\n Kinesis Data Streams Limits in the Amazon Kinesis Data Streams\n Developer Guide. To increase this limit, contact Amazon Web Services\n Support.
\n You can use DescribeStreamSummary to check the stream status, which\n is returned in StreamStatus
.
\n \n CreateStream has a limit of five transactions per second per\n account.
"))
def wrap(input: CreateStreamInput): CreateStream = CreateStream(input)
}
sealed trait CreateStreamError extends scala.Product with scala.Serializable { self =>
@inline final def widen: CreateStreamError = this
def $ordinal: Int
object project {
def invalidArgumentException: Option[InvalidArgumentException] = CreateStreamError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = CreateStreamError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = CreateStreamError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
}
def accept[A](visitor: CreateStreamError.Visitor[A]): A = this match {
case value: CreateStreamError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: CreateStreamError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: CreateStreamError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
}
}
object CreateStreamError extends ErrorSchema.Companion[CreateStreamError] {
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): CreateStreamError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): CreateStreamError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): CreateStreamError = LimitExceededExceptionCase(limitExceededException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "CreateStreamError")
val hints: Hints = Hints.empty
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends CreateStreamError { final def $ordinal: Int = 0 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends CreateStreamError { final def $ordinal: Int = 1 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends CreateStreamError { final def $ordinal: Int = 2 }
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[CreateStreamError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), CreateStreamError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[CreateStreamError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[CreateStreamError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), CreateStreamError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[CreateStreamError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[CreateStreamError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), CreateStreamError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[CreateStreamError]("LimitExceededException")
}
trait Visitor[A] {
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
}
}
implicit val schema: Schema[CreateStreamError] = union(
CreateStreamError.InvalidArgumentExceptionCase.alt,
CreateStreamError.ResourceInUseExceptionCase.alt,
CreateStreamError.LimitExceededExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[CreateStreamError] = throwable match {
case e: InvalidArgumentException => Some(CreateStreamError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(CreateStreamError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(CreateStreamError.LimitExceededExceptionCase(e))
case _ => None
}
def unliftError(e: CreateStreamError): Throwable = e match {
case CreateStreamError.InvalidArgumentExceptionCase(e) => e
case CreateStreamError.ResourceInUseExceptionCase(e) => e
case CreateStreamError.LimitExceededExceptionCase(e) => e
}
}
final case class DecreaseStreamRetentionPeriod(input: DecreaseStreamRetentionPeriodInput) extends KinesisOperation[DecreaseStreamRetentionPeriodInput, KinesisOperation.DecreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[DecreaseStreamRetentionPeriodInput, KinesisOperation.DecreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] = impl.decreaseStreamRetentionPeriod(input.retentionPeriodHours, input.streamName, input.streamARN)
def ordinal: Int = 2
def endpoint: smithy4s.Endpoint[KinesisOperation,DecreaseStreamRetentionPeriodInput, KinesisOperation.DecreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] = DecreaseStreamRetentionPeriod
}
object DecreaseStreamRetentionPeriod extends smithy4s.Endpoint[KinesisOperation,DecreaseStreamRetentionPeriodInput, KinesisOperation.DecreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] {
val schema: OperationSchema[DecreaseStreamRetentionPeriodInput, KinesisOperation.DecreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "DecreaseStreamRetentionPeriod"))
.withInput(DecreaseStreamRetentionPeriodInput.schema)
.withError(DecreaseStreamRetentionPeriodError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Decreases the Kinesis data stream\'s retention period, which is the length of time data\n records are accessible after they are added to the stream. The minimum value of a\n stream\'s retention period is 24 hours.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n This operation may result in lost data. For example, if the stream\'s retention period\n is 48 hours and is decreased to 24 hours, any data already in the stream that is older\n than 24 hours is inaccessible.
"))
def wrap(input: DecreaseStreamRetentionPeriodInput): DecreaseStreamRetentionPeriod = DecreaseStreamRetentionPeriod(input)
}
sealed trait DecreaseStreamRetentionPeriodError extends scala.Product with scala.Serializable { self =>
@inline final def widen: DecreaseStreamRetentionPeriodError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = DecreaseStreamRetentionPeriodError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = DecreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = DecreaseStreamRetentionPeriodError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = DecreaseStreamRetentionPeriodError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = DecreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: DecreaseStreamRetentionPeriodError.Visitor[A]): A = this match {
case value: DecreaseStreamRetentionPeriodError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: DecreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: DecreaseStreamRetentionPeriodError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: DecreaseStreamRetentionPeriodError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: DecreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object DecreaseStreamRetentionPeriodError extends ErrorSchema.Companion[DecreaseStreamRetentionPeriodError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): DecreaseStreamRetentionPeriodError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): DecreaseStreamRetentionPeriodError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): DecreaseStreamRetentionPeriodError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): DecreaseStreamRetentionPeriodError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): DecreaseStreamRetentionPeriodError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "DecreaseStreamRetentionPeriodError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends DecreaseStreamRetentionPeriodError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends DecreaseStreamRetentionPeriodError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends DecreaseStreamRetentionPeriodError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends DecreaseStreamRetentionPeriodError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends DecreaseStreamRetentionPeriodError { final def $ordinal: Int = 4 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DecreaseStreamRetentionPeriodError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), DecreaseStreamRetentionPeriodError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[DecreaseStreamRetentionPeriodError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DecreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), DecreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[DecreaseStreamRetentionPeriodError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DecreaseStreamRetentionPeriodError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), DecreaseStreamRetentionPeriodError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[DecreaseStreamRetentionPeriodError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DecreaseStreamRetentionPeriodError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), DecreaseStreamRetentionPeriodError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[DecreaseStreamRetentionPeriodError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DecreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), DecreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[DecreaseStreamRetentionPeriodError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[DecreaseStreamRetentionPeriodError] = union(
DecreaseStreamRetentionPeriodError.AccessDeniedExceptionCase.alt,
DecreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase.alt,
DecreaseStreamRetentionPeriodError.ResourceInUseExceptionCase.alt,
DecreaseStreamRetentionPeriodError.LimitExceededExceptionCase.alt,
DecreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[DecreaseStreamRetentionPeriodError] = throwable match {
case e: AccessDeniedException => Some(DecreaseStreamRetentionPeriodError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(DecreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(DecreaseStreamRetentionPeriodError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(DecreaseStreamRetentionPeriodError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(DecreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: DecreaseStreamRetentionPeriodError): Throwable = e match {
case DecreaseStreamRetentionPeriodError.AccessDeniedExceptionCase(e) => e
case DecreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase(e) => e
case DecreaseStreamRetentionPeriodError.ResourceInUseExceptionCase(e) => e
case DecreaseStreamRetentionPeriodError.LimitExceededExceptionCase(e) => e
case DecreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class DeleteStream(input: DeleteStreamInput) extends KinesisOperation[DeleteStreamInput, KinesisOperation.DeleteStreamError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[DeleteStreamInput, KinesisOperation.DeleteStreamError, Unit, Nothing, Nothing] = impl.deleteStream(input.streamName, input.enforceConsumerDeletion, input.streamARN)
def ordinal: Int = 3
def endpoint: smithy4s.Endpoint[KinesisOperation,DeleteStreamInput, KinesisOperation.DeleteStreamError, Unit, Nothing, Nothing] = DeleteStream
}
object DeleteStream extends smithy4s.Endpoint[KinesisOperation,DeleteStreamInput, KinesisOperation.DeleteStreamError, Unit, Nothing, Nothing] {
val schema: OperationSchema[DeleteStreamInput, KinesisOperation.DeleteStreamError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "DeleteStream"))
.withInput(DeleteStreamInput.schema)
.withError(DeleteStreamError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Deletes a Kinesis data stream and all its shards and data. You must shut down any\n applications that are operating on the stream before you delete the stream. If an\n application attempts to operate on a deleted stream, it receives the exception\n ResourceNotFoundException
.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n If the stream is in the ACTIVE
state, you can delete it. After a\n DeleteStream
request, the specified stream is in the\n DELETING
state until Kinesis Data Streams completes the\n deletion.
\n \n Note: Kinesis Data Streams might continue to accept\n data read and write operations, such as PutRecord, PutRecords, and GetRecords, on a stream in the\n DELETING
state until the stream deletion is complete.
\n When you delete a stream, any shards in that stream are also deleted, and any tags are\n dissociated from the stream.
\n You can use the DescribeStreamSummary operation to check the state\n of the stream, which is returned in StreamStatus
.
\n \n DeleteStream has a limit of five transactions per second per\n account.
"))
def wrap(input: DeleteStreamInput): DeleteStream = DeleteStream(input)
}
sealed trait DeleteStreamError extends scala.Product with scala.Serializable { self =>
@inline final def widen: DeleteStreamError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = DeleteStreamError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = DeleteStreamError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = DeleteStreamError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = DeleteStreamError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = DeleteStreamError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: DeleteStreamError.Visitor[A]): A = this match {
case value: DeleteStreamError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: DeleteStreamError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: DeleteStreamError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: DeleteStreamError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: DeleteStreamError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object DeleteStreamError extends ErrorSchema.Companion[DeleteStreamError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): DeleteStreamError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): DeleteStreamError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): DeleteStreamError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): DeleteStreamError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): DeleteStreamError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "DeleteStreamError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends DeleteStreamError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends DeleteStreamError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends DeleteStreamError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends DeleteStreamError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends DeleteStreamError { final def $ordinal: Int = 4 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DeleteStreamError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), DeleteStreamError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[DeleteStreamError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DeleteStreamError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), DeleteStreamError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[DeleteStreamError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DeleteStreamError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), DeleteStreamError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[DeleteStreamError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DeleteStreamError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), DeleteStreamError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[DeleteStreamError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DeleteStreamError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), DeleteStreamError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[DeleteStreamError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[DeleteStreamError] = union(
DeleteStreamError.AccessDeniedExceptionCase.alt,
DeleteStreamError.InvalidArgumentExceptionCase.alt,
DeleteStreamError.ResourceInUseExceptionCase.alt,
DeleteStreamError.LimitExceededExceptionCase.alt,
DeleteStreamError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[DeleteStreamError] = throwable match {
case e: AccessDeniedException => Some(DeleteStreamError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(DeleteStreamError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(DeleteStreamError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(DeleteStreamError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(DeleteStreamError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: DeleteStreamError): Throwable = e match {
case DeleteStreamError.AccessDeniedExceptionCase(e) => e
case DeleteStreamError.InvalidArgumentExceptionCase(e) => e
case DeleteStreamError.ResourceInUseExceptionCase(e) => e
case DeleteStreamError.LimitExceededExceptionCase(e) => e
case DeleteStreamError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class DeregisterStreamConsumer(input: DeregisterStreamConsumerInput) extends KinesisOperation[DeregisterStreamConsumerInput, KinesisOperation.DeregisterStreamConsumerError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[DeregisterStreamConsumerInput, KinesisOperation.DeregisterStreamConsumerError, Unit, Nothing, Nothing] = impl.deregisterStreamConsumer(input.streamARN, input.consumerName, input.consumerARN)
def ordinal: Int = 4
def endpoint: smithy4s.Endpoint[KinesisOperation,DeregisterStreamConsumerInput, KinesisOperation.DeregisterStreamConsumerError, Unit, Nothing, Nothing] = DeregisterStreamConsumer
}
object DeregisterStreamConsumer extends smithy4s.Endpoint[KinesisOperation,DeregisterStreamConsumerInput, KinesisOperation.DeregisterStreamConsumerError, Unit, Nothing, Nothing] {
val schema: OperationSchema[DeregisterStreamConsumerInput, KinesisOperation.DeregisterStreamConsumerError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "DeregisterStreamConsumer"))
.withInput(DeregisterStreamConsumerInput.schema)
.withError(DeregisterStreamConsumerError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("To deregister a consumer, provide its ARN. Alternatively, you can provide the ARN of\n the data stream and the name you gave the consumer when you registered it. You may also\n provide all three parameters, as long as they don\'t conflict with each other. If you\n don\'t know the name or ARN of the consumer that you want to deregister, you can use the\n ListStreamConsumers operation to get a list of the descriptions of\n all the consumers that are currently registered with a given data stream. The\n description of a consumer contains its name and ARN.
\n This operation has a limit of five transactions per second per stream.
"))
def wrap(input: DeregisterStreamConsumerInput): DeregisterStreamConsumer = DeregisterStreamConsumer(input)
}
sealed trait DeregisterStreamConsumerError extends scala.Product with scala.Serializable { self =>
@inline final def widen: DeregisterStreamConsumerError = this
def $ordinal: Int
object project {
def invalidArgumentException: Option[InvalidArgumentException] = DeregisterStreamConsumerError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def limitExceededException: Option[LimitExceededException] = DeregisterStreamConsumerError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = DeregisterStreamConsumerError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: DeregisterStreamConsumerError.Visitor[A]): A = this match {
case value: DeregisterStreamConsumerError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: DeregisterStreamConsumerError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: DeregisterStreamConsumerError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object DeregisterStreamConsumerError extends ErrorSchema.Companion[DeregisterStreamConsumerError] {
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): DeregisterStreamConsumerError = InvalidArgumentExceptionCase(invalidArgumentException)
def limitExceededException(limitExceededException: LimitExceededException): DeregisterStreamConsumerError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): DeregisterStreamConsumerError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "DeregisterStreamConsumerError")
val hints: Hints = Hints.empty
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends DeregisterStreamConsumerError { final def $ordinal: Int = 0 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends DeregisterStreamConsumerError { final def $ordinal: Int = 1 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends DeregisterStreamConsumerError { final def $ordinal: Int = 2 }
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DeregisterStreamConsumerError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), DeregisterStreamConsumerError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[DeregisterStreamConsumerError]("InvalidArgumentException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DeregisterStreamConsumerError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), DeregisterStreamConsumerError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[DeregisterStreamConsumerError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DeregisterStreamConsumerError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), DeregisterStreamConsumerError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[DeregisterStreamConsumerError]("ResourceNotFoundException")
}
trait Visitor[A] {
def invalidArgumentException(value: InvalidArgumentException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def invalidArgumentException(value: InvalidArgumentException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[DeregisterStreamConsumerError] = union(
DeregisterStreamConsumerError.InvalidArgumentExceptionCase.alt,
DeregisterStreamConsumerError.LimitExceededExceptionCase.alt,
DeregisterStreamConsumerError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[DeregisterStreamConsumerError] = throwable match {
case e: InvalidArgumentException => Some(DeregisterStreamConsumerError.InvalidArgumentExceptionCase(e))
case e: LimitExceededException => Some(DeregisterStreamConsumerError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(DeregisterStreamConsumerError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: DeregisterStreamConsumerError): Throwable = e match {
case DeregisterStreamConsumerError.InvalidArgumentExceptionCase(e) => e
case DeregisterStreamConsumerError.LimitExceededExceptionCase(e) => e
case DeregisterStreamConsumerError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class DescribeLimits(input: DescribeLimitsInput) extends KinesisOperation[DescribeLimitsInput, KinesisOperation.DescribeLimitsError, DescribeLimitsOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[DescribeLimitsInput, KinesisOperation.DescribeLimitsError, DescribeLimitsOutput, Nothing, Nothing] = impl.describeLimits()
def ordinal: Int = 5
def endpoint: smithy4s.Endpoint[KinesisOperation,DescribeLimitsInput, KinesisOperation.DescribeLimitsError, DescribeLimitsOutput, Nothing, Nothing] = DescribeLimits
}
object DescribeLimits extends smithy4s.Endpoint[KinesisOperation,DescribeLimitsInput, KinesisOperation.DescribeLimitsError, DescribeLimitsOutput, Nothing, Nothing] {
val schema: OperationSchema[DescribeLimitsInput, KinesisOperation.DescribeLimitsError, DescribeLimitsOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "DescribeLimits"))
.withInput(DescribeLimitsInput.schema)
.withError(DescribeLimitsError.errorSchema)
.withOutput(DescribeLimitsOutput.schema)
.withHints(smithy.api.Documentation("Describes the shard limits and usage for the account.
\n If you update your account limits, the old limits might be returned for a few\n minutes.
\n This operation has a limit of one transaction per second per account.
"))
def wrap(input: DescribeLimitsInput): DescribeLimits = DescribeLimits(input)
}
sealed trait DescribeLimitsError extends scala.Product with scala.Serializable { self =>
@inline final def widen: DescribeLimitsError = this
def $ordinal: Int
object project {
def limitExceededException: Option[LimitExceededException] = DescribeLimitsError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
}
def accept[A](visitor: DescribeLimitsError.Visitor[A]): A = this match {
case value: DescribeLimitsError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
}
}
object DescribeLimitsError extends ErrorSchema.Companion[DescribeLimitsError] {
def limitExceededException(limitExceededException: LimitExceededException): DescribeLimitsError = LimitExceededExceptionCase(limitExceededException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "DescribeLimitsError")
val hints: Hints = Hints.empty
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends DescribeLimitsError { final def $ordinal: Int = 0 }
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeLimitsError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), DescribeLimitsError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[DescribeLimitsError]("LimitExceededException")
}
trait Visitor[A] {
def limitExceededException(value: LimitExceededException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def limitExceededException(value: LimitExceededException): A = default
}
}
implicit val schema: Schema[DescribeLimitsError] = union(
DescribeLimitsError.LimitExceededExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[DescribeLimitsError] = throwable match {
case e: LimitExceededException => Some(DescribeLimitsError.LimitExceededExceptionCase(e))
case _ => None
}
def unliftError(e: DescribeLimitsError): Throwable = e match {
case DescribeLimitsError.LimitExceededExceptionCase(e) => e
}
}
final case class DescribeStream(input: DescribeStreamInput) extends KinesisOperation[DescribeStreamInput, KinesisOperation.DescribeStreamError, DescribeStreamOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[DescribeStreamInput, KinesisOperation.DescribeStreamError, DescribeStreamOutput, Nothing, Nothing] = impl.describeStream(input.streamName, input.limit, input.exclusiveStartShardId, input.streamARN)
def ordinal: Int = 6
def endpoint: smithy4s.Endpoint[KinesisOperation,DescribeStreamInput, KinesisOperation.DescribeStreamError, DescribeStreamOutput, Nothing, Nothing] = DescribeStream
}
object DescribeStream extends smithy4s.Endpoint[KinesisOperation,DescribeStreamInput, KinesisOperation.DescribeStreamError, DescribeStreamOutput, Nothing, Nothing] {
val schema: OperationSchema[DescribeStreamInput, KinesisOperation.DescribeStreamError, DescribeStreamOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "DescribeStream"))
.withInput(DescribeStreamInput.schema)
.withError(DescribeStreamError.errorSchema)
.withOutput(DescribeStreamOutput.schema)
.withHints(smithy.api.Documentation("Describes the specified Kinesis data stream.
\n \n This API has been revised. It\'s highly recommended that you use the DescribeStreamSummary API to get a summarized description of the\n specified Kinesis data stream and the ListShards API to list the\n shards in a specified data stream and obtain information about each shard.
\n \n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n The information returned includes the stream name, Amazon Resource Name (ARN),\n creation time, enhanced metric configuration, and shard map. The shard map is an array\n of shard objects. For each shard object, there is the hash key and sequence number\n ranges that the shard spans, and the IDs of any earlier shards that played in a role in\n creating the shard. Every record ingested in the stream is identified by a sequence\n number, which is assigned when the record is put into the stream.
\n You can limit the number of shards returned by each call. For more information, see\n Retrieving\n Shards from a Stream in the Amazon Kinesis Data Streams Developer\n Guide.
\n There are no guarantees about the chronological order shards returned. To process\n shards in chronological order, use the ID of the parent shard to track the lineage to\n the oldest shard.
\n This operation has a limit of 10 transactions per second per account.
"), smithy.waiters.Waitable(Map(smithy.waiters.WaiterName("StreamExists") -> smithy.waiters.Waiter(acceptors = List(smithy.waiters.Acceptor(state = smithy.waiters.AcceptorState.SUCCESS.widen, matcher = smithy.waiters.Matcher.OutputCase(smithy.waiters.PathMatcher(path = "StreamDescription.StreamStatus", expected = "ACTIVE", comparator = smithy.waiters.PathComparator.STRING_EQUALS.widen)).widen)), minDelay = smithy.waiters.WaiterDelay(10), maxDelay = smithy.waiters.WaiterDelay(120), documentation = None, deprecated = None, tags = None), smithy.waiters.WaiterName("StreamNotExists") -> smithy.waiters.Waiter(acceptors = List(smithy.waiters.Acceptor(state = smithy.waiters.AcceptorState.SUCCESS.widen, matcher = smithy.waiters.Matcher.ErrorTypeCase("ResourceNotFoundException").widen)), minDelay = smithy.waiters.WaiterDelay(10), maxDelay = smithy.waiters.WaiterDelay(120), documentation = None, deprecated = None, tags = None))))
def wrap(input: DescribeStreamInput): DescribeStream = DescribeStream(input)
}
sealed trait DescribeStreamError extends scala.Product with scala.Serializable { self =>
@inline final def widen: DescribeStreamError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = DescribeStreamError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = DescribeStreamError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def limitExceededException: Option[LimitExceededException] = DescribeStreamError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = DescribeStreamError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: DescribeStreamError.Visitor[A]): A = this match {
case value: DescribeStreamError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: DescribeStreamError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: DescribeStreamError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: DescribeStreamError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object DescribeStreamError extends ErrorSchema.Companion[DescribeStreamError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): DescribeStreamError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): DescribeStreamError = InvalidArgumentExceptionCase(invalidArgumentException)
def limitExceededException(limitExceededException: LimitExceededException): DescribeStreamError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): DescribeStreamError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "DescribeStreamError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends DescribeStreamError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends DescribeStreamError { final def $ordinal: Int = 1 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends DescribeStreamError { final def $ordinal: Int = 2 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends DescribeStreamError { final def $ordinal: Int = 3 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), DescribeStreamError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[DescribeStreamError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), DescribeStreamError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[DescribeStreamError]("InvalidArgumentException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), DescribeStreamError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[DescribeStreamError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), DescribeStreamError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[DescribeStreamError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[DescribeStreamError] = union(
DescribeStreamError.AccessDeniedExceptionCase.alt,
DescribeStreamError.InvalidArgumentExceptionCase.alt,
DescribeStreamError.LimitExceededExceptionCase.alt,
DescribeStreamError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[DescribeStreamError] = throwable match {
case e: AccessDeniedException => Some(DescribeStreamError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(DescribeStreamError.InvalidArgumentExceptionCase(e))
case e: LimitExceededException => Some(DescribeStreamError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(DescribeStreamError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: DescribeStreamError): Throwable = e match {
case DescribeStreamError.AccessDeniedExceptionCase(e) => e
case DescribeStreamError.InvalidArgumentExceptionCase(e) => e
case DescribeStreamError.LimitExceededExceptionCase(e) => e
case DescribeStreamError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class DescribeStreamConsumer(input: DescribeStreamConsumerInput) extends KinesisOperation[DescribeStreamConsumerInput, KinesisOperation.DescribeStreamConsumerError, DescribeStreamConsumerOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[DescribeStreamConsumerInput, KinesisOperation.DescribeStreamConsumerError, DescribeStreamConsumerOutput, Nothing, Nothing] = impl.describeStreamConsumer(input.streamARN, input.consumerName, input.consumerARN)
def ordinal: Int = 7
def endpoint: smithy4s.Endpoint[KinesisOperation,DescribeStreamConsumerInput, KinesisOperation.DescribeStreamConsumerError, DescribeStreamConsumerOutput, Nothing, Nothing] = DescribeStreamConsumer
}
object DescribeStreamConsumer extends smithy4s.Endpoint[KinesisOperation,DescribeStreamConsumerInput, KinesisOperation.DescribeStreamConsumerError, DescribeStreamConsumerOutput, Nothing, Nothing] {
val schema: OperationSchema[DescribeStreamConsumerInput, KinesisOperation.DescribeStreamConsumerError, DescribeStreamConsumerOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "DescribeStreamConsumer"))
.withInput(DescribeStreamConsumerInput.schema)
.withError(DescribeStreamConsumerError.errorSchema)
.withOutput(DescribeStreamConsumerOutput.schema)
.withHints(smithy.api.Documentation("To get the description of a registered consumer, provide the ARN of the consumer.\n Alternatively, you can provide the ARN of the data stream and the name you gave the\n consumer when you registered it. You may also provide all three parameters, as long as\n they don\'t conflict with each other. If you don\'t know the name or ARN of the consumer\n that you want to describe, you can use the ListStreamConsumers\n operation to get a list of the descriptions of all the consumers that are currently\n registered with a given data stream.
\n This operation has a limit of 20 transactions per second per stream.
"))
def wrap(input: DescribeStreamConsumerInput): DescribeStreamConsumer = DescribeStreamConsumer(input)
}
sealed trait DescribeStreamConsumerError extends scala.Product with scala.Serializable { self =>
@inline final def widen: DescribeStreamConsumerError = this
def $ordinal: Int
object project {
def invalidArgumentException: Option[InvalidArgumentException] = DescribeStreamConsumerError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def limitExceededException: Option[LimitExceededException] = DescribeStreamConsumerError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = DescribeStreamConsumerError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: DescribeStreamConsumerError.Visitor[A]): A = this match {
case value: DescribeStreamConsumerError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: DescribeStreamConsumerError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: DescribeStreamConsumerError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object DescribeStreamConsumerError extends ErrorSchema.Companion[DescribeStreamConsumerError] {
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): DescribeStreamConsumerError = InvalidArgumentExceptionCase(invalidArgumentException)
def limitExceededException(limitExceededException: LimitExceededException): DescribeStreamConsumerError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): DescribeStreamConsumerError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "DescribeStreamConsumerError")
val hints: Hints = Hints.empty
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends DescribeStreamConsumerError { final def $ordinal: Int = 0 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends DescribeStreamConsumerError { final def $ordinal: Int = 1 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends DescribeStreamConsumerError { final def $ordinal: Int = 2 }
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamConsumerError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), DescribeStreamConsumerError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[DescribeStreamConsumerError]("InvalidArgumentException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamConsumerError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), DescribeStreamConsumerError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[DescribeStreamConsumerError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamConsumerError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), DescribeStreamConsumerError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[DescribeStreamConsumerError]("ResourceNotFoundException")
}
trait Visitor[A] {
def invalidArgumentException(value: InvalidArgumentException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def invalidArgumentException(value: InvalidArgumentException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[DescribeStreamConsumerError] = union(
DescribeStreamConsumerError.InvalidArgumentExceptionCase.alt,
DescribeStreamConsumerError.LimitExceededExceptionCase.alt,
DescribeStreamConsumerError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[DescribeStreamConsumerError] = throwable match {
case e: InvalidArgumentException => Some(DescribeStreamConsumerError.InvalidArgumentExceptionCase(e))
case e: LimitExceededException => Some(DescribeStreamConsumerError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(DescribeStreamConsumerError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: DescribeStreamConsumerError): Throwable = e match {
case DescribeStreamConsumerError.InvalidArgumentExceptionCase(e) => e
case DescribeStreamConsumerError.LimitExceededExceptionCase(e) => e
case DescribeStreamConsumerError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class DescribeStreamSummary(input: DescribeStreamSummaryInput) extends KinesisOperation[DescribeStreamSummaryInput, KinesisOperation.DescribeStreamSummaryError, DescribeStreamSummaryOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[DescribeStreamSummaryInput, KinesisOperation.DescribeStreamSummaryError, DescribeStreamSummaryOutput, Nothing, Nothing] = impl.describeStreamSummary(input.streamName, input.streamARN)
def ordinal: Int = 8
def endpoint: smithy4s.Endpoint[KinesisOperation,DescribeStreamSummaryInput, KinesisOperation.DescribeStreamSummaryError, DescribeStreamSummaryOutput, Nothing, Nothing] = DescribeStreamSummary
}
object DescribeStreamSummary extends smithy4s.Endpoint[KinesisOperation,DescribeStreamSummaryInput, KinesisOperation.DescribeStreamSummaryError, DescribeStreamSummaryOutput, Nothing, Nothing] {
val schema: OperationSchema[DescribeStreamSummaryInput, KinesisOperation.DescribeStreamSummaryError, DescribeStreamSummaryOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "DescribeStreamSummary"))
.withInput(DescribeStreamSummaryInput.schema)
.withError(DescribeStreamSummaryError.errorSchema)
.withOutput(DescribeStreamSummaryOutput.schema)
.withHints(smithy.api.Documentation("Provides a summarized description of the specified Kinesis data stream without the\n shard list.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n The information returned includes the stream name, Amazon Resource Name (ARN), status,\n record retention period, approximate creation time, monitoring, encryption details, and\n open shard count.
\n \n DescribeStreamSummary has a limit of 20 transactions per second per\n account.
"))
def wrap(input: DescribeStreamSummaryInput): DescribeStreamSummary = DescribeStreamSummary(input)
}
sealed trait DescribeStreamSummaryError extends scala.Product with scala.Serializable { self =>
@inline final def widen: DescribeStreamSummaryError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = DescribeStreamSummaryError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = DescribeStreamSummaryError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def limitExceededException: Option[LimitExceededException] = DescribeStreamSummaryError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = DescribeStreamSummaryError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: DescribeStreamSummaryError.Visitor[A]): A = this match {
case value: DescribeStreamSummaryError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: DescribeStreamSummaryError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: DescribeStreamSummaryError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: DescribeStreamSummaryError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object DescribeStreamSummaryError extends ErrorSchema.Companion[DescribeStreamSummaryError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): DescribeStreamSummaryError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): DescribeStreamSummaryError = InvalidArgumentExceptionCase(invalidArgumentException)
def limitExceededException(limitExceededException: LimitExceededException): DescribeStreamSummaryError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): DescribeStreamSummaryError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "DescribeStreamSummaryError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends DescribeStreamSummaryError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends DescribeStreamSummaryError { final def $ordinal: Int = 1 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends DescribeStreamSummaryError { final def $ordinal: Int = 2 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends DescribeStreamSummaryError { final def $ordinal: Int = 3 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamSummaryError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), DescribeStreamSummaryError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[DescribeStreamSummaryError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamSummaryError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), DescribeStreamSummaryError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[DescribeStreamSummaryError]("InvalidArgumentException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamSummaryError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), DescribeStreamSummaryError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[DescribeStreamSummaryError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DescribeStreamSummaryError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), DescribeStreamSummaryError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[DescribeStreamSummaryError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[DescribeStreamSummaryError] = union(
DescribeStreamSummaryError.AccessDeniedExceptionCase.alt,
DescribeStreamSummaryError.InvalidArgumentExceptionCase.alt,
DescribeStreamSummaryError.LimitExceededExceptionCase.alt,
DescribeStreamSummaryError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[DescribeStreamSummaryError] = throwable match {
case e: AccessDeniedException => Some(DescribeStreamSummaryError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(DescribeStreamSummaryError.InvalidArgumentExceptionCase(e))
case e: LimitExceededException => Some(DescribeStreamSummaryError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(DescribeStreamSummaryError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: DescribeStreamSummaryError): Throwable = e match {
case DescribeStreamSummaryError.AccessDeniedExceptionCase(e) => e
case DescribeStreamSummaryError.InvalidArgumentExceptionCase(e) => e
case DescribeStreamSummaryError.LimitExceededExceptionCase(e) => e
case DescribeStreamSummaryError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class DisableEnhancedMonitoring(input: DisableEnhancedMonitoringInput) extends KinesisOperation[DisableEnhancedMonitoringInput, KinesisOperation.DisableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[DisableEnhancedMonitoringInput, KinesisOperation.DisableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] = impl.disableEnhancedMonitoring(input.shardLevelMetrics, input.streamName, input.streamARN)
def ordinal: Int = 9
def endpoint: smithy4s.Endpoint[KinesisOperation,DisableEnhancedMonitoringInput, KinesisOperation.DisableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] = DisableEnhancedMonitoring
}
object DisableEnhancedMonitoring extends smithy4s.Endpoint[KinesisOperation,DisableEnhancedMonitoringInput, KinesisOperation.DisableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] {
val schema: OperationSchema[DisableEnhancedMonitoringInput, KinesisOperation.DisableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "DisableEnhancedMonitoring"))
.withInput(DisableEnhancedMonitoringInput.schema)
.withError(DisableEnhancedMonitoringError.errorSchema)
.withOutput(EnhancedMonitoringOutput.schema)
.withHints(smithy.api.Documentation("Disables enhanced monitoring.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n "))
def wrap(input: DisableEnhancedMonitoringInput): DisableEnhancedMonitoring = DisableEnhancedMonitoring(input)
}
sealed trait DisableEnhancedMonitoringError extends scala.Product with scala.Serializable { self =>
@inline final def widen: DisableEnhancedMonitoringError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = DisableEnhancedMonitoringError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = DisableEnhancedMonitoringError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = DisableEnhancedMonitoringError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = DisableEnhancedMonitoringError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = DisableEnhancedMonitoringError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: DisableEnhancedMonitoringError.Visitor[A]): A = this match {
case value: DisableEnhancedMonitoringError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: DisableEnhancedMonitoringError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: DisableEnhancedMonitoringError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: DisableEnhancedMonitoringError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: DisableEnhancedMonitoringError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object DisableEnhancedMonitoringError extends ErrorSchema.Companion[DisableEnhancedMonitoringError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): DisableEnhancedMonitoringError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): DisableEnhancedMonitoringError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): DisableEnhancedMonitoringError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): DisableEnhancedMonitoringError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): DisableEnhancedMonitoringError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "DisableEnhancedMonitoringError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends DisableEnhancedMonitoringError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends DisableEnhancedMonitoringError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends DisableEnhancedMonitoringError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends DisableEnhancedMonitoringError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends DisableEnhancedMonitoringError { final def $ordinal: Int = 4 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DisableEnhancedMonitoringError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), DisableEnhancedMonitoringError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[DisableEnhancedMonitoringError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DisableEnhancedMonitoringError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), DisableEnhancedMonitoringError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[DisableEnhancedMonitoringError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DisableEnhancedMonitoringError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), DisableEnhancedMonitoringError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[DisableEnhancedMonitoringError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DisableEnhancedMonitoringError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), DisableEnhancedMonitoringError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[DisableEnhancedMonitoringError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[DisableEnhancedMonitoringError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), DisableEnhancedMonitoringError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[DisableEnhancedMonitoringError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[DisableEnhancedMonitoringError] = union(
DisableEnhancedMonitoringError.AccessDeniedExceptionCase.alt,
DisableEnhancedMonitoringError.InvalidArgumentExceptionCase.alt,
DisableEnhancedMonitoringError.ResourceInUseExceptionCase.alt,
DisableEnhancedMonitoringError.LimitExceededExceptionCase.alt,
DisableEnhancedMonitoringError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[DisableEnhancedMonitoringError] = throwable match {
case e: AccessDeniedException => Some(DisableEnhancedMonitoringError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(DisableEnhancedMonitoringError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(DisableEnhancedMonitoringError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(DisableEnhancedMonitoringError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(DisableEnhancedMonitoringError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: DisableEnhancedMonitoringError): Throwable = e match {
case DisableEnhancedMonitoringError.AccessDeniedExceptionCase(e) => e
case DisableEnhancedMonitoringError.InvalidArgumentExceptionCase(e) => e
case DisableEnhancedMonitoringError.ResourceInUseExceptionCase(e) => e
case DisableEnhancedMonitoringError.LimitExceededExceptionCase(e) => e
case DisableEnhancedMonitoringError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class EnableEnhancedMonitoring(input: EnableEnhancedMonitoringInput) extends KinesisOperation[EnableEnhancedMonitoringInput, KinesisOperation.EnableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[EnableEnhancedMonitoringInput, KinesisOperation.EnableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] = impl.enableEnhancedMonitoring(input.shardLevelMetrics, input.streamName, input.streamARN)
def ordinal: Int = 10
def endpoint: smithy4s.Endpoint[KinesisOperation,EnableEnhancedMonitoringInput, KinesisOperation.EnableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] = EnableEnhancedMonitoring
}
object EnableEnhancedMonitoring extends smithy4s.Endpoint[KinesisOperation,EnableEnhancedMonitoringInput, KinesisOperation.EnableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] {
val schema: OperationSchema[EnableEnhancedMonitoringInput, KinesisOperation.EnableEnhancedMonitoringError, EnhancedMonitoringOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "EnableEnhancedMonitoring"))
.withInput(EnableEnhancedMonitoringInput.schema)
.withError(EnableEnhancedMonitoringError.errorSchema)
.withOutput(EnhancedMonitoringOutput.schema)
.withHints(smithy.api.Documentation("Enables enhanced Kinesis data stream monitoring for shard-level metrics.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n "))
def wrap(input: EnableEnhancedMonitoringInput): EnableEnhancedMonitoring = EnableEnhancedMonitoring(input)
}
sealed trait EnableEnhancedMonitoringError extends scala.Product with scala.Serializable { self =>
@inline final def widen: EnableEnhancedMonitoringError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = EnableEnhancedMonitoringError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = EnableEnhancedMonitoringError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = EnableEnhancedMonitoringError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = EnableEnhancedMonitoringError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = EnableEnhancedMonitoringError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: EnableEnhancedMonitoringError.Visitor[A]): A = this match {
case value: EnableEnhancedMonitoringError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: EnableEnhancedMonitoringError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: EnableEnhancedMonitoringError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: EnableEnhancedMonitoringError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: EnableEnhancedMonitoringError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object EnableEnhancedMonitoringError extends ErrorSchema.Companion[EnableEnhancedMonitoringError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): EnableEnhancedMonitoringError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): EnableEnhancedMonitoringError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): EnableEnhancedMonitoringError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): EnableEnhancedMonitoringError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): EnableEnhancedMonitoringError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "EnableEnhancedMonitoringError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends EnableEnhancedMonitoringError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends EnableEnhancedMonitoringError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends EnableEnhancedMonitoringError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends EnableEnhancedMonitoringError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends EnableEnhancedMonitoringError { final def $ordinal: Int = 4 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[EnableEnhancedMonitoringError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), EnableEnhancedMonitoringError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[EnableEnhancedMonitoringError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[EnableEnhancedMonitoringError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), EnableEnhancedMonitoringError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[EnableEnhancedMonitoringError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[EnableEnhancedMonitoringError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), EnableEnhancedMonitoringError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[EnableEnhancedMonitoringError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[EnableEnhancedMonitoringError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), EnableEnhancedMonitoringError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[EnableEnhancedMonitoringError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[EnableEnhancedMonitoringError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), EnableEnhancedMonitoringError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[EnableEnhancedMonitoringError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[EnableEnhancedMonitoringError] = union(
EnableEnhancedMonitoringError.AccessDeniedExceptionCase.alt,
EnableEnhancedMonitoringError.InvalidArgumentExceptionCase.alt,
EnableEnhancedMonitoringError.ResourceInUseExceptionCase.alt,
EnableEnhancedMonitoringError.LimitExceededExceptionCase.alt,
EnableEnhancedMonitoringError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[EnableEnhancedMonitoringError] = throwable match {
case e: AccessDeniedException => Some(EnableEnhancedMonitoringError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(EnableEnhancedMonitoringError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(EnableEnhancedMonitoringError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(EnableEnhancedMonitoringError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(EnableEnhancedMonitoringError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: EnableEnhancedMonitoringError): Throwable = e match {
case EnableEnhancedMonitoringError.AccessDeniedExceptionCase(e) => e
case EnableEnhancedMonitoringError.InvalidArgumentExceptionCase(e) => e
case EnableEnhancedMonitoringError.ResourceInUseExceptionCase(e) => e
case EnableEnhancedMonitoringError.LimitExceededExceptionCase(e) => e
case EnableEnhancedMonitoringError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class GetRecords(input: GetRecordsInput) extends KinesisOperation[GetRecordsInput, KinesisOperation.GetRecordsError, GetRecordsOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[GetRecordsInput, KinesisOperation.GetRecordsError, GetRecordsOutput, Nothing, Nothing] = impl.getRecords(input.shardIterator, input.limit, input.streamARN)
def ordinal: Int = 11
def endpoint: smithy4s.Endpoint[KinesisOperation,GetRecordsInput, KinesisOperation.GetRecordsError, GetRecordsOutput, Nothing, Nothing] = GetRecords
}
object GetRecords extends smithy4s.Endpoint[KinesisOperation,GetRecordsInput, KinesisOperation.GetRecordsError, GetRecordsOutput, Nothing, Nothing] {
val schema: OperationSchema[GetRecordsInput, KinesisOperation.GetRecordsError, GetRecordsOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "GetRecords"))
.withInput(GetRecordsInput.schema)
.withError(GetRecordsError.errorSchema)
.withOutput(GetRecordsOutput.schema)
.withHints(smithy.api.Documentation("Gets data records from a Kinesis data stream\'s shard.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter in addition to the ShardIterator
parameter.
\n \n Specify a shard iterator using the ShardIterator
parameter. The shard\n iterator specifies the position in the shard from which you want to start reading data\n records sequentially. If there are no records available in the portion of the shard that\n the iterator points to, GetRecords returns an empty list. It might\n take multiple calls to get to a portion of the shard that contains records.
\n You can scale by provisioning multiple shards per stream while considering service\n limits (for more information, see Amazon Kinesis Data Streams\n Limits in the Amazon Kinesis Data Streams Developer\n Guide). Your application should have one thread per shard, each reading\n continuously from its stream. To read from a stream continually, call GetRecords in a loop. Use GetShardIterator to get the\n shard iterator to specify in the first GetRecords call. GetRecords returns a new shard iterator in\n NextShardIterator
. Specify the shard iterator returned in\n NextShardIterator
in subsequent calls to GetRecords.\n If the shard has been closed, the shard iterator can\'t return more data and GetRecords returns null
in NextShardIterator
.\n You can terminate the loop when the shard is closed, or when the shard iterator reaches\n the record with the sequence number or other attribute that marks it as the last record\n to process.
\n Each data record can be up to 1 MiB in size, and each shard can read up to 2 MiB per\n second. You can ensure that your calls don\'t exceed the maximum supported size or\n throughput by using the Limit
parameter to specify the maximum number of\n records that GetRecords can return. Consider your average record size\n when determining this limit. The maximum number of records that can be returned per call\n is 10,000.
\n The size of the data returned by GetRecords varies depending on the\n utilization of the shard. It is recommended that consumer applications retrieve records\n via the GetRecords
command using the 5 TPS limit to remain caught up.\n Retrieving records less frequently can lead to consumer applications falling behind. The\n maximum size of data that GetRecords can return is 10 MiB. If a call\n returns this amount of data, subsequent calls made within the next 5 seconds throw\n ProvisionedThroughputExceededException
. If there is insufficient\n provisioned throughput on the stream, subsequent calls made within the next 1 second\n throw ProvisionedThroughputExceededException
. GetRecords\n doesn\'t return any data when it throws an exception. For this reason, we recommend that\n you wait 1 second between calls to GetRecords. However, it\'s possible\n that the application will get exceptions for longer than 1 second.
\n To detect whether the application is falling behind in processing, you can use the\n MillisBehindLatest
response attribute. You can also monitor the stream\n using CloudWatch metrics and other mechanisms (see Monitoring in the Amazon\n Kinesis Data Streams Developer Guide).
\n Each Amazon Kinesis record includes a value, ApproximateArrivalTimestamp
,\n that is set when a stream successfully receives and stores a record. This is commonly\n referred to as a server-side time stamp, whereas a client-side time stamp is set when a\n data producer creates or sends the record to a stream (a data producer is any data\n source putting data records into a stream, for example with PutRecords). The time stamp has millisecond precision. There are no guarantees about the time\n stamp accuracy, or that the time stamp is always increasing. For example, records in a\n shard or across a stream might have time stamps that are out of order.
\n This operation has a limit of five transactions per second per shard.
"))
def wrap(input: GetRecordsInput): GetRecords = GetRecords(input)
}
sealed trait GetRecordsError extends scala.Product with scala.Serializable { self =>
@inline final def widen: GetRecordsError = this
def $ordinal: Int
object project {
def kMSAccessDeniedException: Option[KMSAccessDeniedException] = GetRecordsError.KMSAccessDeniedExceptionCase.alt.project.lift(self).map(_.kMSAccessDeniedException)
def kMSDisabledException: Option[KMSDisabledException] = GetRecordsError.KMSDisabledExceptionCase.alt.project.lift(self).map(_.kMSDisabledException)
def accessDeniedException: Option[AccessDeniedException] = GetRecordsError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def kMSNotFoundException: Option[KMSNotFoundException] = GetRecordsError.KMSNotFoundExceptionCase.alt.project.lift(self).map(_.kMSNotFoundException)
def expiredIteratorException: Option[ExpiredIteratorException] = GetRecordsError.ExpiredIteratorExceptionCase.alt.project.lift(self).map(_.expiredIteratorException)
def kMSOptInRequired: Option[KMSOptInRequired] = GetRecordsError.KMSOptInRequiredCase.alt.project.lift(self).map(_.kMSOptInRequired)
def kMSThrottlingException: Option[KMSThrottlingException] = GetRecordsError.KMSThrottlingExceptionCase.alt.project.lift(self).map(_.kMSThrottlingException)
def provisionedThroughputExceededException: Option[ProvisionedThroughputExceededException] = GetRecordsError.ProvisionedThroughputExceededExceptionCase.alt.project.lift(self).map(_.provisionedThroughputExceededException)
def invalidArgumentException: Option[InvalidArgumentException] = GetRecordsError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def kMSInvalidStateException: Option[KMSInvalidStateException] = GetRecordsError.KMSInvalidStateExceptionCase.alt.project.lift(self).map(_.kMSInvalidStateException)
def resourceNotFoundException: Option[ResourceNotFoundException] = GetRecordsError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: GetRecordsError.Visitor[A]): A = this match {
case value: GetRecordsError.KMSAccessDeniedExceptionCase => visitor.kMSAccessDeniedException(value.kMSAccessDeniedException)
case value: GetRecordsError.KMSDisabledExceptionCase => visitor.kMSDisabledException(value.kMSDisabledException)
case value: GetRecordsError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: GetRecordsError.KMSNotFoundExceptionCase => visitor.kMSNotFoundException(value.kMSNotFoundException)
case value: GetRecordsError.ExpiredIteratorExceptionCase => visitor.expiredIteratorException(value.expiredIteratorException)
case value: GetRecordsError.KMSOptInRequiredCase => visitor.kMSOptInRequired(value.kMSOptInRequired)
case value: GetRecordsError.KMSThrottlingExceptionCase => visitor.kMSThrottlingException(value.kMSThrottlingException)
case value: GetRecordsError.ProvisionedThroughputExceededExceptionCase => visitor.provisionedThroughputExceededException(value.provisionedThroughputExceededException)
case value: GetRecordsError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: GetRecordsError.KMSInvalidStateExceptionCase => visitor.kMSInvalidStateException(value.kMSInvalidStateException)
case value: GetRecordsError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object GetRecordsError extends ErrorSchema.Companion[GetRecordsError] {
def kMSAccessDeniedException(kMSAccessDeniedException: KMSAccessDeniedException): GetRecordsError = KMSAccessDeniedExceptionCase(kMSAccessDeniedException)
def kMSDisabledException(kMSDisabledException: KMSDisabledException): GetRecordsError = KMSDisabledExceptionCase(kMSDisabledException)
def accessDeniedException(accessDeniedException: AccessDeniedException): GetRecordsError = AccessDeniedExceptionCase(accessDeniedException)
def kMSNotFoundException(kMSNotFoundException: KMSNotFoundException): GetRecordsError = KMSNotFoundExceptionCase(kMSNotFoundException)
def expiredIteratorException(expiredIteratorException: ExpiredIteratorException): GetRecordsError = ExpiredIteratorExceptionCase(expiredIteratorException)
def kMSOptInRequired(kMSOptInRequired: KMSOptInRequired): GetRecordsError = KMSOptInRequiredCase(kMSOptInRequired)
def kMSThrottlingException(kMSThrottlingException: KMSThrottlingException): GetRecordsError = KMSThrottlingExceptionCase(kMSThrottlingException)
def provisionedThroughputExceededException(provisionedThroughputExceededException: ProvisionedThroughputExceededException): GetRecordsError = ProvisionedThroughputExceededExceptionCase(provisionedThroughputExceededException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): GetRecordsError = InvalidArgumentExceptionCase(invalidArgumentException)
def kMSInvalidStateException(kMSInvalidStateException: KMSInvalidStateException): GetRecordsError = KMSInvalidStateExceptionCase(kMSInvalidStateException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): GetRecordsError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "GetRecordsError")
val hints: Hints = Hints.empty
final case class KMSAccessDeniedExceptionCase(kMSAccessDeniedException: KMSAccessDeniedException) extends GetRecordsError { final def $ordinal: Int = 0 }
final case class KMSDisabledExceptionCase(kMSDisabledException: KMSDisabledException) extends GetRecordsError { final def $ordinal: Int = 1 }
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends GetRecordsError { final def $ordinal: Int = 2 }
final case class KMSNotFoundExceptionCase(kMSNotFoundException: KMSNotFoundException) extends GetRecordsError { final def $ordinal: Int = 3 }
final case class ExpiredIteratorExceptionCase(expiredIteratorException: ExpiredIteratorException) extends GetRecordsError { final def $ordinal: Int = 4 }
final case class KMSOptInRequiredCase(kMSOptInRequired: KMSOptInRequired) extends GetRecordsError { final def $ordinal: Int = 5 }
final case class KMSThrottlingExceptionCase(kMSThrottlingException: KMSThrottlingException) extends GetRecordsError { final def $ordinal: Int = 6 }
final case class ProvisionedThroughputExceededExceptionCase(provisionedThroughputExceededException: ProvisionedThroughputExceededException) extends GetRecordsError { final def $ordinal: Int = 7 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends GetRecordsError { final def $ordinal: Int = 8 }
final case class KMSInvalidStateExceptionCase(kMSInvalidStateException: KMSInvalidStateException) extends GetRecordsError { final def $ordinal: Int = 9 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends GetRecordsError { final def $ordinal: Int = 10 }
object KMSAccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.KMSAccessDeniedExceptionCase] = bijection(KMSAccessDeniedException.schema.addHints(hints), GetRecordsError.KMSAccessDeniedExceptionCase(_), _.kMSAccessDeniedException)
val alt = schema.oneOf[GetRecordsError]("KMSAccessDeniedException")
}
object KMSDisabledExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.KMSDisabledExceptionCase] = bijection(KMSDisabledException.schema.addHints(hints), GetRecordsError.KMSDisabledExceptionCase(_), _.kMSDisabledException)
val alt = schema.oneOf[GetRecordsError]("KMSDisabledException")
}
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), GetRecordsError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[GetRecordsError]("AccessDeniedException")
}
object KMSNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.KMSNotFoundExceptionCase] = bijection(KMSNotFoundException.schema.addHints(hints), GetRecordsError.KMSNotFoundExceptionCase(_), _.kMSNotFoundException)
val alt = schema.oneOf[GetRecordsError]("KMSNotFoundException")
}
object ExpiredIteratorExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.ExpiredIteratorExceptionCase] = bijection(ExpiredIteratorException.schema.addHints(hints), GetRecordsError.ExpiredIteratorExceptionCase(_), _.expiredIteratorException)
val alt = schema.oneOf[GetRecordsError]("ExpiredIteratorException")
}
object KMSOptInRequiredCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.KMSOptInRequiredCase] = bijection(KMSOptInRequired.schema.addHints(hints), GetRecordsError.KMSOptInRequiredCase(_), _.kMSOptInRequired)
val alt = schema.oneOf[GetRecordsError]("KMSOptInRequired")
}
object KMSThrottlingExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.KMSThrottlingExceptionCase] = bijection(KMSThrottlingException.schema.addHints(hints), GetRecordsError.KMSThrottlingExceptionCase(_), _.kMSThrottlingException)
val alt = schema.oneOf[GetRecordsError]("KMSThrottlingException")
}
object ProvisionedThroughputExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.ProvisionedThroughputExceededExceptionCase] = bijection(ProvisionedThroughputExceededException.schema.addHints(hints), GetRecordsError.ProvisionedThroughputExceededExceptionCase(_), _.provisionedThroughputExceededException)
val alt = schema.oneOf[GetRecordsError]("ProvisionedThroughputExceededException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), GetRecordsError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[GetRecordsError]("InvalidArgumentException")
}
object KMSInvalidStateExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.KMSInvalidStateExceptionCase] = bijection(KMSInvalidStateException.schema.addHints(hints), GetRecordsError.KMSInvalidStateExceptionCase(_), _.kMSInvalidStateException)
val alt = schema.oneOf[GetRecordsError]("KMSInvalidStateException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetRecordsError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), GetRecordsError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[GetRecordsError]("ResourceNotFoundException")
}
trait Visitor[A] {
def kMSAccessDeniedException(value: KMSAccessDeniedException): A
def kMSDisabledException(value: KMSDisabledException): A
def accessDeniedException(value: AccessDeniedException): A
def kMSNotFoundException(value: KMSNotFoundException): A
def expiredIteratorException(value: ExpiredIteratorException): A
def kMSOptInRequired(value: KMSOptInRequired): A
def kMSThrottlingException(value: KMSThrottlingException): A
def provisionedThroughputExceededException(value: ProvisionedThroughputExceededException): A
def invalidArgumentException(value: InvalidArgumentException): A
def kMSInvalidStateException(value: KMSInvalidStateException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def kMSAccessDeniedException(value: KMSAccessDeniedException): A = default
def kMSDisabledException(value: KMSDisabledException): A = default
def accessDeniedException(value: AccessDeniedException): A = default
def kMSNotFoundException(value: KMSNotFoundException): A = default
def expiredIteratorException(value: ExpiredIteratorException): A = default
def kMSOptInRequired(value: KMSOptInRequired): A = default
def kMSThrottlingException(value: KMSThrottlingException): A = default
def provisionedThroughputExceededException(value: ProvisionedThroughputExceededException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def kMSInvalidStateException(value: KMSInvalidStateException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[GetRecordsError] = union(
GetRecordsError.KMSAccessDeniedExceptionCase.alt,
GetRecordsError.KMSDisabledExceptionCase.alt,
GetRecordsError.AccessDeniedExceptionCase.alt,
GetRecordsError.KMSNotFoundExceptionCase.alt,
GetRecordsError.ExpiredIteratorExceptionCase.alt,
GetRecordsError.KMSOptInRequiredCase.alt,
GetRecordsError.KMSThrottlingExceptionCase.alt,
GetRecordsError.ProvisionedThroughputExceededExceptionCase.alt,
GetRecordsError.InvalidArgumentExceptionCase.alt,
GetRecordsError.KMSInvalidStateExceptionCase.alt,
GetRecordsError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[GetRecordsError] = throwable match {
case e: KMSAccessDeniedException => Some(GetRecordsError.KMSAccessDeniedExceptionCase(e))
case e: KMSDisabledException => Some(GetRecordsError.KMSDisabledExceptionCase(e))
case e: AccessDeniedException => Some(GetRecordsError.AccessDeniedExceptionCase(e))
case e: KMSNotFoundException => Some(GetRecordsError.KMSNotFoundExceptionCase(e))
case e: ExpiredIteratorException => Some(GetRecordsError.ExpiredIteratorExceptionCase(e))
case e: KMSOptInRequired => Some(GetRecordsError.KMSOptInRequiredCase(e))
case e: KMSThrottlingException => Some(GetRecordsError.KMSThrottlingExceptionCase(e))
case e: ProvisionedThroughputExceededException => Some(GetRecordsError.ProvisionedThroughputExceededExceptionCase(e))
case e: InvalidArgumentException => Some(GetRecordsError.InvalidArgumentExceptionCase(e))
case e: KMSInvalidStateException => Some(GetRecordsError.KMSInvalidStateExceptionCase(e))
case e: ResourceNotFoundException => Some(GetRecordsError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: GetRecordsError): Throwable = e match {
case GetRecordsError.KMSAccessDeniedExceptionCase(e) => e
case GetRecordsError.KMSDisabledExceptionCase(e) => e
case GetRecordsError.AccessDeniedExceptionCase(e) => e
case GetRecordsError.KMSNotFoundExceptionCase(e) => e
case GetRecordsError.ExpiredIteratorExceptionCase(e) => e
case GetRecordsError.KMSOptInRequiredCase(e) => e
case GetRecordsError.KMSThrottlingExceptionCase(e) => e
case GetRecordsError.ProvisionedThroughputExceededExceptionCase(e) => e
case GetRecordsError.InvalidArgumentExceptionCase(e) => e
case GetRecordsError.KMSInvalidStateExceptionCase(e) => e
case GetRecordsError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class GetShardIterator(input: GetShardIteratorInput) extends KinesisOperation[GetShardIteratorInput, KinesisOperation.GetShardIteratorError, GetShardIteratorOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[GetShardIteratorInput, KinesisOperation.GetShardIteratorError, GetShardIteratorOutput, Nothing, Nothing] = impl.getShardIterator(input.shardId, input.shardIteratorType, input.streamName, input.startingSequenceNumber, input.timestamp, input.streamARN)
def ordinal: Int = 12
def endpoint: smithy4s.Endpoint[KinesisOperation,GetShardIteratorInput, KinesisOperation.GetShardIteratorError, GetShardIteratorOutput, Nothing, Nothing] = GetShardIterator
}
object GetShardIterator extends smithy4s.Endpoint[KinesisOperation,GetShardIteratorInput, KinesisOperation.GetShardIteratorError, GetShardIteratorOutput, Nothing, Nothing] {
val schema: OperationSchema[GetShardIteratorInput, KinesisOperation.GetShardIteratorError, GetShardIteratorOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "GetShardIterator"))
.withInput(GetShardIteratorInput.schema)
.withError(GetShardIteratorError.errorSchema)
.withOutput(GetShardIteratorOutput.schema)
.withHints(smithy.api.Documentation("Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it is\n returned to the requester.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n A shard iterator specifies the shard position from which to start reading data records\n sequentially. The position is specified using the sequence number of a data record in a\n shard. A sequence number is the identifier associated with every record ingested in the\n stream, and is assigned when a record is put into the stream. Each stream has one or\n more shards.
\n You must specify the shard iterator type. For example, you can set the\n ShardIteratorType
parameter to read exactly from the position denoted\n by a specific sequence number by using the AT_SEQUENCE_NUMBER
shard\n iterator type. Alternatively, the parameter can read right after the sequence number by\n using the AFTER_SEQUENCE_NUMBER
shard iterator type, using sequence numbers\n returned by earlier calls to PutRecord, PutRecords,\n GetRecords, or DescribeStream. In the request,\n you can specify the shard iterator type AT_TIMESTAMP
to read records from\n an arbitrary point in time, TRIM_HORIZON
to cause\n ShardIterator
to point to the last untrimmed record in the shard in the\n system (the oldest data record in the shard), or LATEST
so that you always\n read the most recent data in the shard.
\n When you read repeatedly from a stream, use a GetShardIterator\n request to get the first shard iterator for use in your first GetRecords request and for subsequent reads use the shard iterator returned by the GetRecords request in NextShardIterator
. A new shard\n iterator is returned by every GetRecords request in\n NextShardIterator
, which you use in the ShardIterator
\n parameter of the next GetRecords request.
\n If a GetShardIterator request is made too often, you receive a\n ProvisionedThroughputExceededException
. For more information about\n throughput limits, see GetRecords, and Streams Limits in the\n Amazon Kinesis Data Streams Developer Guide.
\n If the shard is closed, GetShardIterator returns a valid iterator\n for the last sequence number of the shard. A shard can be closed as a result of using\n SplitShard or MergeShards.
\n \n GetShardIterator has a limit of five transactions per second per\n account per open shard.
"))
def wrap(input: GetShardIteratorInput): GetShardIterator = GetShardIterator(input)
}
sealed trait GetShardIteratorError extends scala.Product with scala.Serializable { self =>
@inline final def widen: GetShardIteratorError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = GetShardIteratorError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def provisionedThroughputExceededException: Option[ProvisionedThroughputExceededException] = GetShardIteratorError.ProvisionedThroughputExceededExceptionCase.alt.project.lift(self).map(_.provisionedThroughputExceededException)
def invalidArgumentException: Option[InvalidArgumentException] = GetShardIteratorError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceNotFoundException: Option[ResourceNotFoundException] = GetShardIteratorError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: GetShardIteratorError.Visitor[A]): A = this match {
case value: GetShardIteratorError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: GetShardIteratorError.ProvisionedThroughputExceededExceptionCase => visitor.provisionedThroughputExceededException(value.provisionedThroughputExceededException)
case value: GetShardIteratorError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: GetShardIteratorError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object GetShardIteratorError extends ErrorSchema.Companion[GetShardIteratorError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): GetShardIteratorError = AccessDeniedExceptionCase(accessDeniedException)
def provisionedThroughputExceededException(provisionedThroughputExceededException: ProvisionedThroughputExceededException): GetShardIteratorError = ProvisionedThroughputExceededExceptionCase(provisionedThroughputExceededException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): GetShardIteratorError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): GetShardIteratorError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "GetShardIteratorError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends GetShardIteratorError { final def $ordinal: Int = 0 }
final case class ProvisionedThroughputExceededExceptionCase(provisionedThroughputExceededException: ProvisionedThroughputExceededException) extends GetShardIteratorError { final def $ordinal: Int = 1 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends GetShardIteratorError { final def $ordinal: Int = 2 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends GetShardIteratorError { final def $ordinal: Int = 3 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetShardIteratorError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), GetShardIteratorError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[GetShardIteratorError]("AccessDeniedException")
}
object ProvisionedThroughputExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetShardIteratorError.ProvisionedThroughputExceededExceptionCase] = bijection(ProvisionedThroughputExceededException.schema.addHints(hints), GetShardIteratorError.ProvisionedThroughputExceededExceptionCase(_), _.provisionedThroughputExceededException)
val alt = schema.oneOf[GetShardIteratorError]("ProvisionedThroughputExceededException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetShardIteratorError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), GetShardIteratorError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[GetShardIteratorError]("InvalidArgumentException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[GetShardIteratorError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), GetShardIteratorError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[GetShardIteratorError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def provisionedThroughputExceededException(value: ProvisionedThroughputExceededException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def provisionedThroughputExceededException(value: ProvisionedThroughputExceededException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[GetShardIteratorError] = union(
GetShardIteratorError.AccessDeniedExceptionCase.alt,
GetShardIteratorError.ProvisionedThroughputExceededExceptionCase.alt,
GetShardIteratorError.InvalidArgumentExceptionCase.alt,
GetShardIteratorError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[GetShardIteratorError] = throwable match {
case e: AccessDeniedException => Some(GetShardIteratorError.AccessDeniedExceptionCase(e))
case e: ProvisionedThroughputExceededException => Some(GetShardIteratorError.ProvisionedThroughputExceededExceptionCase(e))
case e: InvalidArgumentException => Some(GetShardIteratorError.InvalidArgumentExceptionCase(e))
case e: ResourceNotFoundException => Some(GetShardIteratorError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: GetShardIteratorError): Throwable = e match {
case GetShardIteratorError.AccessDeniedExceptionCase(e) => e
case GetShardIteratorError.ProvisionedThroughputExceededExceptionCase(e) => e
case GetShardIteratorError.InvalidArgumentExceptionCase(e) => e
case GetShardIteratorError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class IncreaseStreamRetentionPeriod(input: IncreaseStreamRetentionPeriodInput) extends KinesisOperation[IncreaseStreamRetentionPeriodInput, KinesisOperation.IncreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[IncreaseStreamRetentionPeriodInput, KinesisOperation.IncreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] = impl.increaseStreamRetentionPeriod(input.retentionPeriodHours, input.streamName, input.streamARN)
def ordinal: Int = 13
def endpoint: smithy4s.Endpoint[KinesisOperation,IncreaseStreamRetentionPeriodInput, KinesisOperation.IncreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] = IncreaseStreamRetentionPeriod
}
object IncreaseStreamRetentionPeriod extends smithy4s.Endpoint[KinesisOperation,IncreaseStreamRetentionPeriodInput, KinesisOperation.IncreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] {
val schema: OperationSchema[IncreaseStreamRetentionPeriodInput, KinesisOperation.IncreaseStreamRetentionPeriodError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "IncreaseStreamRetentionPeriod"))
.withInput(IncreaseStreamRetentionPeriodInput.schema)
.withError(IncreaseStreamRetentionPeriodError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Increases the Kinesis data stream\'s retention period, which is the length of time data\n records are accessible after they are added to the stream. The maximum value of a\n stream\'s retention period is 8760 hours (365 days).
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n If you choose a longer stream retention period, this operation increases the time\n period during which records that have not yet expired are accessible. However, it does\n not make previous, expired data (older than the stream\'s previous retention period)\n accessible after the operation has been called. For example, if a stream\'s retention\n period is set to 24 hours and is increased to 168 hours, any data that is older than 24\n hours remains inaccessible to consumer applications.
"))
def wrap(input: IncreaseStreamRetentionPeriodInput): IncreaseStreamRetentionPeriod = IncreaseStreamRetentionPeriod(input)
}
sealed trait IncreaseStreamRetentionPeriodError extends scala.Product with scala.Serializable { self =>
@inline final def widen: IncreaseStreamRetentionPeriodError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = IncreaseStreamRetentionPeriodError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = IncreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = IncreaseStreamRetentionPeriodError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = IncreaseStreamRetentionPeriodError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = IncreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: IncreaseStreamRetentionPeriodError.Visitor[A]): A = this match {
case value: IncreaseStreamRetentionPeriodError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: IncreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: IncreaseStreamRetentionPeriodError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: IncreaseStreamRetentionPeriodError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: IncreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object IncreaseStreamRetentionPeriodError extends ErrorSchema.Companion[IncreaseStreamRetentionPeriodError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): IncreaseStreamRetentionPeriodError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): IncreaseStreamRetentionPeriodError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): IncreaseStreamRetentionPeriodError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): IncreaseStreamRetentionPeriodError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): IncreaseStreamRetentionPeriodError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "IncreaseStreamRetentionPeriodError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends IncreaseStreamRetentionPeriodError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends IncreaseStreamRetentionPeriodError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends IncreaseStreamRetentionPeriodError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends IncreaseStreamRetentionPeriodError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends IncreaseStreamRetentionPeriodError { final def $ordinal: Int = 4 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[IncreaseStreamRetentionPeriodError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), IncreaseStreamRetentionPeriodError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[IncreaseStreamRetentionPeriodError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[IncreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), IncreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[IncreaseStreamRetentionPeriodError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[IncreaseStreamRetentionPeriodError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), IncreaseStreamRetentionPeriodError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[IncreaseStreamRetentionPeriodError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[IncreaseStreamRetentionPeriodError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), IncreaseStreamRetentionPeriodError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[IncreaseStreamRetentionPeriodError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[IncreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), IncreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[IncreaseStreamRetentionPeriodError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[IncreaseStreamRetentionPeriodError] = union(
IncreaseStreamRetentionPeriodError.AccessDeniedExceptionCase.alt,
IncreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase.alt,
IncreaseStreamRetentionPeriodError.ResourceInUseExceptionCase.alt,
IncreaseStreamRetentionPeriodError.LimitExceededExceptionCase.alt,
IncreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[IncreaseStreamRetentionPeriodError] = throwable match {
case e: AccessDeniedException => Some(IncreaseStreamRetentionPeriodError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(IncreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(IncreaseStreamRetentionPeriodError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(IncreaseStreamRetentionPeriodError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(IncreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: IncreaseStreamRetentionPeriodError): Throwable = e match {
case IncreaseStreamRetentionPeriodError.AccessDeniedExceptionCase(e) => e
case IncreaseStreamRetentionPeriodError.InvalidArgumentExceptionCase(e) => e
case IncreaseStreamRetentionPeriodError.ResourceInUseExceptionCase(e) => e
case IncreaseStreamRetentionPeriodError.LimitExceededExceptionCase(e) => e
case IncreaseStreamRetentionPeriodError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class ListShards(input: ListShardsInput) extends KinesisOperation[ListShardsInput, KinesisOperation.ListShardsError, ListShardsOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[ListShardsInput, KinesisOperation.ListShardsError, ListShardsOutput, Nothing, Nothing] = impl.listShards(input.streamName, input.nextToken, input.exclusiveStartShardId, input.maxResults, input.streamCreationTimestamp, input.shardFilter, input.streamARN)
def ordinal: Int = 14
def endpoint: smithy4s.Endpoint[KinesisOperation,ListShardsInput, KinesisOperation.ListShardsError, ListShardsOutput, Nothing, Nothing] = ListShards
}
object ListShards extends smithy4s.Endpoint[KinesisOperation,ListShardsInput, KinesisOperation.ListShardsError, ListShardsOutput, Nothing, Nothing] {
val schema: OperationSchema[ListShardsInput, KinesisOperation.ListShardsError, ListShardsOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "ListShards"))
.withInput(ListShardsInput.schema)
.withError(ListShardsError.errorSchema)
.withOutput(ListShardsOutput.schema)
.withHints(smithy.api.Documentation("Lists the shards in a stream and provides information about each shard. This operation\n has a limit of 1000 transactions per second per data stream.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n This action does not list expired shards. For information about expired shards, see\n Data Routing, Data Persistence, and Shard State after a Reshard.
\n \n This API is a new operation that is used by the Amazon Kinesis Client Library\n (KCL). If you have a fine-grained IAM policy that only allows specific operations,\n you must update your policy to allow calls to this API. For more information, see\n Controlling Access to Amazon Kinesis Data Streams Resources Using\n IAM.
\n "))
def wrap(input: ListShardsInput): ListShards = ListShards(input)
}
sealed trait ListShardsError extends scala.Product with scala.Serializable { self =>
@inline final def widen: ListShardsError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = ListShardsError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def expiredNextTokenException: Option[ExpiredNextTokenException] = ListShardsError.ExpiredNextTokenExceptionCase.alt.project.lift(self).map(_.expiredNextTokenException)
def invalidArgumentException: Option[InvalidArgumentException] = ListShardsError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = ListShardsError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = ListShardsError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = ListShardsError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: ListShardsError.Visitor[A]): A = this match {
case value: ListShardsError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: ListShardsError.ExpiredNextTokenExceptionCase => visitor.expiredNextTokenException(value.expiredNextTokenException)
case value: ListShardsError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: ListShardsError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: ListShardsError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: ListShardsError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object ListShardsError extends ErrorSchema.Companion[ListShardsError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): ListShardsError = AccessDeniedExceptionCase(accessDeniedException)
def expiredNextTokenException(expiredNextTokenException: ExpiredNextTokenException): ListShardsError = ExpiredNextTokenExceptionCase(expiredNextTokenException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): ListShardsError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): ListShardsError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): ListShardsError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): ListShardsError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "ListShardsError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends ListShardsError { final def $ordinal: Int = 0 }
final case class ExpiredNextTokenExceptionCase(expiredNextTokenException: ExpiredNextTokenException) extends ListShardsError { final def $ordinal: Int = 1 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends ListShardsError { final def $ordinal: Int = 2 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends ListShardsError { final def $ordinal: Int = 3 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends ListShardsError { final def $ordinal: Int = 4 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends ListShardsError { final def $ordinal: Int = 5 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListShardsError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), ListShardsError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[ListShardsError]("AccessDeniedException")
}
object ExpiredNextTokenExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListShardsError.ExpiredNextTokenExceptionCase] = bijection(ExpiredNextTokenException.schema.addHints(hints), ListShardsError.ExpiredNextTokenExceptionCase(_), _.expiredNextTokenException)
val alt = schema.oneOf[ListShardsError]("ExpiredNextTokenException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListShardsError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), ListShardsError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[ListShardsError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListShardsError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), ListShardsError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[ListShardsError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListShardsError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), ListShardsError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[ListShardsError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListShardsError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), ListShardsError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[ListShardsError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def expiredNextTokenException(value: ExpiredNextTokenException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def expiredNextTokenException(value: ExpiredNextTokenException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[ListShardsError] = union(
ListShardsError.AccessDeniedExceptionCase.alt,
ListShardsError.ExpiredNextTokenExceptionCase.alt,
ListShardsError.InvalidArgumentExceptionCase.alt,
ListShardsError.ResourceInUseExceptionCase.alt,
ListShardsError.LimitExceededExceptionCase.alt,
ListShardsError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[ListShardsError] = throwable match {
case e: AccessDeniedException => Some(ListShardsError.AccessDeniedExceptionCase(e))
case e: ExpiredNextTokenException => Some(ListShardsError.ExpiredNextTokenExceptionCase(e))
case e: InvalidArgumentException => Some(ListShardsError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(ListShardsError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(ListShardsError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(ListShardsError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: ListShardsError): Throwable = e match {
case ListShardsError.AccessDeniedExceptionCase(e) => e
case ListShardsError.ExpiredNextTokenExceptionCase(e) => e
case ListShardsError.InvalidArgumentExceptionCase(e) => e
case ListShardsError.ResourceInUseExceptionCase(e) => e
case ListShardsError.LimitExceededExceptionCase(e) => e
case ListShardsError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class ListStreamConsumers(input: ListStreamConsumersInput) extends KinesisOperation[ListStreamConsumersInput, KinesisOperation.ListStreamConsumersError, ListStreamConsumersOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[ListStreamConsumersInput, KinesisOperation.ListStreamConsumersError, ListStreamConsumersOutput, Nothing, Nothing] = impl.listStreamConsumers(input.streamARN, input.nextToken, input.maxResults, input.streamCreationTimestamp)
def ordinal: Int = 15
def endpoint: smithy4s.Endpoint[KinesisOperation,ListStreamConsumersInput, KinesisOperation.ListStreamConsumersError, ListStreamConsumersOutput, Nothing, Nothing] = ListStreamConsumers
}
object ListStreamConsumers extends smithy4s.Endpoint[KinesisOperation,ListStreamConsumersInput, KinesisOperation.ListStreamConsumersError, ListStreamConsumersOutput, Nothing, Nothing] {
val schema: OperationSchema[ListStreamConsumersInput, KinesisOperation.ListStreamConsumersError, ListStreamConsumersOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "ListStreamConsumers"))
.withInput(ListStreamConsumersInput.schema)
.withError(ListStreamConsumersError.errorSchema)
.withOutput(ListStreamConsumersOutput.schema)
.withHints(smithy.api.Documentation("Lists the consumers registered to receive data from a stream using enhanced fan-out,\n and provides information about each consumer.
\n This operation has a limit of 5 transactions per second per stream.
"), smithy.api.Paginated(inputToken = Some(smithy.api.NonEmptyString("NextToken")), outputToken = Some(smithy.api.NonEmptyString("NextToken")), items = None, pageSize = Some(smithy.api.NonEmptyString("MaxResults"))))
def wrap(input: ListStreamConsumersInput): ListStreamConsumers = ListStreamConsumers(input)
}
sealed trait ListStreamConsumersError extends scala.Product with scala.Serializable { self =>
@inline final def widen: ListStreamConsumersError = this
def $ordinal: Int
object project {
def expiredNextTokenException: Option[ExpiredNextTokenException] = ListStreamConsumersError.ExpiredNextTokenExceptionCase.alt.project.lift(self).map(_.expiredNextTokenException)
def invalidArgumentException: Option[InvalidArgumentException] = ListStreamConsumersError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = ListStreamConsumersError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = ListStreamConsumersError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = ListStreamConsumersError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: ListStreamConsumersError.Visitor[A]): A = this match {
case value: ListStreamConsumersError.ExpiredNextTokenExceptionCase => visitor.expiredNextTokenException(value.expiredNextTokenException)
case value: ListStreamConsumersError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: ListStreamConsumersError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: ListStreamConsumersError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: ListStreamConsumersError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object ListStreamConsumersError extends ErrorSchema.Companion[ListStreamConsumersError] {
def expiredNextTokenException(expiredNextTokenException: ExpiredNextTokenException): ListStreamConsumersError = ExpiredNextTokenExceptionCase(expiredNextTokenException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): ListStreamConsumersError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): ListStreamConsumersError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): ListStreamConsumersError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): ListStreamConsumersError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "ListStreamConsumersError")
val hints: Hints = Hints.empty
final case class ExpiredNextTokenExceptionCase(expiredNextTokenException: ExpiredNextTokenException) extends ListStreamConsumersError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends ListStreamConsumersError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends ListStreamConsumersError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends ListStreamConsumersError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends ListStreamConsumersError { final def $ordinal: Int = 4 }
object ExpiredNextTokenExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListStreamConsumersError.ExpiredNextTokenExceptionCase] = bijection(ExpiredNextTokenException.schema.addHints(hints), ListStreamConsumersError.ExpiredNextTokenExceptionCase(_), _.expiredNextTokenException)
val alt = schema.oneOf[ListStreamConsumersError]("ExpiredNextTokenException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListStreamConsumersError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), ListStreamConsumersError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[ListStreamConsumersError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListStreamConsumersError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), ListStreamConsumersError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[ListStreamConsumersError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListStreamConsumersError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), ListStreamConsumersError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[ListStreamConsumersError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListStreamConsumersError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), ListStreamConsumersError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[ListStreamConsumersError]("ResourceNotFoundException")
}
trait Visitor[A] {
def expiredNextTokenException(value: ExpiredNextTokenException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def expiredNextTokenException(value: ExpiredNextTokenException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[ListStreamConsumersError] = union(
ListStreamConsumersError.ExpiredNextTokenExceptionCase.alt,
ListStreamConsumersError.InvalidArgumentExceptionCase.alt,
ListStreamConsumersError.ResourceInUseExceptionCase.alt,
ListStreamConsumersError.LimitExceededExceptionCase.alt,
ListStreamConsumersError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[ListStreamConsumersError] = throwable match {
case e: ExpiredNextTokenException => Some(ListStreamConsumersError.ExpiredNextTokenExceptionCase(e))
case e: InvalidArgumentException => Some(ListStreamConsumersError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(ListStreamConsumersError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(ListStreamConsumersError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(ListStreamConsumersError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: ListStreamConsumersError): Throwable = e match {
case ListStreamConsumersError.ExpiredNextTokenExceptionCase(e) => e
case ListStreamConsumersError.InvalidArgumentExceptionCase(e) => e
case ListStreamConsumersError.ResourceInUseExceptionCase(e) => e
case ListStreamConsumersError.LimitExceededExceptionCase(e) => e
case ListStreamConsumersError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class ListStreams(input: ListStreamsInput) extends KinesisOperation[ListStreamsInput, KinesisOperation.ListStreamsError, ListStreamsOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[ListStreamsInput, KinesisOperation.ListStreamsError, ListStreamsOutput, Nothing, Nothing] = impl.listStreams(input.limit, input.exclusiveStartStreamName, input.nextToken)
def ordinal: Int = 16
def endpoint: smithy4s.Endpoint[KinesisOperation,ListStreamsInput, KinesisOperation.ListStreamsError, ListStreamsOutput, Nothing, Nothing] = ListStreams
}
object ListStreams extends smithy4s.Endpoint[KinesisOperation,ListStreamsInput, KinesisOperation.ListStreamsError, ListStreamsOutput, Nothing, Nothing] {
val schema: OperationSchema[ListStreamsInput, KinesisOperation.ListStreamsError, ListStreamsOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "ListStreams"))
.withInput(ListStreamsInput.schema)
.withError(ListStreamsError.errorSchema)
.withOutput(ListStreamsOutput.schema)
.withHints(smithy.api.Documentation("Lists your Kinesis data streams.
\n The number of streams may be too large to return from a single call to\n ListStreams
. You can limit the number of returned streams using the\n Limit
parameter. If you do not specify a value for the\n Limit
parameter, Kinesis Data Streams uses the default limit, which is\n currently 100.
\n You can detect if there are more streams available to list by using the\n HasMoreStreams
flag from the returned output. If there are more streams\n available, you can request more streams by using the name of the last stream returned by\n the ListStreams
request in the ExclusiveStartStreamName
\n parameter in a subsequent request to ListStreams
. The group of stream names\n returned by the subsequent request is then added to the list. You can continue this\n process until all the stream names have been collected in the list.
\n \n ListStreams has a limit of five transactions per second per\n account.
"), smithy.api.Paginated(inputToken = Some(smithy.api.NonEmptyString("NextToken")), outputToken = Some(smithy.api.NonEmptyString("NextToken")), items = None, pageSize = Some(smithy.api.NonEmptyString("Limit"))))
def wrap(input: ListStreamsInput): ListStreams = ListStreams(input)
}
sealed trait ListStreamsError extends scala.Product with scala.Serializable { self =>
@inline final def widen: ListStreamsError = this
def $ordinal: Int
object project {
def expiredNextTokenException: Option[ExpiredNextTokenException] = ListStreamsError.ExpiredNextTokenExceptionCase.alt.project.lift(self).map(_.expiredNextTokenException)
def invalidArgumentException: Option[InvalidArgumentException] = ListStreamsError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def limitExceededException: Option[LimitExceededException] = ListStreamsError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
}
def accept[A](visitor: ListStreamsError.Visitor[A]): A = this match {
case value: ListStreamsError.ExpiredNextTokenExceptionCase => visitor.expiredNextTokenException(value.expiredNextTokenException)
case value: ListStreamsError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: ListStreamsError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
}
}
object ListStreamsError extends ErrorSchema.Companion[ListStreamsError] {
def expiredNextTokenException(expiredNextTokenException: ExpiredNextTokenException): ListStreamsError = ExpiredNextTokenExceptionCase(expiredNextTokenException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): ListStreamsError = InvalidArgumentExceptionCase(invalidArgumentException)
def limitExceededException(limitExceededException: LimitExceededException): ListStreamsError = LimitExceededExceptionCase(limitExceededException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "ListStreamsError")
val hints: Hints = Hints.empty
final case class ExpiredNextTokenExceptionCase(expiredNextTokenException: ExpiredNextTokenException) extends ListStreamsError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends ListStreamsError { final def $ordinal: Int = 1 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends ListStreamsError { final def $ordinal: Int = 2 }
object ExpiredNextTokenExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListStreamsError.ExpiredNextTokenExceptionCase] = bijection(ExpiredNextTokenException.schema.addHints(hints), ListStreamsError.ExpiredNextTokenExceptionCase(_), _.expiredNextTokenException)
val alt = schema.oneOf[ListStreamsError]("ExpiredNextTokenException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListStreamsError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), ListStreamsError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[ListStreamsError]("InvalidArgumentException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListStreamsError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), ListStreamsError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[ListStreamsError]("LimitExceededException")
}
trait Visitor[A] {
def expiredNextTokenException(value: ExpiredNextTokenException): A
def invalidArgumentException(value: InvalidArgumentException): A
def limitExceededException(value: LimitExceededException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def expiredNextTokenException(value: ExpiredNextTokenException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def limitExceededException(value: LimitExceededException): A = default
}
}
implicit val schema: Schema[ListStreamsError] = union(
ListStreamsError.ExpiredNextTokenExceptionCase.alt,
ListStreamsError.InvalidArgumentExceptionCase.alt,
ListStreamsError.LimitExceededExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[ListStreamsError] = throwable match {
case e: ExpiredNextTokenException => Some(ListStreamsError.ExpiredNextTokenExceptionCase(e))
case e: InvalidArgumentException => Some(ListStreamsError.InvalidArgumentExceptionCase(e))
case e: LimitExceededException => Some(ListStreamsError.LimitExceededExceptionCase(e))
case _ => None
}
def unliftError(e: ListStreamsError): Throwable = e match {
case ListStreamsError.ExpiredNextTokenExceptionCase(e) => e
case ListStreamsError.InvalidArgumentExceptionCase(e) => e
case ListStreamsError.LimitExceededExceptionCase(e) => e
}
}
final case class ListTagsForStream(input: ListTagsForStreamInput) extends KinesisOperation[ListTagsForStreamInput, KinesisOperation.ListTagsForStreamError, ListTagsForStreamOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[ListTagsForStreamInput, KinesisOperation.ListTagsForStreamError, ListTagsForStreamOutput, Nothing, Nothing] = impl.listTagsForStream(input.streamName, input.exclusiveStartTagKey, input.limit, input.streamARN)
def ordinal: Int = 17
def endpoint: smithy4s.Endpoint[KinesisOperation,ListTagsForStreamInput, KinesisOperation.ListTagsForStreamError, ListTagsForStreamOutput, Nothing, Nothing] = ListTagsForStream
}
object ListTagsForStream extends smithy4s.Endpoint[KinesisOperation,ListTagsForStreamInput, KinesisOperation.ListTagsForStreamError, ListTagsForStreamOutput, Nothing, Nothing] {
val schema: OperationSchema[ListTagsForStreamInput, KinesisOperation.ListTagsForStreamError, ListTagsForStreamOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "ListTagsForStream"))
.withInput(ListTagsForStreamInput.schema)
.withError(ListTagsForStreamError.errorSchema)
.withOutput(ListTagsForStreamOutput.schema)
.withHints(smithy.api.Documentation("Lists the tags for the specified Kinesis data stream. This operation has a limit of\n five transactions per second per account.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n "))
def wrap(input: ListTagsForStreamInput): ListTagsForStream = ListTagsForStream(input)
}
sealed trait ListTagsForStreamError extends scala.Product with scala.Serializable { self =>
@inline final def widen: ListTagsForStreamError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = ListTagsForStreamError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = ListTagsForStreamError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def limitExceededException: Option[LimitExceededException] = ListTagsForStreamError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = ListTagsForStreamError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: ListTagsForStreamError.Visitor[A]): A = this match {
case value: ListTagsForStreamError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: ListTagsForStreamError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: ListTagsForStreamError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: ListTagsForStreamError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object ListTagsForStreamError extends ErrorSchema.Companion[ListTagsForStreamError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): ListTagsForStreamError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): ListTagsForStreamError = InvalidArgumentExceptionCase(invalidArgumentException)
def limitExceededException(limitExceededException: LimitExceededException): ListTagsForStreamError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): ListTagsForStreamError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "ListTagsForStreamError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends ListTagsForStreamError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends ListTagsForStreamError { final def $ordinal: Int = 1 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends ListTagsForStreamError { final def $ordinal: Int = 2 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends ListTagsForStreamError { final def $ordinal: Int = 3 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListTagsForStreamError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), ListTagsForStreamError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[ListTagsForStreamError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListTagsForStreamError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), ListTagsForStreamError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[ListTagsForStreamError]("InvalidArgumentException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListTagsForStreamError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), ListTagsForStreamError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[ListTagsForStreamError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[ListTagsForStreamError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), ListTagsForStreamError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[ListTagsForStreamError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[ListTagsForStreamError] = union(
ListTagsForStreamError.AccessDeniedExceptionCase.alt,
ListTagsForStreamError.InvalidArgumentExceptionCase.alt,
ListTagsForStreamError.LimitExceededExceptionCase.alt,
ListTagsForStreamError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[ListTagsForStreamError] = throwable match {
case e: AccessDeniedException => Some(ListTagsForStreamError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(ListTagsForStreamError.InvalidArgumentExceptionCase(e))
case e: LimitExceededException => Some(ListTagsForStreamError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(ListTagsForStreamError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: ListTagsForStreamError): Throwable = e match {
case ListTagsForStreamError.AccessDeniedExceptionCase(e) => e
case ListTagsForStreamError.InvalidArgumentExceptionCase(e) => e
case ListTagsForStreamError.LimitExceededExceptionCase(e) => e
case ListTagsForStreamError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class MergeShards(input: MergeShardsInput) extends KinesisOperation[MergeShardsInput, KinesisOperation.MergeShardsError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[MergeShardsInput, KinesisOperation.MergeShardsError, Unit, Nothing, Nothing] = impl.mergeShards(input.shardToMerge, input.adjacentShardToMerge, input.streamName, input.streamARN)
def ordinal: Int = 18
def endpoint: smithy4s.Endpoint[KinesisOperation,MergeShardsInput, KinesisOperation.MergeShardsError, Unit, Nothing, Nothing] = MergeShards
}
object MergeShards extends smithy4s.Endpoint[KinesisOperation,MergeShardsInput, KinesisOperation.MergeShardsError, Unit, Nothing, Nothing] {
val schema: OperationSchema[MergeShardsInput, KinesisOperation.MergeShardsError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "MergeShards"))
.withInput(MergeShardsInput.schema)
.withError(MergeShardsError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Merges two adjacent shards in a Kinesis data stream and combines them into a single\n shard to reduce the stream\'s capacity to ingest and transport data. This API is only\n supported for the data streams with the provisioned capacity mode. Two shards are\n considered adjacent if the union of the hash key ranges for the two shards form a\n contiguous set with no gaps. For example, if you have two shards, one with a hash key\n range of 276...381 and the other with a hash key range of 382...454, then you could\n merge these two shards into a single shard that would have a hash key range of\n 276...454. After the merge, the single child shard receives data for all hash key values\n covered by the two parent shards.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n \n MergeShards
is called when there is a need to reduce the overall capacity\n of a stream because of excess capacity that is not being used. You must specify the\n shard to be merged and the adjacent shard for a stream. For more information about\n merging shards, see Merge Two\n Shards in the Amazon Kinesis Data Streams Developer\n Guide.
\n If the stream is in the ACTIVE
state, you can call\n MergeShards
. If a stream is in the CREATING
,\n UPDATING
, or DELETING
state, MergeShards
\n returns a ResourceInUseException
. If the specified stream does not exist,\n MergeShards
returns a ResourceNotFoundException
.
\n You can use DescribeStreamSummary to check the state of the stream,\n which is returned in StreamStatus
.
\n \n MergeShards
is an asynchronous operation. Upon receiving a\n MergeShards
request, Amazon Kinesis Data Streams immediately returns a\n response and sets the StreamStatus
to UPDATING
. After the\n operation is completed, Kinesis Data Streams sets the StreamStatus
to\n ACTIVE
. Read and write operations continue to work while the stream is\n in the UPDATING
state.
\n You use DescribeStreamSummary and the ListShards\n APIs to determine the shard IDs that are specified in the MergeShards
\n request.
\n If you try to operate on too many streams in parallel using CreateStream, DeleteStream, MergeShards
,\n or SplitShard, you receive a LimitExceededException
.
\n \n MergeShards
has a limit of five transactions per second per account.
"))
def wrap(input: MergeShardsInput): MergeShards = MergeShards(input)
}
sealed trait MergeShardsError extends scala.Product with scala.Serializable { self =>
@inline final def widen: MergeShardsError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = MergeShardsError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def validationException: Option[ValidationException] = MergeShardsError.ValidationExceptionCase.alt.project.lift(self).map(_.validationException)
def invalidArgumentException: Option[InvalidArgumentException] = MergeShardsError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = MergeShardsError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = MergeShardsError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = MergeShardsError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: MergeShardsError.Visitor[A]): A = this match {
case value: MergeShardsError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: MergeShardsError.ValidationExceptionCase => visitor.validationException(value.validationException)
case value: MergeShardsError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: MergeShardsError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: MergeShardsError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: MergeShardsError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object MergeShardsError extends ErrorSchema.Companion[MergeShardsError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): MergeShardsError = AccessDeniedExceptionCase(accessDeniedException)
def validationException(validationException: ValidationException): MergeShardsError = ValidationExceptionCase(validationException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): MergeShardsError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): MergeShardsError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): MergeShardsError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): MergeShardsError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "MergeShardsError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends MergeShardsError { final def $ordinal: Int = 0 }
final case class ValidationExceptionCase(validationException: ValidationException) extends MergeShardsError { final def $ordinal: Int = 1 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends MergeShardsError { final def $ordinal: Int = 2 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends MergeShardsError { final def $ordinal: Int = 3 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends MergeShardsError { final def $ordinal: Int = 4 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends MergeShardsError { final def $ordinal: Int = 5 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[MergeShardsError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), MergeShardsError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[MergeShardsError]("AccessDeniedException")
}
object ValidationExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[MergeShardsError.ValidationExceptionCase] = bijection(ValidationException.schema.addHints(hints), MergeShardsError.ValidationExceptionCase(_), _.validationException)
val alt = schema.oneOf[MergeShardsError]("ValidationException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[MergeShardsError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), MergeShardsError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[MergeShardsError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[MergeShardsError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), MergeShardsError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[MergeShardsError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[MergeShardsError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), MergeShardsError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[MergeShardsError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[MergeShardsError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), MergeShardsError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[MergeShardsError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def validationException(value: ValidationException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def validationException(value: ValidationException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[MergeShardsError] = union(
MergeShardsError.AccessDeniedExceptionCase.alt,
MergeShardsError.ValidationExceptionCase.alt,
MergeShardsError.InvalidArgumentExceptionCase.alt,
MergeShardsError.ResourceInUseExceptionCase.alt,
MergeShardsError.LimitExceededExceptionCase.alt,
MergeShardsError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[MergeShardsError] = throwable match {
case e: AccessDeniedException => Some(MergeShardsError.AccessDeniedExceptionCase(e))
case e: ValidationException => Some(MergeShardsError.ValidationExceptionCase(e))
case e: InvalidArgumentException => Some(MergeShardsError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(MergeShardsError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(MergeShardsError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(MergeShardsError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: MergeShardsError): Throwable = e match {
case MergeShardsError.AccessDeniedExceptionCase(e) => e
case MergeShardsError.ValidationExceptionCase(e) => e
case MergeShardsError.InvalidArgumentExceptionCase(e) => e
case MergeShardsError.ResourceInUseExceptionCase(e) => e
case MergeShardsError.LimitExceededExceptionCase(e) => e
case MergeShardsError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class PutRecord(input: PutRecordInput) extends KinesisOperation[PutRecordInput, KinesisOperation.PutRecordError, PutRecordOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[PutRecordInput, KinesisOperation.PutRecordError, PutRecordOutput, Nothing, Nothing] = impl.putRecord(input.data, input.partitionKey, input.streamName, input.explicitHashKey, input.sequenceNumberForOrdering, input.streamARN)
def ordinal: Int = 19
def endpoint: smithy4s.Endpoint[KinesisOperation,PutRecordInput, KinesisOperation.PutRecordError, PutRecordOutput, Nothing, Nothing] = PutRecord
}
object PutRecord extends smithy4s.Endpoint[KinesisOperation,PutRecordInput, KinesisOperation.PutRecordError, PutRecordOutput, Nothing, Nothing] {
val schema: OperationSchema[PutRecordInput, KinesisOperation.PutRecordError, PutRecordOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "PutRecord"))
.withInput(PutRecordInput.schema)
.withError(PutRecordError.errorSchema)
.withOutput(PutRecordOutput.schema)
.withHints(smithy.api.Documentation("Writes a single data record into an Amazon Kinesis data stream. Call\n PutRecord
to send data into the stream for real-time ingestion and\n subsequent processing, one record at a time. Each shard can support writes up to 1,000\n records per second, up to a maximum data write total of 1 MiB per second.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n You must specify the name of the stream that captures, stores, and transports the\n data; a partition key; and the data blob itself.
\n The data blob can be any type of data; for example, a segment from a log file,\n geographic/location data, website clickstream data, and so on.
\n The partition key is used by Kinesis Data Streams to distribute data across shards.\n Kinesis Data Streams segregates the data records that belong to a stream into multiple\n shards, using the partition key associated with each data record to determine the shard\n to which a given data record belongs.
\n Partition keys are Unicode strings, with a maximum length limit of 256 characters for\n each key. An MD5 hash function is used to map partition keys to 128-bit integer values\n and to map associated data records to shards using the hash key ranges of the shards.\n You can override hashing the partition key to determine the shard by explicitly\n specifying a hash value using the ExplicitHashKey
parameter. For more\n information, see Adding Data to a Stream in the Amazon Kinesis Data Streams\n Developer Guide.
\n \n PutRecord
returns the shard ID of where the data record was placed and the\n sequence number that was assigned to the data record.
\n Sequence numbers increase over time and are specific to a shard within a stream, not\n across all shards within a stream. To guarantee strictly increasing ordering, write\n serially to a shard and use the SequenceNumberForOrdering
parameter. For\n more information, see Adding Data to a Stream in the Amazon Kinesis Data Streams\n Developer Guide.
\n \n After you write a record to a stream, you cannot modify that record or its order\n within the stream.
\n \n If a PutRecord
request cannot be processed because of insufficient\n provisioned throughput on the shard involved in the request, PutRecord
\n throws ProvisionedThroughputExceededException
.
\n By default, data records are accessible for 24 hours from the time that they are added\n to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod to modify this retention period.
"))
def wrap(input: PutRecordInput): PutRecord = PutRecord(input)
}
sealed trait PutRecordError extends scala.Product with scala.Serializable { self =>
@inline final def widen: PutRecordError = this
def $ordinal: Int
object project {
def kMSAccessDeniedException: Option[KMSAccessDeniedException] = PutRecordError.KMSAccessDeniedExceptionCase.alt.project.lift(self).map(_.kMSAccessDeniedException)
def kMSDisabledException: Option[KMSDisabledException] = PutRecordError.KMSDisabledExceptionCase.alt.project.lift(self).map(_.kMSDisabledException)
def accessDeniedException: Option[AccessDeniedException] = PutRecordError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def kMSNotFoundException: Option[KMSNotFoundException] = PutRecordError.KMSNotFoundExceptionCase.alt.project.lift(self).map(_.kMSNotFoundException)
def kMSOptInRequired: Option[KMSOptInRequired] = PutRecordError.KMSOptInRequiredCase.alt.project.lift(self).map(_.kMSOptInRequired)
def kMSThrottlingException: Option[KMSThrottlingException] = PutRecordError.KMSThrottlingExceptionCase.alt.project.lift(self).map(_.kMSThrottlingException)
def provisionedThroughputExceededException: Option[ProvisionedThroughputExceededException] = PutRecordError.ProvisionedThroughputExceededExceptionCase.alt.project.lift(self).map(_.provisionedThroughputExceededException)
def invalidArgumentException: Option[InvalidArgumentException] = PutRecordError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def kMSInvalidStateException: Option[KMSInvalidStateException] = PutRecordError.KMSInvalidStateExceptionCase.alt.project.lift(self).map(_.kMSInvalidStateException)
def resourceNotFoundException: Option[ResourceNotFoundException] = PutRecordError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: PutRecordError.Visitor[A]): A = this match {
case value: PutRecordError.KMSAccessDeniedExceptionCase => visitor.kMSAccessDeniedException(value.kMSAccessDeniedException)
case value: PutRecordError.KMSDisabledExceptionCase => visitor.kMSDisabledException(value.kMSDisabledException)
case value: PutRecordError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: PutRecordError.KMSNotFoundExceptionCase => visitor.kMSNotFoundException(value.kMSNotFoundException)
case value: PutRecordError.KMSOptInRequiredCase => visitor.kMSOptInRequired(value.kMSOptInRequired)
case value: PutRecordError.KMSThrottlingExceptionCase => visitor.kMSThrottlingException(value.kMSThrottlingException)
case value: PutRecordError.ProvisionedThroughputExceededExceptionCase => visitor.provisionedThroughputExceededException(value.provisionedThroughputExceededException)
case value: PutRecordError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: PutRecordError.KMSInvalidStateExceptionCase => visitor.kMSInvalidStateException(value.kMSInvalidStateException)
case value: PutRecordError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object PutRecordError extends ErrorSchema.Companion[PutRecordError] {
def kMSAccessDeniedException(kMSAccessDeniedException: KMSAccessDeniedException): PutRecordError = KMSAccessDeniedExceptionCase(kMSAccessDeniedException)
def kMSDisabledException(kMSDisabledException: KMSDisabledException): PutRecordError = KMSDisabledExceptionCase(kMSDisabledException)
def accessDeniedException(accessDeniedException: AccessDeniedException): PutRecordError = AccessDeniedExceptionCase(accessDeniedException)
def kMSNotFoundException(kMSNotFoundException: KMSNotFoundException): PutRecordError = KMSNotFoundExceptionCase(kMSNotFoundException)
def kMSOptInRequired(kMSOptInRequired: KMSOptInRequired): PutRecordError = KMSOptInRequiredCase(kMSOptInRequired)
def kMSThrottlingException(kMSThrottlingException: KMSThrottlingException): PutRecordError = KMSThrottlingExceptionCase(kMSThrottlingException)
def provisionedThroughputExceededException(provisionedThroughputExceededException: ProvisionedThroughputExceededException): PutRecordError = ProvisionedThroughputExceededExceptionCase(provisionedThroughputExceededException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): PutRecordError = InvalidArgumentExceptionCase(invalidArgumentException)
def kMSInvalidStateException(kMSInvalidStateException: KMSInvalidStateException): PutRecordError = KMSInvalidStateExceptionCase(kMSInvalidStateException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): PutRecordError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "PutRecordError")
val hints: Hints = Hints.empty
final case class KMSAccessDeniedExceptionCase(kMSAccessDeniedException: KMSAccessDeniedException) extends PutRecordError { final def $ordinal: Int = 0 }
final case class KMSDisabledExceptionCase(kMSDisabledException: KMSDisabledException) extends PutRecordError { final def $ordinal: Int = 1 }
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends PutRecordError { final def $ordinal: Int = 2 }
final case class KMSNotFoundExceptionCase(kMSNotFoundException: KMSNotFoundException) extends PutRecordError { final def $ordinal: Int = 3 }
final case class KMSOptInRequiredCase(kMSOptInRequired: KMSOptInRequired) extends PutRecordError { final def $ordinal: Int = 4 }
final case class KMSThrottlingExceptionCase(kMSThrottlingException: KMSThrottlingException) extends PutRecordError { final def $ordinal: Int = 5 }
final case class ProvisionedThroughputExceededExceptionCase(provisionedThroughputExceededException: ProvisionedThroughputExceededException) extends PutRecordError { final def $ordinal: Int = 6 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends PutRecordError { final def $ordinal: Int = 7 }
final case class KMSInvalidStateExceptionCase(kMSInvalidStateException: KMSInvalidStateException) extends PutRecordError { final def $ordinal: Int = 8 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends PutRecordError { final def $ordinal: Int = 9 }
object KMSAccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.KMSAccessDeniedExceptionCase] = bijection(KMSAccessDeniedException.schema.addHints(hints), PutRecordError.KMSAccessDeniedExceptionCase(_), _.kMSAccessDeniedException)
val alt = schema.oneOf[PutRecordError]("KMSAccessDeniedException")
}
object KMSDisabledExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.KMSDisabledExceptionCase] = bijection(KMSDisabledException.schema.addHints(hints), PutRecordError.KMSDisabledExceptionCase(_), _.kMSDisabledException)
val alt = schema.oneOf[PutRecordError]("KMSDisabledException")
}
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), PutRecordError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[PutRecordError]("AccessDeniedException")
}
object KMSNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.KMSNotFoundExceptionCase] = bijection(KMSNotFoundException.schema.addHints(hints), PutRecordError.KMSNotFoundExceptionCase(_), _.kMSNotFoundException)
val alt = schema.oneOf[PutRecordError]("KMSNotFoundException")
}
object KMSOptInRequiredCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.KMSOptInRequiredCase] = bijection(KMSOptInRequired.schema.addHints(hints), PutRecordError.KMSOptInRequiredCase(_), _.kMSOptInRequired)
val alt = schema.oneOf[PutRecordError]("KMSOptInRequired")
}
object KMSThrottlingExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.KMSThrottlingExceptionCase] = bijection(KMSThrottlingException.schema.addHints(hints), PutRecordError.KMSThrottlingExceptionCase(_), _.kMSThrottlingException)
val alt = schema.oneOf[PutRecordError]("KMSThrottlingException")
}
object ProvisionedThroughputExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.ProvisionedThroughputExceededExceptionCase] = bijection(ProvisionedThroughputExceededException.schema.addHints(hints), PutRecordError.ProvisionedThroughputExceededExceptionCase(_), _.provisionedThroughputExceededException)
val alt = schema.oneOf[PutRecordError]("ProvisionedThroughputExceededException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), PutRecordError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[PutRecordError]("InvalidArgumentException")
}
object KMSInvalidStateExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.KMSInvalidStateExceptionCase] = bijection(KMSInvalidStateException.schema.addHints(hints), PutRecordError.KMSInvalidStateExceptionCase(_), _.kMSInvalidStateException)
val alt = schema.oneOf[PutRecordError]("KMSInvalidStateException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), PutRecordError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[PutRecordError]("ResourceNotFoundException")
}
trait Visitor[A] {
def kMSAccessDeniedException(value: KMSAccessDeniedException): A
def kMSDisabledException(value: KMSDisabledException): A
def accessDeniedException(value: AccessDeniedException): A
def kMSNotFoundException(value: KMSNotFoundException): A
def kMSOptInRequired(value: KMSOptInRequired): A
def kMSThrottlingException(value: KMSThrottlingException): A
def provisionedThroughputExceededException(value: ProvisionedThroughputExceededException): A
def invalidArgumentException(value: InvalidArgumentException): A
def kMSInvalidStateException(value: KMSInvalidStateException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def kMSAccessDeniedException(value: KMSAccessDeniedException): A = default
def kMSDisabledException(value: KMSDisabledException): A = default
def accessDeniedException(value: AccessDeniedException): A = default
def kMSNotFoundException(value: KMSNotFoundException): A = default
def kMSOptInRequired(value: KMSOptInRequired): A = default
def kMSThrottlingException(value: KMSThrottlingException): A = default
def provisionedThroughputExceededException(value: ProvisionedThroughputExceededException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def kMSInvalidStateException(value: KMSInvalidStateException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[PutRecordError] = union(
PutRecordError.KMSAccessDeniedExceptionCase.alt,
PutRecordError.KMSDisabledExceptionCase.alt,
PutRecordError.AccessDeniedExceptionCase.alt,
PutRecordError.KMSNotFoundExceptionCase.alt,
PutRecordError.KMSOptInRequiredCase.alt,
PutRecordError.KMSThrottlingExceptionCase.alt,
PutRecordError.ProvisionedThroughputExceededExceptionCase.alt,
PutRecordError.InvalidArgumentExceptionCase.alt,
PutRecordError.KMSInvalidStateExceptionCase.alt,
PutRecordError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[PutRecordError] = throwable match {
case e: KMSAccessDeniedException => Some(PutRecordError.KMSAccessDeniedExceptionCase(e))
case e: KMSDisabledException => Some(PutRecordError.KMSDisabledExceptionCase(e))
case e: AccessDeniedException => Some(PutRecordError.AccessDeniedExceptionCase(e))
case e: KMSNotFoundException => Some(PutRecordError.KMSNotFoundExceptionCase(e))
case e: KMSOptInRequired => Some(PutRecordError.KMSOptInRequiredCase(e))
case e: KMSThrottlingException => Some(PutRecordError.KMSThrottlingExceptionCase(e))
case e: ProvisionedThroughputExceededException => Some(PutRecordError.ProvisionedThroughputExceededExceptionCase(e))
case e: InvalidArgumentException => Some(PutRecordError.InvalidArgumentExceptionCase(e))
case e: KMSInvalidStateException => Some(PutRecordError.KMSInvalidStateExceptionCase(e))
case e: ResourceNotFoundException => Some(PutRecordError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: PutRecordError): Throwable = e match {
case PutRecordError.KMSAccessDeniedExceptionCase(e) => e
case PutRecordError.KMSDisabledExceptionCase(e) => e
case PutRecordError.AccessDeniedExceptionCase(e) => e
case PutRecordError.KMSNotFoundExceptionCase(e) => e
case PutRecordError.KMSOptInRequiredCase(e) => e
case PutRecordError.KMSThrottlingExceptionCase(e) => e
case PutRecordError.ProvisionedThroughputExceededExceptionCase(e) => e
case PutRecordError.InvalidArgumentExceptionCase(e) => e
case PutRecordError.KMSInvalidStateExceptionCase(e) => e
case PutRecordError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class PutRecords(input: PutRecordsInput) extends KinesisOperation[PutRecordsInput, KinesisOperation.PutRecordsError, PutRecordsOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[PutRecordsInput, KinesisOperation.PutRecordsError, PutRecordsOutput, Nothing, Nothing] = impl.putRecords(input.records, input.streamName, input.streamARN)
def ordinal: Int = 20
def endpoint: smithy4s.Endpoint[KinesisOperation,PutRecordsInput, KinesisOperation.PutRecordsError, PutRecordsOutput, Nothing, Nothing] = PutRecords
}
object PutRecords extends smithy4s.Endpoint[KinesisOperation,PutRecordsInput, KinesisOperation.PutRecordsError, PutRecordsOutput, Nothing, Nothing] {
val schema: OperationSchema[PutRecordsInput, KinesisOperation.PutRecordsError, PutRecordsOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "PutRecords"))
.withInput(PutRecordsInput.schema)
.withError(PutRecordsError.errorSchema)
.withOutput(PutRecordsOutput.schema)
.withHints(smithy.api.Documentation("Writes multiple data records into a Kinesis data stream in a single call (also\n referred to as a PutRecords
request). Use this operation to send data into\n the stream for data ingestion and processing.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n Each PutRecords
request can support up to 500 records. Each record in the\n request can be as large as 1 MiB, up to a limit of 5 MiB for the entire request,\n including partition keys. Each shard can support writes up to 1,000 records per second,\n up to a maximum data write total of 1 MiB per second.
\n You must specify the name of the stream that captures, stores, and transports the\n data; and an array of request Records
, with each record in the array\n requiring a partition key and data blob. The record size limit applies to the total size\n of the partition key and data blob.
\n The data blob can be any type of data; for example, a segment from a log file,\n geographic/location data, website clickstream data, and so on.
\n The partition key is used by Kinesis Data Streams as input to a hash function that\n maps the partition key and associated data to a specific shard. An MD5 hash function is\n used to map partition keys to 128-bit integer values and to map associated data records\n to shards. As a result of this hashing mechanism, all data records with the same\n partition key map to the same shard within the stream. For more information, see Adding Data to a Stream in the Amazon Kinesis Data Streams\n Developer Guide.
\n Each record in the Records
array may include an optional parameter,\n ExplicitHashKey
, which overrides the partition key to shard mapping.\n This parameter allows a data producer to determine explicitly the shard where the record\n is stored. For more information, see Adding Multiple Records with PutRecords in the Amazon Kinesis\n Data Streams Developer Guide.
\n The PutRecords
response includes an array of response\n Records
. Each record in the response array directly correlates with a\n record in the request array using natural ordering, from the top to the bottom of the\n request and response. The response Records
array always includes the same\n number of records as the request array.
\n The response Records
array includes both successfully and unsuccessfully\n processed records. Kinesis Data Streams attempts to process all records in each\n PutRecords
request. A single record failure does not stop the\n processing of subsequent records. As a result, PutRecords doesn\'t guarantee the ordering\n of records. If you need to read records in the same order they are written to the\n stream, use PutRecord instead of PutRecords
, and write to\n the same shard.
\n A successfully processed record includes ShardId
and\n SequenceNumber
values. The ShardId
parameter identifies\n the shard in the stream where the record is stored. The SequenceNumber
\n parameter is an identifier assigned to the put record, unique to all records in the\n stream.
\n An unsuccessfully processed record includes ErrorCode
and\n ErrorMessage
values. ErrorCode
reflects the type of error\n and can be one of the following values:\n ProvisionedThroughputExceededException
or InternalFailure
.\n ErrorMessage
provides more detailed information about the\n ProvisionedThroughputExceededException
exception including the account\n ID, stream name, and shard ID of the record that was throttled. For more information\n about partially successful responses, see Adding Multiple Records with PutRecords in the Amazon Kinesis\n Data Streams Developer Guide.
\n \n After you write a record to a stream, you cannot modify that record or its order\n within the stream.
\n \n By default, data records are accessible for 24 hours from the time that they are added\n to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod to modify this retention period.
"))
def wrap(input: PutRecordsInput): PutRecords = PutRecords(input)
}
sealed trait PutRecordsError extends scala.Product with scala.Serializable { self =>
@inline final def widen: PutRecordsError = this
def $ordinal: Int
object project {
def kMSAccessDeniedException: Option[KMSAccessDeniedException] = PutRecordsError.KMSAccessDeniedExceptionCase.alt.project.lift(self).map(_.kMSAccessDeniedException)
def kMSDisabledException: Option[KMSDisabledException] = PutRecordsError.KMSDisabledExceptionCase.alt.project.lift(self).map(_.kMSDisabledException)
def accessDeniedException: Option[AccessDeniedException] = PutRecordsError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def kMSNotFoundException: Option[KMSNotFoundException] = PutRecordsError.KMSNotFoundExceptionCase.alt.project.lift(self).map(_.kMSNotFoundException)
def kMSOptInRequired: Option[KMSOptInRequired] = PutRecordsError.KMSOptInRequiredCase.alt.project.lift(self).map(_.kMSOptInRequired)
def kMSThrottlingException: Option[KMSThrottlingException] = PutRecordsError.KMSThrottlingExceptionCase.alt.project.lift(self).map(_.kMSThrottlingException)
def provisionedThroughputExceededException: Option[ProvisionedThroughputExceededException] = PutRecordsError.ProvisionedThroughputExceededExceptionCase.alt.project.lift(self).map(_.provisionedThroughputExceededException)
def invalidArgumentException: Option[InvalidArgumentException] = PutRecordsError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def kMSInvalidStateException: Option[KMSInvalidStateException] = PutRecordsError.KMSInvalidStateExceptionCase.alt.project.lift(self).map(_.kMSInvalidStateException)
def resourceNotFoundException: Option[ResourceNotFoundException] = PutRecordsError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: PutRecordsError.Visitor[A]): A = this match {
case value: PutRecordsError.KMSAccessDeniedExceptionCase => visitor.kMSAccessDeniedException(value.kMSAccessDeniedException)
case value: PutRecordsError.KMSDisabledExceptionCase => visitor.kMSDisabledException(value.kMSDisabledException)
case value: PutRecordsError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: PutRecordsError.KMSNotFoundExceptionCase => visitor.kMSNotFoundException(value.kMSNotFoundException)
case value: PutRecordsError.KMSOptInRequiredCase => visitor.kMSOptInRequired(value.kMSOptInRequired)
case value: PutRecordsError.KMSThrottlingExceptionCase => visitor.kMSThrottlingException(value.kMSThrottlingException)
case value: PutRecordsError.ProvisionedThroughputExceededExceptionCase => visitor.provisionedThroughputExceededException(value.provisionedThroughputExceededException)
case value: PutRecordsError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: PutRecordsError.KMSInvalidStateExceptionCase => visitor.kMSInvalidStateException(value.kMSInvalidStateException)
case value: PutRecordsError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object PutRecordsError extends ErrorSchema.Companion[PutRecordsError] {
def kMSAccessDeniedException(kMSAccessDeniedException: KMSAccessDeniedException): PutRecordsError = KMSAccessDeniedExceptionCase(kMSAccessDeniedException)
def kMSDisabledException(kMSDisabledException: KMSDisabledException): PutRecordsError = KMSDisabledExceptionCase(kMSDisabledException)
def accessDeniedException(accessDeniedException: AccessDeniedException): PutRecordsError = AccessDeniedExceptionCase(accessDeniedException)
def kMSNotFoundException(kMSNotFoundException: KMSNotFoundException): PutRecordsError = KMSNotFoundExceptionCase(kMSNotFoundException)
def kMSOptInRequired(kMSOptInRequired: KMSOptInRequired): PutRecordsError = KMSOptInRequiredCase(kMSOptInRequired)
def kMSThrottlingException(kMSThrottlingException: KMSThrottlingException): PutRecordsError = KMSThrottlingExceptionCase(kMSThrottlingException)
def provisionedThroughputExceededException(provisionedThroughputExceededException: ProvisionedThroughputExceededException): PutRecordsError = ProvisionedThroughputExceededExceptionCase(provisionedThroughputExceededException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): PutRecordsError = InvalidArgumentExceptionCase(invalidArgumentException)
def kMSInvalidStateException(kMSInvalidStateException: KMSInvalidStateException): PutRecordsError = KMSInvalidStateExceptionCase(kMSInvalidStateException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): PutRecordsError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "PutRecordsError")
val hints: Hints = Hints.empty
final case class KMSAccessDeniedExceptionCase(kMSAccessDeniedException: KMSAccessDeniedException) extends PutRecordsError { final def $ordinal: Int = 0 }
final case class KMSDisabledExceptionCase(kMSDisabledException: KMSDisabledException) extends PutRecordsError { final def $ordinal: Int = 1 }
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends PutRecordsError { final def $ordinal: Int = 2 }
final case class KMSNotFoundExceptionCase(kMSNotFoundException: KMSNotFoundException) extends PutRecordsError { final def $ordinal: Int = 3 }
final case class KMSOptInRequiredCase(kMSOptInRequired: KMSOptInRequired) extends PutRecordsError { final def $ordinal: Int = 4 }
final case class KMSThrottlingExceptionCase(kMSThrottlingException: KMSThrottlingException) extends PutRecordsError { final def $ordinal: Int = 5 }
final case class ProvisionedThroughputExceededExceptionCase(provisionedThroughputExceededException: ProvisionedThroughputExceededException) extends PutRecordsError { final def $ordinal: Int = 6 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends PutRecordsError { final def $ordinal: Int = 7 }
final case class KMSInvalidStateExceptionCase(kMSInvalidStateException: KMSInvalidStateException) extends PutRecordsError { final def $ordinal: Int = 8 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends PutRecordsError { final def $ordinal: Int = 9 }
object KMSAccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.KMSAccessDeniedExceptionCase] = bijection(KMSAccessDeniedException.schema.addHints(hints), PutRecordsError.KMSAccessDeniedExceptionCase(_), _.kMSAccessDeniedException)
val alt = schema.oneOf[PutRecordsError]("KMSAccessDeniedException")
}
object KMSDisabledExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.KMSDisabledExceptionCase] = bijection(KMSDisabledException.schema.addHints(hints), PutRecordsError.KMSDisabledExceptionCase(_), _.kMSDisabledException)
val alt = schema.oneOf[PutRecordsError]("KMSDisabledException")
}
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), PutRecordsError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[PutRecordsError]("AccessDeniedException")
}
object KMSNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.KMSNotFoundExceptionCase] = bijection(KMSNotFoundException.schema.addHints(hints), PutRecordsError.KMSNotFoundExceptionCase(_), _.kMSNotFoundException)
val alt = schema.oneOf[PutRecordsError]("KMSNotFoundException")
}
object KMSOptInRequiredCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.KMSOptInRequiredCase] = bijection(KMSOptInRequired.schema.addHints(hints), PutRecordsError.KMSOptInRequiredCase(_), _.kMSOptInRequired)
val alt = schema.oneOf[PutRecordsError]("KMSOptInRequired")
}
object KMSThrottlingExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.KMSThrottlingExceptionCase] = bijection(KMSThrottlingException.schema.addHints(hints), PutRecordsError.KMSThrottlingExceptionCase(_), _.kMSThrottlingException)
val alt = schema.oneOf[PutRecordsError]("KMSThrottlingException")
}
object ProvisionedThroughputExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.ProvisionedThroughputExceededExceptionCase] = bijection(ProvisionedThroughputExceededException.schema.addHints(hints), PutRecordsError.ProvisionedThroughputExceededExceptionCase(_), _.provisionedThroughputExceededException)
val alt = schema.oneOf[PutRecordsError]("ProvisionedThroughputExceededException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), PutRecordsError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[PutRecordsError]("InvalidArgumentException")
}
object KMSInvalidStateExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.KMSInvalidStateExceptionCase] = bijection(KMSInvalidStateException.schema.addHints(hints), PutRecordsError.KMSInvalidStateExceptionCase(_), _.kMSInvalidStateException)
val alt = schema.oneOf[PutRecordsError]("KMSInvalidStateException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[PutRecordsError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), PutRecordsError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[PutRecordsError]("ResourceNotFoundException")
}
trait Visitor[A] {
def kMSAccessDeniedException(value: KMSAccessDeniedException): A
def kMSDisabledException(value: KMSDisabledException): A
def accessDeniedException(value: AccessDeniedException): A
def kMSNotFoundException(value: KMSNotFoundException): A
def kMSOptInRequired(value: KMSOptInRequired): A
def kMSThrottlingException(value: KMSThrottlingException): A
def provisionedThroughputExceededException(value: ProvisionedThroughputExceededException): A
def invalidArgumentException(value: InvalidArgumentException): A
def kMSInvalidStateException(value: KMSInvalidStateException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def kMSAccessDeniedException(value: KMSAccessDeniedException): A = default
def kMSDisabledException(value: KMSDisabledException): A = default
def accessDeniedException(value: AccessDeniedException): A = default
def kMSNotFoundException(value: KMSNotFoundException): A = default
def kMSOptInRequired(value: KMSOptInRequired): A = default
def kMSThrottlingException(value: KMSThrottlingException): A = default
def provisionedThroughputExceededException(value: ProvisionedThroughputExceededException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def kMSInvalidStateException(value: KMSInvalidStateException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[PutRecordsError] = union(
PutRecordsError.KMSAccessDeniedExceptionCase.alt,
PutRecordsError.KMSDisabledExceptionCase.alt,
PutRecordsError.AccessDeniedExceptionCase.alt,
PutRecordsError.KMSNotFoundExceptionCase.alt,
PutRecordsError.KMSOptInRequiredCase.alt,
PutRecordsError.KMSThrottlingExceptionCase.alt,
PutRecordsError.ProvisionedThroughputExceededExceptionCase.alt,
PutRecordsError.InvalidArgumentExceptionCase.alt,
PutRecordsError.KMSInvalidStateExceptionCase.alt,
PutRecordsError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[PutRecordsError] = throwable match {
case e: KMSAccessDeniedException => Some(PutRecordsError.KMSAccessDeniedExceptionCase(e))
case e: KMSDisabledException => Some(PutRecordsError.KMSDisabledExceptionCase(e))
case e: AccessDeniedException => Some(PutRecordsError.AccessDeniedExceptionCase(e))
case e: KMSNotFoundException => Some(PutRecordsError.KMSNotFoundExceptionCase(e))
case e: KMSOptInRequired => Some(PutRecordsError.KMSOptInRequiredCase(e))
case e: KMSThrottlingException => Some(PutRecordsError.KMSThrottlingExceptionCase(e))
case e: ProvisionedThroughputExceededException => Some(PutRecordsError.ProvisionedThroughputExceededExceptionCase(e))
case e: InvalidArgumentException => Some(PutRecordsError.InvalidArgumentExceptionCase(e))
case e: KMSInvalidStateException => Some(PutRecordsError.KMSInvalidStateExceptionCase(e))
case e: ResourceNotFoundException => Some(PutRecordsError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: PutRecordsError): Throwable = e match {
case PutRecordsError.KMSAccessDeniedExceptionCase(e) => e
case PutRecordsError.KMSDisabledExceptionCase(e) => e
case PutRecordsError.AccessDeniedExceptionCase(e) => e
case PutRecordsError.KMSNotFoundExceptionCase(e) => e
case PutRecordsError.KMSOptInRequiredCase(e) => e
case PutRecordsError.KMSThrottlingExceptionCase(e) => e
case PutRecordsError.ProvisionedThroughputExceededExceptionCase(e) => e
case PutRecordsError.InvalidArgumentExceptionCase(e) => e
case PutRecordsError.KMSInvalidStateExceptionCase(e) => e
case PutRecordsError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class RegisterStreamConsumer(input: RegisterStreamConsumerInput) extends KinesisOperation[RegisterStreamConsumerInput, KinesisOperation.RegisterStreamConsumerError, RegisterStreamConsumerOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[RegisterStreamConsumerInput, KinesisOperation.RegisterStreamConsumerError, RegisterStreamConsumerOutput, Nothing, Nothing] = impl.registerStreamConsumer(input.streamARN, input.consumerName)
def ordinal: Int = 21
def endpoint: smithy4s.Endpoint[KinesisOperation,RegisterStreamConsumerInput, KinesisOperation.RegisterStreamConsumerError, RegisterStreamConsumerOutput, Nothing, Nothing] = RegisterStreamConsumer
}
object RegisterStreamConsumer extends smithy4s.Endpoint[KinesisOperation,RegisterStreamConsumerInput, KinesisOperation.RegisterStreamConsumerError, RegisterStreamConsumerOutput, Nothing, Nothing] {
val schema: OperationSchema[RegisterStreamConsumerInput, KinesisOperation.RegisterStreamConsumerError, RegisterStreamConsumerOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "RegisterStreamConsumer"))
.withInput(RegisterStreamConsumerInput.schema)
.withError(RegisterStreamConsumerError.errorSchema)
.withOutput(RegisterStreamConsumerOutput.schema)
.withHints(smithy.api.Documentation("Registers a consumer with a Kinesis data stream. When you use this operation, the\n consumer you register can then call SubscribeToShard to receive data\n from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every\n shard you subscribe to. This rate is unaffected by the total number of consumers that\n read from the same stream.
\n You can register up to 20 consumers per stream. A given consumer can only be\n registered with one stream at a time.
\n For an example of how to use this operations, see Enhanced Fan-Out\n Using the Kinesis Data Streams API.
\n The use of this operation has a limit of five transactions per second per account.\n Also, only 5 consumers can be created simultaneously. In other words, you cannot have\n more than 5 consumers in a CREATING
status at the same time. Registering a\n 6th consumer while there are 5 in a CREATING
status results in a\n LimitExceededException
.
"))
def wrap(input: RegisterStreamConsumerInput): RegisterStreamConsumer = RegisterStreamConsumer(input)
}
sealed trait RegisterStreamConsumerError extends scala.Product with scala.Serializable { self =>
@inline final def widen: RegisterStreamConsumerError = this
def $ordinal: Int
object project {
def invalidArgumentException: Option[InvalidArgumentException] = RegisterStreamConsumerError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = RegisterStreamConsumerError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = RegisterStreamConsumerError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = RegisterStreamConsumerError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: RegisterStreamConsumerError.Visitor[A]): A = this match {
case value: RegisterStreamConsumerError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: RegisterStreamConsumerError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: RegisterStreamConsumerError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: RegisterStreamConsumerError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object RegisterStreamConsumerError extends ErrorSchema.Companion[RegisterStreamConsumerError] {
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): RegisterStreamConsumerError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): RegisterStreamConsumerError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): RegisterStreamConsumerError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): RegisterStreamConsumerError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "RegisterStreamConsumerError")
val hints: Hints = Hints.empty
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends RegisterStreamConsumerError { final def $ordinal: Int = 0 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends RegisterStreamConsumerError { final def $ordinal: Int = 1 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends RegisterStreamConsumerError { final def $ordinal: Int = 2 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends RegisterStreamConsumerError { final def $ordinal: Int = 3 }
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[RegisterStreamConsumerError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), RegisterStreamConsumerError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[RegisterStreamConsumerError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[RegisterStreamConsumerError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), RegisterStreamConsumerError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[RegisterStreamConsumerError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[RegisterStreamConsumerError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), RegisterStreamConsumerError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[RegisterStreamConsumerError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[RegisterStreamConsumerError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), RegisterStreamConsumerError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[RegisterStreamConsumerError]("ResourceNotFoundException")
}
trait Visitor[A] {
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[RegisterStreamConsumerError] = union(
RegisterStreamConsumerError.InvalidArgumentExceptionCase.alt,
RegisterStreamConsumerError.ResourceInUseExceptionCase.alt,
RegisterStreamConsumerError.LimitExceededExceptionCase.alt,
RegisterStreamConsumerError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[RegisterStreamConsumerError] = throwable match {
case e: InvalidArgumentException => Some(RegisterStreamConsumerError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(RegisterStreamConsumerError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(RegisterStreamConsumerError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(RegisterStreamConsumerError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: RegisterStreamConsumerError): Throwable = e match {
case RegisterStreamConsumerError.InvalidArgumentExceptionCase(e) => e
case RegisterStreamConsumerError.ResourceInUseExceptionCase(e) => e
case RegisterStreamConsumerError.LimitExceededExceptionCase(e) => e
case RegisterStreamConsumerError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class RemoveTagsFromStream(input: RemoveTagsFromStreamInput) extends KinesisOperation[RemoveTagsFromStreamInput, KinesisOperation.RemoveTagsFromStreamError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[RemoveTagsFromStreamInput, KinesisOperation.RemoveTagsFromStreamError, Unit, Nothing, Nothing] = impl.removeTagsFromStream(input.tagKeys, input.streamName, input.streamARN)
def ordinal: Int = 22
def endpoint: smithy4s.Endpoint[KinesisOperation,RemoveTagsFromStreamInput, KinesisOperation.RemoveTagsFromStreamError, Unit, Nothing, Nothing] = RemoveTagsFromStream
}
object RemoveTagsFromStream extends smithy4s.Endpoint[KinesisOperation,RemoveTagsFromStreamInput, KinesisOperation.RemoveTagsFromStreamError, Unit, Nothing, Nothing] {
val schema: OperationSchema[RemoveTagsFromStreamInput, KinesisOperation.RemoveTagsFromStreamError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "RemoveTagsFromStream"))
.withInput(RemoveTagsFromStreamInput.schema)
.withError(RemoveTagsFromStreamError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Removes tags from the specified Kinesis data stream. Removed tags are deleted and\n cannot be recovered after this operation successfully completes.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n If you specify a tag that does not exist, it is ignored.
\n \n RemoveTagsFromStream has a limit of five transactions per second per\n account.
"))
def wrap(input: RemoveTagsFromStreamInput): RemoveTagsFromStream = RemoveTagsFromStream(input)
}
sealed trait RemoveTagsFromStreamError extends scala.Product with scala.Serializable { self =>
@inline final def widen: RemoveTagsFromStreamError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = RemoveTagsFromStreamError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = RemoveTagsFromStreamError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = RemoveTagsFromStreamError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = RemoveTagsFromStreamError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = RemoveTagsFromStreamError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: RemoveTagsFromStreamError.Visitor[A]): A = this match {
case value: RemoveTagsFromStreamError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: RemoveTagsFromStreamError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: RemoveTagsFromStreamError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: RemoveTagsFromStreamError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: RemoveTagsFromStreamError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object RemoveTagsFromStreamError extends ErrorSchema.Companion[RemoveTagsFromStreamError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): RemoveTagsFromStreamError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): RemoveTagsFromStreamError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): RemoveTagsFromStreamError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): RemoveTagsFromStreamError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): RemoveTagsFromStreamError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "RemoveTagsFromStreamError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends RemoveTagsFromStreamError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends RemoveTagsFromStreamError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends RemoveTagsFromStreamError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends RemoveTagsFromStreamError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends RemoveTagsFromStreamError { final def $ordinal: Int = 4 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[RemoveTagsFromStreamError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), RemoveTagsFromStreamError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[RemoveTagsFromStreamError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[RemoveTagsFromStreamError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), RemoveTagsFromStreamError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[RemoveTagsFromStreamError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[RemoveTagsFromStreamError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), RemoveTagsFromStreamError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[RemoveTagsFromStreamError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[RemoveTagsFromStreamError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), RemoveTagsFromStreamError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[RemoveTagsFromStreamError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[RemoveTagsFromStreamError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), RemoveTagsFromStreamError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[RemoveTagsFromStreamError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[RemoveTagsFromStreamError] = union(
RemoveTagsFromStreamError.AccessDeniedExceptionCase.alt,
RemoveTagsFromStreamError.InvalidArgumentExceptionCase.alt,
RemoveTagsFromStreamError.ResourceInUseExceptionCase.alt,
RemoveTagsFromStreamError.LimitExceededExceptionCase.alt,
RemoveTagsFromStreamError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[RemoveTagsFromStreamError] = throwable match {
case e: AccessDeniedException => Some(RemoveTagsFromStreamError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(RemoveTagsFromStreamError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(RemoveTagsFromStreamError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(RemoveTagsFromStreamError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(RemoveTagsFromStreamError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: RemoveTagsFromStreamError): Throwable = e match {
case RemoveTagsFromStreamError.AccessDeniedExceptionCase(e) => e
case RemoveTagsFromStreamError.InvalidArgumentExceptionCase(e) => e
case RemoveTagsFromStreamError.ResourceInUseExceptionCase(e) => e
case RemoveTagsFromStreamError.LimitExceededExceptionCase(e) => e
case RemoveTagsFromStreamError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class SplitShard(input: SplitShardInput) extends KinesisOperation[SplitShardInput, KinesisOperation.SplitShardError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[SplitShardInput, KinesisOperation.SplitShardError, Unit, Nothing, Nothing] = impl.splitShard(input.shardToSplit, input.newStartingHashKey, input.streamName, input.streamARN)
def ordinal: Int = 23
def endpoint: smithy4s.Endpoint[KinesisOperation,SplitShardInput, KinesisOperation.SplitShardError, Unit, Nothing, Nothing] = SplitShard
}
object SplitShard extends smithy4s.Endpoint[KinesisOperation,SplitShardInput, KinesisOperation.SplitShardError, Unit, Nothing, Nothing] {
val schema: OperationSchema[SplitShardInput, KinesisOperation.SplitShardError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "SplitShard"))
.withInput(SplitShardInput.schema)
.withError(SplitShardError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Splits a shard into two new shards in the Kinesis data stream, to increase the\n stream\'s capacity to ingest and transport data. SplitShard
is called when\n there is a need to increase the overall capacity of a stream because of an expected\n increase in the volume of data records being ingested. This API is only supported for\n the data streams with the provisioned capacity mode.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n You can also use SplitShard
when a shard appears to be approaching its\n maximum utilization; for example, the producers sending data into the specific shard are\n suddenly sending more than previously anticipated. You can also call\n SplitShard
to increase stream capacity, so that more Kinesis Data\n Streams applications can simultaneously read data from the stream for real-time\n processing.
\n You must specify the shard to be split and the new hash key, which is the position in\n the shard where the shard gets split in two. In many cases, the new hash key might be\n the average of the beginning and ending hash key, but it can be any hash key value in\n the range being mapped into the shard. For more information, see Split a\n Shard in the Amazon Kinesis Data Streams Developer\n Guide.
\n You can use DescribeStreamSummary and the ListShards APIs to determine the shard ID and hash key values for the ShardToSplit
\n and NewStartingHashKey
parameters that are specified in the\n SplitShard
request.
\n \n SplitShard
is an asynchronous operation. Upon receiving a\n SplitShard
request, Kinesis Data Streams immediately returns a response\n and sets the stream status to UPDATING
. After the operation is completed,\n Kinesis Data Streams sets the stream status to ACTIVE
. Read and write\n operations continue to work while the stream is in the UPDATING
state.
\n You can use DescribeStreamSummary to check the status of the stream,\n which is returned in StreamStatus
. If the stream is in the\n ACTIVE
state, you can call SplitShard
.\n
\n If the specified stream does not exist, DescribeStreamSummary\n returns a ResourceNotFoundException
. If you try to create more shards than\n are authorized for your account, you receive a LimitExceededException
.
\n For the default shard limit for an Amazon Web Services account, see Kinesis\n Data Streams Limits in the Amazon Kinesis Data Streams Developer\n Guide. To increase this limit, contact Amazon Web Services\n Support.
\n If you try to operate on too many streams simultaneously using CreateStream, DeleteStream, MergeShards, and/or SplitShard, you receive a\n LimitExceededException
.
\n \n SplitShard
has a limit of five transactions per second per account.
"))
def wrap(input: SplitShardInput): SplitShard = SplitShard(input)
}
sealed trait SplitShardError extends scala.Product with scala.Serializable { self =>
@inline final def widen: SplitShardError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = SplitShardError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def validationException: Option[ValidationException] = SplitShardError.ValidationExceptionCase.alt.project.lift(self).map(_.validationException)
def invalidArgumentException: Option[InvalidArgumentException] = SplitShardError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = SplitShardError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = SplitShardError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = SplitShardError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: SplitShardError.Visitor[A]): A = this match {
case value: SplitShardError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: SplitShardError.ValidationExceptionCase => visitor.validationException(value.validationException)
case value: SplitShardError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: SplitShardError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: SplitShardError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: SplitShardError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object SplitShardError extends ErrorSchema.Companion[SplitShardError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): SplitShardError = AccessDeniedExceptionCase(accessDeniedException)
def validationException(validationException: ValidationException): SplitShardError = ValidationExceptionCase(validationException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): SplitShardError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): SplitShardError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): SplitShardError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): SplitShardError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "SplitShardError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends SplitShardError { final def $ordinal: Int = 0 }
final case class ValidationExceptionCase(validationException: ValidationException) extends SplitShardError { final def $ordinal: Int = 1 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends SplitShardError { final def $ordinal: Int = 2 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends SplitShardError { final def $ordinal: Int = 3 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends SplitShardError { final def $ordinal: Int = 4 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends SplitShardError { final def $ordinal: Int = 5 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SplitShardError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), SplitShardError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[SplitShardError]("AccessDeniedException")
}
object ValidationExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SplitShardError.ValidationExceptionCase] = bijection(ValidationException.schema.addHints(hints), SplitShardError.ValidationExceptionCase(_), _.validationException)
val alt = schema.oneOf[SplitShardError]("ValidationException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SplitShardError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), SplitShardError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[SplitShardError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SplitShardError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), SplitShardError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[SplitShardError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SplitShardError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), SplitShardError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[SplitShardError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SplitShardError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), SplitShardError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[SplitShardError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def validationException(value: ValidationException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def validationException(value: ValidationException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[SplitShardError] = union(
SplitShardError.AccessDeniedExceptionCase.alt,
SplitShardError.ValidationExceptionCase.alt,
SplitShardError.InvalidArgumentExceptionCase.alt,
SplitShardError.ResourceInUseExceptionCase.alt,
SplitShardError.LimitExceededExceptionCase.alt,
SplitShardError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[SplitShardError] = throwable match {
case e: AccessDeniedException => Some(SplitShardError.AccessDeniedExceptionCase(e))
case e: ValidationException => Some(SplitShardError.ValidationExceptionCase(e))
case e: InvalidArgumentException => Some(SplitShardError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(SplitShardError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(SplitShardError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(SplitShardError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: SplitShardError): Throwable = e match {
case SplitShardError.AccessDeniedExceptionCase(e) => e
case SplitShardError.ValidationExceptionCase(e) => e
case SplitShardError.InvalidArgumentExceptionCase(e) => e
case SplitShardError.ResourceInUseExceptionCase(e) => e
case SplitShardError.LimitExceededExceptionCase(e) => e
case SplitShardError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class StartStreamEncryption(input: StartStreamEncryptionInput) extends KinesisOperation[StartStreamEncryptionInput, KinesisOperation.StartStreamEncryptionError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[StartStreamEncryptionInput, KinesisOperation.StartStreamEncryptionError, Unit, Nothing, Nothing] = impl.startStreamEncryption(input.encryptionType, input.keyId, input.streamName, input.streamARN)
def ordinal: Int = 24
def endpoint: smithy4s.Endpoint[KinesisOperation,StartStreamEncryptionInput, KinesisOperation.StartStreamEncryptionError, Unit, Nothing, Nothing] = StartStreamEncryption
}
object StartStreamEncryption extends smithy4s.Endpoint[KinesisOperation,StartStreamEncryptionInput, KinesisOperation.StartStreamEncryptionError, Unit, Nothing, Nothing] {
val schema: OperationSchema[StartStreamEncryptionInput, KinesisOperation.StartStreamEncryptionError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "StartStreamEncryption"))
.withInput(StartStreamEncryptionInput.schema)
.withError(StartStreamEncryptionError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Enables or updates server-side encryption using an Amazon Web Services KMS key for a\n specified stream.
\n Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis\n Data Streams returns immediately and sets the status of the stream to\n UPDATING
. After the update is complete, Kinesis Data Streams sets the\n status of the stream back to ACTIVE
. Updating or applying encryption\n normally takes a few seconds to complete, but it can take minutes. You can continue to\n read and write data to your stream while its status is UPDATING
. Once the\n status of the stream is ACTIVE
, encryption begins for records written to\n the stream.
\n API Limits: You can successfully apply a new Amazon Web Services KMS key for\n server-side encryption 25 times in a rolling 24-hour period.
\n Note: It can take up to 5 seconds after the stream is in an ACTIVE
status\n before all records written to the stream are encrypted. After you enable encryption, you\n can verify that encryption is applied by inspecting the API response from\n PutRecord
or PutRecords
.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n "))
def wrap(input: StartStreamEncryptionInput): StartStreamEncryption = StartStreamEncryption(input)
}
sealed trait StartStreamEncryptionError extends scala.Product with scala.Serializable { self =>
@inline final def widen: StartStreamEncryptionError = this
def $ordinal: Int
object project {
def kMSAccessDeniedException: Option[KMSAccessDeniedException] = StartStreamEncryptionError.KMSAccessDeniedExceptionCase.alt.project.lift(self).map(_.kMSAccessDeniedException)
def kMSDisabledException: Option[KMSDisabledException] = StartStreamEncryptionError.KMSDisabledExceptionCase.alt.project.lift(self).map(_.kMSDisabledException)
def accessDeniedException: Option[AccessDeniedException] = StartStreamEncryptionError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def kMSNotFoundException: Option[KMSNotFoundException] = StartStreamEncryptionError.KMSNotFoundExceptionCase.alt.project.lift(self).map(_.kMSNotFoundException)
def kMSOptInRequired: Option[KMSOptInRequired] = StartStreamEncryptionError.KMSOptInRequiredCase.alt.project.lift(self).map(_.kMSOptInRequired)
def kMSThrottlingException: Option[KMSThrottlingException] = StartStreamEncryptionError.KMSThrottlingExceptionCase.alt.project.lift(self).map(_.kMSThrottlingException)
def invalidArgumentException: Option[InvalidArgumentException] = StartStreamEncryptionError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def kMSInvalidStateException: Option[KMSInvalidStateException] = StartStreamEncryptionError.KMSInvalidStateExceptionCase.alt.project.lift(self).map(_.kMSInvalidStateException)
def resourceInUseException: Option[ResourceInUseException] = StartStreamEncryptionError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = StartStreamEncryptionError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = StartStreamEncryptionError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: StartStreamEncryptionError.Visitor[A]): A = this match {
case value: StartStreamEncryptionError.KMSAccessDeniedExceptionCase => visitor.kMSAccessDeniedException(value.kMSAccessDeniedException)
case value: StartStreamEncryptionError.KMSDisabledExceptionCase => visitor.kMSDisabledException(value.kMSDisabledException)
case value: StartStreamEncryptionError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: StartStreamEncryptionError.KMSNotFoundExceptionCase => visitor.kMSNotFoundException(value.kMSNotFoundException)
case value: StartStreamEncryptionError.KMSOptInRequiredCase => visitor.kMSOptInRequired(value.kMSOptInRequired)
case value: StartStreamEncryptionError.KMSThrottlingExceptionCase => visitor.kMSThrottlingException(value.kMSThrottlingException)
case value: StartStreamEncryptionError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: StartStreamEncryptionError.KMSInvalidStateExceptionCase => visitor.kMSInvalidStateException(value.kMSInvalidStateException)
case value: StartStreamEncryptionError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: StartStreamEncryptionError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: StartStreamEncryptionError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object StartStreamEncryptionError extends ErrorSchema.Companion[StartStreamEncryptionError] {
def kMSAccessDeniedException(kMSAccessDeniedException: KMSAccessDeniedException): StartStreamEncryptionError = KMSAccessDeniedExceptionCase(kMSAccessDeniedException)
def kMSDisabledException(kMSDisabledException: KMSDisabledException): StartStreamEncryptionError = KMSDisabledExceptionCase(kMSDisabledException)
def accessDeniedException(accessDeniedException: AccessDeniedException): StartStreamEncryptionError = AccessDeniedExceptionCase(accessDeniedException)
def kMSNotFoundException(kMSNotFoundException: KMSNotFoundException): StartStreamEncryptionError = KMSNotFoundExceptionCase(kMSNotFoundException)
def kMSOptInRequired(kMSOptInRequired: KMSOptInRequired): StartStreamEncryptionError = KMSOptInRequiredCase(kMSOptInRequired)
def kMSThrottlingException(kMSThrottlingException: KMSThrottlingException): StartStreamEncryptionError = KMSThrottlingExceptionCase(kMSThrottlingException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): StartStreamEncryptionError = InvalidArgumentExceptionCase(invalidArgumentException)
def kMSInvalidStateException(kMSInvalidStateException: KMSInvalidStateException): StartStreamEncryptionError = KMSInvalidStateExceptionCase(kMSInvalidStateException)
def resourceInUseException(resourceInUseException: ResourceInUseException): StartStreamEncryptionError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): StartStreamEncryptionError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): StartStreamEncryptionError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "StartStreamEncryptionError")
val hints: Hints = Hints.empty
final case class KMSAccessDeniedExceptionCase(kMSAccessDeniedException: KMSAccessDeniedException) extends StartStreamEncryptionError { final def $ordinal: Int = 0 }
final case class KMSDisabledExceptionCase(kMSDisabledException: KMSDisabledException) extends StartStreamEncryptionError { final def $ordinal: Int = 1 }
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends StartStreamEncryptionError { final def $ordinal: Int = 2 }
final case class KMSNotFoundExceptionCase(kMSNotFoundException: KMSNotFoundException) extends StartStreamEncryptionError { final def $ordinal: Int = 3 }
final case class KMSOptInRequiredCase(kMSOptInRequired: KMSOptInRequired) extends StartStreamEncryptionError { final def $ordinal: Int = 4 }
final case class KMSThrottlingExceptionCase(kMSThrottlingException: KMSThrottlingException) extends StartStreamEncryptionError { final def $ordinal: Int = 5 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends StartStreamEncryptionError { final def $ordinal: Int = 6 }
final case class KMSInvalidStateExceptionCase(kMSInvalidStateException: KMSInvalidStateException) extends StartStreamEncryptionError { final def $ordinal: Int = 7 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends StartStreamEncryptionError { final def $ordinal: Int = 8 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends StartStreamEncryptionError { final def $ordinal: Int = 9 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends StartStreamEncryptionError { final def $ordinal: Int = 10 }
object KMSAccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.KMSAccessDeniedExceptionCase] = bijection(KMSAccessDeniedException.schema.addHints(hints), StartStreamEncryptionError.KMSAccessDeniedExceptionCase(_), _.kMSAccessDeniedException)
val alt = schema.oneOf[StartStreamEncryptionError]("KMSAccessDeniedException")
}
object KMSDisabledExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.KMSDisabledExceptionCase] = bijection(KMSDisabledException.schema.addHints(hints), StartStreamEncryptionError.KMSDisabledExceptionCase(_), _.kMSDisabledException)
val alt = schema.oneOf[StartStreamEncryptionError]("KMSDisabledException")
}
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), StartStreamEncryptionError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[StartStreamEncryptionError]("AccessDeniedException")
}
object KMSNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.KMSNotFoundExceptionCase] = bijection(KMSNotFoundException.schema.addHints(hints), StartStreamEncryptionError.KMSNotFoundExceptionCase(_), _.kMSNotFoundException)
val alt = schema.oneOf[StartStreamEncryptionError]("KMSNotFoundException")
}
object KMSOptInRequiredCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.KMSOptInRequiredCase] = bijection(KMSOptInRequired.schema.addHints(hints), StartStreamEncryptionError.KMSOptInRequiredCase(_), _.kMSOptInRequired)
val alt = schema.oneOf[StartStreamEncryptionError]("KMSOptInRequired")
}
object KMSThrottlingExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.KMSThrottlingExceptionCase] = bijection(KMSThrottlingException.schema.addHints(hints), StartStreamEncryptionError.KMSThrottlingExceptionCase(_), _.kMSThrottlingException)
val alt = schema.oneOf[StartStreamEncryptionError]("KMSThrottlingException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), StartStreamEncryptionError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[StartStreamEncryptionError]("InvalidArgumentException")
}
object KMSInvalidStateExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.KMSInvalidStateExceptionCase] = bijection(KMSInvalidStateException.schema.addHints(hints), StartStreamEncryptionError.KMSInvalidStateExceptionCase(_), _.kMSInvalidStateException)
val alt = schema.oneOf[StartStreamEncryptionError]("KMSInvalidStateException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), StartStreamEncryptionError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[StartStreamEncryptionError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), StartStreamEncryptionError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[StartStreamEncryptionError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StartStreamEncryptionError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), StartStreamEncryptionError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[StartStreamEncryptionError]("ResourceNotFoundException")
}
trait Visitor[A] {
def kMSAccessDeniedException(value: KMSAccessDeniedException): A
def kMSDisabledException(value: KMSDisabledException): A
def accessDeniedException(value: AccessDeniedException): A
def kMSNotFoundException(value: KMSNotFoundException): A
def kMSOptInRequired(value: KMSOptInRequired): A
def kMSThrottlingException(value: KMSThrottlingException): A
def invalidArgumentException(value: InvalidArgumentException): A
def kMSInvalidStateException(value: KMSInvalidStateException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def kMSAccessDeniedException(value: KMSAccessDeniedException): A = default
def kMSDisabledException(value: KMSDisabledException): A = default
def accessDeniedException(value: AccessDeniedException): A = default
def kMSNotFoundException(value: KMSNotFoundException): A = default
def kMSOptInRequired(value: KMSOptInRequired): A = default
def kMSThrottlingException(value: KMSThrottlingException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def kMSInvalidStateException(value: KMSInvalidStateException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[StartStreamEncryptionError] = union(
StartStreamEncryptionError.KMSAccessDeniedExceptionCase.alt,
StartStreamEncryptionError.KMSDisabledExceptionCase.alt,
StartStreamEncryptionError.AccessDeniedExceptionCase.alt,
StartStreamEncryptionError.KMSNotFoundExceptionCase.alt,
StartStreamEncryptionError.KMSOptInRequiredCase.alt,
StartStreamEncryptionError.KMSThrottlingExceptionCase.alt,
StartStreamEncryptionError.InvalidArgumentExceptionCase.alt,
StartStreamEncryptionError.KMSInvalidStateExceptionCase.alt,
StartStreamEncryptionError.ResourceInUseExceptionCase.alt,
StartStreamEncryptionError.LimitExceededExceptionCase.alt,
StartStreamEncryptionError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[StartStreamEncryptionError] = throwable match {
case e: KMSAccessDeniedException => Some(StartStreamEncryptionError.KMSAccessDeniedExceptionCase(e))
case e: KMSDisabledException => Some(StartStreamEncryptionError.KMSDisabledExceptionCase(e))
case e: AccessDeniedException => Some(StartStreamEncryptionError.AccessDeniedExceptionCase(e))
case e: KMSNotFoundException => Some(StartStreamEncryptionError.KMSNotFoundExceptionCase(e))
case e: KMSOptInRequired => Some(StartStreamEncryptionError.KMSOptInRequiredCase(e))
case e: KMSThrottlingException => Some(StartStreamEncryptionError.KMSThrottlingExceptionCase(e))
case e: InvalidArgumentException => Some(StartStreamEncryptionError.InvalidArgumentExceptionCase(e))
case e: KMSInvalidStateException => Some(StartStreamEncryptionError.KMSInvalidStateExceptionCase(e))
case e: ResourceInUseException => Some(StartStreamEncryptionError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(StartStreamEncryptionError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(StartStreamEncryptionError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: StartStreamEncryptionError): Throwable = e match {
case StartStreamEncryptionError.KMSAccessDeniedExceptionCase(e) => e
case StartStreamEncryptionError.KMSDisabledExceptionCase(e) => e
case StartStreamEncryptionError.AccessDeniedExceptionCase(e) => e
case StartStreamEncryptionError.KMSNotFoundExceptionCase(e) => e
case StartStreamEncryptionError.KMSOptInRequiredCase(e) => e
case StartStreamEncryptionError.KMSThrottlingExceptionCase(e) => e
case StartStreamEncryptionError.InvalidArgumentExceptionCase(e) => e
case StartStreamEncryptionError.KMSInvalidStateExceptionCase(e) => e
case StartStreamEncryptionError.ResourceInUseExceptionCase(e) => e
case StartStreamEncryptionError.LimitExceededExceptionCase(e) => e
case StartStreamEncryptionError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class StopStreamEncryption(input: StopStreamEncryptionInput) extends KinesisOperation[StopStreamEncryptionInput, KinesisOperation.StopStreamEncryptionError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[StopStreamEncryptionInput, KinesisOperation.StopStreamEncryptionError, Unit, Nothing, Nothing] = impl.stopStreamEncryption(input.encryptionType, input.keyId, input.streamName, input.streamARN)
def ordinal: Int = 25
def endpoint: smithy4s.Endpoint[KinesisOperation,StopStreamEncryptionInput, KinesisOperation.StopStreamEncryptionError, Unit, Nothing, Nothing] = StopStreamEncryption
}
object StopStreamEncryption extends smithy4s.Endpoint[KinesisOperation,StopStreamEncryptionInput, KinesisOperation.StopStreamEncryptionError, Unit, Nothing, Nothing] {
val schema: OperationSchema[StopStreamEncryptionInput, KinesisOperation.StopStreamEncryptionError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "StopStreamEncryption"))
.withInput(StopStreamEncryptionInput.schema)
.withError(StopStreamEncryptionError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation("Disables server-side encryption for a specified stream.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n Stopping encryption is an asynchronous operation. Upon receiving the request, Kinesis\n Data Streams returns immediately and sets the status of the stream to\n UPDATING
. After the update is complete, Kinesis Data Streams sets the\n status of the stream back to ACTIVE
. Stopping encryption normally takes a\n few seconds to complete, but it can take minutes. You can continue to read and write\n data to your stream while its status is UPDATING
. Once the status of the\n stream is ACTIVE
, records written to the stream are no longer encrypted by\n Kinesis Data Streams.
\n API Limits: You can successfully disable server-side encryption 25 times in a rolling\n 24-hour period.
\n Note: It can take up to 5 seconds after the stream is in an ACTIVE
status\n before all records written to the stream are no longer subject to encryption. After you\n disabled encryption, you can verify that encryption is not applied by inspecting the API\n response from PutRecord
or PutRecords
.
"))
def wrap(input: StopStreamEncryptionInput): StopStreamEncryption = StopStreamEncryption(input)
}
sealed trait StopStreamEncryptionError extends scala.Product with scala.Serializable { self =>
@inline final def widen: StopStreamEncryptionError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = StopStreamEncryptionError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = StopStreamEncryptionError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = StopStreamEncryptionError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = StopStreamEncryptionError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = StopStreamEncryptionError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: StopStreamEncryptionError.Visitor[A]): A = this match {
case value: StopStreamEncryptionError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: StopStreamEncryptionError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: StopStreamEncryptionError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: StopStreamEncryptionError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: StopStreamEncryptionError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object StopStreamEncryptionError extends ErrorSchema.Companion[StopStreamEncryptionError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): StopStreamEncryptionError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): StopStreamEncryptionError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): StopStreamEncryptionError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): StopStreamEncryptionError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): StopStreamEncryptionError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "StopStreamEncryptionError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends StopStreamEncryptionError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends StopStreamEncryptionError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends StopStreamEncryptionError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends StopStreamEncryptionError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends StopStreamEncryptionError { final def $ordinal: Int = 4 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StopStreamEncryptionError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), StopStreamEncryptionError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[StopStreamEncryptionError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StopStreamEncryptionError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), StopStreamEncryptionError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[StopStreamEncryptionError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StopStreamEncryptionError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), StopStreamEncryptionError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[StopStreamEncryptionError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StopStreamEncryptionError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), StopStreamEncryptionError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[StopStreamEncryptionError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[StopStreamEncryptionError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), StopStreamEncryptionError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[StopStreamEncryptionError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[StopStreamEncryptionError] = union(
StopStreamEncryptionError.AccessDeniedExceptionCase.alt,
StopStreamEncryptionError.InvalidArgumentExceptionCase.alt,
StopStreamEncryptionError.ResourceInUseExceptionCase.alt,
StopStreamEncryptionError.LimitExceededExceptionCase.alt,
StopStreamEncryptionError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[StopStreamEncryptionError] = throwable match {
case e: AccessDeniedException => Some(StopStreamEncryptionError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(StopStreamEncryptionError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(StopStreamEncryptionError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(StopStreamEncryptionError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(StopStreamEncryptionError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: StopStreamEncryptionError): Throwable = e match {
case StopStreamEncryptionError.AccessDeniedExceptionCase(e) => e
case StopStreamEncryptionError.InvalidArgumentExceptionCase(e) => e
case StopStreamEncryptionError.ResourceInUseExceptionCase(e) => e
case StopStreamEncryptionError.LimitExceededExceptionCase(e) => e
case StopStreamEncryptionError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class SubscribeToShard(input: SubscribeToShardInput) extends KinesisOperation[SubscribeToShardInput, KinesisOperation.SubscribeToShardError, SubscribeToShardOutput, Nothing, SubscribeToShardEventStream] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[SubscribeToShardInput, KinesisOperation.SubscribeToShardError, SubscribeToShardOutput, Nothing, SubscribeToShardEventStream] = impl.subscribeToShard(input.consumerARN, input.shardId, input.startingPosition)
def ordinal: Int = 26
def endpoint: smithy4s.Endpoint[KinesisOperation,SubscribeToShardInput, KinesisOperation.SubscribeToShardError, SubscribeToShardOutput, Nothing, SubscribeToShardEventStream] = SubscribeToShard
}
object SubscribeToShard extends smithy4s.Endpoint[KinesisOperation,SubscribeToShardInput, KinesisOperation.SubscribeToShardError, SubscribeToShardOutput, Nothing, SubscribeToShardEventStream] {
val schema: OperationSchema[SubscribeToShardInput, KinesisOperation.SubscribeToShardError, SubscribeToShardOutput, Nothing, SubscribeToShardEventStream] = Schema.operation(ShapeId("com.amazonaws.kinesis", "SubscribeToShard"))
.withInput(SubscribeToShardInput.schema)
.withError(SubscribeToShardError.errorSchema)
.withOutput(SubscribeToShardOutput.schema)
.withStreamedOutput(StreamingSchema("SubscribeToShardOutput", SubscribeToShardEventStream.schema.addHints(smithy.api.Documentation("The event stream that your consumer can use to read records from the shard.
"))))
.withHints(smithy.api.Documentation("This operation establishes an HTTP/2 connection between the consumer you specify in\n the ConsumerARN
parameter and the shard you specify in the\n ShardId
parameter. After the connection is successfully established,\n Kinesis Data Streams pushes records from the shard to the consumer over this connection.\n Before you call this operation, call RegisterStreamConsumer to\n register the consumer with Kinesis Data Streams.
\n When the SubscribeToShard
call succeeds, your consumer starts receiving\n events of type SubscribeToShardEvent over the HTTP/2 connection for up\n to 5 minutes, after which time you need to call SubscribeToShard
again to\n renew the subscription if you want to continue to receive records.
\n You can make one call to SubscribeToShard
per second per registered\n consumer per shard. For example, if you have a 4000 shard stream and two registered\n stream consumers, you can make one SubscribeToShard
request per second for\n each combination of shard and registered consumer, allowing you to subscribe both\n consumers to all 4000 shards in one second.
\n If you call SubscribeToShard
again with the same ConsumerARN
\n and ShardId
within 5 seconds of a successful call, you\'ll get a\n ResourceInUseException
. If you call SubscribeToShard
5\n seconds or more after a successful call, the second call takes over the subscription and\n the previous connection expires or fails with a\n ResourceInUseException
.
\n For an example of how to use this operations, see Enhanced Fan-Out\n Using the Kinesis Data Streams API.
"))
def wrap(input: SubscribeToShardInput): SubscribeToShard = SubscribeToShard(input)
}
sealed trait SubscribeToShardError extends scala.Product with scala.Serializable { self =>
@inline final def widen: SubscribeToShardError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = SubscribeToShardError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def invalidArgumentException: Option[InvalidArgumentException] = SubscribeToShardError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = SubscribeToShardError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = SubscribeToShardError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = SubscribeToShardError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: SubscribeToShardError.Visitor[A]): A = this match {
case value: SubscribeToShardError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: SubscribeToShardError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: SubscribeToShardError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: SubscribeToShardError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: SubscribeToShardError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object SubscribeToShardError extends ErrorSchema.Companion[SubscribeToShardError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): SubscribeToShardError = AccessDeniedExceptionCase(accessDeniedException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): SubscribeToShardError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): SubscribeToShardError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): SubscribeToShardError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): SubscribeToShardError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "SubscribeToShardError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends SubscribeToShardError { final def $ordinal: Int = 0 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends SubscribeToShardError { final def $ordinal: Int = 1 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends SubscribeToShardError { final def $ordinal: Int = 2 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends SubscribeToShardError { final def $ordinal: Int = 3 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends SubscribeToShardError { final def $ordinal: Int = 4 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SubscribeToShardError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), SubscribeToShardError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[SubscribeToShardError]("AccessDeniedException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SubscribeToShardError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), SubscribeToShardError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[SubscribeToShardError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SubscribeToShardError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), SubscribeToShardError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[SubscribeToShardError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SubscribeToShardError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), SubscribeToShardError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[SubscribeToShardError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[SubscribeToShardError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), SubscribeToShardError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[SubscribeToShardError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[SubscribeToShardError] = union(
SubscribeToShardError.AccessDeniedExceptionCase.alt,
SubscribeToShardError.InvalidArgumentExceptionCase.alt,
SubscribeToShardError.ResourceInUseExceptionCase.alt,
SubscribeToShardError.LimitExceededExceptionCase.alt,
SubscribeToShardError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[SubscribeToShardError] = throwable match {
case e: AccessDeniedException => Some(SubscribeToShardError.AccessDeniedExceptionCase(e))
case e: InvalidArgumentException => Some(SubscribeToShardError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(SubscribeToShardError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(SubscribeToShardError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(SubscribeToShardError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: SubscribeToShardError): Throwable = e match {
case SubscribeToShardError.AccessDeniedExceptionCase(e) => e
case SubscribeToShardError.InvalidArgumentExceptionCase(e) => e
case SubscribeToShardError.ResourceInUseExceptionCase(e) => e
case SubscribeToShardError.LimitExceededExceptionCase(e) => e
case SubscribeToShardError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class UpdateShardCount(input: UpdateShardCountInput) extends KinesisOperation[UpdateShardCountInput, KinesisOperation.UpdateShardCountError, UpdateShardCountOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[UpdateShardCountInput, KinesisOperation.UpdateShardCountError, UpdateShardCountOutput, Nothing, Nothing] = impl.updateShardCount(input.targetShardCount, input.scalingType, input.streamName, input.streamARN)
def ordinal: Int = 27
def endpoint: smithy4s.Endpoint[KinesisOperation,UpdateShardCountInput, KinesisOperation.UpdateShardCountError, UpdateShardCountOutput, Nothing, Nothing] = UpdateShardCount
}
object UpdateShardCount extends smithy4s.Endpoint[KinesisOperation,UpdateShardCountInput, KinesisOperation.UpdateShardCountError, UpdateShardCountOutput, Nothing, Nothing] {
val schema: OperationSchema[UpdateShardCountInput, KinesisOperation.UpdateShardCountError, UpdateShardCountOutput, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "UpdateShardCount"))
.withInput(UpdateShardCountInput.schema)
.withError(UpdateShardCountError.errorSchema)
.withOutput(UpdateShardCountOutput.schema)
.withHints(smithy.api.Documentation("Updates the shard count of the specified stream to the specified number of shards.\n This API is only supported for the data streams with the provisioned capacity\n mode.
\n \n When invoking this API, it is recommended you use the StreamARN
input\n parameter rather than the StreamName
input parameter.
\n \n Updating the shard count is an asynchronous operation. Upon receiving the request,\n Kinesis Data Streams returns immediately and sets the status of the stream to\n UPDATING
. After the update is complete, Kinesis Data Streams sets the\n status of the stream back to ACTIVE
. Depending on the size of the stream,\n the scaling action could take a few minutes to complete. You can continue to read and\n write data to your stream while its status is UPDATING
.
\n To update the shard count, Kinesis Data Streams performs splits or merges on\n individual shards. This can cause short-lived shards to be created, in addition to the\n final shards. These short-lived shards count towards your total shard limit for your\n account in the Region.
\n When using this operation, we recommend that you specify a target shard count that is\n a multiple of 25% (25%, 50%, 75%, 100%). You can specify any target value within your\n shard limit. However, if you specify a target that isn\'t a multiple of 25%, the scaling\n action might take longer to complete.
\n This operation has the following default limits. By default, you cannot do the\n following:
\n \n - \n
Scale more than ten times per rolling 24-hour period per stream
\n \n - \n
Scale up to more than double your current shard count for a stream
\n \n - \n
Scale down below half your current shard count for a stream
\n \n - \n
Scale up to more than 10000 shards in a stream
\n \n - \n
Scale a stream with more than 10000 shards down unless the result is less than\n 10000 shards
\n \n - \n
Scale up to more than the shard limit for your account
\n \n
\n For the default limits for an Amazon Web Services account, see Streams\n Limits in the Amazon Kinesis Data Streams Developer\n Guide. To request an increase in the call rate limit, the shard limit for\n this API, or your overall shard limit, use the limits form.
"))
def wrap(input: UpdateShardCountInput): UpdateShardCount = UpdateShardCount(input)
}
sealed trait UpdateShardCountError extends scala.Product with scala.Serializable { self =>
@inline final def widen: UpdateShardCountError = this
def $ordinal: Int
object project {
def accessDeniedException: Option[AccessDeniedException] = UpdateShardCountError.AccessDeniedExceptionCase.alt.project.lift(self).map(_.accessDeniedException)
def validationException: Option[ValidationException] = UpdateShardCountError.ValidationExceptionCase.alt.project.lift(self).map(_.validationException)
def invalidArgumentException: Option[InvalidArgumentException] = UpdateShardCountError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = UpdateShardCountError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = UpdateShardCountError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = UpdateShardCountError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: UpdateShardCountError.Visitor[A]): A = this match {
case value: UpdateShardCountError.AccessDeniedExceptionCase => visitor.accessDeniedException(value.accessDeniedException)
case value: UpdateShardCountError.ValidationExceptionCase => visitor.validationException(value.validationException)
case value: UpdateShardCountError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: UpdateShardCountError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: UpdateShardCountError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: UpdateShardCountError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object UpdateShardCountError extends ErrorSchema.Companion[UpdateShardCountError] {
def accessDeniedException(accessDeniedException: AccessDeniedException): UpdateShardCountError = AccessDeniedExceptionCase(accessDeniedException)
def validationException(validationException: ValidationException): UpdateShardCountError = ValidationExceptionCase(validationException)
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): UpdateShardCountError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): UpdateShardCountError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): UpdateShardCountError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): UpdateShardCountError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "UpdateShardCountError")
val hints: Hints = Hints.empty
final case class AccessDeniedExceptionCase(accessDeniedException: AccessDeniedException) extends UpdateShardCountError { final def $ordinal: Int = 0 }
final case class ValidationExceptionCase(validationException: ValidationException) extends UpdateShardCountError { final def $ordinal: Int = 1 }
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends UpdateShardCountError { final def $ordinal: Int = 2 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends UpdateShardCountError { final def $ordinal: Int = 3 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends UpdateShardCountError { final def $ordinal: Int = 4 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends UpdateShardCountError { final def $ordinal: Int = 5 }
object AccessDeniedExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateShardCountError.AccessDeniedExceptionCase] = bijection(AccessDeniedException.schema.addHints(hints), UpdateShardCountError.AccessDeniedExceptionCase(_), _.accessDeniedException)
val alt = schema.oneOf[UpdateShardCountError]("AccessDeniedException")
}
object ValidationExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateShardCountError.ValidationExceptionCase] = bijection(ValidationException.schema.addHints(hints), UpdateShardCountError.ValidationExceptionCase(_), _.validationException)
val alt = schema.oneOf[UpdateShardCountError]("ValidationException")
}
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateShardCountError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), UpdateShardCountError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[UpdateShardCountError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateShardCountError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), UpdateShardCountError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[UpdateShardCountError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateShardCountError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), UpdateShardCountError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[UpdateShardCountError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateShardCountError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), UpdateShardCountError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[UpdateShardCountError]("ResourceNotFoundException")
}
trait Visitor[A] {
def accessDeniedException(value: AccessDeniedException): A
def validationException(value: ValidationException): A
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def accessDeniedException(value: AccessDeniedException): A = default
def validationException(value: ValidationException): A = default
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[UpdateShardCountError] = union(
UpdateShardCountError.AccessDeniedExceptionCase.alt,
UpdateShardCountError.ValidationExceptionCase.alt,
UpdateShardCountError.InvalidArgumentExceptionCase.alt,
UpdateShardCountError.ResourceInUseExceptionCase.alt,
UpdateShardCountError.LimitExceededExceptionCase.alt,
UpdateShardCountError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[UpdateShardCountError] = throwable match {
case e: AccessDeniedException => Some(UpdateShardCountError.AccessDeniedExceptionCase(e))
case e: ValidationException => Some(UpdateShardCountError.ValidationExceptionCase(e))
case e: InvalidArgumentException => Some(UpdateShardCountError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(UpdateShardCountError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(UpdateShardCountError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(UpdateShardCountError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: UpdateShardCountError): Throwable = e match {
case UpdateShardCountError.AccessDeniedExceptionCase(e) => e
case UpdateShardCountError.ValidationExceptionCase(e) => e
case UpdateShardCountError.InvalidArgumentExceptionCase(e) => e
case UpdateShardCountError.ResourceInUseExceptionCase(e) => e
case UpdateShardCountError.LimitExceededExceptionCase(e) => e
case UpdateShardCountError.ResourceNotFoundExceptionCase(e) => e
}
}
final case class UpdateStreamMode(input: UpdateStreamModeInput) extends KinesisOperation[UpdateStreamModeInput, KinesisOperation.UpdateStreamModeError, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: KinesisGen[F]): F[UpdateStreamModeInput, KinesisOperation.UpdateStreamModeError, Unit, Nothing, Nothing] = impl.updateStreamMode(input.streamARN, input.streamModeDetails)
def ordinal: Int = 28
def endpoint: smithy4s.Endpoint[KinesisOperation,UpdateStreamModeInput, KinesisOperation.UpdateStreamModeError, Unit, Nothing, Nothing] = UpdateStreamMode
}
object UpdateStreamMode extends smithy4s.Endpoint[KinesisOperation,UpdateStreamModeInput, KinesisOperation.UpdateStreamModeError, Unit, Nothing, Nothing] {
val schema: OperationSchema[UpdateStreamModeInput, KinesisOperation.UpdateStreamModeError, Unit, Nothing, Nothing] = Schema.operation(ShapeId("com.amazonaws.kinesis", "UpdateStreamMode"))
.withInput(UpdateStreamModeInput.schema)
.withError(UpdateStreamModeError.errorSchema)
.withOutput(unit)
.withHints(smithy.api.Documentation(" Updates the capacity mode of the data stream. Currently, in Kinesis Data Streams, you\n can choose between an on-demand capacity mode and a\n provisioned capacity mode for your data stream.\n
"))
def wrap(input: UpdateStreamModeInput): UpdateStreamMode = UpdateStreamMode(input)
}
sealed trait UpdateStreamModeError extends scala.Product with scala.Serializable { self =>
@inline final def widen: UpdateStreamModeError = this
def $ordinal: Int
object project {
def invalidArgumentException: Option[InvalidArgumentException] = UpdateStreamModeError.InvalidArgumentExceptionCase.alt.project.lift(self).map(_.invalidArgumentException)
def resourceInUseException: Option[ResourceInUseException] = UpdateStreamModeError.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException)
def limitExceededException: Option[LimitExceededException] = UpdateStreamModeError.LimitExceededExceptionCase.alt.project.lift(self).map(_.limitExceededException)
def resourceNotFoundException: Option[ResourceNotFoundException] = UpdateStreamModeError.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException)
}
def accept[A](visitor: UpdateStreamModeError.Visitor[A]): A = this match {
case value: UpdateStreamModeError.InvalidArgumentExceptionCase => visitor.invalidArgumentException(value.invalidArgumentException)
case value: UpdateStreamModeError.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException)
case value: UpdateStreamModeError.LimitExceededExceptionCase => visitor.limitExceededException(value.limitExceededException)
case value: UpdateStreamModeError.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException)
}
}
object UpdateStreamModeError extends ErrorSchema.Companion[UpdateStreamModeError] {
def invalidArgumentException(invalidArgumentException: InvalidArgumentException): UpdateStreamModeError = InvalidArgumentExceptionCase(invalidArgumentException)
def resourceInUseException(resourceInUseException: ResourceInUseException): UpdateStreamModeError = ResourceInUseExceptionCase(resourceInUseException)
def limitExceededException(limitExceededException: LimitExceededException): UpdateStreamModeError = LimitExceededExceptionCase(limitExceededException)
def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): UpdateStreamModeError = ResourceNotFoundExceptionCase(resourceNotFoundException)
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "UpdateStreamModeError")
val hints: Hints = Hints.empty
final case class InvalidArgumentExceptionCase(invalidArgumentException: InvalidArgumentException) extends UpdateStreamModeError { final def $ordinal: Int = 0 }
final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends UpdateStreamModeError { final def $ordinal: Int = 1 }
final case class LimitExceededExceptionCase(limitExceededException: LimitExceededException) extends UpdateStreamModeError { final def $ordinal: Int = 2 }
final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends UpdateStreamModeError { final def $ordinal: Int = 3 }
object InvalidArgumentExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateStreamModeError.InvalidArgumentExceptionCase] = bijection(InvalidArgumentException.schema.addHints(hints), UpdateStreamModeError.InvalidArgumentExceptionCase(_), _.invalidArgumentException)
val alt = schema.oneOf[UpdateStreamModeError]("InvalidArgumentException")
}
object ResourceInUseExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateStreamModeError.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), UpdateStreamModeError.ResourceInUseExceptionCase(_), _.resourceInUseException)
val alt = schema.oneOf[UpdateStreamModeError]("ResourceInUseException")
}
object LimitExceededExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateStreamModeError.LimitExceededExceptionCase] = bijection(LimitExceededException.schema.addHints(hints), UpdateStreamModeError.LimitExceededExceptionCase(_), _.limitExceededException)
val alt = schema.oneOf[UpdateStreamModeError]("LimitExceededException")
}
object ResourceNotFoundExceptionCase {
val hints: Hints = Hints.empty
val schema: Schema[UpdateStreamModeError.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), UpdateStreamModeError.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException)
val alt = schema.oneOf[UpdateStreamModeError]("ResourceNotFoundException")
}
trait Visitor[A] {
def invalidArgumentException(value: InvalidArgumentException): A
def resourceInUseException(value: ResourceInUseException): A
def limitExceededException(value: LimitExceededException): A
def resourceNotFoundException(value: ResourceNotFoundException): A
}
object Visitor {
trait Default[A] extends Visitor[A] {
def default: A
def invalidArgumentException(value: InvalidArgumentException): A = default
def resourceInUseException(value: ResourceInUseException): A = default
def limitExceededException(value: LimitExceededException): A = default
def resourceNotFoundException(value: ResourceNotFoundException): A = default
}
}
implicit val schema: Schema[UpdateStreamModeError] = union(
UpdateStreamModeError.InvalidArgumentExceptionCase.alt,
UpdateStreamModeError.ResourceInUseExceptionCase.alt,
UpdateStreamModeError.LimitExceededExceptionCase.alt,
UpdateStreamModeError.ResourceNotFoundExceptionCase.alt,
){
_.$ordinal
}
def liftError(throwable: Throwable): Option[UpdateStreamModeError] = throwable match {
case e: InvalidArgumentException => Some(UpdateStreamModeError.InvalidArgumentExceptionCase(e))
case e: ResourceInUseException => Some(UpdateStreamModeError.ResourceInUseExceptionCase(e))
case e: LimitExceededException => Some(UpdateStreamModeError.LimitExceededExceptionCase(e))
case e: ResourceNotFoundException => Some(UpdateStreamModeError.ResourceNotFoundExceptionCase(e))
case _ => None
}
def unliftError(e: UpdateStreamModeError): Throwable = e match {
case UpdateStreamModeError.InvalidArgumentExceptionCase(e) => e
case UpdateStreamModeError.ResourceInUseExceptionCase(e) => e
case UpdateStreamModeError.LimitExceededExceptionCase(e) => e
case UpdateStreamModeError.ResourceNotFoundExceptionCase(e) => e
}
}
}