/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.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.
 */

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

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

export function GeoIPPolicyCountriesObjInnerFromJSON(json: any): GeoIPPolicyCountriesObjInner {
    return GeoIPPolicyCountriesObjInnerFromJSONTyped(json, false);
}

export function GeoIPPolicyCountriesObjInnerFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): GeoIPPolicyCountriesObjInner {
    if (json == null) {
        return json;
    }
    return {
        code: json["code"],
        name: json["name"],
    };
}

export function GeoIPPolicyCountriesObjInnerToJSON(json: any): GeoIPPolicyCountriesObjInner {
    return GeoIPPolicyCountriesObjInnerToJSONTyped(json, false);
}

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

    return {
        code: value["code"],
        name: value["name"],
    };
}
