// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function iamRoleInlinePolicyToTerraform(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 {
        name: cdktf.stringToTerraform(struct.name),
        policy: cdktf.stringToTerraform(struct.policy),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/iam_role aws_iam_role}
*/
export class IamRole extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_iam_role";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/iam_role aws_iam_role} 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 IamRoleConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_iam_role',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._assumeRolePolicy = config.assumeRolePolicy;
        this._description = config.description;
        this._forceDetachPolicies = config.forceDetachPolicies;
        this._managedPolicyArns = config.managedPolicyArns;
        this._maxSessionDuration = config.maxSessionDuration;
        this._name = config.name;
        this._namePrefix = config.namePrefix;
        this._path = config.path;
        this._permissionsBoundary = config.permissionsBoundary;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._inlinePolicy = config.inlinePolicy;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // assume_role_policy - computed: false, optional: false, required: true
    _assumeRolePolicy;
    get assumeRolePolicy() {
        return this.getStringAttribute('assume_role_policy');
    }
    set assumeRolePolicy(value) {
        this._assumeRolePolicy = value;
    }
    // Temporarily expose input value. Use with caution.
    get assumeRolePolicyInput() {
        return this._assumeRolePolicy;
    }
    // create_date - computed: true, optional: false, required: false
    get createDate() {
        return this.getStringAttribute('create_date');
    }
    // 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;
    }
    // force_detach_policies - computed: false, optional: true, required: false
    _forceDetachPolicies;
    get forceDetachPolicies() {
        return this.getBooleanAttribute('force_detach_policies');
    }
    set forceDetachPolicies(value) {
        this._forceDetachPolicies = value;
    }
    resetForceDetachPolicies() {
        this._forceDetachPolicies = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get forceDetachPoliciesInput() {
        return this._forceDetachPolicies;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // managed_policy_arns - computed: true, optional: true, required: false
    _managedPolicyArns;
    get managedPolicyArns() {
        return cdktf.Fn.tolist(this.getListAttribute('managed_policy_arns'));
    }
    set managedPolicyArns(value) {
        this._managedPolicyArns = value;
    }
    resetManagedPolicyArns() {
        this._managedPolicyArns = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get managedPolicyArnsInput() {
        return this._managedPolicyArns;
    }
    // max_session_duration - computed: false, optional: true, required: false
    _maxSessionDuration;
    get maxSessionDuration() {
        return this.getNumberAttribute('max_session_duration');
    }
    set maxSessionDuration(value) {
        this._maxSessionDuration = value;
    }
    resetMaxSessionDuration() {
        this._maxSessionDuration = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maxSessionDurationInput() {
        return this._maxSessionDuration;
    }
    // name - computed: true, optional: true, required: false
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    resetName() {
        this._name = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // name_prefix - computed: true, optional: true, required: false
    _namePrefix;
    get namePrefix() {
        return this.getStringAttribute('name_prefix');
    }
    set namePrefix(value) {
        this._namePrefix = value;
    }
    resetNamePrefix() {
        this._namePrefix = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get namePrefixInput() {
        return this._namePrefix;
    }
    // path - computed: false, optional: true, required: false
    _path;
    get path() {
        return this.getStringAttribute('path');
    }
    set path(value) {
        this._path = value;
    }
    resetPath() {
        this._path = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pathInput() {
        return this._path;
    }
    // permissions_boundary - computed: false, optional: true, required: false
    _permissionsBoundary;
    get permissionsBoundary() {
        return this.getStringAttribute('permissions_boundary');
    }
    set permissionsBoundary(value) {
        this._permissionsBoundary = value;
    }
    resetPermissionsBoundary() {
        this._permissionsBoundary = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get permissionsBoundaryInput() {
        return this._permissionsBoundary;
    }
    // tags - computed: false, optional: true, required: false
    _tags;
    get tags() {
        return this.getStringMapAttribute('tags');
    }
    set tags(value) {
        this._tags = value;
    }
    resetTags() {
        this._tags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsInput() {
        return this._tags;
    }
    // tags_all - computed: true, optional: true, required: false
    _tagsAll;
    get tagsAll() {
        return this.getStringMapAttribute('tags_all');
    }
    set tagsAll(value) {
        this._tagsAll = value;
    }
    resetTagsAll() {
        this._tagsAll = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsAllInput() {
        return this._tagsAll;
    }
    // unique_id - computed: true, optional: false, required: false
    get uniqueId() {
        return this.getStringAttribute('unique_id');
    }
    // inline_policy - computed: false, optional: true, required: false
    _inlinePolicy;
    get inlinePolicy() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('inline_policy')));
    }
    set inlinePolicy(value) {
        this._inlinePolicy = value;
    }
    resetInlinePolicy() {
        this._inlinePolicy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get inlinePolicyInput() {
        return this._inlinePolicy;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            assume_role_policy: cdktf.stringToTerraform(this._assumeRolePolicy),
            description: cdktf.stringToTerraform(this._description),
            force_detach_policies: cdktf.booleanToTerraform(this._forceDetachPolicies),
            managed_policy_arns: cdktf.listMapper(cdktf.stringToTerraform)(this._managedPolicyArns),
            max_session_duration: cdktf.numberToTerraform(this._maxSessionDuration),
            name: cdktf.stringToTerraform(this._name),
            name_prefix: cdktf.stringToTerraform(this._namePrefix),
            path: cdktf.stringToTerraform(this._path),
            permissions_boundary: cdktf.stringToTerraform(this._permissionsBoundary),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            inline_policy: cdktf.listMapper(iamRoleInlinePolicyToTerraform)(this._inlinePolicy),
        };
    }
}
//# sourceMappingURL=iam-role.js.map