mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
132 lines
3.3 KiB
TypeScript
132 lines
3.3 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 { mapValues } from '../runtime';
|
|
import type { Group } from './Group';
|
|
import {
|
|
GroupFromJSON,
|
|
GroupFromJSONTyped,
|
|
GroupToJSON,
|
|
} from './Group';
|
|
import type { User } from './User';
|
|
import {
|
|
UserFromJSON,
|
|
UserFromJSONTyped,
|
|
UserToJSON,
|
|
} from './User';
|
|
|
|
/**
|
|
* Adds nested create feature
|
|
* @export
|
|
* @interface PatchedUserSpace
|
|
*/
|
|
export interface PatchedUserSpace {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedUserSpace
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {User}
|
|
* @memberof PatchedUserSpace
|
|
*/
|
|
readonly user?: User;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedUserSpace
|
|
*/
|
|
readonly space?: number;
|
|
/**
|
|
*
|
|
* @type {Array<Group>}
|
|
* @memberof PatchedUserSpace
|
|
*/
|
|
groups?: Array<Group>;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof PatchedUserSpace
|
|
*/
|
|
active?: boolean;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PatchedUserSpace
|
|
*/
|
|
internalNote?: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedUserSpace
|
|
*/
|
|
readonly inviteLink?: number;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof PatchedUserSpace
|
|
*/
|
|
readonly createdAt?: Date;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof PatchedUserSpace
|
|
*/
|
|
readonly updatedAt?: Date;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the PatchedUserSpace interface.
|
|
*/
|
|
export function instanceOfPatchedUserSpace(value: object): boolean {
|
|
return true;
|
|
}
|
|
|
|
export function PatchedUserSpaceFromJSON(json: any): PatchedUserSpace {
|
|
return PatchedUserSpaceFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function PatchedUserSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserSpace {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'] == null ? undefined : json['id'],
|
|
'user': json['user'] == null ? undefined : UserFromJSON(json['user']),
|
|
'space': json['space'] == null ? undefined : json['space'],
|
|
'groups': json['groups'] == null ? undefined : ((json['groups'] as Array<any>).map(GroupFromJSON)),
|
|
'active': json['active'] == null ? undefined : json['active'],
|
|
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
|
|
'inviteLink': json['invite_link'] == null ? undefined : json['invite_link'],
|
|
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
};
|
|
}
|
|
|
|
export function PatchedUserSpaceToJSON(value?: Omit<PatchedUserSpace, 'id'|'user'|'space'|'invite_link'|'created_at'|'updated_at'> | null): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
return {
|
|
|
|
'groups': value['groups'] == null ? undefined : ((value['groups'] as Array<any>).map(GroupToJSON)),
|
|
'active': value['active'],
|
|
'internal_note': value['internalNote'],
|
|
};
|
|
}
|
|
|