|
| 1 | +/* tslint:disable */ |
| 2 | +/* eslint-disable */ |
| 3 | +/** |
| 4 | + * Cuculus API |
| 5 | + * The Cuculus API description |
| 6 | + * |
| 7 | + * The version of the OpenAPI document: 0.0.1 |
| 8 | + * |
| 9 | + * |
| 10 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 11 | + * https://openapi-generator.tech |
| 12 | + * Do not edit the class manually. |
| 13 | + */ |
| 14 | + |
| 15 | +import { exists, mapValues } from '../runtime'; |
| 16 | +/** |
| 17 | + * |
| 18 | + * @export |
| 19 | + * @interface UserWithFollows |
| 20 | + */ |
| 21 | +export interface UserWithFollows { |
| 22 | + /** |
| 23 | + * |
| 24 | + * @type {number} |
| 25 | + * @memberof UserWithFollows |
| 26 | + */ |
| 27 | + id: number; |
| 28 | + /** |
| 29 | + * |
| 30 | + * @type {string} |
| 31 | + * @memberof UserWithFollows |
| 32 | + */ |
| 33 | + name: string; |
| 34 | + /** |
| 35 | + * |
| 36 | + * @type {string} |
| 37 | + * @memberof UserWithFollows |
| 38 | + */ |
| 39 | + username: string; |
| 40 | + /** |
| 41 | + * |
| 42 | + * @type {Date} |
| 43 | + * @memberof UserWithFollows |
| 44 | + */ |
| 45 | + createdAt: Date; |
| 46 | + /** |
| 47 | + * |
| 48 | + * @type {string} |
| 49 | + * @memberof UserWithFollows |
| 50 | + */ |
| 51 | + description: string; |
| 52 | + /** |
| 53 | + * |
| 54 | + * @type {string} |
| 55 | + * @memberof UserWithFollows |
| 56 | + */ |
| 57 | + profileImageUrl: string; |
| 58 | + /** |
| 59 | + * |
| 60 | + * @type {boolean} |
| 61 | + * @memberof UserWithFollows |
| 62 | + */ |
| 63 | + _protected: boolean; |
| 64 | + /** |
| 65 | + * |
| 66 | + * @type {string} |
| 67 | + * @memberof UserWithFollows |
| 68 | + */ |
| 69 | + url: string; |
| 70 | + /** |
| 71 | + * |
| 72 | + * @type {boolean} |
| 73 | + * @memberof UserWithFollows |
| 74 | + */ |
| 75 | + verified: boolean; |
| 76 | + /** |
| 77 | + * フォロワー数 |
| 78 | + * @type {number} |
| 79 | + * @memberof UserWithFollows |
| 80 | + */ |
| 81 | + followersCount?: number; |
| 82 | + /** |
| 83 | + * フォロー数 |
| 84 | + * @type {number} |
| 85 | + * @memberof UserWithFollows |
| 86 | + */ |
| 87 | + followingCount?: number; |
| 88 | +} |
| 89 | + |
| 90 | +/** |
| 91 | + * Check if a given object implements the UserWithFollows interface. |
| 92 | + */ |
| 93 | +export function instanceOfUserWithFollows(value: object): boolean { |
| 94 | + let isInstance = true; |
| 95 | + isInstance = isInstance && "id" in value; |
| 96 | + isInstance = isInstance && "name" in value; |
| 97 | + isInstance = isInstance && "username" in value; |
| 98 | + isInstance = isInstance && "createdAt" in value; |
| 99 | + isInstance = isInstance && "description" in value; |
| 100 | + isInstance = isInstance && "profileImageUrl" in value; |
| 101 | + isInstance = isInstance && "_protected" in value; |
| 102 | + isInstance = isInstance && "url" in value; |
| 103 | + isInstance = isInstance && "verified" in value; |
| 104 | + |
| 105 | + return isInstance; |
| 106 | +} |
| 107 | + |
| 108 | +export function UserWithFollowsFromJSON(json: any): UserWithFollows { |
| 109 | + return UserWithFollowsFromJSONTyped(json, false); |
| 110 | +} |
| 111 | + |
| 112 | +export function UserWithFollowsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserWithFollows { |
| 113 | + if ((json === undefined) || (json === null)) { |
| 114 | + return json; |
| 115 | + } |
| 116 | + return { |
| 117 | + |
| 118 | + 'id': json['id'], |
| 119 | + 'name': json['name'], |
| 120 | + 'username': json['username'], |
| 121 | + 'createdAt': (new Date(json['created_at'])), |
| 122 | + 'description': json['description'], |
| 123 | + 'profileImageUrl': json['profile_image_url'], |
| 124 | + '_protected': json['protected'], |
| 125 | + 'url': json['url'], |
| 126 | + 'verified': json['verified'], |
| 127 | + 'followersCount': !exists(json, 'followers_count') ? undefined : json['followers_count'], |
| 128 | + 'followingCount': !exists(json, 'following_count') ? undefined : json['following_count'], |
| 129 | + }; |
| 130 | +} |
| 131 | + |
| 132 | +export function UserWithFollowsToJSON(value?: UserWithFollows | null): any { |
| 133 | + if (value === undefined) { |
| 134 | + return undefined; |
| 135 | + } |
| 136 | + if (value === null) { |
| 137 | + return null; |
| 138 | + } |
| 139 | + return { |
| 140 | + |
| 141 | + 'id': value.id, |
| 142 | + 'name': value.name, |
| 143 | + 'username': value.username, |
| 144 | + 'created_at': (value.createdAt.toISOString()), |
| 145 | + 'description': value.description, |
| 146 | + 'profile_image_url': value.profileImageUrl, |
| 147 | + 'protected': value._protected, |
| 148 | + 'url': value.url, |
| 149 | + 'verified': value.verified, |
| 150 | + 'followers_count': value.followersCount, |
| 151 | + 'following_count': value.followingCount, |
| 152 | + }; |
| 153 | +} |
| 154 | + |
0 commit comments