Permission.fromJson constructor

Permission.fromJson(
  1. Map json_
)

Implementation

Permission.fromJson(core.Map json_)
    : this(
        additionalRoles: json_.containsKey('additionalRoles')
            ? (json_['additionalRoles'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        authKey: json_.containsKey('authKey')
            ? json_['authKey'] as core.String
            : null,
        deleted: json_.containsKey('deleted')
            ? json_['deleted'] as core.bool
            : null,
        domain: json_.containsKey('domain')
            ? json_['domain'] as core.String
            : null,
        emailAddress: json_.containsKey('emailAddress')
            ? json_['emailAddress'] as core.String
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        expirationDate: json_.containsKey('expirationDate')
            ? core.DateTime.parse(json_['expirationDate'] as core.String)
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        pendingOwner: json_.containsKey('pendingOwner')
            ? json_['pendingOwner'] as core.bool
            : null,
        permissionDetails: json_.containsKey('permissionDetails')
            ? (json_['permissionDetails'] as core.List)
                .map((value) => PermissionPermissionDetails.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        photoLink: json_.containsKey('photoLink')
            ? json_['photoLink'] as core.String
            : null,
        role: json_.containsKey('role') ? json_['role'] as core.String : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        teamDrivePermissionDetails: json_
                .containsKey('teamDrivePermissionDetails')
            ? (json_['teamDrivePermissionDetails'] as core.List)
                .map((value) => PermissionTeamDrivePermissionDetails.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        value:
            json_.containsKey('value') ? json_['value'] as core.String : null,
        view: json_.containsKey('view') ? json_['view'] as core.String : null,
        withLink: json_.containsKey('withLink')
            ? json_['withLink'] as core.bool
            : null,
      );