Operation.fromJson constructor
Operation.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Operation.fromJson(Map<String, dynamic> json) {
return Operation(
createdAt: timeStampFromJson(json['createdAt']),
errorCode: json['errorCode'] as String?,
errorDetails: json['errorDetails'] as String?,
id: json['id'] as String?,
isTerminal: json['isTerminal'] as bool?,
location: json['location'] != null
? ResourceLocation.fromJson(json['location'] as Map<String, dynamic>)
: null,
operationDetails: json['operationDetails'] as String?,
operationType: (json['operationType'] as String?)?.toOperationType(),
resourceName: json['resourceName'] as String?,
resourceType: (json['resourceType'] as String?)?.toResourceType(),
status: (json['status'] as String?)?.toOperationStatus(),
statusChangedAt: timeStampFromJson(json['statusChangedAt']),
);
}