AuthorizationPolicy.fromJson constructor

AuthorizationPolicy.fromJson(
  1. Map _json
)

Implementation

AuthorizationPolicy.fromJson(core.Map _json)
    : this(
        action: _json.containsKey('action')
            ? _json['action'] as core.String
            : null,
        createTime: _json.containsKey('createTime')
            ? _json['createTime'] as core.String
            : null,
        description: _json.containsKey('description')
            ? _json['description'] as core.String
            : null,
        labels: _json.containsKey('labels')
            ? (_json['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        name: _json.containsKey('name') ? _json['name'] as core.String : null,
        rules: _json.containsKey('rules')
            ? (_json['rules'] as core.List)
                .map<Rule>((value) => Rule.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        updateTime: _json.containsKey('updateTime')
            ? _json['updateTime'] as core.String
            : null,
      );