/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc1
 * Contact: hello@goauthentik.io
 *
 * 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 { DeviceFactsOSFamily } from './DeviceFactsOSFamily';
import {
    DeviceFactsOSFamilyFromJSON,
    DeviceFactsOSFamilyFromJSONTyped,
    DeviceFactsOSFamilyToJSON,
    DeviceFactsOSFamilyToJSONTyped,
} from './DeviceFactsOSFamily';

/**
 * 
 * @export
 * @interface OperatingSystem
 */
export interface OperatingSystem {
    /**
     * 
     * @type {DeviceFactsOSFamily}
     * @memberof OperatingSystem
     */
    family: DeviceFactsOSFamily;
    /**
     * 
     * @type {string}
     * @memberof OperatingSystem
     */
    name?: string;
    /**
     * 
     * @type {string}
     * @memberof OperatingSystem
     */
    version?: string;
    /**
     * 
     * @type {string}
     * @memberof OperatingSystem
     */
    arch: string;
}



/**
 * Check if a given object implements the OperatingSystem interface.
 */
export function instanceOfOperatingSystem(value: object): value is OperatingSystem {
    if (!('family' in value) || value['family'] === undefined) return false;
    if (!('arch' in value) || value['arch'] === undefined) return false;
    return true;
}

export function OperatingSystemFromJSON(json: any): OperatingSystem {
    return OperatingSystemFromJSONTyped(json, false);
}

export function OperatingSystemFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperatingSystem {
    if (json == null) {
        return json;
    }
    return {
        
        'family': DeviceFactsOSFamilyFromJSON(json['family']),
        'name': json['name'] == null ? undefined : json['name'],
        'version': json['version'] == null ? undefined : json['version'],
        'arch': json['arch'],
    };
}

export function OperatingSystemToJSON(json: any): OperatingSystem {
    return OperatingSystemToJSONTyped(json, false);
}

export function OperatingSystemToJSONTyped(value?: OperatingSystem | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'family': DeviceFactsOSFamilyToJSON(value['family']),
        'name': value['name'],
        'version': value['version'],
        'arch': value['arch'],
    };
}

