/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.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.
 */

/**
 *
 * @export
 * @interface NetworkInterface
 */
export interface NetworkInterface {
    /**
     *
     * @type {string}
     * @memberof NetworkInterface
     */
    name: string;
    /**
     *
     * @type {string}
     * @memberof NetworkInterface
     */
    hardwareAddress: string;
    /**
     *
     * @type {Array<string>}
     * @memberof NetworkInterface
     */
    ipAddresses?: Array<string>;
    /**
     *
     * @type {Array<string>}
     * @memberof NetworkInterface
     */
    dnsServers?: Array<string>;
}

/**
 * Check if a given object implements the NetworkInterface interface.
 */
export function instanceOfNetworkInterface(value: object): value is NetworkInterface {
    if (!("name" in value) || value["name"] === undefined) return false;
    if (!("hardwareAddress" in value) || value["hardwareAddress"] === undefined) return false;
    return true;
}

export function NetworkInterfaceFromJSON(json: any): NetworkInterface {
    return NetworkInterfaceFromJSONTyped(json, false);
}

export function NetworkInterfaceFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): NetworkInterface {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        hardwareAddress: json["hardware_address"],
        ipAddresses: json["ip_addresses"] == null ? undefined : json["ip_addresses"],
        dnsServers: json["dns_servers"] == null ? undefined : json["dns_servers"],
    };
}

export function NetworkInterfaceToJSON(json: any): NetworkInterface {
    return NetworkInterfaceToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        hardware_address: value["hardwareAddress"],
        ip_addresses: value["ipAddresses"],
        dns_servers: value["dnsServers"],
    };
}
