// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function glueClassifierCsvClassifierToTerraform(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 {
        allow_single_column: cdktf.booleanToTerraform(struct.allowSingleColumn),
        contains_header: cdktf.stringToTerraform(struct.containsHeader),
        delimiter: cdktf.stringToTerraform(struct.delimiter),
        disable_value_trimming: cdktf.booleanToTerraform(struct.disableValueTrimming),
        header: cdktf.listMapper(cdktf.stringToTerraform)(struct.header),
        quote_symbol: cdktf.stringToTerraform(struct.quoteSymbol),
    };
}
export class GlueClassifierCsvClassifierOutputReference 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._allowSingleColumn !== undefined) {
            hasAnyValues = true;
            internalValueResult.allowSingleColumn = this._allowSingleColumn;
        }
        if (this._containsHeader !== undefined) {
            hasAnyValues = true;
            internalValueResult.containsHeader = this._containsHeader;
        }
        if (this._delimiter !== undefined) {
            hasAnyValues = true;
            internalValueResult.delimiter = this._delimiter;
        }
        if (this._disableValueTrimming !== undefined) {
            hasAnyValues = true;
            internalValueResult.disableValueTrimming = this._disableValueTrimming;
        }
        if (this._header !== undefined) {
            hasAnyValues = true;
            internalValueResult.header = this._header;
        }
        if (this._quoteSymbol !== undefined) {
            hasAnyValues = true;
            internalValueResult.quoteSymbol = this._quoteSymbol;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._allowSingleColumn = undefined;
            this._containsHeader = undefined;
            this._delimiter = undefined;
            this._disableValueTrimming = undefined;
            this._header = undefined;
            this._quoteSymbol = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._allowSingleColumn = value.allowSingleColumn;
            this._containsHeader = value.containsHeader;
            this._delimiter = value.delimiter;
            this._disableValueTrimming = value.disableValueTrimming;
            this._header = value.header;
            this._quoteSymbol = value.quoteSymbol;
        }
    }
    // allow_single_column - computed: false, optional: true, required: false
    _allowSingleColumn;
    get allowSingleColumn() {
        return this.getBooleanAttribute('allow_single_column');
    }
    set allowSingleColumn(value) {
        this._allowSingleColumn = value;
    }
    resetAllowSingleColumn() {
        this._allowSingleColumn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get allowSingleColumnInput() {
        return this._allowSingleColumn;
    }
    // contains_header - computed: false, optional: true, required: false
    _containsHeader;
    get containsHeader() {
        return this.getStringAttribute('contains_header');
    }
    set containsHeader(value) {
        this._containsHeader = value;
    }
    resetContainsHeader() {
        this._containsHeader = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get containsHeaderInput() {
        return this._containsHeader;
    }
    // delimiter - computed: false, optional: true, required: false
    _delimiter;
    get delimiter() {
        return this.getStringAttribute('delimiter');
    }
    set delimiter(value) {
        this._delimiter = value;
    }
    resetDelimiter() {
        this._delimiter = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get delimiterInput() {
        return this._delimiter;
    }
    // disable_value_trimming - computed: false, optional: true, required: false
    _disableValueTrimming;
    get disableValueTrimming() {
        return this.getBooleanAttribute('disable_value_trimming');
    }
    set disableValueTrimming(value) {
        this._disableValueTrimming = value;
    }
    resetDisableValueTrimming() {
        this._disableValueTrimming = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get disableValueTrimmingInput() {
        return this._disableValueTrimming;
    }
    // header - computed: false, optional: true, required: false
    _header;
    get header() {
        return this.getListAttribute('header');
    }
    set header(value) {
        this._header = value;
    }
    resetHeader() {
        this._header = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get headerInput() {
        return this._header;
    }
    // quote_symbol - computed: false, optional: true, required: false
    _quoteSymbol;
    get quoteSymbol() {
        return this.getStringAttribute('quote_symbol');
    }
    set quoteSymbol(value) {
        this._quoteSymbol = value;
    }
    resetQuoteSymbol() {
        this._quoteSymbol = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get quoteSymbolInput() {
        return this._quoteSymbol;
    }
}
export function glueClassifierGrokClassifierToTerraform(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 {
        classification: cdktf.stringToTerraform(struct.classification),
        custom_patterns: cdktf.stringToTerraform(struct.customPatterns),
        grok_pattern: cdktf.stringToTerraform(struct.grokPattern),
    };
}
export class GlueClassifierGrokClassifierOutputReference 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._classification !== undefined) {
            hasAnyValues = true;
            internalValueResult.classification = this._classification;
        }
        if (this._customPatterns !== undefined) {
            hasAnyValues = true;
            internalValueResult.customPatterns = this._customPatterns;
        }
        if (this._grokPattern !== undefined) {
            hasAnyValues = true;
            internalValueResult.grokPattern = this._grokPattern;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._classification = undefined;
            this._customPatterns = undefined;
            this._grokPattern = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._classification = value.classification;
            this._customPatterns = value.customPatterns;
            this._grokPattern = value.grokPattern;
        }
    }
    // classification - computed: false, optional: false, required: true
    _classification;
    get classification() {
        return this.getStringAttribute('classification');
    }
    set classification(value) {
        this._classification = value;
    }
    // Temporarily expose input value. Use with caution.
    get classificationInput() {
        return this._classification;
    }
    // custom_patterns - computed: false, optional: true, required: false
    _customPatterns;
    get customPatterns() {
        return this.getStringAttribute('custom_patterns');
    }
    set customPatterns(value) {
        this._customPatterns = value;
    }
    resetCustomPatterns() {
        this._customPatterns = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get customPatternsInput() {
        return this._customPatterns;
    }
    // grok_pattern - computed: false, optional: false, required: true
    _grokPattern;
    get grokPattern() {
        return this.getStringAttribute('grok_pattern');
    }
    set grokPattern(value) {
        this._grokPattern = value;
    }
    // Temporarily expose input value. Use with caution.
    get grokPatternInput() {
        return this._grokPattern;
    }
}
export function glueClassifierJsonClassifierToTerraform(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 {
        json_path: cdktf.stringToTerraform(struct.jsonPath),
    };
}
export class GlueClassifierJsonClassifierOutputReference 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._jsonPath !== undefined) {
            hasAnyValues = true;
            internalValueResult.jsonPath = this._jsonPath;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._jsonPath = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._jsonPath = value.jsonPath;
        }
    }
    // json_path - computed: false, optional: false, required: true
    _jsonPath;
    get jsonPath() {
        return this.getStringAttribute('json_path');
    }
    set jsonPath(value) {
        this._jsonPath = value;
    }
    // Temporarily expose input value. Use with caution.
    get jsonPathInput() {
        return this._jsonPath;
    }
}
export function glueClassifierXmlClassifierToTerraform(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 {
        classification: cdktf.stringToTerraform(struct.classification),
        row_tag: cdktf.stringToTerraform(struct.rowTag),
    };
}
export class GlueClassifierXmlClassifierOutputReference 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._classification !== undefined) {
            hasAnyValues = true;
            internalValueResult.classification = this._classification;
        }
        if (this._rowTag !== undefined) {
            hasAnyValues = true;
            internalValueResult.rowTag = this._rowTag;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._classification = undefined;
            this._rowTag = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._classification = value.classification;
            this._rowTag = value.rowTag;
        }
    }
    // classification - computed: false, optional: false, required: true
    _classification;
    get classification() {
        return this.getStringAttribute('classification');
    }
    set classification(value) {
        this._classification = value;
    }
    // Temporarily expose input value. Use with caution.
    get classificationInput() {
        return this._classification;
    }
    // row_tag - computed: false, optional: false, required: true
    _rowTag;
    get rowTag() {
        return this.getStringAttribute('row_tag');
    }
    set rowTag(value) {
        this._rowTag = value;
    }
    // Temporarily expose input value. Use with caution.
    get rowTagInput() {
        return this._rowTag;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/glue_classifier aws_glue_classifier}
