OSPolicyAssignmentInstanceFilter.fromJson constructor

OSPolicyAssignmentInstanceFilter.fromJson(
  1. Map _json
)

Implementation

OSPolicyAssignmentInstanceFilter.fromJson(core.Map _json)
    : this(
        all: _json.containsKey('all') ? _json['all'] as core.bool : null,
        exclusionLabels: _json.containsKey('exclusionLabels')
            ? (_json['exclusionLabels'] as core.List)
                .map<OSPolicyAssignmentLabelSet>((value) =>
                    OSPolicyAssignmentLabelSet.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        inclusionLabels: _json.containsKey('inclusionLabels')
            ? (_json['inclusionLabels'] as core.List)
                .map<OSPolicyAssignmentLabelSet>((value) =>
                    OSPolicyAssignmentLabelSet.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        inventories: _json.containsKey('inventories')
            ? (_json['inventories'] as core.List)
                .map<OSPolicyAssignmentInstanceFilterInventory>((value) =>
                    OSPolicyAssignmentInstanceFilterInventory.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        osShortNames: _json.containsKey('osShortNames')
            ? (_json['osShortNames'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
      );