"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.2-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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfCertificateGenerationRequest = instanceOfCertificateGenerationRequest;
exports.CertificateGenerationRequestFromJSON = CertificateGenerationRequestFromJSON;
exports.CertificateGenerationRequestFromJSONTyped = CertificateGenerationRequestFromJSONTyped;
exports.CertificateGenerationRequestToJSON = CertificateGenerationRequestToJSON;
exports.CertificateGenerationRequestToJSONTyped = CertificateGenerationRequestToJSONTyped;
const AlgEnum_1 = require("./AlgEnum");
/**
 * Check if a given object implements the CertificateGenerationRequest interface.
 */
function instanceOfCertificateGenerationRequest(value) {
    if (!('commonName' in value) || value['commonName'] === undefined)
        return false;
    if (!('validityDays' in value) || value['validityDays'] === undefined)
        return false;
    return true;
}
function CertificateGenerationRequestFromJSON(json) {
    return CertificateGenerationRequestFromJSONTyped(json, false);
}
function CertificateGenerationRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'commonName': json['common_name'],
        'subjectAltName': json['subject_alt_name'] == null ? undefined : json['subject_alt_name'],
        'validityDays': json['validity_days'],
        'alg': json['alg'] == null ? undefined : (0, AlgEnum_1.AlgEnumFromJSON)(json['alg']),
    };
}
function CertificateGenerationRequestToJSON(json) {
    return CertificateGenerationRequestToJSONTyped(json, false);
}
function CertificateGenerationRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'common_name': value['commonName'],
        'subject_alt_name': value['subjectAltName'],
        'validity_days': value['validityDays'],
        'alg': (0, AlgEnum_1.AlgEnumToJSON)(value['alg']),
    };
}
//# sourceMappingURL=CertificateGenerationRequest.js.map