/* tslint:disable */ /* eslint-disable */ /** * Fabric API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.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 { UserGroup } from './UserGroup'; import { UserGroupFromJSON, UserGroupFromJSONTyped, UserGroupToJSON, UserGroupToJSONTyped, } from './UserGroup'; /** * * @export * @interface MineProfile */ export interface MineProfile { /** * * @type {string} * @memberof MineProfile */ 'id': string; /** * * @type {string} * @memberof MineProfile */ 'pictureUrlCdn'?: string | null; /** * * @type {string} * @memberof MineProfile */ 'name'?: string | null; /** * * @type {string} * @memberof MineProfile */ 'email': string; /** * * @type {string} * @memberof MineProfile */ 'authMethod'?: string | null; /** * * @type {Array} * @memberof MineProfile */ 'groups'?: Array | null; /** * * @type {string} * @memberof MineProfile */ 'createdAt': string; /** * * @type {string} * @memberof MineProfile */ 'modifiedAt': string; /** * * @type {string} * @memberof MineProfile */ 'emailIngestionAddress': string | null; } /** * Check if a given object implements the MineProfile interface. */ export function instanceOfMineProfile(value: object): value is MineProfile { if (!('id' in value) || value['id'] === undefined) return false; if (!('email' in value) || value['email'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('modifiedAt' in value) || value['modifiedAt'] === undefined) return false; if (!('emailIngestionAddress' in value) || value['emailIngestionAddress'] === undefined) return false; return true; } export function MineProfileFromJSON(json: any): MineProfile { return MineProfileFromJSONTyped(json, false); } export function MineProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): MineProfile { if (json == null) { return json; } const result = { } as MineProfile; if (json['id'] !== undefined) { result['id'] = json['id']; } if (json['pictureUrlCdn'] !== undefined) { if (json['pictureUrlCdn'] === null) { result['pictureUrlCdn'] = null; } else { result['pictureUrlCdn'] = json['pictureUrlCdn']; } } if (json['name'] !== undefined) { if (json['name'] === null) { result['name'] = null; } else { result['name'] = json['name']; } } if (json['email'] !== undefined) { result['email'] = json['email']; } if (json['authMethod'] !== undefined) { if (json['authMethod'] === null) { result['authMethod'] = null; } else { result['authMethod'] = json['authMethod']; } } if (json['groups'] !== undefined) { if (json['groups'] === null) { result['groups'] = null; } else { result['groups'] = (json['groups'] as Array).map(UserGroupFromJSON); } } if (json['createdAt'] !== undefined) { result['createdAt'] = json['createdAt']; } if (json['modifiedAt'] !== undefined) { result['modifiedAt'] = json['modifiedAt']; } if (json['emailIngestionAddress'] !== undefined) { if (json['emailIngestionAddress'] === null) { result['emailIngestionAddress'] = null; } else { result['emailIngestionAddress'] = json['emailIngestionAddress']; } } return result; } export function MineProfileToJSON(json: any): MineProfile { return MineProfileToJSONTyped(json, false); } export function MineProfileToJSONTyped(value?: MineProfile | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'pictureUrlCdn': value['pictureUrlCdn'], 'name': value['name'], 'email': value['email'], 'authMethod': value['authMethod'], 'groups': value['groups'] == null ? undefined : ((value['groups'] as Array).map(UserGroupToJSON)), 'createdAt': value['createdAt'], 'modifiedAt': value['modifiedAt'], 'emailIngestionAddress': value['emailIngestionAddress'], }; }