/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Kinesis { namespace Model { /** *

The unit of data of the Kinesis data stream, which is composed of a sequence * number, a partition key, and a data blob.

See Also:

AWS API * Reference

*/ class AWS_KINESIS_API Record { public: Record(); Record(Aws::Utils::Json::JsonView jsonValue); Record& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

The unique identifier of the record within its shard.

*/ inline const Aws::String& GetSequenceNumber() const{ return m_sequenceNumber; } /** *

The unique identifier of the record within its shard.

*/ inline bool SequenceNumberHasBeenSet() const { return m_sequenceNumberHasBeenSet; } /** *

The unique identifier of the record within its shard.

*/ inline void SetSequenceNumber(const Aws::String& value) { m_sequenceNumberHasBeenSet = true; m_sequenceNumber = value; } /** *

The unique identifier of the record within its shard.

*/ inline void SetSequenceNumber(Aws::String&& value) { m_sequenceNumberHasBeenSet = true; m_sequenceNumber = std::move(value); } /** *

The unique identifier of the record within its shard.

*/ inline void SetSequenceNumber(const char* value) { m_sequenceNumberHasBeenSet = true; m_sequenceNumber.assign(value); } /** *

The unique identifier of the record within its shard.

*/ inline Record& WithSequenceNumber(const Aws::String& value) { SetSequenceNumber(value); return *this;} /** *

The unique identifier of the record within its shard.

*/ inline Record& WithSequenceNumber(Aws::String&& value) { SetSequenceNumber(std::move(value)); return *this;} /** *

The unique identifier of the record within its shard.

*/ inline Record& WithSequenceNumber(const char* value) { SetSequenceNumber(value); return *this;} /** *

The approximate time that the record was inserted into the stream.

*/ inline const Aws::Utils::DateTime& GetApproximateArrivalTimestamp() const{ return m_approximateArrivalTimestamp; } /** *

The approximate time that the record was inserted into the stream.

*/ inline bool ApproximateArrivalTimestampHasBeenSet() const { return m_approximateArrivalTimestampHasBeenSet; } /** *

The approximate time that the record was inserted into the stream.

*/ inline void SetApproximateArrivalTimestamp(const Aws::Utils::DateTime& value) { m_approximateArrivalTimestampHasBeenSet = true; m_approximateArrivalTimestamp = value; } /** *

The approximate time that the record was inserted into the stream.

*/ inline void SetApproximateArrivalTimestamp(Aws::Utils::DateTime&& value) { m_approximateArrivalTimestampHasBeenSet = true; m_approximateArrivalTimestamp = std::move(value); } /** *

The approximate time that the record was inserted into the stream.

*/ inline Record& WithApproximateArrivalTimestamp(const Aws::Utils::DateTime& value) { SetApproximateArrivalTimestamp(value); return *this;} /** *

The approximate time that the record was inserted into the stream.

*/ inline Record& WithApproximateArrivalTimestamp(Aws::Utils::DateTime&& value) { SetApproximateArrivalTimestamp(std::move(value)); return *this;} /** *

The data blob. The data in the blob is both opaque and immutable to Kinesis * Data Streams, which does not inspect, interpret, or change the data in the blob * in any way. 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).

*/ inline const Aws::Utils::ByteBuffer& GetData() const{ return m_data; } /** *

The data blob. The data in the blob is both opaque and immutable to Kinesis * Data Streams, which does not inspect, interpret, or change the data in the blob * in any way. 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).

*/ inline bool DataHasBeenSet() const { return m_dataHasBeenSet; } /** *

The data blob. The data in the blob is both opaque and immutable to Kinesis * Data Streams, which does not inspect, interpret, or change the data in the blob * in any way. 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).

*/ inline void SetData(const Aws::Utils::ByteBuffer& value) { m_dataHasBeenSet = true; m_data = value; } /** *

The data blob. The data in the blob is both opaque and immutable to Kinesis * Data Streams, which does not inspect, interpret, or change the data in the blob * in any way. 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).

*/ inline void SetData(Aws::Utils::ByteBuffer&& value) { m_dataHasBeenSet = true; m_data = std::move(value); } /** *

The data blob. The data in the blob is both opaque and immutable to Kinesis * Data Streams, which does not inspect, interpret, or change the data in the blob * in any way. 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).

*/ inline Record& WithData(const Aws::Utils::ByteBuffer& value) { SetData(value); return *this;} /** *

The data blob. The data in the blob is both opaque and immutable to Kinesis * Data Streams, which does not inspect, interpret, or change the data in the blob * in any way. 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).

*/ inline Record& WithData(Aws::Utils::ByteBuffer&& value) { SetData(std::move(value)); return *this;} /** *

Identifies which shard in the stream the data record is assigned to.

*/ inline const Aws::String& GetPartitionKey() const{ return m_partitionKey; } /** *

Identifies which shard in the stream the data record is assigned to.

*/ inline bool PartitionKeyHasBeenSet() const { return m_partitionKeyHasBeenSet; } /** *

Identifies which shard in the stream the data record is assigned to.

*/ inline void SetPartitionKey(const Aws::String& value) { m_partitionKeyHasBeenSet = true; m_partitionKey = value; } /** *

Identifies which shard in the stream the data record is assigned to.

*/ inline void SetPartitionKey(Aws::String&& value) { m_partitionKeyHasBeenSet = true; m_partitionKey = std::move(value); } /** *

Identifies which shard in the stream the data record is assigned to.

*/ inline void SetPartitionKey(const char* value) { m_partitionKeyHasBeenSet = true; m_partitionKey.assign(value); } /** *

Identifies which shard in the stream the data record is assigned to.

*/ inline Record& WithPartitionKey(const Aws::String& value) { SetPartitionKey(value); return *this;} /** *

Identifies which shard in the stream the data record is assigned to.

*/ inline Record& WithPartitionKey(Aws::String&& value) { SetPartitionKey(std::move(value)); return *this;} /** *

Identifies which shard in the stream the data record is assigned to.

*/ inline Record& WithPartitionKey(const char* value) { SetPartitionKey(value); return *this;} /** *

The encryption type used on the record. This parameter can be one of the * following values:

  • NONE: Do not encrypt the * records in the stream.

  • KMS: Use server-side * encryption on the records in the stream using a customer-managed AWS KMS * key.

*/ inline const EncryptionType& GetEncryptionType() const{ return m_encryptionType; } /** *

The encryption type used on the record. This parameter can be one of the * following values:

  • NONE: Do not encrypt the * records in the stream.

  • KMS: Use server-side * encryption on the records in the stream using a customer-managed AWS KMS * key.

*/ inline bool EncryptionTypeHasBeenSet() const { return m_encryptionTypeHasBeenSet; } /** *

The encryption type used on the record. This parameter can be one of the * following values:

  • NONE: Do not encrypt the * records in the stream.

  • KMS: Use server-side * encryption on the records in the stream using a customer-managed AWS KMS * key.

*/ inline void SetEncryptionType(const EncryptionType& value) { m_encryptionTypeHasBeenSet = true; m_encryptionType = value; } /** *

The encryption type used on the record. This parameter can be one of the * following values:

  • NONE: Do not encrypt the * records in the stream.

  • KMS: Use server-side * encryption on the records in the stream using a customer-managed AWS KMS * key.

*/ inline void SetEncryptionType(EncryptionType&& value) { m_encryptionTypeHasBeenSet = true; m_encryptionType = std::move(value); } /** *

The encryption type used on the record. This parameter can be one of the * following values:

  • NONE: Do not encrypt the * records in the stream.

  • KMS: Use server-side * encryption on the records in the stream using a customer-managed AWS KMS * key.

*/ inline Record& WithEncryptionType(const EncryptionType& value) { SetEncryptionType(value); return *this;} /** *

The encryption type used on the record. This parameter can be one of the * following values:

  • NONE: Do not encrypt the * records in the stream.

  • KMS: Use server-side * encryption on the records in the stream using a customer-managed AWS KMS * key.

*/ inline Record& WithEncryptionType(EncryptionType&& value) { SetEncryptionType(std::move(value)); return *this;} private: Aws::String m_sequenceNumber; bool m_sequenceNumberHasBeenSet; Aws::Utils::DateTime m_approximateArrivalTimestamp; bool m_approximateArrivalTimestampHasBeenSet; Aws::Utils::ByteBuffer m_data; bool m_dataHasBeenSet; Aws::String m_partitionKey; bool m_partitionKeyHasBeenSet; EncryptionType m_encryptionType; bool m_encryptionTypeHasBeenSet; }; } // namespace Model } // namespace Kinesis } // namespace Aws