*/
export class GlueClassifier extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_glue_classifier";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/glue_classifier aws_glue_classifier} 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 GlueClassifierConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_glue_classifier',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._name = config.name;
        this._csvClassifier.internalValue = config.csvClassifier;
        this._grokClassifier.internalValue = config.grokClassifier;
        this._jsonClassifier.internalValue = config.jsonClassifier;
        this._xmlClassifier.internalValue = config.xmlClassifier;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // 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;
    }
    // csv_classifier - computed: false, optional: true, required: false
    _csvClassifier = new GlueClassifierCsvClassifierOutputReference(this, "csv_classifier", true);
    get csvClassifier() {
        return this._csvClassifier;
    }
    putCsvClassifier(value) {
        this._csvClassifier.internalValue = value;
    }
    resetCsvClassifier() {
        this._csvClassifier.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get csvClassifierInput() {
        return this._csvClassifier.internalValue;
    }
    // grok_classifier - computed: false, optional: true, required: false
    _grokClassifier = new GlueClassifierGrokClassifierOutputReference(this, "grok_classifier", true);
    get grokClassifier() {
        return this._grokClassifier;
    }
    putGrokClassifier(value) {
        this._grokClassifier.internalValue = value;
    }
    resetGrokClassifier() {
        this._grokClassifier.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get grokClassifierInput() {
        return this._grokClassifier.internalValue;
    }
    // json_classifier - computed: false, optional: true, required: false
    _jsonClassifier = new GlueClassifierJsonClassifierOutputReference(this, "json_classifier", true);
    get jsonClassifier() {
        return this._jsonClassifier;
    }
    putJsonClassifier(value) {
        this._jsonClassifier.internalValue = value;
    }
    resetJsonClassifier() {
        this._jsonClassifier.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get jsonClassifierInput() {
        return this._jsonClassifier.internalValue;
    }
    // xml_classifier - computed: false, optional: true, required: false
    _xmlClassifier = new GlueClassifierXmlClassifierOutputReference(this, "xml_classifier", true);
    get xmlClassifier() {
        return this._xmlClassifier;
    }
    putXmlClassifier(value) {
        this._xmlClassifier.internalValue = value;
    }
    resetXmlClassifier() {
        this._xmlClassifier.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get xmlClassifierInput() {
        return this._xmlClassifier.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            name: cdktf.stringToTerraform(this._name),
            csv_classifier: glueClassifierCsvClassifierToTerraform(this._csvClassifier.internalValue),
            grok_classifier: glueClassifierGrokClassifierToTerraform(this._grokClassifier.internalValue),
            json_classifier: glueClassifierJsonClassifierToTerraform(this._jsonClassifier.internalValue),
            xml_classifier: glueClassifierXmlClassifierToTerraform(this._xmlClassifier.internalValue),
        };
    }
}
//# sourceMappingURL=glue-classifier.js.map