// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function cloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowHeadersToTerraform(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 {
        items: cdktf.listMapper(cdktf.stringToTerraform)(struct.items),
    };
}
export class CloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowHeadersOutputReference 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._items !== undefined) {
            hasAnyValues = true;
            internalValueResult.items = this._items;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._items = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._items = value.items;
        }
    }
    // items - computed: false, optional: true, required: false
    _items;
    get items() {
        return cdktf.Fn.tolist(this.getListAttribute('items'));
    }
    set items(value) {
        this._items = value;
    }
    resetItems() {
        this._items = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get itemsInput() {
        return this._items;
    }
}
export function cloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowMethodsToTerraform(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 {
        items: cdktf.listMapper(cdktf.stringToTerraform)(struct.items),
    };
}
export class CloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowMethodsOutputReference 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._items !== undefined) {
            hasAnyValues = true;
            internalValueResult.items = this._items;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._items = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._items = value.items;
        }
    }
    // items - computed: false, optional: true, required: false
    _items;
    get items() {
        return cdktf.Fn.tolist(this.getListAttribute('items'));
    }
    set items(value) {
        this._items = value;
    }
    resetItems() {
        this._items = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get itemsInput() {
        return this._items;
    }
}
export function cloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowOriginsToTerraform(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 {
        items: cdktf.listMapper(cdktf.stringToTerraform)(struct.items),
    };
}
export class CloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowOriginsOutputReference 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._items !== undefined) {
            hasAnyValues = true;
            internalValueResult.items = this._items;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._items = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._items = value.items;
        }
    }
    // items - computed: false, optional: true, required: false
    _items;
    get items() {
        return cdktf.Fn.tolist(this.getListAttribute('items'));
    }
    set items(value) {
        this._items = value;
    }
    resetItems() {
        this._items = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get itemsInput() {
        return this._items;
    }
}
export function cloudfrontResponseHeadersPolicyCorsConfigAccessControlExposeHeadersToTerraform(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 {
        items: cdktf.listMapper(cdktf.stringToTerraform)(struct.items),
    };
}
export class CloudfrontResponseHeadersPolicyCorsConfigAccessControlExposeHeadersOutputReference 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._items !== undefined) {
            hasAnyValues = true;
            internalValueResult.items = this._items;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._items = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._items = value.items;
        }
    }
    // items - computed: false, optional: true, required: false
    _items;
    get items() {
        return cdktf.Fn.tolist(this.getListAttribute('items'));
    }
    set items(value) {
        this._items = value;
    }
    resetItems() {
        this._items = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get itemsInput() {
        return this._items;
    }
}
export function cloudfrontResponseHeadersPolicyCorsConfigToTerraform(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 {
        access_control_allow_credentials: cdktf.booleanToTerraform(struct.accessControlAllowCredentials),
        access_control_max_age_sec: cdktf.numberToTerraform(struct.accessControlMaxAgeSec),
        origin_override: cdktf.booleanToTerraform(struct.originOverride),
        access_control_allow_headers: cloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowHeadersToTerraform(struct.accessControlAllowHeaders),
        access_control_allow_methods: cloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowMethodsToTerraform(struct.accessControlAllowMethods),
        access_control_allow_origins: cloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowOriginsToTerraform(struct.accessControlAllowOrigins),
        access_control_expose_headers: cloudfrontResponseHeadersPolicyCorsConfigAccessControlExposeHeadersToTerraform(struct.accessControlExposeHeaders),
    };
}
export class CloudfrontResponseHeadersPolicyCorsConfigOutputReference 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._accessControlAllowCredentials !== undefined) {
            hasAnyValues = true;
            internalValueResult.accessControlAllowCredentials = this._accessControlAllowCredentials;
        }
        if (this._accessControlMaxAgeSec !== undefined) {
            hasAnyValues = true;
            internalValueResult.accessControlMaxAgeSec = this._accessControlMaxAgeSec;
        }
        if (this._originOverride !== undefined) {
            hasAnyValues = true;
            internalValueResult.originOverride = this._originOverride;
        }
        if (this._accessControlAllowHeaders?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.accessControlAllowHeaders = this._accessControlAllowHeaders?.internalValue;
        }
        if (this._accessControlAllowMethods?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.accessControlAllowMethods = this._accessControlAllowMethods?.internalValue;
        }
        if (this._accessControlAllowOrigins?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.accessControlAllowOrigins = this._accessControlAllowOrigins?.internalValue;
        }
        if (this._accessControlExposeHeaders?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.accessControlExposeHeaders = this._accessControlExposeHeaders?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._accessControlAllowCredentials = undefined;
            this._accessControlMaxAgeSec = undefined;
            this._originOverride = undefined;
            this._accessControlAllowHeaders.internalValue = undefined;
            this._accessControlAllowMethods.internalValue = undefined;
            this._accessControlAllowOrigins.internalValue = undefined;
            this._accessControlExposeHeaders.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._accessControlAllowCredentials = value.accessControlAllowCredentials;
            this._accessControlMaxAgeSec = value.accessControlMaxAgeSec;
            this._originOverride = value.originOverride;
            this._accessControlAllowHeaders.internalValue = value.accessControlAllowHeaders;
            this._accessControlAllowMethods.internalValue = value.accessControlAllowMethods;
            this._accessControlAllowOrigins.internalValue = value.accessControlAllowOrigins;
            this._accessControlExposeHeaders.internalValue = value.accessControlExposeHeaders;
        }
    }
    // access_control_allow_credentials - computed: false, optional: false, required: true
    _accessControlAllowCredentials;
    get accessControlAllowCredentials() {
        return this.getBooleanAttribute('access_control_allow_credentials');
    }
    set accessControlAllowCredentials(value) {
        this._accessControlAllowCredentials = value;
    }
    // Temporarily expose input value. Use with caution.
    get accessControlAllowCredentialsInput() {
        return this._accessControlAllowCredentials;
    }
    // access_control_max_age_sec - computed: false, optional: true, required: false
    _accessControlMaxAgeSec;
    get accessControlMaxAgeSec() {
        return this.getNumberAttribute('access_control_max_age_sec');
    }
    set accessControlMaxAgeSec(value) {
        this._accessControlMaxAgeSec = value;
    }
    resetAccessControlMaxAgeSec() {
        this._accessControlMaxAgeSec = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accessControlMaxAgeSecInput() {
        return this._accessControlMaxAgeSec;
    }
    // origin_override - computed: false, optional: false, required: true
    _originOverride;
    get originOverride() {
        return this.getBooleanAttribute('origin_override');
    }
    set originOverride(value) {
        this._originOverride = value;
    }
    // Temporarily expose input value. Use with caution.
    get originOverrideInput() {
        return this._originOverride;
    }
    // access_control_allow_headers - computed: false, optional: false, required: true
    _accessControlAllowHeaders = new CloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowHeadersOutputReference(this, "access_control_allow_headers", true);
    get accessControlAllowHeaders() {
        return this._accessControlAllowHeaders;
    }
    putAccessControlAllowHeaders(value) {
        this._accessControlAllowHeaders.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get accessControlAllowHeadersInput() {
        return this._accessControlAllowHeaders.internalValue;
    }
    // access_control_allow_methods - computed: false, optional: false, required: true
    _accessControlAllowMethods = new CloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowMethodsOutputReference(this, "access_control_allow_methods", true);
    get accessControlAllowMethods() {
        return this._accessControlAllowMethods;
    }
    putAccessControlAllowMethods(value) {
        this._accessControlAllowMethods.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get accessControlAllowMethodsInput() {
        return this._accessControlAllowMethods.internalValue;
    }
    // access_control_allow_origins - computed: false, optional: false, required: true
    _accessControlAllowOrigins = new CloudfrontResponseHeadersPolicyCorsConfigAccessControlAllowOriginsOutputReference(this, "access_control_allow_origins", true);
    get accessControlAllowOrigins() {
        return this._accessControlAllowOrigins;
    }
    putAccessControlAllowOrigins(value) {
        this._accessControlAllowOrigins.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get accessControlAllowOriginsInput() {
        return this._accessControlAllowOrigins.internalValue;
    }
    // access_control_expose_headers - computed: false, optional: true, required: false
    _accessControlExposeHeaders = new CloudfrontResponseHeadersPolicyCorsConfigAccessControlExposeHeadersOutputReference(this, "access_control_expose_headers", true);
    get accessControlExposeHeaders() {
        return this._accessControlExposeHeaders;
    }
    putAccessControlExposeHeaders(value) {
        this._accessControlExposeHeaders.internalValue = value;
    }
    resetAccessControlExposeHeaders() {
        this._accessControlExposeHeaders.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accessControlExposeHeadersInput() {
        return this._accessControlExposeHeaders.internalValue;
    }
}
export function cloudfrontResponseHeadersPolicyCustomHeadersConfigItemsToTerraform(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 {
        header: cdktf.stringToTerraform(struct.header),
        override: cdktf.booleanToTerraform(struct.override),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export function cloudfrontResponseHeadersPolicyCustomHeadersConfigToTerraform(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 {
        items: cdktf.listMapper(cloudfrontResponseHeadersPolicyCustomHeadersConfigItemsToTerraform)(struct.items),
    };
}
export class CloudfrontResponseHeadersPolicyCustomHeadersConfigOutputReference 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._items !== undefined) {
            hasAnyValues = true;
            internalValueResult.items = this._items;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._items = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._items = value.items;
        }
    }
    // items - computed: false, optional: true, required: false
    _items;
    get items() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('items')));
    }
    set items(value) {
        this._items = value;
    }
    resetItems() {
        this._items = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get itemsInput() {
        return this._items;
    }
}
export function cloudfrontResponseHeadersPolicySecurityHeadersConfigContentSecurityPolicyToTerraform(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 {
        content_security_policy: cdktf.stringToTerraform(struct.contentSecurityPolicy),
        override: cdktf.booleanToTerraform(struct.override),
    };
}
export class CloudfrontResponseHeadersPolicySecurityHeadersConfigContentSecurityPolicyOutputReference 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._contentSecurityPolicy !== undefined) {
            hasAnyValues = true;
            internalValueResult.contentSecurityPolicy = this._contentSecurityPolicy;
        }
        if (this._override !== undefined) {
            hasAnyValues = true;
            internalValueResult.override = this._override;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._contentSecurityPolicy = undefined;
            this._override = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._contentSecurityPolicy = value.contentSecurityPolicy;
            this._override = value.override;
        }
    }
    // content_security_policy - computed: false, optional: false, required: true
    _contentSecurityPolicy;
    get contentSecurityPolicy() {
        return this.getStringAttribute('content_security_policy');
    }
    set contentSecurityPolicy(value) {
        this._contentSecurityPolicy = value;
    }
    // Temporarily expose input value. Use with caution.
    get contentSecurityPolicyInput() {
        return this._contentSecurityPolicy;
    }
    // override - computed: false, optional: false, required: true
    _override;
    get override() {
        return this.getBooleanAttribute('override');
    }
    set override(value) {
        this._override = value;
    }
    // Temporarily expose input value. Use with caution.
    get overrideInput() {
        return this._override;
    }
}
export function cloudfrontResponseHeadersPolicySecurityHeadersConfigContentTypeOptionsToTerraform(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 {
        override: cdktf.booleanToTerraform(struct.override),
    };
}
export class CloudfrontResponseHeadersPolicySecurityHeadersConfigContentTypeOptionsOutputReference 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._override !== undefined) {
            hasAnyValues = true;
            internalValueResult.override = this._override;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._override = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._override = value.override;
        }
    }
    // override - computed: false, optional: false, required: true
    _override;
    get override() {
        return this.getBooleanAttribute('override');
    }
    set override(value) {
        this._override = value;
    }
    // Temporarily expose input value. Use with caution.
    get overrideInput() {
        return this._override;
    }
}
export function cloudfrontResponseHeadersPolicySecurityHeadersConfigFrameOptionsToTerraform(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 {
        frame_option: cdktf.stringToTerraform(struct.frameOption),
        override: cdktf.booleanToTerraform(struct.override),
    };
}
export class CloudfrontResponseHeadersPolicySecurityHeadersConfigFrameOptionsOutputReference 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._frameOption !== undefined) {
            hasAnyValues = true;
            internalValueResult.frameOption = this._frameOption;
        }
        if (this._override !== undefined) {
            hasAnyValues = true;
            internalValueResult.override = this._override;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._frameOption = undefined;
            this._override = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._frameOption = value.frameOption;
            this._override = value.override;
        }
    }
    // frame_option - computed: false, optional: false, required: true
    _frameOption;
    get frameOption() {
        return this.getStringAttribute('frame_option');
    }
    set frameOption(value) {
        this._frameOption = value;
    }
    // Temporarily expose input value. Use with caution.
    get frameOptionInput() {
        return this._frameOption;
    }
    // override - computed: false, optional: false, required: true
    _override;
    get override() {
        return this.getBooleanAttribute('override');
    }
    set override(value) {
        this._override = value;
    }
    // Temporarily expose input value. Use with caution.
    get overrideInput() {
        return this._override;
    }
}
export function cloudfrontResponseHeadersPolicySecurityHeadersConfigReferrerPolicyToTerraform(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 {
        override: cdktf.booleanToTerraform(struct.override),
        referrer_policy: cdktf.stringToTerraform(struct.referrerPolicy),
    };
}
export class CloudfrontResponseHeadersPolicySecurityHeadersConfigReferrerPolicyOutputReference 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._override !== undefined) {
            hasAnyValues = true;
            internalValueResult.override = this._override;
        }
        if (this._referrerPolicy !== undefined) {
            hasAnyValues = true;
            internalValueResult.referrerPolicy = this._referrerPolicy;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._override = undefined;
            this._referrerPolicy = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._override = value.override;
            this._referrerPolicy = value.referrerPolicy;
        }
    }
    // override - computed: false, optional: false, required: true
    _override;
    get override() {
        return this.getBooleanAttribute('override');
    }
    set override(value) {
        this._override = value;
    }
    // Temporarily expose input value. Use with caution.
    get overrideInput() {
        return this._override;
    }
    // referrer_policy - computed: false, optional: false, required: true
    _referrerPolicy;
    get referrerPolicy() {
        return this.getStringAttribute('referrer_policy');
    }
    set referrerPolicy(value) {
        this._referrerPolicy = value;
    }
    // Temporarily expose input value. Use with caution.
    get referrerPolicyInput() {
        return this._referrerPolicy;
    }
}
export function cloudfrontResponseHeadersPolicySecurityHeadersConfigStrictTransportSecurityToTerraform(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 {
        access_control_max_age_sec: cdktf.numberToTerraform(struct.accessControlMaxAgeSec),
        include_subdomains: cdktf.booleanToTerraform(struct.includeSubdomains),
        override: cdktf.booleanToTerraform(struct.override),
        preload: cdktf.booleanToTerraform(struct.preload),
    };
}
export class CloudfrontResponseHeadersPolicySecurityHeadersConfigStrictTransportSecurityOutputReference 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._accessControlMaxAgeSec !== undefined) {
            hasAnyValues = true;
            internalValueResult.accessControlMaxAgeSec = this._accessControlMaxAgeSec;
        }
        if (this._includeSubdomains !== undefined) {
            hasAnyValues = true;
            internalValueResult.includeSubdomains = this._includeSubdomains;
        }
        if (this._override !== undefined) {
            hasAnyValues = true;
            internalValueResult.override = this._override;
        }
        if (this._preload !== undefined) {
            hasAnyValues = true;
            internalValueResult.preload = this._preload;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._accessControlMaxAgeSec = undefined;
            this._includeSubdomains = undefined;
            this._override = undefined;
            this._preload = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._accessControlMaxAgeSec = value.accessControlMaxAgeSec;
            this._includeSubdomains = value.includeSubdomains;
            this._override = value.override;
            this._preload = value.preload;
        }
    }
    // access_control_max_age_sec - computed: false, optional: false, required: true
    _accessControlMaxAgeSec;
    get accessControlMaxAgeSec() {
        return this.getNumberAttribute('access_control_max_age_sec');
    }
    set accessControlMaxAgeSec(value) {
        this._accessControlMaxAgeSec = value;
    }
    // Temporarily expose input value. Use with caution.
    get accessControlMaxAgeSecInput() {
        return this._accessControlMaxAgeSec;
    }
    // include_subdomains - computed: false, optional: true, required: false
    _includeSubdomains;
    get includeSubdomains() {
        return this.getBooleanAttribute('include_subdomains');
    }
    set includeSubdomains(value) {
        this._includeSubdomains = value;
    }
    resetIncludeSubdomains() {
        this._includeSubdomains = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get includeSubdomainsInput() {
        return this._includeSubdomains;
    }
    // override - computed: false, optional: false, required: true
    _override;
    get override() {
        return this.getBooleanAttribute('override');
    }
    set override(value) {
        this._override = value;
    }
    // Temporarily expose input value. Use with caution.
    get overrideInput() {
        return this._override;
    }
    // preload - computed: false, optional: true, required: false
    _preload;
    get preload() {
        return this.getBooleanAttribute('preload');
    }
    set preload(value) {
        this._preload = value;
    }
    resetPreload() {
        this._preload = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get preloadInput() {
        return this._preload;
    }
}
export function cloudfrontResponseHeadersPolicySecurityHeadersConfigXssProtectionToTerraform(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 {
        mode_block: cdktf.booleanToTerraform(struct.modeBlock),
        override: cdktf.booleanToTerraform(struct.override),
        protection: cdktf.booleanToTerraform(struct.protection),
        report_uri: cdktf.stringToTerraform(struct.reportUri),
    };
}
export class CloudfrontResponseHeadersPolicySecurityHeadersConfigXssProtectionOutputReference 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._modeBlock !== undefined) {
            hasAnyValues = true;
            internalValueResult.modeBlock = this._modeBlock;
        }
        if (this._override !== undefined) {
            hasAnyValues = true;
            internalValueResult.override = this._override;
        }
        if (this._protection !== undefined) {
            hasAnyValues = true;
            internalValueResult.protection = this._protection;
        }
        if (this._reportUri !== undefined) {
            hasAnyValues = true;
            internalValueResult.reportUri = this._reportUri;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._modeBlock = undefined;
            this._override = undefined;
            this._protection = undefined;
            this._reportUri = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._modeBlock = value.modeBlock;
            this._override = value.override;
            this._protection = value.protection;
            this._reportUri = value.reportUri;
        }
    }
    // mode_block - computed: false, optional: true, required: false
    _modeBlock;
    get modeBlock() {
        return this.getBooleanAttribute('mode_block');
    }
    set modeBlock(value) {
        this._modeBlock = value;
    }
    resetModeBlock() {
        this._modeBlock = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get modeBlockInput() {
        return this._modeBlock;
    }
    // override - computed: false, optional: false, required: true
    _override;
    get override() {
        return this.getBooleanAttribute('override');
    }
    set override(value) {
        this._override = value;
    }
    // Temporarily expose input value. Use with caution.
    get overrideInput() {
        return this._override;
    }
    // protection - computed: false, optional: false, required: true
    _protection;
    get protection() {
        return this.getBooleanAttribute('protection');
    }
    set protection(value) {
        this._protection = value;
    }
    // Temporarily expose input value. Use with caution.
    get protectionInput() {
        return this._protection;
    }
    // report_uri - computed: false, optional: true, required: false
    _reportUri;
    get reportUri() {
        return this.getStringAttribute('report_uri');
    }
    set reportUri(value) {
        this._reportUri = value;
    }
    resetReportUri() {
        this._reportUri = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get reportUriInput() {
        return this._reportUri;
    }
}
export function cloudfrontResponseHeadersPolicySecurityHeadersConfigToTerraform(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 {
        content_security_policy: cloudfrontResponseHeadersPolicySecurityHeadersConfigContentSecurityPolicyToTerraform(struct.contentSecurityPolicy),
        content_type_options: cloudfrontResponseHeadersPolicySecurityHeadersConfigContentTypeOptionsToTerraform(struct.contentTypeOptions),
        frame_options: cloudfrontResponseHeadersPolicySecurityHeadersConfigFrameOptionsToTerraform(struct.frameOptions),
        referrer_policy: cloudfrontResponseHeadersPolicySecurityHeadersConfigReferrerPolicyToTerraform(struct.referrerPolicy),
        strict_transport_security: cloudfrontResponseHeadersPolicySecurityHeadersConfigStrictTransportSecurityToTerraform(struct.strictTransportSecurity),
        xss_protection: cloudfrontResponseHeadersPolicySecurityHeadersConfigXssProtectionToTerraform(struct.xssProtection),
    };
}
export class CloudfrontResponseHeadersPolicySecurityHeadersConfigOutputReference 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._contentSecurityPolicy?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.contentSecurityPolicy = this._contentSecurityPolicy?.internalValue;
        }
        if (this._contentTypeOptions?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.contentTypeOptions = this._contentTypeOptions?.internalValue;
        }
        if (this._frameOptions?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.frameOptions = this._frameOptions?.internalValue;
        }
        if (this._referrerPolicy?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.referrerPolicy = this._referrerPolicy?.internalValue;
        }
        if (this._strictTransportSecurity?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.strictTransportSecurity = this._strictTransportSecurity?.internalValue;
        }
        if (this._xssProtection?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.xssProtection = this._xssProtection?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._contentSecurityPolicy.internalValue = undefined;
            this._contentTypeOptions.internalValue = undefined;
            this._frameOptions.internalValue = undefined;
            this._referrerPolicy.internalValue = undefined;
            this._strictTransportSecurity.internalValue = undefined;
            this._xssProtection.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._contentSecurityPolicy.internalValue = value.contentSecurityPolicy;
            this._contentTypeOptions.internalValue = value.contentTypeOptions;
            this._frameOptions.internalValue = value.frameOptions;
            this._referrerPolicy.internalValue = value.referrerPolicy;
            this._strictTransportSecurity.internalValue = value.strictTransportSecurity;
            this._xssProtection.internalValue = value.xssProtection;
        }
    }
    // content_security_policy - computed: false, optional: true, required: false
    _contentSecurityPolicy = new CloudfrontResponseHeadersPolicySecurityHeadersConfigContentSecurityPolicyOutputReference(this, "content_security_policy", true);
    get contentSecurityPolicy() {
        return this._contentSecurityPolicy;
    }
    putContentSecurityPolicy(value) {
        this._contentSecurityPolicy.internalValue = value;
    }
    resetContentSecurityPolicy() {
        this._contentSecurityPolicy.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get contentSecurityPolicyInput() {
        return this._contentSecurityPolicy.internalValue;
    }
    // content_type_options - computed: false, optional: true, required: false
    _contentTypeOptions = new CloudfrontResponseHeadersPolicySecurityHeadersConfigContentTypeOptionsOutputReference(this, "content_type_options", true);
    get contentTypeOptions() {
        return this._contentTypeOptions;
    }
    putContentTypeOptions(value) {
        this._contentTypeOptions.internalValue = value;
    }
    resetContentTypeOptions() {
        this._contentTypeOptions.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get contentTypeOptionsInput() {
        return this._contentTypeOptions.internalValue;
    }
    // frame_options - computed: false, optional: true, required: false
    _frameOptions = new CloudfrontResponseHeadersPolicySecurityHeadersConfigFrameOptionsOutputReference(this, "frame_options", true);
    get frameOptions() {
        return this._frameOptions;
    }
    putFrameOptions(value) {
        this._frameOptions.internalValue = value;
    }
    resetFrameOptions() {
        this._frameOptions.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get frameOptionsInput() {
        return this._frameOptions.internalValue;
    }
    // referrer_policy - computed: false, optional: true, required: false
    _referrerPolicy = new CloudfrontResponseHeadersPolicySecurityHeadersConfigReferrerPolicyOutputReference(this, "referrer_policy", true);
    get referrerPolicy() {
        return this._referrerPolicy;
    }
    putReferrerPolicy(value) {
        this._referrerPolicy.internalValue = value;
    }
    resetReferrerPolicy() {
        this._referrerPolicy.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get referrerPolicyInput() {
        return this._referrerPolicy.internalValue;
    }
    // strict_transport_security - computed: false, optional: true, required: false
    _strictTransportSecurity = new CloudfrontResponseHeadersPolicySecurityHeadersConfigStrictTransportSecurityOutputReference(this, "strict_transport_security", true);
    get strictTransportSecurity() {
        return this._strictTransportSecurity;
    }
    putStrictTransportSecurity(value) {
        this._strictTransportSecurity.internalValue = value;
    }
    resetStrictTransportSecurity() {
        this._strictTransportSecurity.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get strictTransportSecurityInput() {
        return this._strictTransportSecurity.internalValue;
    }
    // xss_protection - computed: false, optional: true, required: false
    _xssProtection = new CloudfrontResponseHeadersPolicySecurityHeadersConfigXssProtectionOutputReference(this, "xss_protection", true);
    get xssProtection() {
        return this._xssProtection;
    }
    putXssProtection(value) {
        this._xssProtection.internalValue = value;
    }
    resetXssProtection() {
        this._xssProtection.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get xssProtectionInput() {
        return this._xssProtection.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_response_headers_policy aws_cloudfront_response_headers_policy}
*/
export class CloudfrontResponseHeadersPolicy extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_cloudfront_response_headers_policy";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_response_headers_policy aws_cloudfront_response_headers_policy} 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 CloudfrontResponseHeadersPolicyConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_cloudfront_response_headers_policy',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._comment = config.comment;
        this._etag = config.etag;
        this._name = config.name;
        this._corsConfig.internalValue = config.corsConfig;
        this._customHeadersConfig.internalValue = config.customHeadersConfig;
        this._securityHeadersConfig.internalValue = config.securityHeadersConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // comment - computed: false, optional: true, required: false
    _comment;
    get comment() {
        return this.getStringAttribute('comment');
    }
    set comment(value) {
        this._comment = value;
    }
    resetComment() {
        this._comment = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get commentInput() {
        return this._comment;
    }
    // etag - computed: true, optional: true, required: false
    _etag;
    get etag() {
        return this.getStringAttribute('etag');
    }
    set etag(value) {
        this._etag = value;
    }
    resetEtag() {
        this._etag = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get etagInput() {
        return this._etag;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // 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;
    }
    // cors_config - computed: false, optional: true, required: false
    _corsConfig = new CloudfrontResponseHeadersPolicyCorsConfigOutputReference(this, "cors_config", true);
    get corsConfig() {
        return this._corsConfig;
    }
    putCorsConfig(value) {
        this._corsConfig.internalValue = value;
    }
    resetCorsConfig() {
        this._corsConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get corsConfigInput() {
        return this._corsConfig.internalValue;
    }
    // custom_headers_config - computed: false, optional: true, required: false
    _customHeadersConfig = new CloudfrontResponseHeadersPolicyCustomHeadersConfigOutputReference(this, "custom_headers_config", true);
    get customHeadersConfig() {
        return this._customHeadersConfig;
    }
    putCustomHeadersConfig(value) {
        this._customHeadersConfig.internalValue = value;
    }
    resetCustomHeadersConfig() {
        this._customHeadersConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get customHeadersConfigInput() {
        return this._customHeadersConfig.internalValue;
    }
    // security_headers_config - computed: false, optional: true, required: false
    _securityHeadersConfig = new CloudfrontResponseHeadersPolicySecurityHeadersConfigOutputReference(this, "security_headers_config", true);
    get securityHeadersConfig() {
        return this._securityHeadersConfig;
    }
    putSecurityHeadersConfig(value) {
        this._securityHeadersConfig.internalValue = value;
    }
    resetSecurityHeadersConfig() {
        this._securityHeadersConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get securityHeadersConfigInput() {
        return this._securityHeadersConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            comment: cdktf.stringToTerraform(this._comment),
            etag: cdktf.stringToTerraform(this._etag),
            name: cdktf.stringToTerraform(this._name),
            cors_config: cloudfrontResponseHeadersPolicyCorsConfigToTerraform(this._corsConfig.internalValue),
            custom_headers_config: cloudfrontResponseHeadersPolicyCustomHeadersConfigToTerraform(this._customHeadersConfig.internalValue),
            security_headers_config: cloudfrontResponseHeadersPolicySecurityHeadersConfigToTerraform(this._securityHeadersConfig.internalValue),
        };
    }
}
//# sourceMappingURL=cloudfront-response-headers-policy.js.map