/* 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.
 */

/**
 * Domain Serializer
 * @export
 * @interface PatchedDomainRequest
 */
export interface PatchedDomainRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedDomainRequest
     */
    domain?: string;
    /**
     *
     * @type {boolean}
     * @memberof PatchedDomainRequest
     */
    isPrimary?: boolean;
    /**
     *
     * @type {string}
     * @memberof PatchedDomainRequest
     */
    tenant?: string;
}

/**
 * Check if a given object implements the PatchedDomainRequest interface.
 */
export function instanceOfPatchedDomainRequest(value: object): value is PatchedDomainRequest {
    return true;
}

export function PatchedDomainRequestFromJSON(json: any): PatchedDomainRequest {
    return PatchedDomainRequestFromJSONTyped(json, false);
}

export function PatchedDomainRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedDomainRequest {
    if (json == null) {
        return json;
    }
    return {
        domain: json["domain"] == null ? undefined : json["domain"],
        isPrimary: json["is_primary"] == null ? undefined : json["is_primary"],
        tenant: json["tenant"] == null ? undefined : json["tenant"],
    };
}

export function PatchedDomainRequestToJSON(json: any): PatchedDomainRequest {
    return PatchedDomainRequestToJSONTyped(json, false);
}

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

    return {
        domain: value["domain"],
        is_primary: value["isPrimary"],
        tenant: value["tenant"],
    };
}
