ObjectMeta.fromJson constructor

ObjectMeta.fromJson(
  1. Map json_
)

Implementation

ObjectMeta.fromJson(core.Map json_)
    : this(
        annotations: json_.containsKey('annotations')
            ? (json_['annotations'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        clusterName: json_.containsKey('clusterName')
            ? json_['clusterName'] as core.String
            : null,
        creationTimestamp: json_.containsKey('creationTimestamp')
            ? json_['creationTimestamp'] as core.String
            : null,
        deletionGracePeriodSeconds:
            json_.containsKey('deletionGracePeriodSeconds')
                ? json_['deletionGracePeriodSeconds'] as core.int
                : null,
        deletionTimestamp: json_.containsKey('deletionTimestamp')
            ? json_['deletionTimestamp'] as core.String
            : null,
        finalizers: json_.containsKey('finalizers')
            ? (json_['finalizers'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        generateName: json_.containsKey('generateName')
            ? json_['generateName'] as core.String
            : null,
        generation: json_.containsKey('generation')
            ? json_['generation'] as core.int
            : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        namespace: json_.containsKey('namespace')
            ? json_['namespace'] as core.String
            : null,
        ownerReferences: json_.containsKey('ownerReferences')
            ? (json_['ownerReferences'] as core.List)
                .map((value) => OwnerReference.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        resourceVersion: json_.containsKey('resourceVersion')
            ? json_['resourceVersion'] as core.String
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        uid: json_.containsKey('uid') ? json_['uid'] as core.String : null,
      );