/* 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';
/**
 * CertificateKeyPair Serializer
 * @export
 * @interface PatchedCertificateKeyPairRequest
 */
export interface PatchedCertificateKeyPairRequest {
    /**
     * 
     * @type {string}
     * @memberof PatchedCertificateKeyPairRequest
     */
    name?: string;
    /**
     * PEM-encoded Certificate data
     * @type {string}
     * @memberof PatchedCertificateKeyPairRequest
     */
    certificateData?: string;
    /**
     * Optional Private Key. If this is set, you can use this keypair for encryption.
     * @type {string}
     * @memberof PatchedCertificateKeyPairRequest
     */
    keyData?: string;
}

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

export function PatchedCertificateKeyPairRequestFromJSON(json: any): PatchedCertificateKeyPairRequest {
    return PatchedCertificateKeyPairRequestFromJSONTyped(json, false);
}

export function PatchedCertificateKeyPairRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCertificateKeyPairRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'] == null ? undefined : json['name'],
        'certificateData': json['certificate_data'] == null ? undefined : json['certificate_data'],
        'keyData': json['key_data'] == null ? undefined : json['key_data'],
    };
}

export function PatchedCertificateKeyPairRequestToJSON(json: any): PatchedCertificateKeyPairRequest {
    return PatchedCertificateKeyPairRequestToJSONTyped(json, false);
}

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

    return {
        
        'name': value['name'],
        'certificate_data': value['certificateData'],
        'key_data': value['keyData'],
    };
}

