// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function lambdaCodeSigningConfigAllowedPublishersToTerraform(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 {
        signing_profile_version_arns: cdktf.listMapper(cdktf.stringToTerraform)(struct.signingProfileVersionArns),
    };
}
export class LambdaCodeSigningConfigAllowedPublishersOutputReference 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._signingProfileVersionArns !== undefined) {
            hasAnyValues = true;
            internalValueResult.signingProfileVersionArns = this._signingProfileVersionArns;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._signingProfileVersionArns = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._signingProfileVersionArns = value.signingProfileVersionArns;
        }
    }
    // signing_profile_version_arns - computed: false, optional: false, required: true
    _signingProfileVersionArns;
    get signingProfileVersionArns() {
        return cdktf.Fn.tolist(this.getListAttribute('signing_profile_version_arns'));
    }
    set signingProfileVersionArns(value) {
        this._signingProfileVersionArns = value;
    }
    // Temporarily expose input value. Use with caution.
    get signingProfileVersionArnsInput() {
        return this._signingProfileVersionArns;
    }
}
export function lambdaCodeSigningConfigPoliciesToTerraform(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 {
        untrusted_artifact_on_deployment: cdktf.stringToTerraform(struct.untrustedArtifactOnDeployment),
    };
}
export class LambdaCodeSigningConfigPoliciesOutputReference 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._untrustedArtifactOnDeployment !== undefined) {
            hasAnyValues = true;
            internalValueResult.untrustedArtifactOnDeployment = this._untrustedArtifactOnDeployment;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._untrustedArtifactOnDeployment = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._untrustedArtifactOnDeployment = value.untrustedArtifactOnDeployment;
        }
    }
    // untrusted_artifact_on_deployment - computed: false, optional: false, required: true
    _untrustedArtifactOnDeployment;
    get untrustedArtifactOnDeployment() {
        return this.getStringAttribute('untrusted_artifact_on_deployment');
    }
    set untrustedArtifactOnDeployment(value) {
        this._untrustedArtifactOnDeployment = value;
    }
    // Temporarily expose input value. Use with caution.
    get untrustedArtifactOnDeploymentInput() {
        return this._untrustedArtifactOnDeployment;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/lambda_code_signing_config aws_lambda_code_signing_config}
*/
export class LambdaCodeSigningConfig extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_lambda_code_signing_config";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/lambda_code_signing_config aws_lambda_code_signing_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 LambdaCodeSigningConfigConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_lambda_code_signing_config',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._allowedPublishers.internalValue = config.allowedPublishers;
        this._policies.internalValue = config.policies;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // config_id - computed: true, optional: false, required: false
    get configId() {
        return this.getStringAttribute('config_id');
    }
    // description - computed: false, optional: true, required: false
    _description;
    get description() {
        return this.getStringAttribute('description');
    }
    set description(value) {
        this._description = value;
    }
    resetDescription() {
        this._description = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get descriptionInput() {
        return this._description;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // last_modified - computed: true, optional: false, required: false
    get lastModified() {
        return this.getStringAttribute('last_modified');
    }
    // allowed_publishers - computed: false, optional: false, required: true
    _allowedPublishers = new LambdaCodeSigningConfigAllowedPublishersOutputReference(this, "allowed_publishers", true);
    get allowedPublishers() {
        return this._allowedPublishers;
    }
    putAllowedPublishers(value) {
        this._allowedPublishers.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get allowedPublishersInput() {
        return this._allowedPublishers.internalValue;
    }
    // policies - computed: false, optional: true, required: false
    _policies = new LambdaCodeSigningConfigPoliciesOutputReference(this, "policies", true);
    get policies() {
        return this._policies;
    }
    putPolicies(value) {
        this._policies.internalValue = value;
    }
    resetPolicies() {
        this._policies.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get policiesInput() {
        return this._policies.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            description: cdktf.stringToTerraform(this._description),
            allowed_publishers: lambdaCodeSigningConfigAllowedPublishersToTerraform(this._allowedPublishers.internalValue),
            policies: lambdaCodeSigningConfigPoliciesToTerraform(this._policies.internalValue),
        };
    }
}
//# sourceMappingURL=lambda-code-signing-config.js.map