// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function cloudformationTypeLoggingConfigToTerraform(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 {
        log_group_name: cdktf.stringToTerraform(struct.logGroupName),
        log_role_arn: cdktf.stringToTerraform(struct.logRoleArn),
    };
}
export class CloudformationTypeLoggingConfigOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._logGroupName !== undefined) {
            hasAnyValues = true;
            internalValueResult.logGroupName = this._logGroupName;
        }
        if (this._logRoleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.logRoleArn = this._logRoleArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._logGroupName = undefined;
            this._logRoleArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._logGroupName = value.logGroupName;
            this._logRoleArn = value.logRoleArn;
        }
    }
    // log_group_name - computed: false, optional: false, required: true
    _logGroupName;
    get logGroupName() {
        return this.getStringAttribute('log_group_name');
    }
    set logGroupName(value) {
        this._logGroupName = value;
    }
    // Temporarily expose input value. Use with caution.
    get logGroupNameInput() {
        return this._logGroupName;
    }
    // log_role_arn - computed: false, optional: false, required: true
    _logRoleArn;
    get logRoleArn() {
        return this.getStringAttribute('log_role_arn');
    }
    set logRoleArn(value) {
        this._logRoleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get logRoleArnInput() {
        return this._logRoleArn;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_type aws_cloudformation_type}
*/
export class CloudformationType extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_cloudformation_type";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_type aws_cloudformation_type} 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 CloudformationTypeConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_cloudformation_type',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._executionRoleArn = config.executionRoleArn;
        this._schemaHandlerPackage = config.schemaHandlerPackage;
        this._type = config.type;
        this._typeName = config.typeName;
        this._loggingConfig.internalValue = config.loggingConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // default_version_id - computed: true, optional: false, required: false
    get defaultVersionId() {
        return this.getStringAttribute('default_version_id');
    }
    // deprecated_status - computed: true, optional: false, required: false
    get deprecatedStatus() {
        return this.getStringAttribute('deprecated_status');
    }
    // description - computed: true, optional: false, required: false
    get description() {
        return this.getStringAttribute('description');
    }
    // documentation_url - computed: true, optional: false, required: false
    get documentationUrl() {
        return this.getStringAttribute('documentation_url');
    }
    // execution_role_arn - computed: false, optional: true, required: false
    _executionRoleArn;
    get executionRoleArn() {
        return this.getStringAttribute('execution_role_arn');
    }
    set executionRoleArn(value) {
        this._executionRoleArn = value;
    }
    resetExecutionRoleArn() {
        this._executionRoleArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get executionRoleArnInput() {
        return this._executionRoleArn;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // is_default_version - computed: true, optional: false, required: false
    get isDefaultVersion() {
        return this.getBooleanAttribute('is_default_version');
    }
    // provisioning_type - computed: true, optional: false, required: false
    get provisioningType() {
        return this.getStringAttribute('provisioning_type');
    }
    // schema - computed: true, optional: false, required: false
    get schema() {
        return this.getStringAttribute('schema');
    }
    // schema_handler_package - computed: false, optional: false, required: true
    _schemaHandlerPackage;
    get schemaHandlerPackage() {
        return this.getStringAttribute('schema_handler_package');
    }
    set schemaHandlerPackage(value) {
        this._schemaHandlerPackage = value;
    }
    // Temporarily expose input value. Use with caution.
    get schemaHandlerPackageInput() {
        return this._schemaHandlerPackage;
    }
    // source_url - computed: true, optional: false, required: false
    get sourceUrl() {
        return this.getStringAttribute('source_url');
    }
    // type - computed: true, optional: true, required: false
    _type;
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    resetType() {
        this._type = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
    // type_arn - computed: true, optional: false, required: false
    get typeArn() {
        return this.getStringAttribute('type_arn');
    }
    // type_name - computed: false, optional: false, required: true
    _typeName;
    get typeName() {
        return this.getStringAttribute('type_name');
    }
    set typeName(value) {
        this._typeName = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeNameInput() {
        return this._typeName;
    }
    // version_id - computed: true, optional: false, required: false
    get versionId() {
        return this.getStringAttribute('version_id');
    }
    // visibility - computed: true, optional: false, required: false
    get visibility() {
        return this.getStringAttribute('visibility');
    }
    // logging_config - computed: false, optional: true, required: false
    _loggingConfig = new CloudformationTypeLoggingConfigOutputReference(this, "logging_config", true);
    get loggingConfig() {
        return this._loggingConfig;
    }
    putLoggingConfig(value) {
        this._loggingConfig.internalValue = value;
    }
    resetLoggingConfig() {
        this._loggingConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get loggingConfigInput() {
        return this._loggingConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            execution_role_arn: cdktf.stringToTerraform(this._executionRoleArn),
            schema_handler_package: cdktf.stringToTerraform(this._schemaHandlerPackage),
            type: cdktf.stringToTerraform(this._type),
            type_name: cdktf.stringToTerraform(this._typeName),
            logging_config: cloudformationTypeLoggingConfigToTerraform(this._loggingConfig.internalValue),
        };
    }
}
//# sourceMappingURL=cloudformation-type.js.map