/* 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 { CountryCodeEnum } from './CountryCodeEnum';
import {
    CountryCodeEnumFromJSON,
    CountryCodeEnumFromJSONTyped,
    CountryCodeEnumToJSON,
    CountryCodeEnumToJSONTyped,
} from './CountryCodeEnum';

/**
 * 
 * @export
 * @interface DetailedCountry
 */
export interface DetailedCountry {
    /**
     * 
     * @type {CountryCodeEnum}
     * @memberof DetailedCountry
     */
    code: CountryCodeEnum;
    /**
     * 
     * @type {string}
     * @memberof DetailedCountry
     */
    name: string;
}



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

export function DetailedCountryFromJSON(json: any): DetailedCountry {
    return DetailedCountryFromJSONTyped(json, false);
}

export function DetailedCountryFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetailedCountry {
    if (json == null) {
        return json;
    }
    return {
        
        'code': CountryCodeEnumFromJSON(json['code']),
        'name': json['name'],
    };
}

export function DetailedCountryToJSON(json: any): DetailedCountry {
    return DetailedCountryToJSONTyped(json, false);
}

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

    return {
        
        'code': CountryCodeEnumToJSON(value['code']),
        'name': value['name'],
    };
}

