toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final id = this.id;
  final messageBody = this.messageBody;
  final delaySeconds = this.delaySeconds;
  final messageAttributes = this.messageAttributes;
  final messageDeduplicationId = this.messageDeduplicationId;
  final messageGroupId = this.messageGroupId;
  final messageSystemAttributes = this.messageSystemAttributes;
  return {
    'Id': id,
    'MessageBody': messageBody,
    if (delaySeconds != null) 'DelaySeconds': delaySeconds,
    if (messageAttributes != null) 'MessageAttribute': messageAttributes,
    if (messageDeduplicationId != null)
      'MessageDeduplicationId': messageDeduplicationId,
    if (messageGroupId != null) 'MessageGroupId': messageGroupId,
    if (messageSystemAttributes != null)
      'MessageSystemAttribute':
          messageSystemAttributes.map((k, e) => MapEntry(k.toValue(), e)),
  };
}