// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function apiGatewayRestApiEndpointConfigurationToTerraform(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 {
        types: cdktf.listMapper(cdktf.stringToTerraform)(struct.types),
        vpc_endpoint_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.vpcEndpointIds),
    };
}
export class ApiGatewayRestApiEndpointConfigurationOutputReference 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._types !== undefined) {
            hasAnyValues = true;
            internalValueResult.types = this._types;
        }
        if (this._vpcEndpointIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.vpcEndpointIds = this._vpcEndpointIds;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._types = undefined;
            this._vpcEndpointIds = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._types = value.types;
            this._vpcEndpointIds = value.vpcEndpointIds;
        }
    }
    // types - computed: false, optional: false, required: true
    _types;
    get types() {
        return this.getListAttribute('types');
    }
    set types(value) {
        this._types = value;
    }
    // Temporarily expose input value. Use with caution.
    get typesInput() {
        return this._types;
    }
    // vpc_endpoint_ids - computed: true, optional: true, required: false
    _vpcEndpointIds;
    get vpcEndpointIds() {
        return cdktf.Fn.tolist(this.getListAttribute('vpc_endpoint_ids'));
    }
    set vpcEndpointIds(value) {
        this._vpcEndpointIds = value;
    }
    resetVpcEndpointIds() {
        this._vpcEndpointIds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get vpcEndpointIdsInput() {
        return this._vpcEndpointIds;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_rest_api aws_api_gateway_rest_api}
*/
export class ApiGatewayRestApi extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_api_gateway_rest_api";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_rest_api aws_api_gateway_rest_api} 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 ApiGatewayRestApiConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_api_gateway_rest_api',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._apiKeySource = config.apiKeySource;
        this._binaryMediaTypes = config.binaryMediaTypes;
        this._body = config.body;
        this._description = config.description;
        this._disableExecuteApiEndpoint = config.disableExecuteApiEndpoint;
        this._minimumCompressionSize = config.minimumCompressionSize;
        this._name = config.name;
        this._parameters = config.parameters;
        this._policy = config.policy;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._endpointConfiguration.internalValue = config.endpointConfiguration;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // api_key_source - computed: true, optional: true, required: false
    _apiKeySource;
    get apiKeySource() {
        return this.getStringAttribute('api_key_source');
    }
    set apiKeySource(value) {
        this._apiKeySource = value;
    }
    resetApiKeySource() {
        this._apiKeySource = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get apiKeySourceInput() {
        return this._apiKeySource;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // binary_media_types - computed: true, optional: true, required: false
    _binaryMediaTypes;
    get binaryMediaTypes() {
        return this.getListAttribute('binary_media_types');
    }
    set binaryMediaTypes(value) {
        this._binaryMediaTypes = value;
    }
    resetBinaryMediaTypes() {
        this._binaryMediaTypes = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get binaryMediaTypesInput() {
        return this._binaryMediaTypes;
    }
    // body - computed: false, optional: true, required: false
    _body;
    get body() {
        return this.getStringAttribute('body');
    }
    set body(value) {
        this._body = value;
    }
    resetBody() {
        this._body = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get bodyInput() {
        return this._body;
    }
    // created_date - computed: true, optional: false, required: false
    get createdDate() {
        return this.getStringAttribute('created_date');
    }
    // description - computed: true, 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;
    }
    // disable_execute_api_endpoint - computed: true, optional: true, required: false
    _disableExecuteApiEndpoint;
    get disableExecuteApiEndpoint() {
        return this.getBooleanAttribute('disable_execute_api_endpoint');
    }
    set disableExecuteApiEndpoint(value) {
        this._disableExecuteApiEndpoint = value;
    }
    resetDisableExecuteApiEndpoint() {
        this._disableExecuteApiEndpoint = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get disableExecuteApiEndpointInput() {
        return this._disableExecuteApiEndpoint;
    }
    // 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');
    }
    // minimum_compression_size - computed: false, optional: true, required: false
    _minimumCompressionSize;
    get minimumCompressionSize() {
        return this.getNumberAttribute('minimum_compression_size');
    }
    set minimumCompressionSize(value) {
        this._minimumCompressionSize = value;
    }
    resetMinimumCompressionSize() {
        this._minimumCompressionSize = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get minimumCompressionSizeInput() {
        return this._minimumCompressionSize;
    }
    // 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;
    }
    // parameters - computed: false, optional: true, required: false
    _parameters;
    get parameters() {
        return this.getStringMapAttribute('parameters');
    }
    set parameters(value) {
        this._parameters = value;
    }
    resetParameters() {
        this._parameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get parametersInput() {
        return this._parameters;
    }
    // policy - computed: true, optional: true, required: false
    _policy;
    get policy() {
        return this.getStringAttribute('policy');
    }
    set policy(value) {
        this._policy = value;
    }
    resetPolicy() {
        this._policy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get policyInput() {
        return this._policy;
    }
    // root_resource_id - computed: true, optional: false, required: false
    get rootResourceId() {
        return this.getStringAttribute('root_resource_id');
    }
    // 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;
    }
    // endpoint_configuration - computed: false, optional: true, required: false
    _endpointConfiguration = new ApiGatewayRestApiEndpointConfigurationOutputReference(this, "endpoint_configuration", true);
    get endpointConfiguration() {
        return this._endpointConfiguration;
    }
    putEndpointConfiguration(value) {
        this._endpointConfiguration.internalValue = value;
    }
    resetEndpointConfiguration() {
        this._endpointConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get endpointConfigurationInput() {
        return this._endpointConfiguration.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            api_key_source: cdktf.stringToTerraform(this._apiKeySource),
            binary_media_types: cdktf.listMapper(cdktf.stringToTerraform)(this._binaryMediaTypes),
            body: cdktf.stringToTerraform(this._body),
            description: cdktf.stringToTerraform(this._description),
            disable_execute_api_endpoint: cdktf.booleanToTerraform(this._disableExecuteApiEndpoint),
            minimum_compression_size: cdktf.numberToTerraform(this._minimumCompressionSize),
            name: cdktf.stringToTerraform(this._name),
            parameters: cdktf.hashMapper(cdktf.stringToTerraform)(this._parameters),
            policy: cdktf.stringToTerraform(this._policy),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            endpoint_configuration: apiGatewayRestApiEndpointConfigurationToTerraform(this._endpointConfiguration.internalValue),
        };
    }
}
//# sourceMappingURL=api-gateway-rest-api.js.map