"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppServiceCertificateOrder = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * SSL certificate purchase order.
 *
 * Uses Azure REST API version 2024-04-01. In version 2.x of the Azure Native provider, it used API version 2022-09-01.
 *
 * Other available API versions: 2022-09-01, 2023-01-01, 2023-12-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native certificateregistration [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
 */
class AppServiceCertificateOrder extends pulumi.CustomResource {
    /**
     * Get an existing AppServiceCertificateOrder resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new AppServiceCertificateOrder(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of AppServiceCertificateOrder.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === AppServiceCertificateOrder.__pulumiType;
    }
    /**
     * Create a AppServiceCertificateOrder resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        var _a, _b, _c;
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if ((!args || args.productType === undefined) && !opts.urn) {
                throw new Error("Missing required property 'productType'");
            }
            if ((!args || args.resourceGroupName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            resourceInputs["autoRenew"] = (_a = (args ? args.autoRenew : undefined)) !== null && _a !== void 0 ? _a : true;
            resourceInputs["certificateOrderName"] = args ? args.certificateOrderName : undefined;
            resourceInputs["certificates"] = args ? args.certificates : undefined;
            resourceInputs["csr"] = args ? args.csr : undefined;
            resourceInputs["distinguishedName"] = args ? args.distinguishedName : undefined;
            resourceInputs["keySize"] = (_b = (args ? args.keySize : undefined)) !== null && _b !== void 0 ? _b : 2048;
            resourceInputs["kind"] = args ? args.kind : undefined;
            resourceInputs["location"] = args ? args.location : undefined;
            resourceInputs["productType"] = args ? args.productType : undefined;
            resourceInputs["resourceGroupName"] = args ? args.resourceGroupName : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["validityInYears"] = (_c = (args ? args.validityInYears : undefined)) !== null && _c !== void 0 ? _c : 1;
            resourceInputs["appServiceCertificateNotRenewableReasons"] = undefined /*out*/;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["contact"] = undefined /*out*/;
            resourceInputs["domainVerificationToken"] = undefined /*out*/;
            resourceInputs["expirationTime"] = undefined /*out*/;
            resourceInputs["intermediate"] = undefined /*out*/;
            resourceInputs["isPrivateKeyExternal"] = undefined /*out*/;
            resourceInputs["lastCertificateIssuanceTime"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["nextAutoRenewalTimeStamp"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["root"] = undefined /*out*/;
            resourceInputs["serialNumber"] = undefined /*out*/;
            resourceInputs["signedCertificate"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["appServiceCertificateNotRenewableReasons"] = undefined /*out*/;
            resourceInputs["autoRenew"] = undefined /*out*/;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["certificates"] = undefined /*out*/;
            resourceInputs["contact"] = undefined /*out*/;
            resourceInputs["csr"] = undefined /*out*/;
            resourceInputs["distinguishedName"] = undefined /*out*/;
            resourceInputs["domainVerificationToken"] = undefined /*out*/;
            resourceInputs["expirationTime"] = undefined /*out*/;
            resourceInputs["intermediate"] = undefined /*out*/;
            resourceInputs["isPrivateKeyExternal"] = undefined /*out*/;
            resourceInputs["keySize"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["lastCertificateIssuanceTime"] = undefined /*out*/;
            resourceInputs["location"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["nextAutoRenewalTimeStamp"] = undefined /*out*/;
            resourceInputs["productType"] = undefined /*out*/;
            resourceInputs["provisioningState"] = undefined /*out*/;
            resourceInputs["root"] = undefined /*out*/;
            resourceInputs["serialNumber"] = undefined /*out*/;
            resourceInputs["signedCertificate"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
            resourceInputs["validityInYears"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:certificateregistration/v20150801:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20180201:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20190801:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20200601:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20200901:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20201001:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20201201:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20210101:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20210115:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20210201:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20210301:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20220301:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20220901:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20230101:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20231201:AppServiceCertificateOrder" }, { type: "azure-native:certificateregistration/v20240401:AppServiceCertificateOrder" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(AppServiceCertificateOrder.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AppServiceCertificateOrder = AppServiceCertificateOrder;
/** @internal */
AppServiceCertificateOrder.__pulumiType = 'azure-native:certificateregistration:AppServiceCertificateOrder';
//# sourceMappingURL=data:application/json;base64, 