/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { TermsOfServiceAgreementFromJSON, TermsOfServiceAgreementToJSON, } from './TermsOfServiceAgreement';
import { SettingsFromJSON, SettingsToJSON, } from './Settings';
import { UserPreferenceBooleanFromJSON, UserPreferenceBooleanToJSON, } from './UserPreferenceBoolean';
/**
 * Check if a given object implements the UserProfile interface.
 */
export function instanceOfUserProfile(value) {
    return true;
}
export function UserProfileFromJSON(json) {
    return UserProfileFromJSONTyped(json, false);
}
export function UserProfileFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'ownerId': json['ownerId'] == null ? undefined : json['ownerId'],
        'etag': json['etag'] == null ? undefined : json['etag'],
        'firstName': json['firstName'] == null ? undefined : json['firstName'],
        'lastName': json['lastName'] == null ? undefined : json['lastName'],
        'email': json['email'] == null ? undefined : json['email'],
        'emails': json['emails'] == null ? undefined : json['emails'],
        'openIds': json['openIds'] == null ? undefined : json['openIds'],
        'userName': json['userName'] == null ? undefined : json['userName'],
        'displayName': json['displayName'] == null ? undefined : json['displayName'],
        'rStudioUrl': json['rStudioUrl'] == null ? undefined : json['rStudioUrl'],
        'summary': json['summary'] == null ? undefined : json['summary'],
        'position': json['position'] == null ? undefined : json['position'],
        'location': json['location'] == null ? undefined : json['location'],
        'industry': json['industry'] == null ? undefined : json['industry'],
        'company': json['company'] == null ? undefined : json['company'],
        'profilePicureFileHandleId': json['profilePicureFileHandleId'] == null ? undefined : json['profilePicureFileHandleId'],
        'url': json['url'] == null ? undefined : json['url'],
        'teamName': json['teamName'] == null ? undefined : json['teamName'],
        'notificationSettings': json['notificationSettings'] == null ? undefined : SettingsFromJSON(json['notificationSettings']),
        'preferences': json['preferences'] == null ? undefined : (new Set(json['preferences'].map(UserPreferenceBooleanFromJSON))),
        'createdOn': json['createdOn'] == null ? undefined : json['createdOn'],
        'twoFactorAuthEnabled': json['twoFactorAuthEnabled'] == null ? undefined : json['twoFactorAuthEnabled'],
        'tosAgreements': json['tosAgreements'] == null ? undefined : (json['tosAgreements'].map(TermsOfServiceAgreementFromJSON)),
    };
}
export function UserProfileToJSON(json) {
    return UserProfileToJSONTyped(json, false);
}
export function UserProfileToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'ownerId': value['ownerId'],
        'etag': value['etag'],
        'firstName': value['firstName'],
        'lastName': value['lastName'],
        'email': value['email'],
        'emails': value['emails'],
        'openIds': value['openIds'],
        'userName': value['userName'],
        'displayName': value['displayName'],
        'rStudioUrl': value['rStudioUrl'],
        'summary': value['summary'],
        'position': value['position'],
        'location': value['location'],
        'industry': value['industry'],
        'company': value['company'],
        'profilePicureFileHandleId': value['profilePicureFileHandleId'],
        'url': value['url'],
        'teamName': value['teamName'],
        'notificationSettings': SettingsToJSON(value['notificationSettings']),
        'preferences': value['preferences'] == null ? undefined : (Array.from(value['preferences']).map(UserPreferenceBooleanToJSON)),
        'createdOn': value['createdOn'],
        'twoFactorAuthEnabled': value['twoFactorAuthEnabled'],
        'tosAgreements': value['tosAgreements'] == null ? undefined : (value['tosAgreements'].map(TermsOfServiceAgreementToJSON)),
    };
}
//# sourceMappingURL=UserProfile.js.map