Files
recipes/models/AuthToken.ts

84 lines
1.7 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.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';
/**
*
* @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;
isInstance = isInstance && "token" 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': 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,
};
}