/* 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 NetworkInterfaceRequest
 */
export interface NetworkInterfaceRequest {
    /**
     *
     * @type {string}
     * @memberof NetworkInterfaceRequest
     */
    name: string;
    /**
     *
     * @type {string}
     * @memberof NetworkInterfaceRequest
     */
    hardwareAddress: string;
    /**
     *
     * @type {Array<string>}
     * @memberof NetworkInterfaceRequest
     */
    ipAddresses?: Array<string>;
    /**
     *
     * @type {Array<string>}
     * @memberof NetworkInterfaceRequest
     */
    dnsServers?: Array<string>;
}

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

export function NetworkInterfaceRequestFromJSON(json: any): NetworkInterfaceRequest {
    return NetworkInterfaceRequestFromJSONTyped(json, false);
}

export function NetworkInterfaceRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): NetworkInterfaceRequest {
    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 NetworkInterfaceRequestToJSON(json: any): NetworkInterfaceRequest {
    return NetworkInterfaceRequestToJSONTyped(json, false);
}

export function NetworkInterfaceRequestToJSONTyped(
    value?: NetworkInterfaceRequest | 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"],
    };
}
