fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
76 lines • 3.36 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* fastcomments
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfUserSessionInfo = instanceOfUserSessionInfo;
exports.UserSessionInfoFromJSON = UserSessionInfoFromJSON;
exports.UserSessionInfoFromJSONTyped = UserSessionInfoFromJSONTyped;
exports.UserSessionInfoToJSON = UserSessionInfoToJSON;
exports.UserSessionInfoToJSONTyped = UserSessionInfoToJSONTyped;
const CommentUserBadgeInfo_1 = require("./CommentUserBadgeInfo");
/**
* Check if a given object implements the UserSessionInfo interface.
*/
function instanceOfUserSessionInfo(value) {
return true;
}
function UserSessionInfoFromJSON(json) {
return UserSessionInfoFromJSONTyped(json, false);
}
function UserSessionInfoFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'authorized': json['authorized'] == null ? undefined : json['authorized'],
'avatarSrc': json['avatarSrc'] == null ? undefined : json['avatarSrc'],
'badges': json['badges'] == null ? undefined : (json['badges'].map(CommentUserBadgeInfo_1.CommentUserBadgeInfoFromJSON)),
'displayLabel': json['displayLabel'] == null ? undefined : json['displayLabel'],
'displayName': json['displayName'] == null ? undefined : json['displayName'],
'email': json['email'] == null ? undefined : json['email'],
'groupIds': json['groupIds'] == null ? undefined : json['groupIds'],
'hasBlockedUsers': json['hasBlockedUsers'] == null ? undefined : json['hasBlockedUsers'],
'isAnonSession': json['isAnonSession'] == null ? undefined : json['isAnonSession'],
'needsTOS': json['needsTOS'] == null ? undefined : json['needsTOS'],
'sessionId': json['sessionId'] == null ? undefined : json['sessionId'],
'username': json['username'] == null ? undefined : json['username'],
'websiteUrl': json['websiteUrl'] == null ? undefined : json['websiteUrl'],
};
}
function UserSessionInfoToJSON(json) {
return UserSessionInfoToJSONTyped(json, false);
}
function UserSessionInfoToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'id': value['id'],
'authorized': value['authorized'],
'avatarSrc': value['avatarSrc'],
'badges': value['badges'] == null ? undefined : (value['badges'].map(CommentUserBadgeInfo_1.CommentUserBadgeInfoToJSON)),
'displayLabel': value['displayLabel'],
'displayName': value['displayName'],
'email': value['email'],
'groupIds': value['groupIds'],
'hasBlockedUsers': value['hasBlockedUsers'],
'isAnonSession': value['isAnonSession'],
'needsTOS': value['needsTOS'],
'sessionId': value['sessionId'],
'username': value['username'],
'websiteUrl': value['websiteUrl'],
};
}
//# sourceMappingURL=UserSessionInfo.js.map