// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function networkfirewallLoggingConfigurationLoggingConfigurationLogDestinationConfigToTerraform(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_destination: cdktf.hashMapper(cdktf.stringToTerraform)(struct.logDestination),
        log_destination_type: cdktf.stringToTerraform(struct.logDestinationType),
        log_type: cdktf.stringToTerraform(struct.logType),
    };
}
export function networkfirewallLoggingConfigurationLoggingConfigurationToTerraform(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_destination_config: cdktf.listMapper(networkfirewallLoggingConfigurationLoggingConfigurationLogDestinationConfigToTerraform)(struct.logDestinationConfig),
    };
}
export class NetworkfirewallLoggingConfigurationLoggingConfigurationOutputReference 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._logDestinationConfig !== undefined) {
            hasAnyValues = true;
            internalValueResult.logDestinationConfig = this._logDestinationConfig;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._logDestinationConfig = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._logDestinationConfig = value.logDestinationConfig;
        }
    }
    // log_destination_config - computed: false, optional: false, required: true
    _logDestinationConfig;
    get logDestinationConfig() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('log_destination_config')));
    }
    set logDestinationConfig(value) {
        this._logDestinationConfig = value;
    }
    // Temporarily expose input value. Use with caution.
    get logDestinationConfigInput() {
        return this._logDestinationConfig;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/networkfirewall_logging_configuration aws_networkfirewall_logging_configuration}
*/
export class NetworkfirewallLoggingConfiguration extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_networkfirewall_logging_configuration";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/networkfirewall_logging_configuration aws_networkfirewall_logging_configuration} 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 NetworkfirewallLoggingConfigurationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_networkfirewall_logging_configuration',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._firewallArn = config.firewallArn;
        this._loggingConfiguration.internalValue = config.loggingConfiguration;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // firewall_arn - computed: false, optional: false, required: true
    _firewallArn;
    get firewallArn() {
        return this.getStringAttribute('firewall_arn');
    }
    set firewallArn(value) {
        this._firewallArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get firewallArnInput() {
        return this._firewallArn;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // logging_configuration - computed: false, optional: false, required: true
    _loggingConfiguration = new NetworkfirewallLoggingConfigurationLoggingConfigurationOutputReference(this, "logging_configuration", true);
    get loggingConfiguration() {
        return this._loggingConfiguration;
    }
    putLoggingConfiguration(value) {
        this._loggingConfiguration.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get loggingConfigurationInput() {
        return this._loggingConfiguration.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            firewall_arn: cdktf.stringToTerraform(this._firewallArn),
            logging_configuration: networkfirewallLoggingConfigurationLoggingConfigurationToTerraform(this._loggingConfiguration.internalValue),
        };
    }
}
//# sourceMappingURL=networkfirewall-logging-configuration.js.map