OSPolicyResource.fromJson constructor

OSPolicyResource.fromJson(
  1. Map _json
)

Implementation

OSPolicyResource.fromJson(core.Map _json)
    : this(
        exec: _json.containsKey('exec')
            ? OSPolicyResourceExecResource.fromJson(
                _json['exec'] as core.Map<core.String, core.dynamic>)
            : null,
        file: _json.containsKey('file')
            ? OSPolicyResourceFileResource.fromJson(
                _json['file'] as core.Map<core.String, core.dynamic>)
            : null,
        id: _json.containsKey('id') ? _json['id'] as core.String : null,
        pkg: _json.containsKey('pkg')
            ? OSPolicyResourcePackageResource.fromJson(
                _json['pkg'] as core.Map<core.String, core.dynamic>)
            : null,
        repository: _json.containsKey('repository')
            ? OSPolicyResourceRepositoryResource.fromJson(
                _json['repository'] as core.Map<core.String, core.dynamic>)
            : null,
      );