/* 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';
import type { MatchingModeEnum } from './MatchingModeEnum';
import {
    MatchingModeEnumFromJSON,
    MatchingModeEnumFromJSONTyped,
    MatchingModeEnumToJSON,
    MatchingModeEnumToJSONTyped,
} from './MatchingModeEnum';

/**
 * A single allowed redirect URI entry
 * @export
 * @interface RedirectURI
 */
export interface RedirectURI {
    /**
     * 
     * @type {MatchingModeEnum}
     * @memberof RedirectURI
     */
    matchingMode: MatchingModeEnum;
    /**
     * 
     * @type {string}
     * @memberof RedirectURI
     */
    url: string;
}



/**
 * Check if a given object implements the RedirectURI interface.
 */
export function instanceOfRedirectURI(value: object): value is RedirectURI {
    if (!('matchingMode' in value) || value['matchingMode'] === undefined) return false;
    if (!('url' in value) || value['url'] === undefined) return false;
    return true;
}

export function RedirectURIFromJSON(json: any): RedirectURI {
    return RedirectURIFromJSONTyped(json, false);
}

export function RedirectURIFromJSONTyped(json: any, ignoreDiscriminator: boolean): RedirectURI {
    if (json == null) {
        return json;
    }
    return {
        
        'matchingMode': MatchingModeEnumFromJSON(json['matching_mode']),
        'url': json['url'],
    };
}

export function RedirectURIToJSON(json: any): RedirectURI {
    return RedirectURIToJSONTyped(json, false);
}

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

    return {
        
        'matching_mode': MatchingModeEnumToJSON(value['matchingMode']),
        'url': value['url'],
    };
}

