"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateProviderBindingsFromSchema = exports.CodeMaker = exports.TerraformProviderGenerator = exports.escapeAttributeName = exports.sanitizeClassOrNamespaceName = exports.isLocalModule = exports.TerraformProviderConstraint = exports.TerraformModuleConstraint = exports.isRegistryModule = void 0;
// Copyright (c) HashiCorp, Inc
// SPDX-License-Identifier: MPL-2.0
__exportStar(require("./get/constructs-maker"), exports);
var commons_1 = require("@cdktn/commons");
Object.defineProperty(exports, "isRegistryModule", { enumerable: true, get: function () { return commons_1.isRegistryModule; } });
Object.defineProperty(exports, "TerraformModuleConstraint", { enumerable: true, get: function () { return commons_1.TerraformModuleConstraint; } });
Object.defineProperty(exports, "TerraformProviderConstraint", { enumerable: true, get: function () { return commons_1.TerraformProviderConstraint; } });
Object.defineProperty(exports, "isLocalModule", { enumerable: true, get: function () { return commons_1.isLocalModule; } });
var resource_parser_1 = require("./get/generator/resource-parser");
Object.defineProperty(exports, "sanitizeClassOrNamespaceName", { enumerable: true, get: function () { return resource_parser_1.sanitizeClassOrNamespaceName; } });
const codemaker_1 = require("codemaker");
Object.defineProperty(exports, "CodeMaker", { enumerable: true, get: function () { return codemaker_1.CodeMaker; } });
const constructs_maker_1 = require("./get/constructs-maker");
var models_1 = require("./get/generator/models");
Object.defineProperty(exports, "escapeAttributeName", { enumerable: true, get: function () { return models_1.escapeAttributeName; } });
const provider_generator_1 = require("./get/generator/provider-generator");
Object.defineProperty(exports, "TerraformProviderGenerator", { enumerable: true, get: function () { return provider_generator_1.TerraformProviderGenerator; } });
// Used for testing only
async function generateProviderBindingsFromSchema(targetPath, schemaJSON, options) {
    const code = new codemaker_1.CodeMaker();
    const generator = new provider_generator_1.TerraformProviderGenerator(code, schemaJSON);
    generator.generateAll();
    await code.save(targetPath);
    if (options) {
        await (0, constructs_maker_1.generateJsiiLanguage)(code, options, targetPath);
    }
}
exports.generateProviderBindingsFromSchema = generateProviderBindingsFromSchema;
// Used for convert
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSwrQkFBK0I7QUFDL0IsbUNBQW1DO0FBQ25DLHlEQUF1QztBQUN2QywwQ0FLd0I7QUFKdEIsMkdBQUEsZ0JBQWdCLE9BQUE7QUFDaEIsb0hBQUEseUJBQXlCLE9BQUE7QUFDekIsc0hBQUEsMkJBQTJCLE9BQUE7QUFDM0Isd0dBQUEsYUFBYSxPQUFBO0FBRWYsbUVBQStFO0FBQXRFLCtIQUFBLDRCQUE0QixPQUFBO0FBRXJDLHlDQUFzQztBQVNELDBGQVQ1QixxQkFBUyxPQVM0QjtBQVI5Qyw2REFHZ0M7QUFDaEMsaURBQTZEO0FBQXBELDZHQUFBLG1CQUFtQixPQUFBO0FBQzVCLDJFQUFnRjtBQUd2RSwyR0FIQSwrQ0FBMEIsT0FHQTtBQUVuQyx3QkFBd0I7QUFDakIsS0FBSyxVQUFVLGtDQUFrQyxDQUN0RCxVQUFrQixFQUNsQixVQUEwQixFQUMxQixPQUE2QjtJQUU3QixNQUFNLElBQUksR0FBRyxJQUFJLHFCQUFTLEVBQUUsQ0FBQztJQUM3QixNQUF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