// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function servicecatalogProvisionedProductProvisioningParametersToTerraform(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 {
        key: cdktf.stringToTerraform(struct.key),
        use_previous_value: cdktf.booleanToTerraform(struct.usePreviousValue),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export function servicecatalogProvisionedProductStackSetProvisioningPreferencesToTerraform(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 {
        accounts: cdktf.listMapper(cdktf.stringToTerraform)(struct.accounts),
        failure_tolerance_count: cdktf.numberToTerraform(struct.failureToleranceCount),
        failure_tolerance_percentage: cdktf.numberToTerraform(struct.failureTolerancePercentage),
        max_concurrency_count: cdktf.numberToTerraform(struct.maxConcurrencyCount),
        max_concurrency_percentage: cdktf.numberToTerraform(struct.maxConcurrencyPercentage),
        regions: cdktf.listMapper(cdktf.stringToTerraform)(struct.regions),
    };
}
export class ServicecatalogProvisionedProductStackSetProvisioningPreferencesOutputReference 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._accounts !== undefined) {
            hasAnyValues = true;
            internalValueResult.accounts = this._accounts;
        }
        if (this._failureToleranceCount !== undefined) {
            hasAnyValues = true;
            internalValueResult.failureToleranceCount = this._failureToleranceCount;
        }
        if (this._failureTolerancePercentage !== undefined) {
            hasAnyValues = true;
            internalValueResult.failureTolerancePercentage = this._failureTolerancePercentage;
        }
        if (this._maxConcurrencyCount !== undefined) {
            hasAnyValues = true;
            internalValueResult.maxConcurrencyCount = this._maxConcurrencyCount;
        }
        if (this._maxConcurrencyPercentage !== undefined) {
            hasAnyValues = true;
            internalValueResult.maxConcurrencyPercentage = this._maxConcurrencyPercentage;
        }
        if (this._regions !== undefined) {
            hasAnyValues = true;
            internalValueResult.regions = this._regions;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._accounts = undefined;
            this._failureToleranceCount = undefined;
            this._failureTolerancePercentage = undefined;
            this._maxConcurrencyCount = undefined;
            this._maxConcurrencyPercentage = undefined;
            this._regions = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._accounts = value.accounts;
            this._failureToleranceCount = value.failureToleranceCount;
            this._failureTolerancePercentage = value.failureTolerancePercentage;
            this._maxConcurrencyCount = value.maxConcurrencyCount;
            this._maxConcurrencyPercentage = value.maxConcurrencyPercentage;
            this._regions = value.regions;
        }
    }
    // accounts - computed: false, optional: true, required: false
    _accounts;
    get accounts() {
        return this.getListAttribute('accounts');
    }
    set accounts(value) {
        this._accounts = value;
    }
    resetAccounts() {
        this._accounts = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accountsInput() {
        return this._accounts;
    }
    // failure_tolerance_count - computed: false, optional: true, required: false
    _failureToleranceCount;
    get failureToleranceCount() {
        return this.getNumberAttribute('failure_tolerance_count');
    }
    set failureToleranceCount(value) {
        this._failureToleranceCount = value;
    }
    resetFailureToleranceCount() {
        this._failureToleranceCount = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get failureToleranceCountInput() {
        return this._failureToleranceCount;
    }
    // failure_tolerance_percentage - computed: false, optional: true, required: false
    _failureTolerancePercentage;
    get failureTolerancePercentage() {
        return this.getNumberAttribute('failure_tolerance_percentage');
    }
    set failureTolerancePercentage(value) {
        this._failureTolerancePercentage = value;
    }
    resetFailureTolerancePercentage() {
        this._failureTolerancePercentage = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get failureTolerancePercentageInput() {
        return this._failureTolerancePercentage;
    }
    // max_concurrency_count - computed: false, optional: true, required: false
    _maxConcurrencyCount;
    get maxConcurrencyCount() {
        return this.getNumberAttribute('max_concurrency_count');
    }
    set maxConcurrencyCount(value) {
        this._maxConcurrencyCount = value;
    }
    resetMaxConcurrencyCount() {
        this._maxConcurrencyCount = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maxConcurrencyCountInput() {
        return this._maxConcurrencyCount;
    }
    // max_concurrency_percentage - computed: false, optional: true, required: false
    _maxConcurrencyPercentage;
    get maxConcurrencyPercentage() {
        return this.getNumberAttribute('max_concurrency_percentage');
    }
    set maxConcurrencyPercentage(value) {
        this._maxConcurrencyPercentage = value;
    }
    resetMaxConcurrencyPercentage() {
        this._maxConcurrencyPercentage = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maxConcurrencyPercentageInput() {
        return this._maxConcurrencyPercentage;
    }
    // regions - computed: false, optional: true, required: false
    _regions;
    get regions() {
        return this.getListAttribute('regions');
    }
    set regions(value) {
        this._regions = value;
    }
    resetRegions() {
        this._regions = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get regionsInput() {
        return this._regions;
    }
}
export function servicecatalogProvisionedProductTimeoutsToTerraform(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 {
        create: cdktf.stringToTerraform(struct.create),
        delete: cdktf.stringToTerraform(struct.delete),
        update: cdktf.stringToTerraform(struct.update),
    };
}
export class ServicecatalogProvisionedProductTimeoutsOutputReference 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._create !== undefined) {
            hasAnyValues = true;
            internalValueResult.create = this._create;
        }
        if (this._delete !== undefined) {
            hasAnyValues = true;
            internalValueResult.delete = this._delete;
        }
        if (this._update !== undefined) {
            hasAnyValues = true;
            internalValueResult.update = this._update;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._create = undefined;
            this._delete = undefined;
            this._update = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._create = value.create;
            this._delete = value.delete;
            this._update = value.update;
        }
    }
    // create - computed: false, optional: true, required: false
    _create;
    get create() {
        return this.getStringAttribute('create');
    }
    set create(value) {
        this._create = value;
    }
    resetCreate() {
        this._create = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get createInput() {
        return this._create;
    }
    // delete - computed: false, optional: true, required: false
    _delete;
    get delete() {
        return this.getStringAttribute('delete');
    }
    set delete(value) {
        this._delete = value;
    }
    resetDelete() {
        this._delete = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteInput() {
        return this._delete;
    }
    // update - computed: false, optional: true, required: false
    _update;
    get update() {
        return this.getStringAttribute('update');
    }
    set update(value) {
        this._update = value;
    }
    resetUpdate() {
        this._update = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get updateInput() {
        return this._update;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/servicecatalog_provisioned_product aws_servicecatalog_provisioned_product}
*/
export class ServicecatalogProvisionedProduct extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_servicecatalog_provisioned_product";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/servicecatalog_provisioned_product aws_servicecatalog_provisioned_product} 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 ServicecatalogProvisionedProductConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_servicecatalog_provisioned_product',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._acceptLanguage = config.acceptLanguage;
        this._ignoreErrors = config.ignoreErrors;
        this._name = config.name;
        this._notificationArns = config.notificationArns;
        this._pathId = config.pathId;
        this._pathName = config.pathName;
        this._productId = config.productId;
        this._productName = config.productName;
        this._provisioningArtifactId = config.provisioningArtifactId;
        this._provisioningArtifactName = config.provisioningArtifactName;
        this._retainPhysicalResources = config.retainPhysicalResources;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._provisioningParameters = config.provisioningParameters;
        this._stackSetProvisioningPreferences.internalValue = config.stackSetProvisioningPreferences;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // accept_language - computed: false, optional: true, required: false
    _acceptLanguage;
    get acceptLanguage() {
        return this.getStringAttribute('accept_language');
    }
    set acceptLanguage(value) {
        this._acceptLanguage = value;
    }
    resetAcceptLanguage() {
        this._acceptLanguage = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get acceptLanguageInput() {
        return this._acceptLanguage;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // cloudwatch_dashboard_names - computed: true, optional: false, required: false
    get cloudwatchDashboardNames() {
        return cdktf.Fn.tolist(this.getListAttribute('cloudwatch_dashboard_names'));
    }
    // created_time - computed: true, optional: false, required: false
    get createdTime() {
        return this.getStringAttribute('created_time');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // ignore_errors - computed: false, optional: true, required: false
    _ignoreErrors;
    get ignoreErrors() {
        return this.getBooleanAttribute('ignore_errors');
    }
    set ignoreErrors(value) {
        this._ignoreErrors = value;
    }
    resetIgnoreErrors() {
        this._ignoreErrors = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get ignoreErrorsInput() {
        return this._ignoreErrors;
    }
    // last_provisioning_record_id - computed: true, optional: false, required: false
    get lastProvisioningRecordId() {
        return this.getStringAttribute('last_provisioning_record_id');
    }
    // last_record_id - computed: true, optional: false, required: false
    get lastRecordId() {
        return this.getStringAttribute('last_record_id');
    }
    // last_successful_provisioning_record_id - computed: true, optional: false, required: false
    get lastSuccessfulProvisioningRecordId() {
        return this.getStringAttribute('last_successful_provisioning_record_id');
    }
    // launch_role_arn - computed: true, optional: false, required: false
    get launchRoleArn() {
        return this.getStringAttribute('launch_role_arn');
    }
    // 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;
    }
    // notification_arns - computed: false, optional: true, required: false
    _notificationArns;
    get notificationArns() {
        return this.getListAttribute('notification_arns');
    }
    set notificationArns(value) {
        this._notificationArns = value;
    }
    resetNotificationArns() {
        this._notificationArns = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get notificationArnsInput() {
        return this._notificationArns;
    }
    // path_id - computed: true, optional: true, required: false
    _pathId;
    get pathId() {
        return this.getStringAttribute('path_id');
    }
    set pathId(value) {
        this._pathId = value;
    }
    resetPathId() {
        this._pathId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pathIdInput() {
        return this._pathId;
    }
    // path_name - computed: false, optional: true, required: false
    _pathName;
    get pathName() {
        return this.getStringAttribute('path_name');
    }
    set pathName(value) {
        this._pathName = value;
    }
    resetPathName() {
        this._pathName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pathNameInput() {
        return this._pathName;
    }
    // product_id - computed: true, optional: true, required: false
    _productId;
    get productId() {
        return this.getStringAttribute('product_id');
    }
    set productId(value) {
        this._productId = value;
    }
    resetProductId() {
        this._productId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get productIdInput() {
        return this._productId;
    }
    // product_name - computed: false, optional: true, required: false
    _productName;
    get productName() {
        return this.getStringAttribute('product_name');
    }
    set productName(value) {
        this._productName = value;
    }
    resetProductName() {
        this._productName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get productNameInput() {
        return this._productName;
    }
    // provisioning_artifact_id - computed: true, optional: true, required: false
    _provisioningArtifactId;
    get provisioningArtifactId() {
        return this.getStringAttribute('provisioning_artifact_id');
    }
    set provisioningArtifactId(value) {
        this._provisioningArtifactId = value;
    }
    resetProvisioningArtifactId() {
        this._provisioningArtifactId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get provisioningArtifactIdInput() {
        return this._provisioningArtifactId;
    }
    // provisioning_artifact_name - computed: false, optional: true, required: false
    _provisioningArtifactName;
    get provisioningArtifactName() {
        return this.getStringAttribute('provisioning_artifact_name');
    }
    set provisioningArtifactName(value) {
        this._provisioningArtifactName = value;
    }
    resetProvisioningArtifactName() {
        this._provisioningArtifactName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get provisioningArtifactNameInput() {
        return this._provisioningArtifactName;
    }
    // retain_physical_resources - computed: false, optional: true, required: false
    _retainPhysicalResources;
    get retainPhysicalResources() {
        return this.getBooleanAttribute('retain_physical_resources');
    }
    set retainPhysicalResources(value) {
        this._retainPhysicalResources = value;
    }
    resetRetainPhysicalResources() {
        this._retainPhysicalResources = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get retainPhysicalResourcesInput() {
        return this._retainPhysicalResources;
    }
    // status - computed: true, optional: false, required: false
    get status() {
        return this.getStringAttribute('status');
    }
    // status_message - computed: true, optional: false, required: false
    get statusMessage() {
        return this.getStringAttribute('status_message');
    }
    // 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;
    }
    // type - computed: true, optional: false, required: false
    get type() {
        return this.getStringAttribute('type');
    }
    // provisioning_parameters - computed: false, optional: true, required: false
    _provisioningParameters;
    get provisioningParameters() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('provisioning_parameters');
    }
    set provisioningParameters(value) {
        this._provisioningParameters = value;
    }
    resetProvisioningParameters() {
        this._provisioningParameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get provisioningParametersInput() {
        return this._provisioningParameters;
    }
    // stack_set_provisioning_preferences - computed: false, optional: true, required: false
    _stackSetProvisioningPreferences = new ServicecatalogProvisionedProductStackSetProvisioningPreferencesOutputReference(this, "stack_set_provisioning_preferences", true);
    get stackSetProvisioningPreferences() {
        return this._stackSetProvisioningPreferences;
    }
    putStackSetProvisioningPreferences(value) {
        this._stackSetProvisioningPreferences.internalValue = value;
    }
    resetStackSetProvisioningPreferences() {
        this._stackSetProvisioningPreferences.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get stackSetProvisioningPreferencesInput() {
        return this._stackSetProvisioningPreferences.internalValue;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new ServicecatalogProvisionedProductTimeoutsOutputReference(this, "timeouts", true);
    get timeouts() {
        return this._timeouts;
    }
    putTimeouts(value) {
        this._timeouts.internalValue = value;
    }
    resetTimeouts() {
        this._timeouts.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get timeoutsInput() {
        return this._timeouts.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            accept_language: cdktf.stringToTerraform(this._acceptLanguage),
            ignore_errors: cdktf.booleanToTerraform(this._ignoreErrors),
            name: cdktf.stringToTerraform(this._name),
            notification_arns: cdktf.listMapper(cdktf.stringToTerraform)(this._notificationArns),
            path_id: cdktf.stringToTerraform(this._pathId),
            path_name: cdktf.stringToTerraform(this._pathName),
            product_id: cdktf.stringToTerraform(this._productId),
            product_name: cdktf.stringToTerraform(this._productName),
            provisioning_artifact_id: cdktf.stringToTerraform(this._provisioningArtifactId),
            provisioning_artifact_name: cdktf.stringToTerraform(this._provisioningArtifactName),
            retain_physical_resources: cdktf.booleanToTerraform(this._retainPhysicalResources),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            provisioning_parameters: cdktf.listMapper(servicecatalogProvisionedProductProvisioningParametersToTerraform)(this._provisioningParameters),
            stack_set_provisioning_preferences: servicecatalogProvisionedProductStackSetProvisioningPreferencesToTerraform(this._stackSetProvisioningPreferences.internalValue),
            timeouts: servicecatalogProvisionedProductTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=servicecatalog-provisioned-product.js.map