/* 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, GroupToJSONTyped, } from './Group'; /** * Adds nested create feature * @export * @interface PatchedInviteLink */ export interface PatchedInviteLink { /** * * @type {number} * @memberof PatchedInviteLink */ id?: number; /** * * @type {string} * @memberof PatchedInviteLink */ readonly uuid?: string; /** * * @type {string} * @memberof PatchedInviteLink */ email?: string; /** * * @type {Group} * @memberof PatchedInviteLink */ group?: Group; /** * * @type {Date} * @memberof PatchedInviteLink */ validUntil?: Date; /** * * @type {number} * @memberof PatchedInviteLink */ usedBy?: number | null; /** * * @type {boolean} * @memberof PatchedInviteLink */ reusable?: boolean; /** * * @type {string} * @memberof PatchedInviteLink */ internalNote?: string | null; /** * * @type {number} * @memberof PatchedInviteLink */ readonly createdBy?: number; /** * * @type {Date} * @memberof PatchedInviteLink */ readonly createdAt?: Date; } /** * Check if a given object implements the PatchedInviteLink interface. */ export function instanceOfPatchedInviteLink(value: object): value is PatchedInviteLink { return true; } export function PatchedInviteLinkFromJSON(json: any): PatchedInviteLink { return PatchedInviteLinkFromJSONTyped(json, false); } export function PatchedInviteLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedInviteLink { if (json == null) { return json; } return { 'id': json['id'] == null ? undefined : json['id'], 'uuid': json['uuid'] == null ? undefined : json['uuid'], 'email': json['email'] == null ? undefined : json['email'], 'group': json['group'] == null ? undefined : GroupFromJSON(json['group']), 'validUntil': json['valid_until'] == null ? undefined : (new Date(json['valid_until'])), 'usedBy': json['used_by'] == null ? undefined : json['used_by'], 'reusable': json['reusable'] == null ? undefined : json['reusable'], 'internalNote': json['internal_note'] == null ? undefined : json['internal_note'], 'createdBy': json['created_by'] == null ? undefined : json['created_by'], 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), }; } export function PatchedInviteLinkToJSON(json: any): PatchedInviteLink { return PatchedInviteLinkToJSONTyped(json, false); } export function PatchedInviteLinkToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'email': value['email'], 'group': GroupToJSON(value['group']), 'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)), 'used_by': value['usedBy'], 'reusable': value['reusable'], 'internal_note': value['internalNote'], }; }