/* 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 PatchedRadiusProviderRequest
 */
export interface PatchedRadiusProviderRequest {
    /**
     * 
     * @type {string}
     * @memberof PatchedRadiusProviderRequest
     */
    name?: string;
    /**
     * Flow used for authentication when the associated application is accessed by an un-authenticated user.
     * @type {string}
     * @memberof PatchedRadiusProviderRequest
     */
    authenticationFlow?: string | null;
    /**
     * Flow used when authorizing this provider.
     * @type {string}
     * @memberof PatchedRadiusProviderRequest
     */
    authorizationFlow?: string;
    /**
     * Flow used ending the session from a provider.
     * @type {string}
     * @memberof PatchedRadiusProviderRequest
     */
    invalidationFlow?: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof PatchedRadiusProviderRequest
     */
    propertyMappings?: Array<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 PatchedRadiusProviderRequest
     */
    clientNetworks?: string;
    /**
     * Shared secret between clients and server to hash packets.
     * @type {string}
     * @memberof PatchedRadiusProviderRequest
     */
    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 PatchedRadiusProviderRequest
     */
    mfaSupport?: boolean;
}

/**
 * Check if a given object implements the PatchedRadiusProviderRequest interface.
 */
export function instanceOfPatchedRadiusProviderRequest(value: object): value is PatchedRadiusProviderRequest {
    return true;
}

export function PatchedRadiusProviderRequestFromJSON(json: any): PatchedRadiusProviderRequest {
    return PatchedRadiusProviderRequestFromJSONTyped(json, false);
}

export function PatchedRadiusProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRadiusProviderRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'] == null ? undefined : json['name'],
        'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'],
        'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'],
        'invalidationFlow': json['invalidation_flow'] == null ? undefined : json['invalidation_flow'],
        'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'],
        '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 PatchedRadiusProviderRequestToJSON(json: any): PatchedRadiusProviderRequest {
    return PatchedRadiusProviderRequestToJSONTyped(json, false);
}

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

    return {
        
        'name': value['name'],
        'authentication_flow': value['authenticationFlow'],
        'authorization_flow': value['authorizationFlow'],
        'invalidation_flow': value['invalidationFlow'],
        'property_mappings': value['propertyMappings'],
        'client_networks': value['clientNetworks'],
        'shared_secret': value['sharedSecret'],
        'mfa_support': value['mfaSupport'],
    };
}

