ResourcePolicy.fromJson constructor

ResourcePolicy.fromJson(
  1. Map json_
)

Implementation

ResourcePolicy.fromJson(core.Map json_)
    : this(
        creationTimestamp: json_.containsKey('creationTimestamp')
            ? json_['creationTimestamp'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        diskConsistencyGroupPolicy:
            json_.containsKey('diskConsistencyGroupPolicy')
                ? ResourcePolicyDiskConsistencyGroupPolicy.fromJson(
                    json_['diskConsistencyGroupPolicy']
                        as core.Map<core.String, core.dynamic>)
                : null,
        groupPlacementPolicy: json_.containsKey('groupPlacementPolicy')
            ? ResourcePolicyGroupPlacementPolicy.fromJson(
                json_['groupPlacementPolicy']
                    as core.Map<core.String, core.dynamic>)
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        instanceSchedulePolicy: json_.containsKey('instanceSchedulePolicy')
            ? ResourcePolicyInstanceSchedulePolicy.fromJson(
                json_['instanceSchedulePolicy']
                    as core.Map<core.String, core.dynamic>)
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        region: json_.containsKey('region')
            ? json_['region'] as core.String
            : null,
        resourceStatus: json_.containsKey('resourceStatus')
            ? ResourcePolicyResourceStatus.fromJson(json_['resourceStatus']
                as core.Map<core.String, core.dynamic>)
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        snapshotSchedulePolicy: json_.containsKey('snapshotSchedulePolicy')
            ? ResourcePolicySnapshotSchedulePolicy.fromJson(
                json_['snapshotSchedulePolicy']
                    as core.Map<core.String, core.dynamic>)
            : null,
        status: json_.containsKey('status')
            ? json_['status'] as core.String
            : null,
      );