@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
67 lines (66 loc) • 2.33 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API
*
* The version of the OpenAPI document: 0.21.1
* Contact: contact@emergentmethods.ai
*
* 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.UserProfileToJSONTyped = exports.UserProfileToJSON = exports.UserProfileFromJSONTyped = exports.UserProfileFromJSON = exports.instanceOfUserProfile = exports.UserProfileIdentityTypeEnum = void 0;
const UserProfileSubscription_1 = require("./UserProfileSubscription");
/**
* @export
*/
exports.UserProfileIdentityTypeEnum = {
User: 'user'
};
/**
* Check if a given object implements the UserProfile interface.
*/
function instanceOfUserProfile(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('subscription' in value) || value['subscription'] === undefined)
return false;
return true;
}
exports.instanceOfUserProfile = instanceOfUserProfile;
function UserProfileFromJSON(json) {
return UserProfileFromJSONTyped(json, false);
}
exports.UserProfileFromJSON = UserProfileFromJSON;
function UserProfileFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'identityType': json['identity_type'] == null ? undefined : json['identity_type'],
'id': json['id'],
'subscription': (0, UserProfileSubscription_1.UserProfileSubscriptionFromJSON)(json['subscription']),
'suspended': json['suspended'] == null ? undefined : json['suspended'],
};
}
exports.UserProfileFromJSONTyped = UserProfileFromJSONTyped;
function UserProfileToJSON(json) {
return UserProfileToJSONTyped(json, false);
}
exports.UserProfileToJSON = UserProfileToJSON;
function UserProfileToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'identity_type': value['identityType'],
'id': value['id'],
'subscription': (0, UserProfileSubscription_1.UserProfileSubscriptionToJSON)(value['subscription']),
'suspended': value['suspended'],
};
}
exports.UserProfileToJSONTyped = UserProfileToJSONTyped;
;