UNPKG

@amaabca/aws-lex-custom-resources

Version:
27 lines (26 loc) 803 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const __1 = require(".."); class default_1 { constructor(scope, id, serviceToken, props) { this.scope = scope; this.id = id; this.serviceToken = serviceToken; this.props = props; this.locales = []; } addLocale(localeProps) { const locale = new __1.LexBotLocale(localeProps); this.locales.push(locale); return locale; } definition() { const configuration = { ...this.props }; configuration['CR.botLocales'] = this.locales.map((l) => l.definition()); return configuration; } build() { return new __1.LexBot(this.scope, this.id, this.serviceToken, this.definition()); } } exports.default = default_1;