// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function opsworksStackCustomCookbooksSourceToTerraform(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),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/opsworks_stack aws_opsworks_stack}
*/
export class OpsworksStack extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_opsworks_stack";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/opsworks_stack aws_opsworks_stack} 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 OpsworksStackConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_opsworks_stack',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._agentVersion = config.agentVersion;
        this._berkshelfVersion = config.berkshelfVersion;
        this._color = config.color;
        this._configurationManagerName = config.configurationManagerName;
        this._configurationManagerVersion = config.configurationManagerVersion;
        this._customJson = config.customJson;
        this._defaultAvailabilityZone = config.defaultAvailabilityZone;
        this._defaultInstanceProfileArn = config.defaultInstanceProfileArn;
        this._defaultOs = config.defaultOs;
        this._defaultRootDeviceType = config.defaultRootDeviceType;
        this._defaultSshKeyName = config.defaultSshKeyName;
        this._defaultSubnetId = config.defaultSubnetId;
        this._hostnameTheme = config.hostnameTheme;
        this._manageBerkshelf = config.manageBerkshelf;
        this._name = config.name;
        this._region = config.region;
        this._serviceRoleArn = config.serviceRoleArn;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._useCustomCookbooks = config.useCustomCookbooks;
        this._useOpsworksSecurityGroups = config.useOpsworksSecurityGroups;
        this._vpcId = config.vpcId;
        this._customCookbooksSource = config.customCookbooksSource;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // agent_version - computed: true, optional: true, required: false
    _agentVersion;
    get agentVersion() {
        return this.getStringAttribute('agent_version');
    }
    set agentVersion(value) {
        this._agentVersion = value;
    }
    resetAgentVersion() {
        this._agentVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get agentVersionInput() {
        return this._agentVersion;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // berkshelf_version - computed: false, optional: true, required: false
    _berkshelfVersion;
    get berkshelfVersion() {
        return this.getStringAttribute('berkshelf_version');
    }
    set berkshelfVersion(value) {
        this._berkshelfVersion = value;
    }
    resetBerkshelfVersion() {
        this._berkshelfVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get berkshelfVersionInput() {
        return this._berkshelfVersion;
    }
    // color - computed: false, optional: true, required: false
    _color;
    get color() {
        return this.getStringAttribute('color');
    }
    set color(value) {
        this._color = value;
    }
    resetColor() {
        this._color = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get colorInput() {
        return this._color;
    }
    // configuration_manager_name - computed: false, optional: true, required: false
    _configurationManagerName;
    get configurationManagerName() {
        return this.getStringAttribute('configuration_manager_name');
    }
    set configurationManagerName(value) {
        this._configurationManagerName = value;
    }
    resetConfigurationManagerName() {
        this._configurationManagerName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get configurationManagerNameInput() {
        return this._configurationManagerName;
    }
    // configuration_manager_version - computed: false, optional: true, required: false
    _configurationManagerVersion;
    get configurationManagerVersion() {
        return this.getStringAttribute('configuration_manager_version');
    }
    set configurationManagerVersion(value) {
        this._configurationManagerVersion = value;
    }
    resetConfigurationManagerVersion() {
        this._configurationManagerVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get configurationManagerVersionInput() {
        return this._configurationManagerVersion;
    }
    // custom_json - computed: false, optional: true, required: false
    _customJson;
    get customJson() {
        return this.getStringAttribute('custom_json');
    }
    set customJson(value) {
        this._customJson = value;
    }
    resetCustomJson() {
        this._customJson = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get customJsonInput() {
        return this._customJson;
    }
    // default_availability_zone - computed: true, optional: true, required: false
    _defaultAvailabilityZone;
    get defaultAvailabilityZone() {
        return this.getStringAttribute('default_availability_zone');
    }
    set defaultAvailabilityZone(value) {
        this._defaultAvailabilityZone = value;
    }
    resetDefaultAvailabilityZone() {
        this._defaultAvailabilityZone = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get defaultAvailabilityZoneInput() {
        return this._defaultAvailabilityZone;
    }
    // default_instance_profile_arn - computed: false, optional: false, required: true
    _defaultInstanceProfileArn;
    get defaultInstanceProfileArn() {
        return this.getStringAttribute('default_instance_profile_arn');
    }
    set defaultInstanceProfileArn(value) {
        this._defaultInstanceProfileArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get defaultInstanceProfileArnInput() {
        return this._defaultInstanceProfileArn;
    }
    // default_os - computed: false, optional: true, required: false
    _defaultOs;
    get defaultOs() {
        return this.getStringAttribute('default_os');
    }
    set defaultOs(value) {
        this._defaultOs = value;
    }
    resetDefaultOs() {
        this._defaultOs = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get defaultOsInput() {
        return this._defaultOs;
    }
    // default_root_device_type - computed: false, optional: true, required: false
    _defaultRootDeviceType;
    get defaultRootDeviceType() {
        return this.getStringAttribute('default_root_device_type');
    }
    set defaultRootDeviceType(value) {
        this._defaultRootDeviceType = value;
    }
    resetDefaultRootDeviceType() {
        this._defaultRootDeviceType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get defaultRootDeviceTypeInput() {
        return this._defaultRootDeviceType;
    }
    // default_ssh_key_name - computed: false, optional: true, required: false
    _defaultSshKeyName;
    get defaultSshKeyName() {
        return this.getStringAttribute('default_ssh_key_name');
    }
    set defaultSshKeyName(value) {
        this._defaultSshKeyName = value;
    }
    resetDefaultSshKeyName() {
        this._defaultSshKeyName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get defaultSshKeyNameInput() {
        return this._defaultSshKeyName;
    }
    // default_subnet_id - computed: true, optional: true, required: false
    _defaultSubnetId;
    get defaultSubnetId() {
        return this.getStringAttribute('default_subnet_id');
    }
    set defaultSubnetId(value) {
        this._defaultSubnetId = value;
    }
    resetDefaultSubnetId() {
        this._defaultSubnetId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get defaultSubnetIdInput() {
        return this._defaultSubnetId;
    }
    // hostname_theme - computed: false, optional: true, required: false
    _hostnameTheme;
    get hostnameTheme() {
        return this.getStringAttribute('hostname_theme');
    }
    set hostnameTheme(value) {
        this._hostnameTheme = value;
    }
    resetHostnameTheme() {
        this._hostnameTheme = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get hostnameThemeInput() {
        return this._hostnameTheme;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // manage_berkshelf - computed: false, optional: true, required: false
    _manageBerkshelf;
    get manageBerkshelf() {
        return this.getBooleanAttribute('manage_berkshelf');
    }
    set manageBerkshelf(value) {
        this._manageBerkshelf = value;
    }
    resetManageBerkshelf() {
        this._manageBerkshelf = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get manageBerkshelfInput() {
        return this._manageBerkshelf;
    }
    // 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;
    }
    // region - computed: false, optional: false, required: true
    _region;
    get region() {
        return this.getStringAttribute('region');
    }
    set region(value) {
        this._region = value;
    }
    // Temporarily expose input value. Use with caution.
    get regionInput() {
        return this._region;
    }
    // service_role_arn - computed: false, optional: false, required: true
    _serviceRoleArn;
    get serviceRoleArn() {
        return this.getStringAttribute('service_role_arn');
    }
    set serviceRoleArn(value) {
        this._serviceRoleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get serviceRoleArnInput() {
        return this._serviceRoleArn;
    }
    // stack_endpoint - computed: true, optional: false, required: false
    get stackEndpoint() {
        return this.getStringAttribute('stack_endpoint');
    }
    // tags - computed: false, optional: true, required: false
    _tags;
    get tags() {
        return this.getStringMapAttribute('tags');
    }
    set tags(value) {
        this._tags = value;
    }
    resetTags() {
        this._tags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsInput() {
        return this._tags;
    }
    // tags_all - computed: true, optional: true, required: false
    _tagsAll;
    get tagsAll() {
        return this.getStringMapAttribute('tags_all');
    }
    set tagsAll(value) {
        this._tagsAll = value;
    }
    resetTagsAll() {
        this._tagsAll = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsAllInput() {
        return this._tagsAll;
    }
    // use_custom_cookbooks - computed: false, optional: true, required: false
    _useCustomCookbooks;
    get useCustomCookbooks() {
        return this.getBooleanAttribute('use_custom_cookbooks');
    }
    set useCustomCookbooks(value) {
        this._useCustomCookbooks = value;
    }
    resetUseCustomCookbooks() {
        this._useCustomCookbooks = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get useCustomCookbooksInput() {
        return this._useCustomCookbooks;
    }
    // use_opsworks_security_groups - computed: false, optional: true, required: false
    _useOpsworksSecurityGroups;
    get useOpsworksSecurityGroups() {
        return this.getBooleanAttribute('use_opsworks_security_groups');
    }
    set useOpsworksSecurityGroups(value) {
        this._useOpsworksSecurityGroups = value;
    }
    resetUseOpsworksSecurityGroups() {
        this._useOpsworksSecurityGroups = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get useOpsworksSecurityGroupsInput() {
        return this._useOpsworksSecurityGroups;
    }
    // vpc_id - computed: true, optional: true, required: false
    _vpcId;
    get vpcId() {
        return this.getStringAttribute('vpc_id');
    }
    set vpcId(value) {
        this._vpcId = value;
    }
    resetVpcId() {
        this._vpcId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get vpcIdInput() {
        return this._vpcId;
    }
    // custom_cookbooks_source - computed: false, optional: true, required: false
    _customCookbooksSource;
    get customCookbooksSource() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('custom_cookbooks_source');
    }
    set customCookbooksSource(value) {
        this._customCookbooksSource = value;
    }
    resetCustomCookbooksSource() {
        this._customCookbooksSource = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get customCookbooksSourceInput() {
        return this._customCookbooksSource;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            agent_version: cdktf.stringToTerraform(this._agentVersion),
            berkshelf_version: cdktf.stringToTerraform(this._berkshelfVersion),
            color: cdktf.stringToTerraform(this._color),
            configuration_manager_name: cdktf.stringToTerraform(this._configurationManagerName),
            configuration_manager_version: cdktf.stringToTerraform(this._configurationManagerVersion),
            custom_json: cdktf.stringToTerraform(this._customJson),
            default_availability_zone: cdktf.stringToTerraform(this._defaultAvailabilityZone),
            default_instance_profile_arn: cdktf.stringToTerraform(this._defaultInstanceProfileArn),
            default_os: cdktf.stringToTerraform(this._defaultOs),
            default_root_device_type: cdktf.stringToTerraform(this._defaultRootDeviceType),
            default_ssh_key_name: cdktf.stringToTerraform(this._defaultSshKeyName),
            default_subnet_id: cdktf.stringToTerraform(this._defaultSubnetId),
            hostname_theme: cdktf.stringToTerraform(this._hostnameTheme),
            manage_berkshelf: cdktf.booleanToTerraform(this._manageBerkshelf),
            name: cdktf.stringToTerraform(this._name),
            region: cdktf.stringToTerraform(this._region),
            service_role_arn: cdktf.stringToTerraform(this._serviceRoleArn),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            use_custom_cookbooks: cdktf.booleanToTerraform(this._useCustomCookbooks),
            use_opsworks_security_groups: cdktf.booleanToTerraform(this._useOpsworksSecurityGroups),
            vpc_id: cdktf.stringToTerraform(this._vpcId),
            custom_cookbooks_source: cdktf.listMapper(opsworksStackCustomCookbooksSourceToTerraform)(this._customCookbooksSource),
        };
    }
}
//# sourceMappingURL=opsworks-stack.js.map