SegmentResponse.fromJson constructor

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

Implementation

factory SegmentResponse.fromJson(Map<String, dynamic> json) {
  return SegmentResponse(
    applicationId: json['ApplicationId'] as String,
    arn: json['Arn'] as String,
    creationDate: json['CreationDate'] as String,
    id: json['Id'] as String,
    segmentType: (json['SegmentType'] as String).toSegmentType(),
    dimensions: json['Dimensions'] != null
        ? SegmentDimensions.fromJson(
            json['Dimensions'] as Map<String, dynamic>)
        : null,
    importDefinition: json['ImportDefinition'] != null
        ? SegmentImportResource.fromJson(
            json['ImportDefinition'] as Map<String, dynamic>)
        : null,
    lastModifiedDate: json['LastModifiedDate'] as String?,
    name: json['Name'] as String?,
    segmentGroups: json['SegmentGroups'] != null
        ? SegmentGroupList.fromJson(
            json['SegmentGroups'] as Map<String, dynamic>)
        : null,
    version: json['Version'] as int?,
    tags: (json['tags'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
  );
}