@Generated(value="software.amazon.awssdk:codegen") public class Record extends Object implements StructuredPojo, ToCopyableBuilder<Record.Builder,Record>
The unit of data of the Kinesis stream, which is composed of a sequence number, a partition key, and a data blob.
Modifier and Type | Class and Description |
---|---|
static interface |
Record.Builder |
Modifier and Type | Method and Description |
---|---|
Instant |
approximateArrivalTimestamp()
The approximate time that the record was inserted into the stream.
|
static Record.Builder |
builder() |
ByteBuffer |
data()
The data blob.
|
EncryptionType |
encryptionType()
The encryption type used on the record.
|
String |
encryptionTypeString()
The encryption type used on the record.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
String |
partitionKey()
Identifies which shard in the stream the data record is assigned to.
|
String |
sequenceNumber()
The unique identifier of the record within its shard.
|
static Class<? extends Record.Builder> |
serializableBuilderClass() |
Record.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
copy
public String sequenceNumber()
The unique identifier of the record within its shard.
public Instant approximateArrivalTimestamp()
The approximate time that the record was inserted into the stream.
public ByteBuffer data()
The data blob. The data in the blob is both opaque and immutable to Kinesis 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 MB).
This method will return a new read-only ByteBuffer
each time it is invoked.
public String partitionKey()
Identifies which shard in the stream the data record is assigned to.
public EncryptionType 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 KMS key.
If the service returns an enum value that is not available in the current SDK version, encryptionType
will return EncryptionType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from encryptionTypeString()
.
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in the stream using a customer-managed KMS
key.
EncryptionType
public String encryptionTypeString()
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 KMS key.
If the service returns an enum value that is not available in the current SDK version, encryptionType
will return EncryptionType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from encryptionTypeString()
.
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in the stream using a customer-managed KMS
key.
EncryptionType
public Record.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<Record.Builder,Record>
public static Record.Builder builder()
public static Class<? extends Record.Builder> serializableBuilderClass()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.