EventSourceMappingConfiguration.fromJson constructor
EventSourceMappingConfiguration.fromJson(
- Map<String, dynamic> json
)
Implementation
factory EventSourceMappingConfiguration.fromJson(Map<String, dynamic> json) {
return EventSourceMappingConfiguration(
batchSize: json['BatchSize'] as int?,
bisectBatchOnFunctionError: json['BisectBatchOnFunctionError'] as bool?,
destinationConfig: json['DestinationConfig'] != null
? DestinationConfig.fromJson(
json['DestinationConfig'] as Map<String, dynamic>)
: null,
eventSourceArn: json['EventSourceArn'] as String?,
functionArn: json['FunctionArn'] as String?,
functionResponseTypes: (json['FunctionResponseTypes'] as List?)
?.whereNotNull()
.map((e) => (e as String).toFunctionResponseType())
.toList(),
lastModified: timeStampFromJson(json['LastModified']),
lastProcessingResult: json['LastProcessingResult'] as String?,
maximumBatchingWindowInSeconds:
json['MaximumBatchingWindowInSeconds'] as int?,
maximumRecordAgeInSeconds: json['MaximumRecordAgeInSeconds'] as int?,
maximumRetryAttempts: json['MaximumRetryAttempts'] as int?,
parallelizationFactor: json['ParallelizationFactor'] as int?,
queues: (json['Queues'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
selfManagedEventSource: json['SelfManagedEventSource'] != null
? SelfManagedEventSource.fromJson(
json['SelfManagedEventSource'] as Map<String, dynamic>)
: null,
sourceAccessConfigurations: (json['SourceAccessConfigurations'] as List?)
?.whereNotNull()
.map((e) =>
SourceAccessConfiguration.fromJson(e as Map<String, dynamic>))
.toList(),
startingPosition:
(json['StartingPosition'] as String?)?.toEventSourcePosition(),
startingPositionTimestamp:
timeStampFromJson(json['StartingPositionTimestamp']),
state: json['State'] as String?,
stateTransitionReason: json['StateTransitionReason'] as String?,
topics: (json['Topics'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
tumblingWindowInSeconds: json['TumblingWindowInSeconds'] as int?,
uuid: json['UUID'] as String?,
);
}