// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function opsworksApplicationAppSourceToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        password: cdktf.stringToTerraform(struct.password),
        revision: cdktf.stringToTerraform(struct.revision),
        ssh_key: cdktf.stringToTerraform(struct.sshKey),
        type: cdktf.stringToTerraform(struct.type),
        url: cdktf.stringToTerraform(struct.url),
        username: cdktf.stringToTerraform(struct.username),
    };
}
export function opsworksApplicationEnvironmentToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        key: cdktf.stringToTerraform(struct.key),
        secure: cdktf.booleanToTerraform(struct.secure),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export function opsworksApplicationSslConfigurationToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        certificate: cdktf.stringToTerraform(struct.certificate),
        chain: cdktf.stringToTerraform(struct.chain),
        private_key: cdktf.stringToTerraform(struct.privateKey),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/opsworks_application aws_opsworks_application}
*/
export class OpsworksApplication extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_opsworks_application";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/opsworks_application aws_opsworks_application} Resource
    *
    * @param scope The scope in which to define this construct
    * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
    * @param options OpsworksApplicationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_opsworks_application',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._autoBundleOnDeploy = config.autoBundleOnDeploy;
        this._awsFlowRubySettings = config.awsFlowRubySettings;
        this._dataSourceArn = config.dataSourceArn;
        this._dataSourceDatabaseName = config.dataSourceDatabaseName;
        this._dataSourceType = config.dataSourceType;
        this._description = config.description;
        this._documentRoot = config.documentRoot;
        this._domains = config.domains;
        this._enableSsl = config.enableSsl;
        this._name = config.name;
        this._railsEnv = config.railsEnv;
        this._shortName = config.shortName;
        this._stackId = config.stackId;
        this._type = config.type;
        this._appSource = config.appSource;
        this._environment = config.environment;
        this._sslConfiguration = config.sslConfiguration;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // auto_bundle_on_deploy - computed: false, optional: true, required: false
    _autoBundleOnDeploy;
    get autoBundleOnDeploy() {
        return this.getStringAttribute('auto_bundle_on_deploy');
    }
    set autoBundleOnDeploy(value) {
        this._autoBundleOnDeploy = value;
    }
    resetAutoBundleOnDeploy() {
        this._autoBundleOnDeploy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoBundleOnDeployInput() {
        return this._autoBundleOnDeploy;
    }
    // aws_flow_ruby_settings - computed: false, optional: true, required: false
    _awsFlowRubySettings;
    get awsFlowRubySettings() {
        return this.getStringAttribute('aws_flow_ruby_settings');
    }
    set awsFlowRubySettings(value) {
        this._awsFlowRubySettings = value;
    }
    resetAwsFlowRubySettings() {
        this._awsFlowRubySettings = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get awsFlowRubySettingsInput() {
        return this._awsFlowRubySettings;
    }
    // data_source_arn - computed: false, optional: true, required: false
    _dataSourceArn;
    get dataSourceArn() {
        return this.getStringAttribute('data_source_arn');
    }
    set dataSourceArn(value) {
        this._dataSourceArn = value;
    }
    resetDataSourceArn() {
        this._dataSourceArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dataSourceArnInput() {
        return this._dataSourceArn;
    }
    // data_source_database_name - computed: false, optional: true, required: false
    _dataSourceDatabaseName;
    get dataSourceDatabaseName() {
        return this.getStringAttribute('data_source_database_name');
    }
    set dataSourceDatabaseName(value) {
        this._dataSourceDatabaseName = value;
    }
    resetDataSourceDatabaseName() {
        this._dataSourceDatabaseName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dataSourceDatabaseNameInput() {
        return this._dataSourceDatabaseName;
    }
    // data_source_type - computed: false, optional: true, required: false
    _dataSourceType;
    get dataSourceType() {
        return this.getStringAttribute('data_source_type');
    }
    set dataSourceType(value) {
        this._dataSourceType = value;
    }
    resetDataSourceType() {
        this._dataSourceType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dataSourceTypeInput() {
        return this._dataSourceType;
    }
    // description - computed: false, optional: true, required: false
    _description;
    get description() {
        return this.getStringAttribute('description');
    }
    set description(value) {
        this._description = value;
    }
    resetDescription() {
        this._description = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get descriptionInput() {
        return this._description;
    }
    // document_root - computed: false, optional: true, required: false
    _documentRoot;
    get documentRoot() {
        return this.getStringAttribute('document_root');
    }
    set documentRoot(value) {
        this._documentRoot = value;
    }
    resetDocumentRoot() {
        this._documentRoot = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get documentRootInput() {
        return this._documentRoot;
    }
    // domains - computed: false, optional: true, required: false
    _domains;
    get domains() {
        return this.getListAttribute('domains');
    }
    set domains(value) {
        this._domains = value;
    }
    resetDomains() {
        this._domains = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get domainsInput() {
        return this._domains;
    }
    // enable_ssl - computed: false, optional: true, required: false
    _enableSsl;
    get enableSsl() {
        return this.getBooleanAttribute('enable_ssl');
    }
    set enableSsl(value) {
        this._enableSsl = value;
    }
    resetEnableSsl() {
        this._enableSsl = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableSslInput() {
        return this._enableSsl;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // name - computed: false, optional: false, required: true
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // rails_env - computed: false, optional: true, required: false
    _railsEnv;
    get railsEnv() {
        return this.getStringAttribute('rails_env');
    }
    set railsEnv(value) {
        this._railsEnv = value;
    }
    resetRailsEnv() {
        this._railsEnv = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get railsEnvInput() {
        return this._railsEnv;
    }
    // short_name - computed: true, optional: true, required: false
    _shortName;
    get shortName() {
        return this.getStringAttribute('short_name');
    }
    set shortName(value) {
        this._shortName = value;
    }
    resetShortName() {
        this._shortName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get shortNameInput() {
        return this._shortName;
    }
    // stack_id - computed: false, optional: false, required: true
    _stackId;
    get stackId() {
        return this.getStringAttribute('stack_id');
    }
    set stackId(value) {
        this._stackId = value;
    }
    // Temporarily expose input value. Use with caution.
    get stackIdInput() {
        return this._stackId;
    }
    // type - computed: false, optional: false, required: true
    _type;
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
    // app_source - computed: false, optional: true, required: false
    _appSource;
    get appSource() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('app_source');
    }
    set appSource(value) {
        this._appSource = value;
    }
    resetAppSource() {
        this._appSource = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get appSourceInput() {
        return this._appSource;
    }
    // environment - computed: false, optional: true, required: false
    _environment;
    get environment() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('environment')));
    }
    set environment(value) {
        this._environment = value;
    }
    resetEnvironment() {
        this._environment = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get environmentInput() {
        return this._environment;
    }
    // ssl_configuration - computed: false, optional: true, required: false
    _sslConfiguration;
    get sslConfiguration() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('ssl_configuration');
    }
    set sslConfiguration(value) {
        this._sslConfiguration = value;
    }
    resetSslConfiguration() {
        this._sslConfiguration = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sslConfigurationInput() {
        return this._sslConfiguration;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            auto_bundle_on_deploy: cdktf.stringToTerraform(this._autoBundleOnDeploy),
            aws_flow_ruby_settings: cdktf.stringToTerraform(this._awsFlowRubySettings),
            data_source_arn: cdktf.stringToTerraform(this._dataSourceArn),
            data_source_database_name: cdktf.stringToTerraform(this._dataSourceDatabaseName),
            data_source_type: cdktf.stringToTerraform(this._dataSourceType),
            description: cdktf.stringToTerraform(this._description),
            document_root: cdktf.stringToTerraform(this._documentRoot),
            domains: cdktf.listMapper(cdktf.stringToTerraform)(this._domains),
            enable_ssl: cdktf.booleanToTerraform(this._enableSsl),
            name: cdktf.stringToTerraform(this._name),
            rails_env: cdktf.stringToTerraform(this._railsEnv),
            short_name: cdktf.stringToTerraform(this._shortName),
            stack_id: cdktf.stringToTerraform(this._stackId),
            type: cdktf.stringToTerraform(this._type),
            app_source: cdktf.listMapper(opsworksApplicationAppSourceToTerraform)(this._appSource),
            environment: cdktf.listMapper(opsworksApplicationEnvironmentToTerraform)(this._environment),
            ssl_configuration: cdktf.listMapper(opsworksApplicationSslConfigurationToTerraform)(this._sslConfiguration),
        };
    }
}
//# sourceMappingURL=opsworks-application.js.map