|
| 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: 1.0 |
| 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 | +/** |
| 17 | + * |
| 18 | + * @export |
| 19 | + * @interface BackendInfoResponse |
| 20 | + */ |
| 21 | +export interface BackendInfoResponse { |
| 22 | + /** |
| 23 | + * |
| 24 | + * @type {string} |
| 25 | + * @memberof BackendInfoResponse |
| 26 | + */ |
| 27 | + version: string; |
| 28 | + /** |
| 29 | + * |
| 30 | + * @type {string} |
| 31 | + * @memberof BackendInfoResponse |
| 32 | + */ |
| 33 | + commit: string; |
| 34 | + /** |
| 35 | + * |
| 36 | + * @type {Date} |
| 37 | + * @memberof BackendInfoResponse |
| 38 | + */ |
| 39 | + currentTime: Date; |
| 40 | + /** |
| 41 | + * |
| 42 | + * @type {string} |
| 43 | + * @memberof BackendInfoResponse |
| 44 | + */ |
| 45 | + frontendUrl: string; |
| 46 | + /** |
| 47 | + * |
| 48 | + * @type {string} |
| 49 | + * @memberof BackendInfoResponse |
| 50 | + */ |
| 51 | + shortLinkUrl: string; |
| 52 | + /** |
| 53 | + * |
| 54 | + * @type {string} |
| 55 | + * @memberof BackendInfoResponse |
| 56 | + */ |
| 57 | + turnstileSiteKey: string | null; |
| 58 | + /** |
| 59 | + * |
| 60 | + * @type {boolean} |
| 61 | + * @memberof BackendInfoResponse |
| 62 | + */ |
| 63 | + isUserAuthenticated: boolean; |
| 64 | +} |
| 65 | + |
| 66 | +/** |
| 67 | + * Check if a given object implements the BackendInfoResponse interface. |
| 68 | + */ |
| 69 | +export function instanceOfBackendInfoResponse(value: object): value is BackendInfoResponse { |
| 70 | + if (!('version' in value) || value['version'] === undefined) return false; |
| 71 | + if (!('commit' in value) || value['commit'] === undefined) return false; |
| 72 | + if (!('currentTime' in value) || value['currentTime'] === undefined) return false; |
| 73 | + if (!('frontendUrl' in value) || value['frontendUrl'] === undefined) return false; |
| 74 | + if (!('shortLinkUrl' in value) || value['shortLinkUrl'] === undefined) return false; |
| 75 | + if (!('turnstileSiteKey' in value) || value['turnstileSiteKey'] === undefined) return false; |
| 76 | + if (!('isUserAuthenticated' in value) || value['isUserAuthenticated'] === undefined) return false; |
| 77 | + return true; |
| 78 | +} |
| 79 | + |
| 80 | +export function BackendInfoResponseFromJSON(json: any): BackendInfoResponse { |
| 81 | + return BackendInfoResponseFromJSONTyped(json, false); |
| 82 | +} |
| 83 | + |
| 84 | +export function BackendInfoResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BackendInfoResponse { |
| 85 | + if (json == null) { |
| 86 | + return json; |
| 87 | + } |
| 88 | + return { |
| 89 | + |
| 90 | + 'version': json['version'], |
| 91 | + 'commit': json['commit'], |
| 92 | + 'currentTime': (new Date(json['currentTime'])), |
| 93 | + 'frontendUrl': json['frontendUrl'], |
| 94 | + 'shortLinkUrl': json['shortLinkUrl'], |
| 95 | + 'turnstileSiteKey': json['turnstileSiteKey'], |
| 96 | + 'isUserAuthenticated': json['isUserAuthenticated'], |
| 97 | + }; |
| 98 | +} |
| 99 | + |
| 100 | +export function BackendInfoResponseToJSON(json: any): BackendInfoResponse { |
| 101 | + return BackendInfoResponseToJSONTyped(json, false); |
| 102 | +} |
| 103 | + |
| 104 | +export function BackendInfoResponseToJSONTyped(value?: BackendInfoResponse | null, ignoreDiscriminator: boolean = false): any { |
| 105 | + if (value == null) { |
| 106 | + return value; |
| 107 | + } |
| 108 | + |
| 109 | + return { |
| 110 | + |
| 111 | + 'version': value['version'], |
| 112 | + 'commit': value['commit'], |
| 113 | + 'currentTime': ((value['currentTime']).toISOString()), |
| 114 | + 'frontendUrl': value['frontendUrl'], |
| 115 | + 'shortLinkUrl': value['shortLinkUrl'], |
| 116 | + 'turnstileSiteKey': value['turnstileSiteKey'], |
| 117 | + 'isUserAuthenticated': value['isUserAuthenticated'], |
| 118 | + }; |
| 119 | +} |
| 120 | + |
0 commit comments