Environment.fromJson constructor

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

Implementation

factory Environment.fromJson(Map<String, dynamic> json) {
  return Environment(
    applicationId: json['ApplicationId'] as String?,
    description: json['Description'] as String?,
    id: json['Id'] as String?,
    monitors: (json['Monitors'] as List?)
        ?.whereNotNull()
        .map((e) => Monitor.fromJson(e as Map<String, dynamic>))
        .toList(),
    name: json['Name'] as String?,
    state: (json['State'] as String?)?.toEnvironmentState(),
  );
}