/* 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 { CoverPhoto } from './CoverPhoto'; import { CoverPhotoFromJSON, CoverPhotoFromJSONTyped, CoverPhotoToJSON, } from './CoverPhoto'; import type { PlaylistLibrary } from './PlaylistLibrary'; import { PlaylistLibraryFromJSON, PlaylistLibraryFromJSONTyped, PlaylistLibraryToJSON, } from './PlaylistLibrary'; import type { ProfilePicture } from './ProfilePicture'; import { ProfilePictureFromJSON, ProfilePictureFromJSONTyped, ProfilePictureToJSON, } from './ProfilePicture'; import type { UserArtistCoinBadge } from './UserArtistCoinBadge'; import { UserArtistCoinBadgeFromJSON, UserArtistCoinBadgeFromJSONTyped, UserArtistCoinBadgeToJSON, } from './UserArtistCoinBadge'; /** * * @export * @interface User */ export interface User { /** * * @type {number} * @memberof User */ albumCount: number; /** * * @type {string} * @memberof User */ artistPickTrackId?: string; /** * * @type {UserArtistCoinBadge} * @memberof User */ artistCoinBadge: UserArtistCoinBadge; /** * * @type {string} * @memberof User */ coinFlairMint?: string; /** * * @type {string} * @memberof User */ bio?: string; /** * * @type {CoverPhoto} * @memberof User */ coverPhoto?: CoverPhoto; /** * * @type {number} * @memberof User */ followeeCount: number; /** * * @type {number} * @memberof User */ followerCount: number; /** * * @type {string} * @memberof User */ handle: string; /** * * @type {string} * @memberof User */ id: string; /** * * @type {boolean} * @memberof User */ isVerified: boolean; /** * * @type {string} * @memberof User */ twitterHandle?: string; /** * * @type {string} * @memberof User */ instagramHandle?: string; /** * * @type {string} * @memberof User */ tiktokHandle?: string; /** * * @type {boolean} * @memberof User */ verifiedWithTwitter: boolean; /** * * @type {boolean} * @memberof User */ verifiedWithInstagram: boolean; /** * * @type {boolean} * @memberof User */ verifiedWithTiktok: boolean; /** * * @type {string} * @memberof User */ website?: string; /** * * @type {string} * @memberof User */ donation?: string; /** * * @type {string} * @memberof User */ location?: string; /** * * @type {string} * @memberof User */ name: string; /** * * @type {number} * @memberof User */ playlistCount: number; /** * * @type {ProfilePicture} * @memberof User */ profilePicture?: ProfilePicture; /** * * @type {number} * @memberof User */ repostCount: number; /** * * @type {number} * @memberof User */ trackCount: number; /** * * @type {boolean} * @memberof User */ isDeactivated: boolean; /** * * @type {boolean} * @memberof User */ isAvailable: boolean; /** * * @type {string} * @memberof User */ ercWallet: string; /** * * @type {string} * @memberof User */ splWallet: string; /** * * @type {string} * @memberof User */ splUsdcWallet: string; /** * * @type {string} * @memberof User */ splUsdcPayoutWallet?: string; /** * * @type {number} * @memberof User */ supporterCount: number; /** * * @type {number} * @memberof User */ supportingCount: number; /** * * @type {number} * @memberof User */ totalAudioBalance: number; /** * The user's Ethereum wallet address for their account * @type {string} * @memberof User */ wallet: string; /** * * @type {string} * @memberof User */ balance: string; /** * * @type {string} * @memberof User */ associatedWalletsBalance: string; /** * * @type {string} * @memberof User */ totalBalance: string; /** * * @type {string} * @memberof User */ waudioBalance: string; /** * * @type {string} * @memberof User */ associatedSolWalletsBalance: string; /** * * @type {number} * @memberof User */ blocknumber: number; /** * * @type {string} * @memberof User */ createdAt: string; /** * * @type {boolean} * @memberof User */ isStorageV2: boolean; /** * * @type {string} * @memberof User */ creatorNodeEndpoint?: string; /** * * @type {number} * @memberof User */ currentUserFolloweeFollowCount: number; /** * * @type {boolean} * @memberof User */ doesCurrentUserFollow: boolean; /** * * @type {boolean} * @memberof User */ doesCurrentUserSubscribe: boolean; /** * * @type {boolean} * @memberof User */ doesFollowCurrentUser: boolean; /** * * @type {string} * @memberof User */ handleLc: string; /** * * @type {string} * @memberof User */ updatedAt: string; /** * * @type {string} * @memberof User */ coverPhotoSizes?: string; /** * * @type {CoverPhoto} * @memberof User */ coverPhotoCids?: CoverPhoto; /** * * @type {string} * @memberof User */ coverPhotoLegacy?: string; /** * * @type {string} * @memberof User */ profilePictureSizes?: string; /** * * @type {ProfilePicture} * @memberof User */ profilePictureCids?: ProfilePicture; /** * * @type {string} * @memberof User */ profilePictureLegacy?: string; /** * * @type {boolean} * @memberof User */ hasCollectibles: boolean; /** * * @type {PlaylistLibrary} * @memberof User */ playlistLibrary?: PlaylistLibrary; /** * * @type {boolean} * @memberof User */ allowAiAttribution: boolean; /** * * @type {string} * @memberof User */ profileType?: string; } /** * Check if a given object implements the User interface. */ export function instanceOfUser(value: object): value is User { let isInstance = true; isInstance = isInstance && "albumCount" in value && value["albumCount"] !== undefined; isInstance = isInstance && "artistCoinBadge" in value && value["artistCoinBadge"] !== undefined; isInstance = isInstance && "followeeCount" in value && value["followeeCount"] !== undefined; isInstance = isInstance && "followerCount" in value && value["followerCount"] !== undefined; isInstance = isInstance && "handle" in value && value["handle"] !== undefined; isInstance = isInstance && "id" in value && value["id"] !== undefined; isInstance = isInstance && "isVerified" in value && value["isVerified"] !== undefined; isInstance = isInstance && "verifiedWithTwitter" in value && value["verifiedWithTwitter"] !== undefined; isInstance = isInstance && "verifiedWithInstagram" in value && value["verifiedWithInstagram"] !== undefined; isInstance = isInstance && "verifiedWithTiktok" in value && value["verifiedWithTiktok"] !== undefined; isInstance = isInstance && "name" in value && value["name"] !== undefined; isInstance = isInstance && "playlistCount" in value && value["playlistCount"] !== undefined; isInstance = isInstance && "repostCount" in value && value["repostCount"] !== undefined; isInstance = isInstance && "trackCount" in value && value["trackCount"] !== undefined; isInstance = isInstance && "isDeactivated" in value && value["isDeactivated"] !== undefined; isInstance = isInstance && "isAvailable" in value && value["isAvailable"] !== undefined; isInstance = isInstance && "ercWallet" in value && value["ercWallet"] !== undefined; isInstance = isInstance && "splWallet" in value && value["splWallet"] !== undefined; isInstance = isInstance && "splUsdcWallet" in value && value["splUsdcWallet"] !== undefined; isInstance = isInstance && "supporterCount" in value && value["supporterCount"] !== undefined; isInstance = isInstance && "supportingCount" in value && value["supportingCount"] !== undefined; isInstance = isInstance && "totalAudioBalance" in value && value["totalAudioBalance"] !== undefined; isInstance = isInstance && "wallet" in value && value["wallet"] !== undefined; isInstance = isInstance && "balance" in value && value["balance"] !== undefined; isInstance = isInstance && "associatedWalletsBalance" in value && value["associatedWalletsBalance"] !== undefined; isInstance = isInstance && "totalBalance" in value && value["totalBalance"] !== undefined; isInstance = isInstance && "waudioBalance" in value && value["waudioBalance"] !== undefined; isInstance = isInstance && "associatedSolWalletsBalance" in value && value["associatedSolWalletsBalance"] !== undefined; isInstance = isInstance && "blocknumber" in value && value["blocknumber"] !== undefined; isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; isInstance = isInstance && "isStorageV2" in value && value["isStorageV2"] !== undefined; isInstance = isInstance && "currentUserFolloweeFollowCount" in value && value["currentUserFolloweeFollowCount"] !== undefined; isInstance = isInstance && "doesCurrentUserFollow" in value && value["doesCurrentUserFollow"] !== undefined; isInstance = isInstance && "doesCurrentUserSubscribe" in value && value["doesCurrentUserSubscribe"] !== undefined; isInstance = isInstance && "doesFollowCurrentUser" in value && value["doesFollowCurrentUser"] !== undefined; isInstance = isInstance && "handleLc" in value && value["handleLc"] !== undefined; isInstance = isInstance && "updatedAt" in value && value["updatedAt"] !== undefined; isInstance = isInstance && "hasCollectibles" in value && value["hasCollectibles"] !== undefined; isInstance = isInstance && "allowAiAttribution" in value && value["allowAiAttribution"] !== undefined; return isInstance; } export function UserFromJSON(json: any): User { return UserFromJSONTyped(json, false); } export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User { if ((json === undefined) || (json === null)) { return json; } return { 'albumCount': json['album_count'], 'artistPickTrackId': !exists(json, 'artist_pick_track_id') ? undefined : json['artist_pick_track_id'], 'artistCoinBadge': UserArtistCoinBadgeFromJSON(json['artist_coin_badge']), 'coinFlairMint': !exists(json, 'coin_flair_mint') ? undefined : json['coin_flair_mint'], 'bio': !exists(json, 'bio') ? undefined : json['bio'], 'coverPhoto': !exists(json, 'cover_photo') ? undefined : CoverPhotoFromJSON(json['cover_photo']), 'followeeCount': json['followee_count'], 'followerCount': json['follower_count'], 'handle': json['handle'], 'id': json['id'], 'isVerified': json['is_verified'], 'twitterHandle': !exists(json, 'twitter_handle') ? undefined : json['twitter_handle'], 'instagramHandle': !exists(json, 'instagram_handle') ? undefined : json['instagram_handle'], 'tiktokHandle': !exists(json, 'tiktok_handle') ? undefined : json['tiktok_handle'], 'verifiedWithTwitter': json['verified_with_twitter'], 'verifiedWithInstagram': json['verified_with_instagram'], 'verifiedWithTiktok': json['verified_with_tiktok'], 'website': !exists(json, 'website') ? undefined : json['website'], 'donation': !exists(json, 'donation') ? undefined : json['donation'], 'location': !exists(json, 'location') ? undefined : json['location'], 'name': json['name'], 'playlistCount': json['playlist_count'], 'profilePicture': !exists(json, 'profile_picture') ? undefined : ProfilePictureFromJSON(json['profile_picture']), 'repostCount': json['repost_count'], 'trackCount': json['track_count'], 'isDeactivated': json['is_deactivated'], 'isAvailable': json['is_available'], 'ercWallet': json['erc_wallet'], 'splWallet': json['spl_wallet'], 'splUsdcWallet': json['spl_usdc_wallet'], 'splUsdcPayoutWallet': !exists(json, 'spl_usdc_payout_wallet') ? undefined : json['spl_usdc_payout_wallet'], 'supporterCount': json['supporter_count'], 'supportingCount': json['supporting_count'], 'totalAudioBalance': json['total_audio_balance'], 'wallet': json['wallet'], 'balance': json['balance'], 'associatedWalletsBalance': json['associated_wallets_balance'], 'totalBalance': json['total_balance'], 'waudioBalance': json['waudio_balance'], 'associatedSolWalletsBalance': json['associated_sol_wallets_balance'], 'blocknumber': json['blocknumber'], 'createdAt': json['created_at'], 'isStorageV2': json['is_storage_v2'], 'creatorNodeEndpoint': !exists(json, 'creator_node_endpoint') ? undefined : json['creator_node_endpoint'], 'currentUserFolloweeFollowCount': json['current_user_followee_follow_count'], 'doesCurrentUserFollow': json['does_current_user_follow'], 'doesCurrentUserSubscribe': json['does_current_user_subscribe'], 'doesFollowCurrentUser': json['does_follow_current_user'], 'handleLc': json['handle_lc'], 'updatedAt': json['updated_at'], 'coverPhotoSizes': !exists(json, 'cover_photo_sizes') ? undefined : json['cover_photo_sizes'], 'coverPhotoCids': !exists(json, 'cover_photo_cids') ? undefined : CoverPhotoFromJSON(json['cover_photo_cids']), 'coverPhotoLegacy': !exists(json, 'cover_photo_legacy') ? undefined : json['cover_photo_legacy'], 'profilePictureSizes': !exists(json, 'profile_picture_sizes') ? undefined : json['profile_picture_sizes'], 'profilePictureCids': !exists(json, 'profile_picture_cids') ? undefined : ProfilePictureFromJSON(json['profile_picture_cids']), 'profilePictureLegacy': !exists(json, 'profile_picture_legacy') ? undefined : json['profile_picture_legacy'], 'hasCollectibles': json['has_collectibles'], 'playlistLibrary': !exists(json, 'playlist_library') ? undefined : PlaylistLibraryFromJSON(json['playlist_library']), 'allowAiAttribution': json['allow_ai_attribution'], 'profileType': !exists(json, 'profile_type') ? undefined : json['profile_type'], }; } export function UserToJSON(value?: User | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'album_count': value.albumCount, 'artist_pick_track_id': value.artistPickTrackId, 'artist_coin_badge': UserArtistCoinBadgeToJSON(value.artistCoinBadge), 'coin_flair_mint': value.coinFlairMint, 'bio': value.bio, 'cover_photo': CoverPhotoToJSON(value.coverPhoto), 'followee_count': value.followeeCount, 'follower_count': value.followerCount, 'handle': value.handle, 'id': value.id, 'is_verified': value.isVerified, 'twitter_handle': value.twitterHandle, 'instagram_handle': value.instagramHandle, 'tiktok_handle': value.tiktokHandle, 'verified_with_twitter': value.verifiedWithTwitter, 'verified_with_instagram': value.verifiedWithInstagram, 'verified_with_tiktok': value.verifiedWithTiktok, 'website': value.website, 'donation': value.donation, 'location': value.location, 'name': value.name, 'playlist_count': value.playlistCount, 'profile_picture': ProfilePictureToJSON(value.profilePicture), 'repost_count': value.repostCount, 'track_count': value.trackCount, 'is_deactivated': value.isDeactivated, 'is_available': value.isAvailable, 'erc_wallet': value.ercWallet, 'spl_wallet': value.splWallet, 'spl_usdc_wallet': value.splUsdcWallet, 'spl_usdc_payout_wallet': value.splUsdcPayoutWallet, 'supporter_count': value.supporterCount, 'supporting_count': value.supportingCount, 'total_audio_balance': value.totalAudioBalance, 'wallet': value.wallet, 'balance': value.balance, 'associated_wallets_balance': value.associatedWalletsBalance, 'total_balance': value.totalBalance, 'waudio_balance': value.waudioBalance, 'associated_sol_wallets_balance': value.associatedSolWalletsBalance, 'blocknumber': value.blocknumber, 'created_at': value.createdAt, 'is_storage_v2': value.isStorageV2, 'creator_node_endpoint': value.creatorNodeEndpoint, 'current_user_followee_follow_count': value.currentUserFolloweeFollowCount, 'does_current_user_follow': value.doesCurrentUserFollow, 'does_current_user_subscribe': value.doesCurrentUserSubscribe, 'does_follow_current_user': value.doesFollowCurrentUser, 'handle_lc': value.handleLc, 'updated_at': value.updatedAt, 'cover_photo_sizes': value.coverPhotoSizes, 'cover_photo_cids': CoverPhotoToJSON(value.coverPhotoCids), 'cover_photo_legacy': value.coverPhotoLegacy, 'profile_picture_sizes': value.profilePictureSizes, 'profile_picture_cids': ProfilePictureToJSON(value.profilePictureCids), 'profile_picture_legacy': value.profilePictureLegacy, 'has_collectibles': value.hasCollectibles, 'playlist_library': PlaylistLibraryToJSON(value.playlistLibrary), 'allow_ai_attribution': value.allowAiAttribution, 'profile_type': value.profileType, }; }