"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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLCtCQUErQjtBQUMvQixtQ0FBbUM7QUFDbkMseURBQXVDO0FBQ3ZDLDBDQUt3QjtBQUp0QiwyR0FBQSxnQkFBZ0IsT0FBQTtBQUNoQixvSEFBQSx5QkFBeUIsT0FBQTtBQUN6QixzSEFBQSwyQkFBMkIsT0FBQTtBQUMzQix3R0FBQSxhQUFhLE9BQUE7QUFFZixtRUFBK0U7QUFBdEUsK0hBQUEsNEJBQTRCLE9BQUE7QUFFckMseUNBQXNDO0FBU0QsMEZBVDVCLHFCQUFTLE9BUzRCO0FBUjlDLDZEQUdnQztBQUNoQyxpREFBNkQ7QUFBcEQsNkdBQUEsbUJBQW1CLE9BQUE7QUFDNUIsMkVBQWdGO0FBR3ZFLDJHQUhBLCtDQUEwQixPQUdBO0FBRW5DLHdCQUF3QjtBQUNqQixLQUFLLFVBQVUsa0NBQWtDLENBQ3RELFVBQWtCLEVBQ2xCLFVBQTBCLEVBQzFCLE9BQTZCO0lBRTdCLE1BQU0sSUFBSSxHQUFHLElBQUkscUJBQVMsRUFBRSxDQUFDO0lBQzdCLE1BQU0sU0FB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