/* 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 OperatingSystemRequest
 */
export interface OperatingSystemRequest {
    /**
     * 
     * @type {DeviceFactsOSFamily}
     * @memberof OperatingSystemRequest
     */
    family: DeviceFactsOSFamily;
    /**
     * 
     * @type {string}
     * @memberof OperatingSystemRequest
     */
    name?: string;
    /**
     * 
     * @type {string}
     * @memberof OperatingSystemRequest
     */
    version?: string;
    /**
     * 
     * @type {string}
     * @memberof OperatingSystemRequest
     */
    arch: string;
}



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

export function OperatingSystemRequestFromJSON(json: any): OperatingSystemRequest {
    return OperatingSystemRequestFromJSONTyped(json, false);
}

export function OperatingSystemRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperatingSystemRequest {
    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 OperatingSystemRequestToJSON(json: any): OperatingSystemRequest {
    return OperatingSystemRequestToJSONTyped(json, false);
}

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

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

