/* 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';
/**
 * RACProvider Serializer
 * @export
 * @interface PatchedRACProviderRequest
 */
export interface PatchedRACProviderRequest {
    /**
     * 
     * @type {string}
     * @memberof PatchedRACProviderRequest
     */
    name?: string;
    /**
     * Flow used for authentication when the associated application is accessed by an un-authenticated user.
     * @type {string}
     * @memberof PatchedRACProviderRequest
     */
    authenticationFlow?: string | null;
    /**
     * Flow used when authorizing this provider.
     * @type {string}
     * @memberof PatchedRACProviderRequest
     */
    authorizationFlow?: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof PatchedRACProviderRequest
     */
    propertyMappings?: Array<string>;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof PatchedRACProviderRequest
     */
    settings?: { [key: string]: any; };
    /**
     * Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3)
     * @type {string}
     * @memberof PatchedRACProviderRequest
     */
    connectionExpiry?: string;
    /**
     * When set to true, connection tokens will be deleted upon disconnect.
     * @type {boolean}
     * @memberof PatchedRACProviderRequest
     */
    deleteTokenOnDisconnect?: boolean;
}

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

export function PatchedRACProviderRequestFromJSON(json: any): PatchedRACProviderRequest {
    return PatchedRACProviderRequestFromJSONTyped(json, false);
}

export function PatchedRACProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRACProviderRequest {
    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'],
        'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'],
        'settings': json['settings'] == null ? undefined : json['settings'],
        'connectionExpiry': json['connection_expiry'] == null ? undefined : json['connection_expiry'],
        'deleteTokenOnDisconnect': json['delete_token_on_disconnect'] == null ? undefined : json['delete_token_on_disconnect'],
    };
}

export function PatchedRACProviderRequestToJSON(json: any): PatchedRACProviderRequest {
    return PatchedRACProviderRequestToJSONTyped(json, false);
}

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

    return {
        
        'name': value['name'],
        'authentication_flow': value['authenticationFlow'],
        'authorization_flow': value['authorizationFlow'],
        'property_mappings': value['propertyMappings'],
        'settings': value['settings'],
        'connection_expiry': value['connectionExpiry'],
        'delete_token_on_disconnect': value['deleteTokenOnDisconnect'],
    };
}

