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



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

export function DetailedCountryFieldRequestFromJSON(json: any): DetailedCountryFieldRequest {
    return DetailedCountryFieldRequestFromJSONTyped(json, false);
}

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

export function DetailedCountryFieldRequestToJSON(json: any): DetailedCountryFieldRequest {
    return DetailedCountryFieldRequestToJSONTyped(json, false);
}

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

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

