mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
103 lines
2.3 KiB
TypeScript
103 lines
2.3 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 AccessToken
|
|
*/
|
|
export interface AccessToken {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof AccessToken
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AccessToken
|
|
*/
|
|
readonly token?: string;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof AccessToken
|
|
*/
|
|
expires: Date;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AccessToken
|
|
*/
|
|
scope?: string;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof AccessToken
|
|
*/
|
|
readonly created?: Date;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof AccessToken
|
|
*/
|
|
readonly updated?: Date;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the AccessToken interface.
|
|
*/
|
|
export function instanceOfAccessToken(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "expires" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function AccessTokenFromJSON(json: any): AccessToken {
|
|
return AccessTokenFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function AccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessToken {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'token': !exists(json, 'token') ? undefined : json['token'],
|
|
'expires': (new Date(json['expires'])),
|
|
'scope': !exists(json, 'scope') ? undefined : json['scope'],
|
|
'created': !exists(json, 'created') ? undefined : (new Date(json['created'])),
|
|
'updated': !exists(json, 'updated') ? undefined : (new Date(json['updated'])),
|
|
};
|
|
}
|
|
|
|
export function AccessTokenToJSON(value?: AccessToken | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'expires': (value.expires.toISOString()),
|
|
'scope': value.scope,
|
|
};
|
|
}
|
|
|