stream-events.js
function _validateKinesisStreamEventRecord(record) {
  if (!record.kinesis) {
    throw new Error(`Missing kinesis property for Kinesis stream event record (${record.eventID})`);
  }
  if (!record.kinesis.data) {
    throw new Error(`Missing data property for Kinesis stream event record (${record.eventID})`);
  }
  if (!record.kinesis.partitionKey) {
    throw new Error(`Missing partitionKey property for Kinesis stream event record (${record.eventID})`);
  }
  if (!record.kinesis.sequenceNumber) {
    throw new Error(`Missing sequenceNumber property for Kinesis stream event record (${record.eventID})`);
  }
}
function _validateKinesisStreamEventRecord(record) {
  if (!record.kinesis) {
    throw new Error(`Missing kinesis property for Kinesis stream event record (${record.eventID})`);
  }
  if (!record.kinesis.data) {
    throw new Error(`Missing data property for Kinesis stream event record (${record.eventID})`);
  }
  if (!record.kinesis.partitionKey) {
    throw new Error(`Missing partitionKey property for Kinesis stream event record (${record.eventID})`);
  }
  if (!record.kinesis.sequenceNumber) {
    throw new Error(`Missing sequenceNumber property for Kinesis stream event record (${record.eventID})`);
  }
}
function _validateKinesisStreamEventRecord ( record ) { if ( ! record . kinesis ) { throw new Error ( ` ${ record . eventID } ` ) ; } if ( ! record . kinesis . data ) { throw new Error ( ` ${ record . eventID } ` ) ; } if ( ! record . kinesis . partitionKey ) { throw new Error ( ` ${ record . eventID } ` ) ; } if ( ! record . kinesis . sequenceNumber ) { throw new Error ( ` ${ record . eventID } ` ) ; } }
Validates the given Kinesis stream event record.
@param {KinesisEventRecord|*} record - a Kinesis stream event record
@private
Validates the given Kinesis stream event record .