// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function apigatewayv2IntegrationResponseParametersToTerraform(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 {
        mappings: cdktf.hashMapper(cdktf.stringToTerraform)(struct.mappings),
        status_code: cdktf.stringToTerraform(struct.statusCode),
    };
}
export function apigatewayv2IntegrationTlsConfigToTerraform(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 {
        server_name_to_verify: cdktf.stringToTerraform(struct.serverNameToVerify),
    };
}
export class Apigatewayv2IntegrationTlsConfigOutputReference 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._serverNameToVerify !== undefined) {
            hasAnyValues = true;
            internalValueResult.serverNameToVerify = this._serverNameToVerify;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._serverNameToVerify = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._serverNameToVerify = value.serverNameToVerify;
        }
    }
    // server_name_to_verify - computed: false, optional: true, required: false
    _serverNameToVerify;
    get serverNameToVerify() {
        return this.getStringAttribute('server_name_to_verify');
    }
    set serverNameToVerify(value) {
        this._serverNameToVerify = value;
    }
    resetServerNameToVerify() {
        this._serverNameToVerify = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get serverNameToVerifyInput() {
        return this._serverNameToVerify;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/apigatewayv2_integration aws_apigatewayv2_integration}
*/
export class Apigatewayv2Integration extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_apigatewayv2_integration";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/apigatewayv2_integration aws_apigatewayv2_integration} 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 Apigatewayv2IntegrationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_apigatewayv2_integration',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._apiId = config.apiId;
        this._connectionId = config.connectionId;
        this._connectionType = config.connectionType;
        this._contentHandlingStrategy = config.contentHandlingStrategy;
        this._credentialsArn = config.credentialsArn;
        this._description = config.description;
        this._integrationMethod = config.integrationMethod;
        this._integrationSubtype = config.integrationSubtype;
        this._integrationType = config.integrationType;
        this._integrationUri = config.integrationUri;
        this._passthroughBehavior = config.passthroughBehavior;
        this._payloadFormatVersion = config.payloadFormatVersion;
        this._requestParameters = config.requestParameters;
        this._requestTemplates = config.requestTemplates;
        this._templateSelectionExpression = config.templateSelectionExpression;
        this._timeoutMilliseconds = config.timeoutMilliseconds;
        this._responseParameters = config.responseParameters;
        this._tlsConfig.internalValue = config.tlsConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // api_id - computed: false, optional: false, required: true
    _apiId;
    get apiId() {
        return this.getStringAttribute('api_id');
    }
    set apiId(value) {
        this._apiId = value;
    }
    // Temporarily expose input value. Use with caution.
    get apiIdInput() {
        return this._apiId;
    }
    // connection_id - computed: false, optional: true, required: false
    _connectionId;
    get connectionId() {
        return this.getStringAttribute('connection_id');
    }
    set connectionId(value) {
        this._connectionId = value;
    }
    resetConnectionId() {
        this._connectionId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get connectionIdInput() {
        return this._connectionId;
    }
    // connection_type - computed: false, optional: true, required: false
    _connectionType;
    get connectionType() {
        return this.getStringAttribute('connection_type');
    }
    set connectionType(value) {
        this._connectionType = value;
    }
    resetConnectionType() {
        this._connectionType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get connectionTypeInput() {
        return this._connectionType;
    }
    // content_handling_strategy - computed: false, optional: true, required: false
    _contentHandlingStrategy;
    get contentHandlingStrategy() {
        return this.getStringAttribute('content_handling_strategy');
    }
    set contentHandlingStrategy(value) {
        this._contentHandlingStrategy = value;
    }
    resetContentHandlingStrategy() {
        this._contentHandlingStrategy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get contentHandlingStrategyInput() {
        return this._contentHandlingStrategy;
    }
    // credentials_arn - computed: false, optional: true, required: false
    _credentialsArn;
    get credentialsArn() {
        return this.getStringAttribute('credentials_arn');
    }
    set credentialsArn(value) {
        this._credentialsArn = value;
    }
    resetCredentialsArn() {
        this._credentialsArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get credentialsArnInput() {
        return this._credentialsArn;
    }
    // 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;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // integration_method - computed: false, optional: true, required: false
    _integrationMethod;
    get integrationMethod() {
        return this.getStringAttribute('integration_method');
    }
    set integrationMethod(value) {
        this._integrationMethod = value;
    }
    resetIntegrationMethod() {
        this._integrationMethod = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get integrationMethodInput() {
        return this._integrationMethod;
    }
    // integration_response_selection_expression - computed: true, optional: false, required: false
    get integrationResponseSelectionExpression() {
        return this.getStringAttribute('integration_response_selection_expression');
    }
    // integration_subtype - computed: false, optional: true, required: false
    _integrationSubtype;
    get integrationSubtype() {
        return this.getStringAttribute('integration_subtype');
    }
    set integrationSubtype(value) {
        this._integrationSubtype = value;
    }
    resetIntegrationSubtype() {
        this._integrationSubtype = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get integrationSubtypeInput() {
        return this._integrationSubtype;
    }
    // integration_type - computed: false, optional: false, required: true
    _integrationType;
    get integrationType() {
        return this.getStringAttribute('integration_type');
    }
    set integrationType(value) {
        this._integrationType = value;
    }
    // Temporarily expose input value. Use with caution.
    get integrationTypeInput() {
        return this._integrationType;
    }
    // integration_uri - computed: false, optional: true, required: false
    _integrationUri;
    get integrationUri() {
        return this.getStringAttribute('integration_uri');
    }
    set integrationUri(value) {
        this._integrationUri = value;
    }
    resetIntegrationUri() {
        this._integrationUri = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get integrationUriInput() {
        return this._integrationUri;
    }
    // passthrough_behavior - computed: false, optional: true, required: false
    _passthroughBehavior;
    get passthroughBehavior() {
        return this.getStringAttribute('passthrough_behavior');
    }
    set passthroughBehavior(value) {
        this._passthroughBehavior = value;
    }
    resetPassthroughBehavior() {
        this._passthroughBehavior = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get passthroughBehaviorInput() {
        return this._passthroughBehavior;
    }
    // payload_format_version - computed: false, optional: true, required: false
    _payloadFormatVersion;
    get payloadFormatVersion() {
        return this.getStringAttribute('payload_format_version');
    }
    set payloadFormatVersion(value) {
        this._payloadFormatVersion = value;
    }
    resetPayloadFormatVersion() {
        this._payloadFormatVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get payloadFormatVersionInput() {
        return this._payloadFormatVersion;
    }
    // request_parameters - computed: false, optional: true, required: false
    _requestParameters;
    get requestParameters() {
        return this.getStringMapAttribute('request_parameters');
    }
    set requestParameters(value) {
        this._requestParameters = value;
    }
    resetRequestParameters() {
        this._requestParameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get requestParametersInput() {
        return this._requestParameters;
    }
    // request_templates - computed: false, optional: true, required: false
    _requestTemplates;
    get requestTemplates() {
        return this.getStringMapAttribute('request_templates');
    }
    set requestTemplates(value) {
        this._requestTemplates = value;
    }
    resetRequestTemplates() {
        this._requestTemplates = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get requestTemplatesInput() {
        return this._requestTemplates;
    }
    // template_selection_expression - computed: false, optional: true, required: false
    _templateSelectionExpression;
    get templateSelectionExpression() {
        return this.getStringAttribute('template_selection_expression');
    }
    set templateSelectionExpression(value) {
        this._templateSelectionExpression = value;
    }
    resetTemplateSelectionExpression() {
        this._templateSelectionExpression = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get templateSelectionExpressionInput() {
        return this._templateSelectionExpression;
    }
    // timeout_milliseconds - computed: true, optional: true, required: false
    _timeoutMilliseconds;
    get timeoutMilliseconds() {
        return this.getNumberAttribute('timeout_milliseconds');
    }
    set timeoutMilliseconds(value) {
        this._timeoutMilliseconds = value;
    }
    resetTimeoutMilliseconds() {
        this._timeoutMilliseconds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get timeoutMillisecondsInput() {
        return this._timeoutMilliseconds;
    }
    // response_parameters - computed: false, optional: true, required: false
    _responseParameters;
    get responseParameters() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('response_parameters')));
    }
    set responseParameters(value) {
        this._responseParameters = value;
    }
    resetResponseParameters() {
        this._responseParameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get responseParametersInput() {
        return this._responseParameters;
    }
    // tls_config - computed: false, optional: true, required: false
    _tlsConfig = new Apigatewayv2IntegrationTlsConfigOutputReference(this, "tls_config", true);
    get tlsConfig() {
        return this._tlsConfig;
    }
    putTlsConfig(value) {
        this._tlsConfig.internalValue = value;
    }
    resetTlsConfig() {
        this._tlsConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tlsConfigInput() {
        return this._tlsConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            api_id: cdktf.stringToTerraform(this._apiId),
            connection_id: cdktf.stringToTerraform(this._connectionId),
            connection_type: cdktf.stringToTerraform(this._connectionType),
            content_handling_strategy: cdktf.stringToTerraform(this._contentHandlingStrategy),
            credentials_arn: cdktf.stringToTerraform(this._credentialsArn),
            description: cdktf.stringToTerraform(this._description),
            integration_method: cdktf.stringToTerraform(this._integrationMethod),
            integration_subtype: cdktf.stringToTerraform(this._integrationSubtype),
            integration_type: cdktf.stringToTerraform(this._integrationType),
            integration_uri: cdktf.stringToTerraform(this._integrationUri),
            passthrough_behavior: cdktf.stringToTerraform(this._passthroughBehavior),
            payload_format_version: cdktf.stringToTerraform(this._payloadFormatVersion),
            request_parameters: cdktf.hashMapper(cdktf.stringToTerraform)(this._requestParameters),
            request_templates: cdktf.hashMapper(cdktf.stringToTerraform)(this._requestTemplates),
            template_selection_expression: cdktf.stringToTerraform(this._templateSelectionExpression),
            timeout_milliseconds: cdktf.numberToTerraform(this._timeoutMilliseconds),
            response_parameters: cdktf.listMapper(apigatewayv2IntegrationResponseParametersToTerraform)(this._responseParameters),
            tls_config: apigatewayv2IntegrationTlsConfigToTerraform(this._tlsConfig.internalValue),
        };
    }
}
//# sourceMappingURL=apigatewayv2-integration.js.map