MonitoringJobDefinition.fromJson constructor
MonitoringJobDefinition.fromJson(
- Map<String, dynamic> json
)
Implementation
factory MonitoringJobDefinition.fromJson(Map<String, dynamic> json) {
return MonitoringJobDefinition(
monitoringAppSpecification: MonitoringAppSpecification.fromJson(
json['MonitoringAppSpecification'] as Map<String, dynamic>),
monitoringInputs: (json['MonitoringInputs'] as List)
.whereNotNull()
.map((e) => MonitoringInput.fromJson(e as Map<String, dynamic>))
.toList(),
monitoringOutputConfig: MonitoringOutputConfig.fromJson(
json['MonitoringOutputConfig'] as Map<String, dynamic>),
monitoringResources: MonitoringResources.fromJson(
json['MonitoringResources'] as Map<String, dynamic>),
roleArn: json['RoleArn'] as String,
baselineConfig: json['BaselineConfig'] != null
? MonitoringBaselineConfig.fromJson(
json['BaselineConfig'] as Map<String, dynamic>)
: null,
environment: (json['Environment'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
networkConfig: json['NetworkConfig'] != null
? NetworkConfig.fromJson(
json['NetworkConfig'] as Map<String, dynamic>)
: null,
stoppingCondition: json['StoppingCondition'] != null
? MonitoringStoppingCondition.fromJson(
json['StoppingCondition'] as Map<String, dynamic>)
: null,
);
}