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