// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function codebuildReportGroupExportConfigS3DestinationToTerraform(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 {
        bucket: cdktf.stringToTerraform(struct.bucket),
        encryption_disabled: cdktf.booleanToTerraform(struct.encryptionDisabled),
        encryption_key: cdktf.stringToTerraform(struct.encryptionKey),
        packaging: cdktf.stringToTerraform(struct.packaging),
        path: cdktf.stringToTerraform(struct.path),
    };
}
export class CodebuildReportGroupExportConfigS3DestinationOutputReference 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._bucket !== undefined) {
            hasAnyValues = true;
            internalValueResult.bucket = this._bucket;
        }
        if (this._encryptionDisabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.encryptionDisabled = this._encryptionDisabled;
        }
        if (this._encryptionKey !== undefined) {
            hasAnyValues = true;
            internalValueResult.encryptionKey = this._encryptionKey;
        }
        if (this._packaging !== undefined) {
            hasAnyValues = true;
            internalValueResult.packaging = this._packaging;
        }
        if (this._path !== undefined) {
            hasAnyValues = true;
            internalValueResult.path = this._path;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._bucket = undefined;
            this._encryptionDisabled = undefined;
            this._encryptionKey = undefined;
            this._packaging = undefined;
            this._path = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._bucket = value.bucket;
            this._encryptionDisabled = value.encryptionDisabled;
            this._encryptionKey = value.encryptionKey;
            this._packaging = value.packaging;
            this._path = value.path;
        }
    }
    // bucket - computed: false, optional: false, required: true
    _bucket;
    get bucket() {
        return this.getStringAttribute('bucket');
    }
    set bucket(value) {
        this._bucket = value;
    }
    // Temporarily expose input value. Use with caution.
    get bucketInput() {
        return this._bucket;
    }
    // encryption_disabled - computed: false, optional: true, required: false
    _encryptionDisabled;
    get encryptionDisabled() {
        return this.getBooleanAttribute('encryption_disabled');
    }
    set encryptionDisabled(value) {
        this._encryptionDisabled = value;
    }
    resetEncryptionDisabled() {
        this._encryptionDisabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get encryptionDisabledInput() {
        return this._encryptionDisabled;
    }
    // encryption_key - computed: false, optional: false, required: true
    _encryptionKey;
    get encryptionKey() {
        return this.getStringAttribute('encryption_key');
    }
    set encryptionKey(value) {
        this._encryptionKey = value;
    }
    // Temporarily expose input value. Use with caution.
    get encryptionKeyInput() {
        return this._encryptionKey;
    }
    // packaging - computed: false, optional: true, required: false
    _packaging;
    get packaging() {
        return this.getStringAttribute('packaging');
    }
    set packaging(value) {
        this._packaging = value;
    }
    resetPackaging() {
        this._packaging = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get packagingInput() {
        return this._packaging;
    }
    // path - computed: false, optional: true, required: false
    _path;
    get path() {
        return this.getStringAttribute('path');
    }
    set path(value) {
        this._path = value;
    }
    resetPath() {
        this._path = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pathInput() {
        return this._path;
    }
}
export function codebuildReportGroupExportConfigToTerraform(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 {
        type: cdktf.stringToTerraform(struct.type),
        s3_destination: codebuildReportGroupExportConfigS3DestinationToTerraform(struct.s3Destination),
    };
}
export class CodebuildReportGroupExportConfigOutputReference 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._type !== undefined) {
            hasAnyValues = true;
            internalValueResult.type = this._type;
        }
        if (this._s3Destination?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.s3Destination = this._s3Destination?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._type = undefined;
            this._s3Destination.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._type = value.type;
            this._s3Destination.internalValue = value.s3Destination;
        }
    }
    // 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;
    }
    // s3_destination - computed: false, optional: true, required: false
    _s3Destination = new CodebuildReportGroupExportConfigS3DestinationOutputReference(this, "s3_destination", true);
    get s3Destination() {
        return this._s3Destination;
    }
    putS3Destination(value) {
        this._s3Destination.internalValue = value;
    }
    resetS3Destination() {
        this._s3Destination.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get s3DestinationInput() {
        return this._s3Destination.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/codebuild_report_group aws_codebuild_report_group}
*/
export class CodebuildReportGroup extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_codebuild_report_group";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/codebuild_report_group aws_codebuild_report_group} 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 CodebuildReportGroupConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_codebuild_report_group',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._deleteReports = config.deleteReports;
        this._name = config.name;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._type = config.type;
        this._exportConfig.internalValue = config.exportConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // created - computed: true, optional: false, required: false
    get created() {
        return this.getStringAttribute('created');
    }
    // delete_reports - computed: false, optional: true, required: false
    _deleteReports;
    get deleteReports() {
        return this.getBooleanAttribute('delete_reports');
    }
    set deleteReports(value) {
        this._deleteReports = value;
    }
    resetDeleteReports() {
        this._deleteReports = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteReportsInput() {
        return this._deleteReports;
    }
    // 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;
    }
    // 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;
    }
    // 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;
    }
    // export_config - computed: false, optional: false, required: true
    _exportConfig = new CodebuildReportGroupExportConfigOutputReference(this, "export_config", true);
    get exportConfig() {
        return this._exportConfig;
    }
    putExportConfig(value) {
        this._exportConfig.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get exportConfigInput() {
        return this._exportConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            delete_reports: cdktf.booleanToTerraform(this._deleteReports),
            name: cdktf.stringToTerraform(this._name),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            type: cdktf.stringToTerraform(this._type),
            export_config: codebuildReportGroupExportConfigToTerraform(this._exportConfig.internalValue),
        };
    }
}
//# sourceMappingURL=codebuild-report-group.js.map