|
| 1 | +/* tslint:disable */ |
| 2 | +/* eslint-disable */ |
| 3 | +/** |
| 4 | + * OpenShock.API |
| 5 | + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
| 6 | + * |
| 7 | + * The version of the OpenAPI document: 2 |
| 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 { mapValues } from '../runtime'; |
| 16 | +import type { RoleType } from './RoleType'; |
| 17 | +import { |
| 18 | + RoleTypeFromJSON, |
| 19 | + RoleTypeFromJSONTyped, |
| 20 | + RoleTypeToJSON, |
| 21 | + RoleTypeToJSONTyped, |
| 22 | +} from './RoleType'; |
| 23 | + |
| 24 | +/** |
| 25 | + * |
| 26 | + * @export |
| 27 | + * @interface LoginV2OkResponse |
| 28 | + */ |
| 29 | +export interface LoginV2OkResponse { |
| 30 | + /** |
| 31 | + * |
| 32 | + * @type {string} |
| 33 | + * @memberof LoginV2OkResponse |
| 34 | + */ |
| 35 | + accountId: string; |
| 36 | + /** |
| 37 | + * |
| 38 | + * @type {string} |
| 39 | + * @memberof LoginV2OkResponse |
| 40 | + */ |
| 41 | + accountName: string; |
| 42 | + /** |
| 43 | + * |
| 44 | + * @type {string} |
| 45 | + * @memberof LoginV2OkResponse |
| 46 | + */ |
| 47 | + accountEmail: string; |
| 48 | + /** |
| 49 | + * |
| 50 | + * @type {string} |
| 51 | + * @memberof LoginV2OkResponse |
| 52 | + */ |
| 53 | + profileImage: string; |
| 54 | + /** |
| 55 | + * |
| 56 | + * @type {Array<RoleType>} |
| 57 | + * @memberof LoginV2OkResponse |
| 58 | + */ |
| 59 | + accountRoles: Array<RoleType>; |
| 60 | +} |
| 61 | + |
| 62 | +/** |
| 63 | + * Check if a given object implements the LoginV2OkResponse interface. |
| 64 | + */ |
| 65 | +export function instanceOfLoginV2OkResponse(value: object): value is LoginV2OkResponse { |
| 66 | + if (!('accountId' in value) || value['accountId'] === undefined) return false; |
| 67 | + if (!('accountName' in value) || value['accountName'] === undefined) return false; |
| 68 | + if (!('accountEmail' in value) || value['accountEmail'] === undefined) return false; |
| 69 | + if (!('profileImage' in value) || value['profileImage'] === undefined) return false; |
| 70 | + if (!('accountRoles' in value) || value['accountRoles'] === undefined) return false; |
| 71 | + return true; |
| 72 | +} |
| 73 | + |
| 74 | +export function LoginV2OkResponseFromJSON(json: any): LoginV2OkResponse { |
| 75 | + return LoginV2OkResponseFromJSONTyped(json, false); |
| 76 | +} |
| 77 | + |
| 78 | +export function LoginV2OkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginV2OkResponse { |
| 79 | + if (json == null) { |
| 80 | + return json; |
| 81 | + } |
| 82 | + return { |
| 83 | + |
| 84 | + 'accountId': json['accountId'], |
| 85 | + 'accountName': json['accountName'], |
| 86 | + 'accountEmail': json['accountEmail'], |
| 87 | + 'profileImage': json['profileImage'], |
| 88 | + 'accountRoles': ((json['accountRoles'] as Array<any>).map(RoleTypeFromJSON)), |
| 89 | + }; |
| 90 | +} |
| 91 | + |
| 92 | +export function LoginV2OkResponseToJSON(json: any): LoginV2OkResponse { |
| 93 | + return LoginV2OkResponseToJSONTyped(json, false); |
| 94 | +} |
| 95 | + |
| 96 | +export function LoginV2OkResponseToJSONTyped(value?: LoginV2OkResponse | null, ignoreDiscriminator: boolean = false): any { |
| 97 | + if (value == null) { |
| 98 | + return value; |
| 99 | + } |
| 100 | + |
| 101 | + return { |
| 102 | + |
| 103 | + 'accountId': value['accountId'], |
| 104 | + 'accountName': value['accountName'], |
| 105 | + 'accountEmail': value['accountEmail'], |
| 106 | + 'profileImage': value['profileImage'], |
| 107 | + 'accountRoles': ((value['accountRoles'] as Array<any>).map(RoleTypeToJSON)), |
| 108 | + }; |
| 109 | +} |
| 110 | + |
0 commit comments