ManagedFieldsEntry.fromJson constructor
Creates a ManagedFieldsEntry from JSON data.
Implementation
factory ManagedFieldsEntry.fromJson(Map<String, dynamic> json) {
final tempApiVersionJson = json['apiVersion'];
final tempFieldsTypeJson = json['fieldsType'];
final tempFieldsV1Json = json['fieldsV1'];
final tempManagerJson = json['manager'];
final tempOperationJson = json['operation'];
final tempSubresourceJson = json['subresource'];
final tempTimeJson = json['time'];
final String? tempApiVersion = tempApiVersionJson;
final String? tempFieldsType = tempFieldsTypeJson;
final FieldsV1? tempFieldsV1 =
tempFieldsV1Json != null ? FieldsV1.fromJson(tempFieldsV1Json) : null;
final String? tempManager = tempManagerJson;
final String? tempOperation = tempOperationJson;
final String? tempSubresource = tempSubresourceJson;
final DateTime? tempTime =
tempTimeJson != null ? DateTime.tryParse(tempTimeJson) : null;
return ManagedFieldsEntry(
apiVersion: tempApiVersion,
fieldsType: tempFieldsType,
fieldsV1: tempFieldsV1,
manager: tempManager,
operation: tempOperation,
subresource: tempSubresource,
time: tempTime,
);
}