/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.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';
/**
 * RadiusProvider Serializer
 * @export
 * @interface RadiusOutpostConfig
 */
export interface RadiusOutpostConfig {
    /**
     * 
     * @type {number}
     * @memberof RadiusOutpostConfig
     */
    readonly pk: number;
    /**
     * 
     * @type {string}
     * @memberof RadiusOutpostConfig
     */
    name: string;
    /**
     * 
     * @type {string}
     * @memberof RadiusOutpostConfig
     */
    applicationSlug: string;
    /**
     * 
     * @type {string}
     * @memberof RadiusOutpostConfig
     */
    authFlowSlug: string;
    /**
     * List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped.
     * @type {string}
     * @memberof RadiusOutpostConfig
     */
    clientNetworks?: string;
    /**
     * Shared secret between clients and server to hash packets.
     * @type {string}
     * @memberof RadiusOutpostConfig
     */
    sharedSecret?: string;
    /**
     * When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon.
     * @type {boolean}
     * @memberof RadiusOutpostConfig
     */
    mfaSupport?: boolean;
}

/**
 * Check if a given object implements the RadiusOutpostConfig interface.
 */
export function instanceOfRadiusOutpostConfig(value: object): value is RadiusOutpostConfig {
    if (!('pk' in value) || value['pk'] === undefined) return false;
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('applicationSlug' in value) || value['applicationSlug'] === undefined) return false;
    if (!('authFlowSlug' in value) || value['authFlowSlug'] === undefined) return false;
    return true;
}

export function RadiusOutpostConfigFromJSON(json: any): RadiusOutpostConfig {
    return RadiusOutpostConfigFromJSONTyped(json, false);
}

export function RadiusOutpostConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): RadiusOutpostConfig {
    if (json == null) {
        return json;
    }
    return {
        
        'pk': json['pk'],
        'name': json['name'],
        'applicationSlug': json['application_slug'],
        'authFlowSlug': json['auth_flow_slug'],
        'clientNetworks': json['client_networks'] == null ? undefined : json['client_networks'],
        'sharedSecret': json['shared_secret'] == null ? undefined : json['shared_secret'],
        'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'],
    };
}

export function RadiusOutpostConfigToJSON(json: any): RadiusOutpostConfig {
    return RadiusOutpostConfigToJSONTyped(json, false);
}

export function RadiusOutpostConfigToJSONTyped(value?: Omit<RadiusOutpostConfig, 'pk'> | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'name': value['name'],
        'application_slug': value['applicationSlug'],
        'auth_flow_slug': value['authFlowSlug'],
        'client_networks': value['clientNetworks'],
        'shared_secret': value['sharedSecret'],
        'mfa_support': value['mfaSupport'],
    };
}

