Channel.fromJson constructor

Channel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Channel.fromJson(Map<String, dynamic> json) {
  return Channel(
    channelName: json['ChannelName'] as String,
    dataSource:
        DataSource.fromJson(json['DataSource'] as Map<String, dynamic>),
    compressionType:
        (json['CompressionType'] as String?)?.toCompressionType(),
    contentType: json['ContentType'] as String?,
    inputMode: (json['InputMode'] as String?)?.toTrainingInputMode(),
    recordWrapperType:
        (json['RecordWrapperType'] as String?)?.toRecordWrapper(),
    shuffleConfig: json['ShuffleConfig'] != null
        ? ShuffleConfig.fromJson(
            json['ShuffleConfig'] as Map<String, dynamic>)
        : null,
  );
}