/* 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 DetailedCountryField
 */
export interface DetailedCountryField {
    /**
     * 
     * @type {CountryCodeEnum}
     * @memberof DetailedCountryField
     */
    code: CountryCodeEnum;
    /**
     * 
     * @type {string}
     * @memberof DetailedCountryField
     */
    name: string;
}



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

export function DetailedCountryFieldFromJSON(json: any): DetailedCountryField {
    return DetailedCountryFieldFromJSONTyped(json, false);
}

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

export function DetailedCountryFieldToJSON(json: any): DetailedCountryField {
    return DetailedCountryFieldToJSONTyped(json, false);
}

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

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

