"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.OriginCACertificates = void 0;
const resource_1 = require("cloudflare/resource");
class OriginCACertificates extends resource_1.APIResource {
    /**
     * Create an Origin CA certificate. Use your Origin CA Key as your User Service Key
     * when calling this endpoint ([see above](#requests)).
     */
    create(body, options) {
        return this._client.post('/certificates', { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * List all existing Origin CA certificates for a given zone. Use your Origin CA
     * Key as your User Service Key when calling this endpoint
     * ([see above](#requests)).
     */
    list(options) {
        return this._client.get('/certificates', options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Revoke an existing Origin CA certificate by its serial number. Use your Origin
     * CA Key as your User Service Key when calling this endpoint
     * ([see above](#requests)).
     */
    delete(certificateId, options) {
        return this._client.delete(`/certificates/${certificateId}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Get an existing Origin CA certificate by its serial number. Use your Origin CA
     * Key as your User Service Key when calling this endpoint
     * ([see above](#requests)).
     */
    get(certificateId, options) {
        return this._client.get(`/certificates/${certificateId}`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.OriginCACertificates = OriginCACertificates;
(function (OriginCACertificates) {
})(OriginCACertificates = exports.OriginCACertificates || (exports.OriginCACertificates = {}));
//# sourceMappingURL=origin-ca-certificates.js.map