EventContext constructor

EventContext({
  1. Timestamp? timestamp,
  2. @Deprecated('This field is deprecated.') CommandContext? commandContext,
  3. Any? producerId,
  4. Version? version,
  5. Enrichment? enrichment,
  6. @Deprecated('This field is deprecated.') EventContext? eventContext,
  7. bool? external,
  8. @Deprecated('This field is deprecated.') CommandId? rootCommandId,
  9. RejectionEventContext? rejection,
  10. ActorContext? importContext,
  11. @Deprecated('This field is deprecated.') CommandId? commandId,
  12. @Deprecated('This field is deprecated.') EventId? eventId,
  13. Origin? pastMessage,
})

Implementation

factory EventContext({
  $4.Timestamp? timestamp,
@$core.Deprecated('This field is deprecated.')
  $43.CommandContext? commandContext,
  $5.Any? producerId,
  $40.Version? version,
  $44.Enrichment? enrichment,
@$core.Deprecated('This field is deprecated.')
  EventContext? eventContext,
  $core.bool? external,
@$core.Deprecated('This field is deprecated.')
  $43.CommandId? rootCommandId,
  RejectionEventContext? rejection,
  $41.ActorContext? importContext,
@$core.Deprecated('This field is deprecated.')
  $43.CommandId? commandId,
@$core.Deprecated('This field is deprecated.')
  EventId? eventId,
  $42.Origin? pastMessage,
}) {
  final _result = create();
  if (timestamp != null) {
    _result.timestamp = timestamp;
  }
  if (commandContext != null) {
    // ignore: deprecated_member_use_from_same_package
    _result.commandContext = commandContext;
  }
  if (producerId != null) {
    _result.producerId = producerId;
  }
  if (version != null) {
    _result.version = version;
  }
  if (enrichment != null) {
    _result.enrichment = enrichment;
  }
  if (eventContext != null) {
    // ignore: deprecated_member_use_from_same_package
    _result.eventContext = eventContext;
  }
  if (external != null) {
    _result.external = external;
  }
  if (rootCommandId != null) {
    // ignore: deprecated_member_use_from_same_package
    _result.rootCommandId = rootCommandId;
  }
  if (rejection != null) {
    _result.rejection = rejection;
  }
  if (importContext != null) {
    _result.importContext = importContext;
  }
  if (commandId != null) {
    // ignore: deprecated_member_use_from_same_package
    _result.commandId = commandId;
  }
  if (eventId != null) {
    // ignore: deprecated_member_use_from_same_package
    _result.eventId = eventId;
  }
  if (pastMessage != null) {
    _result.pastMessage = pastMessage;
  }
  return _result;
}