TypedObjectReference.fromJson constructor

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

Creates a TypedObjectReference from JSON data.

Implementation

factory TypedObjectReference.fromJson(Map<String, dynamic> json) {
  final tempApiGroupJson = json['apiGroup'];
  final tempKindJson = json['kind'];
  final tempNameJson = json['name'];
  final tempNamespaceJson = json['namespace'];

  final String? tempApiGroup = tempApiGroupJson;
  final String tempKind = tempKindJson;
  final String tempName = tempNameJson;
  final String? tempNamespace = tempNamespaceJson;

  return TypedObjectReference(
    apiGroup: tempApiGroup,
    kind: tempKind,
    name: tempName,
    namespace: tempNamespace,
  );
}