// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function cloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsToTerraform(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_type: cdktf.stringToTerraform(struct.contentType),
        format: cdktf.stringToTerraform(struct.format),
        profile_id: cdktf.stringToTerraform(struct.profileId),
    };
}
export function cloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesToTerraform(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(cloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsToTerraform)(struct.items),
    };
}
export class CloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesOutputReference 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: false, required: true
    _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;
    }
    // Temporarily expose input value. Use with caution.
    get itemsInput() {
        return this._items;
    }
}
export function cloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigToTerraform(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 {
        forward_when_content_type_is_unknown: cdktf.booleanToTerraform(struct.forwardWhenContentTypeIsUnknown),
        content_type_profiles: cloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesToTerraform(struct.contentTypeProfiles),
    };
}
export class CloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigOutputReference 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._forwardWhenContentTypeIsUnknown !== undefined) {
            hasAnyValues = true;
            internalValueResult.forwardWhenContentTypeIsUnknown = this._forwardWhenContentTypeIsUnknown;
        }
        if (this._contentTypeProfiles?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.contentTypeProfiles = this._contentTypeProfiles?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._forwardWhenContentTypeIsUnknown = undefined;
            this._contentTypeProfiles.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._forwardWhenContentTypeIsUnknown = value.forwardWhenContentTypeIsUnknown;
            this._contentTypeProfiles.internalValue = value.contentTypeProfiles;
        }
    }
    // forward_when_content_type_is_unknown - computed: false, optional: false, required: true
    _forwardWhenContentTypeIsUnknown;
    get forwardWhenContentTypeIsUnknown() {
        return this.getBooleanAttribute('forward_when_content_type_is_unknown');
    }
    set forwardWhenContentTypeIsUnknown(value) {
        this._forwardWhenContentTypeIsUnknown = value;
    }
    // Temporarily expose input value. Use with caution.
    get forwardWhenContentTypeIsUnknownInput() {
        return this._forwardWhenContentTypeIsUnknown;
    }
    // content_type_profiles - computed: false, optional: false, required: true
    _contentTypeProfiles = new CloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesOutputReference(this, "content_type_profiles", true);
    get contentTypeProfiles() {
        return this._contentTypeProfiles;
    }
    putContentTypeProfiles(value) {
        this._contentTypeProfiles.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get contentTypeProfilesInput() {
        return this._contentTypeProfiles.internalValue;
    }
}
export function cloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemsToTerraform(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 {
        profile_id: cdktf.stringToTerraform(struct.profileId),
        query_arg: cdktf.stringToTerraform(struct.queryArg),
    };
}
export function cloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesToTerraform(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(cloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemsToTerraform)(struct.items),
    };
}
export class CloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesOutputReference 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 cloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigToTerraform(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 {
        forward_when_query_arg_profile_is_unknown: cdktf.booleanToTerraform(struct.forwardWhenQueryArgProfileIsUnknown),
        query_arg_profiles: cloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesToTerraform(struct.queryArgProfiles),
    };
}
export class CloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigOutputReference 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._forwardWhenQueryArgProfileIsUnknown !== undefined) {
            hasAnyValues = true;
            internalValueResult.forwardWhenQueryArgProfileIsUnknown = this._forwardWhenQueryArgProfileIsUnknown;
        }
        if (this._queryArgProfiles?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.queryArgProfiles = this._queryArgProfiles?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._forwardWhenQueryArgProfileIsUnknown = undefined;
            this._queryArgProfiles.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._forwardWhenQueryArgProfileIsUnknown = value.forwardWhenQueryArgProfileIsUnknown;
            this._queryArgProfiles.internalValue = value.queryArgProfiles;
        }
    }
    // forward_when_query_arg_profile_is_unknown - computed: false, optional: false, required: true
    _forwardWhenQueryArgProfileIsUnknown;
    get forwardWhenQueryArgProfileIsUnknown() {
        return this.getBooleanAttribute('forward_when_query_arg_profile_is_unknown');
    }
    set forwardWhenQueryArgProfileIsUnknown(value) {
        this._forwardWhenQueryArgProfileIsUnknown = value;
    }
    // Temporarily expose input value. Use with caution.
    get forwardWhenQueryArgProfileIsUnknownInput() {
        return this._forwardWhenQueryArgProfileIsUnknown;
    }
    // query_arg_profiles - computed: false, optional: true, required: false
    _queryArgProfiles = new CloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesOutputReference(this, "query_arg_profiles", true);
    get queryArgProfiles() {
        return this._queryArgProfiles;
    }
    putQueryArgProfiles(value) {
        this._queryArgProfiles.internalValue = value;
    }
    resetQueryArgProfiles() {
        this._queryArgProfiles.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get queryArgProfilesInput() {
        return this._queryArgProfiles.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_field_level_encryption_config aws_cloudfront_field_level_encryption_config}
*/
export class CloudfrontFieldLevelEncryptionConfig extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_cloudfront_field_level_encryption_config";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_field_level_encryption_config aws_cloudfront_field_level_encryption_config} 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 CloudfrontFieldLevelEncryptionConfigConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_cloudfront_field_level_encryption_config',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._comment = config.comment;
        this._contentTypeProfileConfig.internalValue = config.contentTypeProfileConfig;
        this._queryArgProfileConfig.internalValue = config.queryArgProfileConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // caller_reference - computed: true, optional: false, required: false
    get callerReference() {
        return this.getStringAttribute('caller_reference');
    }
    // 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: false, required: false
    get etag() {
        return this.getStringAttribute('etag');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // content_type_profile_config - computed: false, optional: false, required: true
    _contentTypeProfileConfig = new CloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigOutputReference(this, "content_type_profile_config", true);
    get contentTypeProfileConfig() {
        return this._contentTypeProfileConfig;
    }
    putContentTypeProfileConfig(value) {
        this._contentTypeProfileConfig.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get contentTypeProfileConfigInput() {
        return this._contentTypeProfileConfig.internalValue;
    }
    // query_arg_profile_config - computed: false, optional: false, required: true
    _queryArgProfileConfig = new CloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigOutputReference(this, "query_arg_profile_config", true);
    get queryArgProfileConfig() {
        return this._queryArgProfileConfig;
    }
    putQueryArgProfileConfig(value) {
        this._queryArgProfileConfig.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get queryArgProfileConfigInput() {
        return this._queryArgProfileConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            comment: cdktf.stringToTerraform(this._comment),
            content_type_profile_config: cloudfrontFieldLevelEncryptionConfigContentTypeProfileConfigToTerraform(this._contentTypeProfileConfig.internalValue),
            query_arg_profile_config: cloudfrontFieldLevelEncryptionConfigQueryArgProfileConfigToTerraform(this._queryArgProfileConfig.internalValue),
        };
    }
}
//# sourceMappingURL=cloudfront-field-level-encryption-config.js.map