/* tslint:disable */ /* eslint-disable */ /** * metrics-sdk-admin * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 5.4.9 * * * 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 { FacilityData } from './FacilityData'; import { FacilityDataFromJSON, FacilityDataFromJSONTyped, FacilityDataToJSON, } from './FacilityData'; import type { FacilityLicenseType } from './FacilityLicenseType'; import { FacilityLicenseTypeFromJSON, FacilityLicenseTypeFromJSONTyped, FacilityLicenseTypeToJSON, } from './FacilityLicenseType'; /** * * @export * @interface FacilityLicenseData */ export interface FacilityLicenseData { /** * * @type {number} * @memberof FacilityLicenseData */ id: number; /** * * @type {string} * @memberof FacilityLicenseData */ key: string; /** * * @type {string} * @memberof FacilityLicenseData */ accountId?: string; /** * * @type {number} * @memberof FacilityLicenseData */ term: number; /** * * @type {FacilityLicenseType} * @memberof FacilityLicenseData */ type: FacilityLicenseType; /** * * @type {number} * @memberof FacilityLicenseData */ facilityId?: number; /** * * @type {Date} * @memberof FacilityLicenseData */ effectiveDate?: Date; /** * * @type {FacilityData} * @memberof FacilityLicenseData */ facility?: FacilityData; } /** * Check if a given object implements the FacilityLicenseData interface. */ export function instanceOfFacilityLicenseData(value: object): value is FacilityLicenseData { if (!('id' in value) || value['id'] === undefined) return false; if (!('key' in value) || value['key'] === undefined) return false; if (!('term' in value) || value['term'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; return true; } export function FacilityLicenseDataFromJSON(json: any): FacilityLicenseData { return FacilityLicenseDataFromJSONTyped(json, false); } export function FacilityLicenseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FacilityLicenseData { if (json == null) { return json; } return { 'id': json['id'], 'key': json['key'], 'accountId': json['accountId'] == null ? undefined : json['accountId'], 'term': json['term'], 'type': FacilityLicenseTypeFromJSON(json['type']), 'facilityId': json['facilityId'] == null ? undefined : json['facilityId'], 'effectiveDate': json['effectiveDate'] == null ? undefined : (new Date(json['effectiveDate'])), 'facility': json['facility'] == null ? undefined : FacilityDataFromJSON(json['facility']), }; } export function FacilityLicenseDataToJSON(value?: FacilityLicenseData | null): any { if (value == null) { return value; } return { 'id': value['id'], 'key': value['key'], 'accountId': value['accountId'], 'term': value['term'], 'type': FacilityLicenseTypeToJSON(value['type']), 'facilityId': value['facilityId'], 'effectiveDate': value['effectiveDate'] == null ? undefined : ((value['effectiveDate']).toISOString()), 'facility': FacilityDataToJSON(value['facility']), }; }