ParentReference.fromJson constructor

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

Creates a ParentReference from JSON data.

Implementation

factory ParentReference.fromJson(Map<String, dynamic> json) {
  final tempGroupJson = json['group'];
  final tempNameJson = json['name'];
  final tempNamespaceJson = json['namespace'];
  final tempResourceJson = json['resource'];
  final tempUidJson = json['uid'];

  final String? tempGroup = tempGroupJson;
  final String? tempName = tempNameJson;
  final String? tempNamespace = tempNamespaceJson;
  final String? tempResource = tempResourceJson;
  final String? tempUid = tempUidJson;

  return ParentReference(
    group: tempGroup,
    name: tempName,
    namespace: tempNamespace,
    resource: tempResource,
    uid: tempUid,
  );
}