/* 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';
/**
 * Provider Serializer
 * @export
 * @interface ProviderRequest
 */
export interface ProviderRequest {
    /**
     * 
     * @type {string}
     * @memberof ProviderRequest
     */
    name: string;
    /**
     * Flow used for authentication when the associated application is accessed by an un-authenticated user.
     * @type {string}
     * @memberof ProviderRequest
     */
    authenticationFlow?: string | null;
    /**
     * Flow used when authorizing this provider.
     * @type {string}
     * @memberof ProviderRequest
     */
    authorizationFlow: string;
    /**
     * Flow used ending the session from a provider.
     * @type {string}
     * @memberof ProviderRequest
     */
    invalidationFlow: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof ProviderRequest
     */
    propertyMappings?: Array<string>;
}

/**
 * Check if a given object implements the ProviderRequest interface.
 */
export function instanceOfProviderRequest(value: object): value is ProviderRequest {
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false;
    if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false;
    return true;
}

export function ProviderRequestFromJSON(json: any): ProviderRequest {
    return ProviderRequestFromJSONTyped(json, false);
}

export function ProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProviderRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'],
        'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'],
        'authorizationFlow': json['authorization_flow'],
        'invalidationFlow': json['invalidation_flow'],
        'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'],
    };
}

export function ProviderRequestToJSON(json: any): ProviderRequest {
    return ProviderRequestToJSONTyped(json, false);
}

export function ProviderRequestToJSONTyped(value?: ProviderRequest | 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'],
    };
}

