// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function apiGatewayIntegrationTlsConfigToTerraform(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 {
        insecure_skip_verification: cdktf.booleanToTerraform(struct.insecureSkipVerification),
    };
}
export class ApiGatewayIntegrationTlsConfigOutputReference 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._insecureSkipVerification !== undefined) {
            hasAnyValues = true;
            internalValueResult.insecureSkipVerification = this._insecureSkipVerification;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._insecureSkipVerification = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._insecureSkipVerification = value.insecureSkipVerification;
        }
    }
    // insecure_skip_verification - computed: false, optional: true, required: false
    _insecureSkipVerification;
    get insecureSkipVerification() {
        return this.getBooleanAttribute('insecure_skip_verification');
    }
    set insecureSkipVerification(value) {
        this._insecureSkipVerification = value;
    }
    resetInsecureSkipVerification() {
        this._insecureSkipVerification = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get insecureSkipVerificationInput() {
        return this._insecureSkipVerification;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_integration aws_api_gateway_integration}
*/
export class ApiGatewayIntegration extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_api_gateway_integration";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_integration aws_api_gateway_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 ApiGatewayIntegrationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_api_gateway_integration',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._cacheKeyParameters = config.cacheKeyParameters;
        this._cacheNamespace = config.cacheNamespace;
        this._connectionId = config.connectionId;
        this._connectionType = config.connectionType;
        this._contentHandling = config.contentHandling;
        this._credentials = config.credentials;
        this._httpMethod = config.httpMethod;
        this._integrationHttpMethod = config.integrationHttpMethod;
        this._passthroughBehavior = config.passthroughBehavior;
        this._requestParameters = config.requestParameters;
        this._requestTemplates = config.requestTemplates;
        this._resourceId = config.resourceId;
        this._restApiId = config.restApiId;
        this._timeoutMilliseconds = config.timeoutMilliseconds;
        this._type = config.type;
        this._uri = config.uri;
        this._tlsConfig.internalValue = config.tlsConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // cache_key_parameters - computed: false, optional: true, required: false
    _cacheKeyParameters;
    get cacheKeyParameters() {
        return cdktf.Fn.tolist(this.getListAttribute('cache_key_parameters'));
    }
    set cacheKeyParameters(value) {
        this._cacheKeyParameters = value;
    }
    resetCacheKeyParameters() {
        this._cacheKeyParameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cacheKeyParametersInput() {
        return this._cacheKeyParameters;
    }
    // cache_namespace - computed: true, optional: true, required: false
    _cacheNamespace;
    get cacheNamespace() {
        return this.getStringAttribute('cache_namespace');
    }
    set cacheNamespace(value) {
        this._cacheNamespace = value;
    }
    resetCacheNamespace() {
        this._cacheNamespace = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cacheNamespaceInput() {
        return this._cacheNamespace;
    }
    // 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 - computed: false, optional: true, required: false
    _contentHandling;
    get contentHandling() {
        return this.getStringAttribute('content_handling');
    }
    set contentHandling(value) {
        this._contentHandling = value;
    }
    resetContentHandling() {
        this._contentHandling = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get contentHandlingInput() {
        return this._contentHandling;
    }
    // credentials - computed: false, optional: true, required: false
    _credentials;
    get credentials() {
        return this.getStringAttribute('credentials');
    }
    set credentials(value) {
        this._credentials = value;
    }
    resetCredentials() {
        this._credentials = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get credentialsInput() {
        return this._credentials;
    }
    // http_method - computed: false, optional: false, required: true
    _httpMethod;
    get httpMethod() {
        return this.getStringAttribute('http_method');
    }
    set httpMethod(value) {
        this._httpMethod = value;
    }
    // Temporarily expose input value. Use with caution.
    get httpMethodInput() {
        return this._httpMethod;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // integration_http_method - computed: false, optional: true, required: false
    _integrationHttpMethod;
    get integrationHttpMethod() {
        return this.getStringAttribute('integration_http_method');
    }
    set integrationHttpMethod(value) {
        this._integrationHttpMethod = value;
    }
    resetIntegrationHttpMethod() {
        this._integrationHttpMethod = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get integrationHttpMethodInput() {
        return this._integrationHttpMethod;
    }
    // passthrough_behavior - computed: true, 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;
    }
    // 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;
    }
    // resource_id - computed: false, optional: false, required: true
    _resourceId;
    get resourceId() {
        return this.getStringAttribute('resource_id');
    }
    set resourceId(value) {
        this._resourceId = value;
    }
    // Temporarily expose input value. Use with caution.
    get resourceIdInput() {
        return this._resourceId;
    }
    // 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;
    }
    // timeout_milliseconds - computed: false, 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;
    }
    // type - computed: false, optional: false, required: true
    _type;
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
    // uri - computed: false, optional: true, required: false
    _uri;
    get uri() {
        return this.getStringAttribute('uri');
    }
    set uri(value) {
        this._uri = value;
    }
    resetUri() {
        this._uri = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get uriInput() {
        return this._uri;
    }
    // tls_config - computed: false, optional: true, required: false
    _tlsConfig = new ApiGatewayIntegrationTlsConfigOutputReference(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 {
            cache_key_parameters: cdktf.listMapper(cdktf.stringToTerraform)(this._cacheKeyParameters),
            cache_namespace: cdktf.stringToTerraform(this._cacheNamespace),
            connection_id: cdktf.stringToTerraform(this._connectionId),
            connection_type: cdktf.stringToTerraform(this._connectionType),
            content_handling: cdktf.stringToTerraform(this._contentHandling),
            credentials: cdktf.stringToTerraform(this._credentials),
            http_method: cdktf.stringToTerraform(this._httpMethod),
            integration_http_method: cdktf.stringToTerraform(this._integrationHttpMethod),
            passthrough_behavior: cdktf.stringToTerraform(this._passthroughBehavior),
            request_parameters: cdktf.hashMapper(cdktf.stringToTerraform)(this._requestParameters),
            request_templates: cdktf.hashMapper(cdktf.stringToTerraform)(this._requestTemplates),
            resource_id: cdktf.stringToTerraform(this._resourceId),
            rest_api_id: cdktf.stringToTerraform(this._restApiId),
            timeout_milliseconds: cdktf.numberToTerraform(this._timeoutMilliseconds),
            type: cdktf.stringToTerraform(this._type),
            uri: cdktf.stringToTerraform(this._uri),
            tls_config: apiGatewayIntegrationTlsConfigToTerraform(this._tlsConfig.internalValue),
        };
    }
}
//# sourceMappingURL=api-gateway-integration.js.map