// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function s3ControlObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationAwsLambdaToTerraform(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 {
        function_arn: cdktf.stringToTerraform(struct.functionArn),
        function_payload: cdktf.stringToTerraform(struct.functionPayload),
    };
}
export class S3ControlObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationAwsLambdaOutputReference 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._functionArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.functionArn = this._functionArn;
        }
        if (this._functionPayload !== undefined) {
            hasAnyValues = true;
            internalValueResult.functionPayload = this._functionPayload;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._functionArn = undefined;
            this._functionPayload = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._functionArn = value.functionArn;
            this._functionPayload = value.functionPayload;
        }
    }
    // function_arn - computed: false, optional: false, required: true
    _functionArn;
    get functionArn() {
        return this.getStringAttribute('function_arn');
    }
    set functionArn(value) {
        this._functionArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get functionArnInput() {
        return this._functionArn;
    }
    // function_payload - computed: false, optional: true, required: false
    _functionPayload;
    get functionPayload() {
        return this.getStringAttribute('function_payload');
    }
    set functionPayload(value) {
        this._functionPayload = value;
    }
    resetFunctionPayload() {
        this._functionPayload = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get functionPayloadInput() {
        return this._functionPayload;
    }
}
export function s3ControlObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationToTerraform(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 {
        aws_lambda: s3ControlObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationAwsLambdaToTerraform(struct.awsLambda),
    };
}
export class S3ControlObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationOutputReference 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._awsLambda?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.awsLambda = this._awsLambda?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._awsLambda.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._awsLambda.internalValue = value.awsLambda;
        }
    }
    // aws_lambda - computed: false, optional: false, required: true
    _awsLambda = new S3ControlObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationAwsLambdaOutputReference(this, "aws_lambda", true);
    get awsLambda() {
        return this._awsLambda;
    }
    putAwsLambda(value) {
        this._awsLambda.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get awsLambdaInput() {
        return this._awsLambda.internalValue;
    }
}
export function s3ControlObjectLambdaAccessPointConfigurationTransformationConfigurationToTerraform(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 {
        actions: cdktf.listMapper(cdktf.stringToTerraform)(struct.actions),
        content_transformation: s3ControlObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationToTerraform(struct.contentTransformation),
    };
}
export function s3ControlObjectLambdaAccessPointConfigurationToTerraform(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 {
        allowed_features: cdktf.listMapper(cdktf.stringToTerraform)(struct.allowedFeatures),
        cloud_watch_metrics_enabled: cdktf.booleanToTerraform(struct.cloudWatchMetricsEnabled),
        supporting_access_point: cdktf.stringToTerraform(struct.supportingAccessPoint),
        transformation_configuration: cdktf.listMapper(s3ControlObjectLambdaAccessPointConfigurationTransformationConfigurationToTerraform)(struct.transformationConfiguration),
    };
}
export class S3ControlObjectLambdaAccessPointConfigurationOutputReference 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._allowedFeatures !== undefined) {
            hasAnyValues = true;
            internalValueResult.allowedFeatures = this._allowedFeatures;
        }
        if (this._cloudWatchMetricsEnabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.cloudWatchMetricsEnabled = this._cloudWatchMetricsEnabled;
        }
        if (this._supportingAccessPoint !== undefined) {
            hasAnyValues = true;
            internalValueResult.supportingAccessPoint = this._supportingAccessPoint;
        }
        if (this._transformationConfiguration !== undefined) {
            hasAnyValues = true;
            internalValueResult.transformationConfiguration = this._transformationConfiguration;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._allowedFeatures = undefined;
            this._cloudWatchMetricsEnabled = undefined;
            this._supportingAccessPoint = undefined;
            this._transformationConfiguration = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._allowedFeatures = value.allowedFeatures;
            this._cloudWatchMetricsEnabled = value.cloudWatchMetricsEnabled;
            this._supportingAccessPoint = value.supportingAccessPoint;
            this._transformationConfiguration = value.transformationConfiguration;
        }
    }
    // allowed_features - computed: false, optional: true, required: false
    _allowedFeatures;
    get allowedFeatures() {
        return cdktf.Fn.tolist(this.getListAttribute('allowed_features'));
    }
    set allowedFeatures(value) {
        this._allowedFeatures = value;
    }
    resetAllowedFeatures() {
        this._allowedFeatures = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get allowedFeaturesInput() {
        return this._allowedFeatures;
    }
    // cloud_watch_metrics_enabled - computed: false, optional: true, required: false
    _cloudWatchMetricsEnabled;
    get cloudWatchMetricsEnabled() {
        return this.getBooleanAttribute('cloud_watch_metrics_enabled');
    }
    set cloudWatchMetricsEnabled(value) {
        this._cloudWatchMetricsEnabled = value;
    }
    resetCloudWatchMetricsEnabled() {
        this._cloudWatchMetricsEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cloudWatchMetricsEnabledInput() {
        return this._cloudWatchMetricsEnabled;
    }
    // supporting_access_point - computed: false, optional: false, required: true
    _supportingAccessPoint;
    get supportingAccessPoint() {
        return this.getStringAttribute('supporting_access_point');
    }
    set supportingAccessPoint(value) {
        this._supportingAccessPoint = value;
    }
    // Temporarily expose input value. Use with caution.
    get supportingAccessPointInput() {
        return this._supportingAccessPoint;
    }
    // transformation_configuration - computed: false, optional: false, required: true
    _transformationConfiguration;
    get transformationConfiguration() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('transformation_configuration')));
    }
    set transformationConfiguration(value) {
        this._transformationConfiguration = value;
    }
    // Temporarily expose input value. Use with caution.
    get transformationConfigurationInput() {
        return this._transformationConfiguration;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/s3control_object_lambda_access_point aws_s3control_object_lambda_access_point}
*/
export class S3ControlObjectLambdaAccessPoint extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_s3control_object_lambda_access_point";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/s3control_object_lambda_access_point aws_s3control_object_lambda_access_point} 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 S3ControlObjectLambdaAccessPointConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_s3control_object_lambda_access_point',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._accountId = config.accountId;
        this._name = config.name;
        this._configuration.internalValue = config.configuration;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // account_id - computed: true, optional: true, required: false
    _accountId;
    get accountId() {
        return this.getStringAttribute('account_id');
    }
    set accountId(value) {
        this._accountId = value;
    }
    resetAccountId() {
        this._accountId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accountIdInput() {
        return this._accountId;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // 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;
    }
    // configuration - computed: false, optional: false, required: true
    _configuration = new S3ControlObjectLambdaAccessPointConfigurationOutputReference(this, "configuration", true);
    get configuration() {
        return this._configuration;
    }
    putConfiguration(value) {
        this._configuration.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get configurationInput() {
        return this._configuration.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            account_id: cdktf.stringToTerraform(this._accountId),
            name: cdktf.stringToTerraform(this._name),
            configuration: s3ControlObjectLambdaAccessPointConfigurationToTerraform(this._configuration.internalValue),
        };
    }
}
//# sourceMappingURL=s3control-object-lambda-access-point.js.map