/* tslint:disable */ /* eslint-disable */ // @ts-nocheck /** * Audius API * * The version of the OpenAPI document: 1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import type { ProfilePicture } from './ProfilePicture'; import { ProfilePictureFromJSON, ProfilePictureFromJSONTyped, ProfilePictureToJSON, } from './ProfilePicture'; /** * * @export * @interface DecodedUserToken */ export interface DecodedUserToken { /** * * @type {string} * @memberof DecodedUserToken */ apiKey: string; /** * * @type {string} * @memberof DecodedUserToken */ userId: string; /** * * @type {string} * @memberof DecodedUserToken */ email: string; /** * * @type {string} * @memberof DecodedUserToken */ name: string; /** * * @type {string} * @memberof DecodedUserToken */ handle: string; /** * * @type {boolean} * @memberof DecodedUserToken */ verified: boolean; /** * * @type {ProfilePicture} * @memberof DecodedUserToken */ profilePicture?: ProfilePicture; /** * * @type {string} * @memberof DecodedUserToken */ sub: string; /** * * @type {string} * @memberof DecodedUserToken */ iat: string; } /** * Check if a given object implements the DecodedUserToken interface. */ export function instanceOfDecodedUserToken(value: object): value is DecodedUserToken { let isInstance = true; isInstance = isInstance && "apiKey" in value && value["apiKey"] !== undefined; isInstance = isInstance && "userId" in value && value["userId"] !== undefined; isInstance = isInstance && "email" in value && value["email"] !== undefined; isInstance = isInstance && "name" in value && value["name"] !== undefined; isInstance = isInstance && "handle" in value && value["handle"] !== undefined; isInstance = isInstance && "verified" in value && value["verified"] !== undefined; isInstance = isInstance && "sub" in value && value["sub"] !== undefined; isInstance = isInstance && "iat" in value && value["iat"] !== undefined; return isInstance; } export function DecodedUserTokenFromJSON(json: any): DecodedUserToken { return DecodedUserTokenFromJSONTyped(json, false); } export function DecodedUserTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): DecodedUserToken { if ((json === undefined) || (json === null)) { return json; } return { 'apiKey': json['apiKey'], 'userId': json['userId'], 'email': json['email'], 'name': json['name'], 'handle': json['handle'], 'verified': json['verified'], 'profilePicture': !exists(json, 'profile_picture') ? undefined : ProfilePictureFromJSON(json['profile_picture']), 'sub': json['sub'], 'iat': json['iat'], }; } export function DecodedUserTokenToJSON(value?: DecodedUserToken | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'apiKey': value.apiKey, 'userId': value.userId, 'email': value.email, 'name': value.name, 'handle': value.handle, 'verified': value.verified, 'profile_picture': ProfilePictureToJSON(value.profilePicture), 'sub': value.sub, 'iat': value.iat, }; }