mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
83 lines
1.8 KiB
TypeScript
83 lines
1.8 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Django Recipes
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document:
|
|
*
|
|
*
|
|
* 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';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface AuthToken
|
|
*/
|
|
export interface AuthToken {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AuthToken
|
|
*/
|
|
username: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AuthToken
|
|
*/
|
|
password: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AuthToken
|
|
*/
|
|
readonly token?: string;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the AuthToken interface.
|
|
*/
|
|
export function instanceOfAuthToken(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "username" in value;
|
|
isInstance = isInstance && "password" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function AuthTokenFromJSON(json: any): AuthToken {
|
|
return AuthTokenFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function AuthTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthToken {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'username': json['username'],
|
|
'password': json['password'],
|
|
'token': !exists(json, 'token') ? undefined : json['token'],
|
|
};
|
|
}
|
|
|
|
export function AuthTokenToJSON(value?: AuthToken | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'username': value.username,
|
|
'password': value.password,
|
|
};
|
|
}
|
|
|