Scale.fromJson constructor

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

Creates a Scale from JSON data.

Implementation

Scale.fromJson(Map<String, dynamic> json)
    : this(
        apiVersion: json['apiVersion'],
        kind: json['kind'],
        metadata: json['metadata'] != null
            ? ObjectMeta.fromJson(json['metadata'])
            : null,
        spec: json['spec'] != null ? ScaleSpec.fromJson(json['spec']) : null,
        status: json['status'] != null
            ? ScaleStatus.fromJson(json['status'])
            : null,
      );