All Downloads are FREE. Search and download functionalities are using the official Maven repository.

smithy4s.com.amazonaws.kinesis.Consumer.scala Maven / Gradle / Ivy

package com.amazonaws.kinesis

import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.Timestamp
import smithy4s.schema.Schema.struct
import smithy4s.schema.Schema.timestamp

/** 

An object that represents the details of the consumer you registered. This type of * object is returned by RegisterStreamConsumer.

* @param ConsumerName *

The name of the consumer is something you choose when you register the * consumer.

* @param ConsumerARN *

When you register a consumer, Kinesis Data Streams generates an ARN for it. You need * this ARN to be able to call SubscribeToShard.

*

If you delete a consumer and then create a new one with the same name, it won't have * the same ARN. That's because consumer ARNs contain the creation timestamp. This is * important to keep in mind if you have IAM policies that reference consumer ARNs.

* @param ConsumerStatus *

A consumer can't read data while in the CREATING or DELETING * states.

* @param ConsumerCreationTimestamp *

*/ final case class Consumer(consumerName: ConsumerName, consumerARN: ConsumerARN, consumerStatus: ConsumerStatus, consumerCreationTimestamp: Timestamp) object Consumer extends ShapeTag.Companion[Consumer] { val id: ShapeId = ShapeId("com.amazonaws.kinesis", "Consumer") val hints: Hints = Hints( smithy.api.Documentation("

An object that represents the details of the consumer you registered. This type of\n object is returned by RegisterStreamConsumer.

"), ).lazily // constructor using the original order from the spec private def make(consumerName: ConsumerName, consumerARN: ConsumerARN, consumerStatus: ConsumerStatus, consumerCreationTimestamp: Timestamp): Consumer = Consumer(consumerName, consumerARN, consumerStatus, consumerCreationTimestamp) implicit val schema: Schema[Consumer] = struct( ConsumerName.schema.required[Consumer]("ConsumerName", _.consumerName).addHints(smithy.api.Documentation("

The name of the consumer is something you choose when you register the\n consumer.

")), ConsumerARN.schema.required[Consumer]("ConsumerARN", _.consumerARN).addHints(smithy.api.Documentation("

When you register a consumer, Kinesis Data Streams generates an ARN for it. You need\n this ARN to be able to call SubscribeToShard.

\n

If you delete a consumer and then create a new one with the same name, it won\'t have\n the same ARN. That\'s because consumer ARNs contain the creation timestamp. This is\n important to keep in mind if you have IAM policies that reference consumer ARNs.

")), ConsumerStatus.schema.required[Consumer]("ConsumerStatus", _.consumerStatus).addHints(smithy.api.Documentation("

A consumer can\'t read data while in the CREATING or DELETING\n states.

")), timestamp.required[Consumer]("ConsumerCreationTimestamp", _.consumerCreationTimestamp).addHints(smithy.api.Documentation("

")), )(make).withId(id).addHints(hints) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy