ProtectedRange.fromJson constructor

ProtectedRange.fromJson(
  1. Map json_
)

Implementation

ProtectedRange.fromJson(core.Map json_)
    : this(
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        editors: json_.containsKey('editors')
            ? Editors.fromJson(
                json_['editors'] as core.Map<core.String, core.dynamic>)
            : null,
        namedRangeId: json_.containsKey('namedRangeId')
            ? json_['namedRangeId'] as core.String
            : null,
        protectedRangeId: json_.containsKey('protectedRangeId')
            ? json_['protectedRangeId'] as core.int
            : null,
        range: json_.containsKey('range')
            ? GridRange.fromJson(
                json_['range'] as core.Map<core.String, core.dynamic>)
            : null,
        requestingUserCanEdit: json_.containsKey('requestingUserCanEdit')
            ? json_['requestingUserCanEdit'] as core.bool
            : null,
        unprotectedRanges: json_.containsKey('unprotectedRanges')
            ? (json_['unprotectedRanges'] as core.List)
                .map((value) => GridRange.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        warningOnly: json_.containsKey('warningOnly')
            ? json_['warningOnly'] as core.bool
            : null,
      );