MembershipRelation.fromJson constructor

MembershipRelation.fromJson(
  1. Map json_
)

Implementation

MembershipRelation.fromJson(core.Map json_)
    : this(
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        group:
            json_.containsKey('group') ? json_['group'] as core.String : null,
        groupKey: json_.containsKey('groupKey')
            ? EntityKey.fromJson(
                json_['groupKey'] as core.Map<core.String, core.dynamic>)
            : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        membership: json_.containsKey('membership')
            ? json_['membership'] as core.String
            : null,
        roles: json_.containsKey('roles')
            ? (json_['roles'] as core.List)
                .map((value) => MembershipRole.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );