// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function apiGatewayStageAccessLogSettingsToTerraform(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 {
        destination_arn: cdktf.stringToTerraform(struct.destinationArn),
        format: cdktf.stringToTerraform(struct.format),
    };
}
export class ApiGatewayStageAccessLogSettingsOutputReference 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._destinationArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.destinationArn = this._destinationArn;
        }
        if (this._format !== undefined) {
            hasAnyValues = true;
            internalValueResult.format = this._format;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._destinationArn = undefined;
            this._format = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._destinationArn = value.destinationArn;
            this._format = value.format;
        }
    }
    // destination_arn - computed: false, optional: false, required: true
    _destinationArn;
    get destinationArn() {
        return this.getStringAttribute('destination_arn');
    }
    set destinationArn(value) {
        this._destinationArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get destinationArnInput() {
        return this._destinationArn;
    }
    // format - computed: false, optional: false, required: true
    _format;
    get format() {
        return this.getStringAttribute('format');
    }
    set format(value) {
        this._format = value;
    }
    // Temporarily expose input value. Use with caution.
    get formatInput() {
        return this._format;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_stage aws_api_gateway_stage}
*/
export class ApiGatewayStage extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_api_gateway_stage";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_stage aws_api_gateway_stage} 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 ApiGatewayStageConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_api_gateway_stage',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._cacheClusterEnabled = config.cacheClusterEnabled;
        this._cacheClusterSize = config.cacheClusterSize;
        this._clientCertificateId = config.clientCertificateId;
        this._deploymentId = config.deploymentId;
        this._description = config.description;
        this._documentationVersion = config.documentationVersion;
        this._restApiId = config.restApiId;
        this._stageName = config.stageName;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._variables = config.variables;
        this._xrayTracingEnabled = config.xrayTracingEnabled;
        this._accessLogSettings.internalValue = config.accessLogSettings;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // cache_cluster_enabled - computed: false, optional: true, required: false
    _cacheClusterEnabled;
    get cacheClusterEnabled() {
        return this.getBooleanAttribute('cache_cluster_enabled');
    }
    set cacheClusterEnabled(value) {
        this._cacheClusterEnabled = value;
    }
    resetCacheClusterEnabled() {
        this._cacheClusterEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cacheClusterEnabledInput() {
        return this._cacheClusterEnabled;
    }
    // cache_cluster_size - computed: false, optional: true, required: false
    _cacheClusterSize;
    get cacheClusterSize() {
        return this.getStringAttribute('cache_cluster_size');
    }
    set cacheClusterSize(value) {
        this._cacheClusterSize = value;
    }
    resetCacheClusterSize() {
        this._cacheClusterSize = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cacheClusterSizeInput() {
        return this._cacheClusterSize;
    }
    // client_certificate_id - computed: false, optional: true, required: false
    _clientCertificateId;
    get clientCertificateId() {
        return this.getStringAttribute('client_certificate_id');
    }
    set clientCertificateId(value) {
        this._clientCertificateId = value;
    }
    resetClientCertificateId() {
        this._clientCertificateId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get clientCertificateIdInput() {
        return this._clientCertificateId;
    }
    // deployment_id - computed: false, optional: false, required: true
    _deploymentId;
    get deploymentId() {
        return this.getStringAttribute('deployment_id');
    }
    set deploymentId(value) {
        this._deploymentId = value;
    }
    // Temporarily expose input value. Use with caution.
    get deploymentIdInput() {
        return this._deploymentId;
    }
    // description - computed: false, optional: true, required: false
    _description;
    get description() {
        return this.getStringAttribute('description');
    }
    set description(value) {
        this._description = value;
    }
    resetDescription() {
        this._description = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get descriptionInput() {
        return this._description;
    }
    // documentation_version - computed: false, optional: true, required: false
    _documentationVersion;
    get documentationVersion() {
        return this.getStringAttribute('documentation_version');
    }
    set documentationVersion(value) {
        this._documentationVersion = value;
    }
    resetDocumentationVersion() {
        this._documentationVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get documentationVersionInput() {
        return this._documentationVersion;
    }
    // execution_arn - computed: true, optional: false, required: false
    get executionArn() {
        return this.getStringAttribute('execution_arn');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // invoke_url - computed: true, optional: false, required: false
    get invokeUrl() {
        return this.getStringAttribute('invoke_url');
    }
    // rest_api_id - computed: false, optional: false, required: true
    _restApiId;
    get restApiId() {
        return this.getStringAttribute('rest_api_id');
    }
    set restApiId(value) {
        this._restApiId = value;
    }
    // Temporarily expose input value. Use with caution.
    get restApiIdInput() {
        return this._restApiId;
    }
    // stage_name - computed: false, optional: false, required: true
    _stageName;
    get stageName() {
        return this.getStringAttribute('stage_name');
    }
    set stageName(value) {
        this._stageName = value;
    }
    // Temporarily expose input value. Use with caution.
    get stageNameInput() {
        return this._stageName;
    }
    // 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;
    }
    // variables - computed: false, optional: true, required: false
    _variables;
    get variables() {
        return this.getStringMapAttribute('variables');
    }
    set variables(value) {
        this._variables = value;
    }
    resetVariables() {
        this._variables = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get variablesInput() {
        return this._variables;
    }
    // web_acl_arn - computed: true, optional: false, required: false
    get webAclArn() {
        return this.getStringAttribute('web_acl_arn');
    }
    // xray_tracing_enabled - computed: false, optional: true, required: false
    _xrayTracingEnabled;
    get xrayTracingEnabled() {
        return this.getBooleanAttribute('xray_tracing_enabled');
    }
    set xrayTracingEnabled(value) {
        this._xrayTracingEnabled = value;
    }
    resetXrayTracingEnabled() {
        this._xrayTracingEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get xrayTracingEnabledInput() {
        return this._xrayTracingEnabled;
    }
    // access_log_settings - computed: false, optional: true, required: false
    _accessLogSettings = new ApiGatewayStageAccessLogSettingsOutputReference(this, "access_log_settings", true);
    get accessLogSettings() {
        return this._accessLogSettings;
    }
    putAccessLogSettings(value) {
        this._accessLogSettings.internalValue = value;
    }
    resetAccessLogSettings() {
        this._accessLogSettings.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accessLogSettingsInput() {
        return this._accessLogSettings.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            cache_cluster_enabled: cdktf.booleanToTerraform(this._cacheClusterEnabled),
            cache_cluster_size: cdktf.stringToTerraform(this._cacheClusterSize),
            client_certificate_id: cdktf.stringToTerraform(this._clientCertificateId),
            deployment_id: cdktf.stringToTerraform(this._deploymentId),
            description: cdktf.stringToTerraform(this._description),
            documentation_version: cdktf.stringToTerraform(this._documentationVersion),
            rest_api_id: cdktf.stringToTerraform(this._restApiId),
            stage_name: cdktf.stringToTerraform(this._stageName),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            variables: cdktf.hashMapper(cdktf.stringToTerraform)(this._variables),
            xray_tracing_enabled: cdktf.booleanToTerraform(this._xrayTracingEnabled),
            access_log_settings: apiGatewayStageAccessLogSettingsToTerraform(this._accessLogSettings.internalValue),
        };
    }
}
//# sourceMappingURL=api-gateway-stage.js.map