@cdktf/provider-azurerm
Version: 
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,170 lines • 176 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SubscriptionCostManagementView = exports.SubscriptionCostManagementViewTimeoutsOutputReference = exports.subscriptionCostManagementViewTimeoutsToHclTerraform = exports.subscriptionCostManagementViewTimeoutsToTerraform = exports.SubscriptionCostManagementViewPivotList = exports.SubscriptionCostManagementViewPivotOutputReference = exports.subscriptionCostManagementViewPivotToHclTerraform = exports.subscriptionCostManagementViewPivotToTerraform = exports.SubscriptionCostManagementViewKpiList = exports.SubscriptionCostManagementViewKpiOutputReference = exports.subscriptionCostManagementViewKpiToHclTerraform = exports.subscriptionCostManagementViewKpiToTerraform = exports.SubscriptionCostManagementViewDatasetOutputReference = exports.subscriptionCostManagementViewDatasetToHclTerraform = exports.subscriptionCostManagementViewDatasetToTerraform = exports.SubscriptionCostManagementViewDatasetSortingList = exports.SubscriptionCostManagementViewDatasetSortingOutputReference = exports.subscriptionCostManagementViewDatasetSortingToHclTerraform = exports.subscriptionCostManagementViewDatasetSortingToTerraform = exports.SubscriptionCostManagementViewDatasetGroupingList = exports.SubscriptionCostManagementViewDatasetGroupingOutputReference = exports.subscriptionCostManagementViewDatasetGroupingToHclTerraform = exports.subscriptionCostManagementViewDatasetGroupingToTerraform = exports.SubscriptionCostManagementViewDatasetAggregationList = exports.SubscriptionCostManagementViewDatasetAggregationOutputReference = exports.subscriptionCostManagementViewDatasetAggregationToHclTerraform = exports.subscriptionCostManagementViewDatasetAggregationToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function subscriptionCostManagementViewDatasetAggregationToTerraform(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 {
        column_name: cdktf.stringToTerraform(struct.columnName),
        name: cdktf.stringToTerraform(struct.name),
    };
}
exports.subscriptionCostManagementViewDatasetAggregationToTerraform = subscriptionCostManagementViewDatasetAggregationToTerraform;
function subscriptionCostManagementViewDatasetAggregationToHclTerraform(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");
    }
    const attrs = {
        column_name: {
            value: cdktf.stringToHclTerraform(struct.columnName),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
        name: {
            value: cdktf.stringToHclTerraform(struct.name),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
    };
    // remove undefined attributes
    return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionCostManagementViewDatasetAggregationToHclTerraform = subscriptionCostManagementViewDatasetAggregationToHclTerraform;
class SubscriptionCostManagementViewDatasetAggregationOutputReference extends cdktf.ComplexObject {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param complexObjectIndex the index of this item in the list
    * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
        super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
        this.isEmptyObject = false;
    }
    get internalValue() {
        if (this.resolvableValue) {
            return this.resolvableValue;
        }
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._columnName !== undefined) {
            hasAnyValues = true;
            internalValueResult.columnName = this._columnName;
        }
        if (this._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this.resolvableValue = undefined;
            this._columnName = undefined;
            this._name = undefined;
        }
        else if (cdktf.Tokenization.isResolvable(value)) {
            this.isEmptyObject = false;
            this.resolvableValue = value;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this.resolvableValue = undefined;
            this._columnName = value.columnName;
            this._name = value.name;
        }
    }
    get columnName() {
        return this.getStringAttribute('column_name');
    }
    set columnName(value) {
        this._columnName = value;
    }
    // Temporarily expose input value. Use with caution.
    get columnNameInput() {
        return this._columnName;
    }
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
}
exports.SubscriptionCostManagementViewDatasetAggregationOutputReference = SubscriptionCostManagementViewDatasetAggregationOutputReference;
_a = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewDatasetAggregationOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewDatasetAggregationOutputReference", version: "12.27.0" };
class SubscriptionCostManagementViewDatasetAggregationList extends cdktf.ComplexList {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, wrapsSet) {
        super(terraformResource, terraformAttribute, wrapsSet);
        this.terraformResource = terraformResource;
        this.terraformAttribute = terraformAttribute;
        this.wrapsSet = wrapsSet;
    }
    /**
    * @param index the index of the item to return
    */
    get(index) {
        return new SubscriptionCostManagementViewDatasetAggregationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
    }
}
exports.SubscriptionCostManagementViewDatasetAggregationList = SubscriptionCostManagementViewDatasetAggregationList;
_b = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewDatasetAggregationList[_b] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewDatasetAggregationList", version: "12.27.0" };
function subscriptionCostManagementViewDatasetGroupingToTerraform(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),
        type: cdktf.stringToTerraform(struct.type),
    };
}
exports.subscriptionCostManagementViewDatasetGroupingToTerraform = subscriptionCostManagementViewDatasetGroupingToTerraform;
function subscriptionCostManagementViewDatasetGroupingToHclTerraform(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");
    }
    const attrs = {
        name: {
            value: cdktf.stringToHclTerraform(struct.name),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
        type: {
            value: cdktf.stringToHclTerraform(struct.type),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
    };
    // remove undefined attributes
    return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionCostManagementViewDatasetGroupingToHclTerraform = subscriptionCostManagementViewDatasetGroupingToHclTerraform;
class SubscriptionCostManagementViewDatasetGroupingOutputReference extends cdktf.ComplexObject {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param complexObjectIndex the index of this item in the list
    * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
        super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
        this.isEmptyObject = false;
    }
    get internalValue() {
        if (this.resolvableValue) {
            return this.resolvableValue;
        }
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        if (this._type !== undefined) {
            hasAnyValues = true;
            internalValueResult.type = this._type;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this.resolvableValue = undefined;
            this._name = undefined;
            this._type = undefined;
        }
        else if (cdktf.Tokenization.isResolvable(value)) {
            this.isEmptyObject = false;
            this.resolvableValue = value;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this.resolvableValue = undefined;
            this._name = value.name;
            this._type = value.type;
        }
    }
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
}
exports.SubscriptionCostManagementViewDatasetGroupingOutputReference = SubscriptionCostManagementViewDatasetGroupingOutputReference;
_c = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewDatasetGroupingOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewDatasetGroupingOutputReference", version: "12.27.0" };
class SubscriptionCostManagementViewDatasetGroupingList extends cdktf.ComplexList {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, wrapsSet) {
        super(terraformResource, terraformAttribute, wrapsSet);
        this.terraformResource = terraformResource;
        this.terraformAttribute = terraformAttribute;
        this.wrapsSet = wrapsSet;
    }
    /**
    * @param index the index of the item to return
    */
    get(index) {
        return new SubscriptionCostManagementViewDatasetGroupingOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
    }
}
exports.SubscriptionCostManagementViewDatasetGroupingList = SubscriptionCostManagementViewDatasetGroupingList;
_d = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewDatasetGroupingList[_d] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewDatasetGroupingList", version: "12.27.0" };
function subscriptionCostManagementViewDatasetSortingToTerraform(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 {
        direction: cdktf.stringToTerraform(struct.direction),
        name: cdktf.stringToTerraform(struct.name),
    };
}
exports.subscriptionCostManagementViewDatasetSortingToTerraform = subscriptionCostManagementViewDatasetSortingToTerraform;
function subscriptionCostManagementViewDatasetSortingToHclTerraform(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");
    }
    const attrs = {
        direction: {
            value: cdktf.stringToHclTerraform(struct.direction),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
        name: {
            value: cdktf.stringToHclTerraform(struct.name),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
    };
    // remove undefined attributes
    return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionCostManagementViewDatasetSortingToHclTerraform = subscriptionCostManagementViewDatasetSortingToHclTerraform;
class SubscriptionCostManagementViewDatasetSortingOutputReference extends cdktf.ComplexObject {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param complexObjectIndex the index of this item in the list
    * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
        super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
        this.isEmptyObject = false;
    }
    get internalValue() {
        if (this.resolvableValue) {
            return this.resolvableValue;
        }
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._direction !== undefined) {
            hasAnyValues = true;
            internalValueResult.direction = this._direction;
        }
        if (this._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this.resolvableValue = undefined;
            this._direction = undefined;
            this._name = undefined;
        }
        else if (cdktf.Tokenization.isResolvable(value)) {
            this.isEmptyObject = false;
            this.resolvableValue = value;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this.resolvableValue = undefined;
            this._direction = value.direction;
            this._name = value.name;
        }
    }
    get direction() {
        return this.getStringAttribute('direction');
    }
    set direction(value) {
        this._direction = value;
    }
    // Temporarily expose input value. Use with caution.
    get directionInput() {
        return this._direction;
    }
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
}
exports.SubscriptionCostManagementViewDatasetSortingOutputReference = SubscriptionCostManagementViewDatasetSortingOutputReference;
_e = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewDatasetSortingOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewDatasetSortingOutputReference", version: "12.27.0" };
class SubscriptionCostManagementViewDatasetSortingList extends cdktf.ComplexList {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, wrapsSet) {
        super(terraformResource, terraformAttribute, wrapsSet);
        this.terraformResource = terraformResource;
        this.terraformAttribute = terraformAttribute;
        this.wrapsSet = wrapsSet;
    }
    /**
    * @param index the index of the item to return
    */
    get(index) {
        return new SubscriptionCostManagementViewDatasetSortingOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
    }
}
exports.SubscriptionCostManagementViewDatasetSortingList = SubscriptionCostManagementViewDatasetSortingList;
_f = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewDatasetSortingList[_f] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewDatasetSortingList", version: "12.27.0" };
function subscriptionCostManagementViewDatasetToTerraform(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 {
        granularity: cdktf.stringToTerraform(struct.granularity),
        aggregation: cdktf.listMapper(subscriptionCostManagementViewDatasetAggregationToTerraform, true)(struct.aggregation),
        grouping: cdktf.listMapper(subscriptionCostManagementViewDatasetGroupingToTerraform, true)(struct.grouping),
        sorting: cdktf.listMapper(subscriptionCostManagementViewDatasetSortingToTerraform, true)(struct.sorting),
    };
}
exports.subscriptionCostManagementViewDatasetToTerraform = subscriptionCostManagementViewDatasetToTerraform;
function subscriptionCostManagementViewDatasetToHclTerraform(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");
    }
    const attrs = {
        granularity: {
            value: cdktf.stringToHclTerraform(struct.granularity),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
        aggregation: {
            value: cdktf.listMapperHcl(subscriptionCostManagementViewDatasetAggregationToHclTerraform, true)(struct.aggregation),
            isBlock: true,
            type: "set",
            storageClassType: "SubscriptionCostManagementViewDatasetAggregationList",
        },
        grouping: {
            value: cdktf.listMapperHcl(subscriptionCostManagementViewDatasetGroupingToHclTerraform, true)(struct.grouping),
            isBlock: true,
            type: "list",
            storageClassType: "SubscriptionCostManagementViewDatasetGroupingList",
        },
        sorting: {
            value: cdktf.listMapperHcl(subscriptionCostManagementViewDatasetSortingToHclTerraform, true)(struct.sorting),
            isBlock: true,
            type: "list",
            storageClassType: "SubscriptionCostManagementViewDatasetSortingList",
        },
    };
    // remove undefined attributes
    return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionCostManagementViewDatasetToHclTerraform = subscriptionCostManagementViewDatasetToHclTerraform;
class SubscriptionCostManagementViewDatasetOutputReference extends cdktf.ComplexObject {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    */
    constructor(terraformResource, terraformAttribute) {
        super(terraformResource, terraformAttribute, false, 0);
        this.isEmptyObject = false;
        // aggregation - computed: false, optional: false, required: true
        this._aggregation = new SubscriptionCostManagementViewDatasetAggregationList(this, "aggregation", true);
        // grouping - computed: false, optional: true, required: false
        this._grouping = new SubscriptionCostManagementViewDatasetGroupingList(this, "grouping", false);
        // sorting - computed: false, optional: true, required: false
        this._sorting = new SubscriptionCostManagementViewDatasetSortingList(this, "sorting", false);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._granularity !== undefined) {
            hasAnyValues = true;
            internalValueResult.granularity = this._granularity;
        }
        if (this._aggregation?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.aggregation = this._aggregation?.internalValue;
        }
        if (this._grouping?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.grouping = this._grouping?.internalValue;
        }
        if (this._sorting?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.sorting = this._sorting?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._granularity = undefined;
            this._aggregation.internalValue = undefined;
            this._grouping.internalValue = undefined;
            this._sorting.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._granularity = value.granularity;
            this._aggregation.internalValue = value.aggregation;
            this._grouping.internalValue = value.grouping;
            this._sorting.internalValue = value.sorting;
        }
    }
    get granularity() {
        return this.getStringAttribute('granularity');
    }
    set granularity(value) {
        this._granularity = value;
    }
    // Temporarily expose input value. Use with caution.
    get granularityInput() {
        return this._granularity;
    }
    get aggregation() {
        return this._aggregation;
    }
    putAggregation(value) {
        this._aggregation.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get aggregationInput() {
        return this._aggregation.internalValue;
    }
    get grouping() {
        return this._grouping;
    }
    putGrouping(value) {
        this._grouping.internalValue = value;
    }
    resetGrouping() {
        this._grouping.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get groupingInput() {
        return this._grouping.internalValue;
    }
    get sorting() {
        return this._sorting;
    }
    putSorting(value) {
        this._sorting.internalValue = value;
    }
    resetSorting() {
        this._sorting.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sortingInput() {
        return this._sorting.internalValue;
    }
}
exports.SubscriptionCostManagementViewDatasetOutputReference = SubscriptionCostManagementViewDatasetOutputReference;
_g = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewDatasetOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewDatasetOutputReference", version: "12.27.0" };
function subscriptionCostManagementViewKpiToTerraform(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 {
        type: cdktf.stringToTerraform(struct.type),
    };
}
exports.subscriptionCostManagementViewKpiToTerraform = subscriptionCostManagementViewKpiToTerraform;
function subscriptionCostManagementViewKpiToHclTerraform(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");
    }
    const attrs = {
        type: {
            value: cdktf.stringToHclTerraform(struct.type),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
    };
    // remove undefined attributes
    return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionCostManagementViewKpiToHclTerraform = subscriptionCostManagementViewKpiToHclTerraform;
class SubscriptionCostManagementViewKpiOutputReference extends cdktf.ComplexObject {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param complexObjectIndex the index of this item in the list
    * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
        super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
        this.isEmptyObject = false;
    }
    get internalValue() {
        if (this.resolvableValue) {
            return this.resolvableValue;
        }
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._type !== undefined) {
            hasAnyValues = true;
            internalValueResult.type = this._type;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this.resolvableValue = undefined;
            this._type = undefined;
        }
        else if (cdktf.Tokenization.isResolvable(value)) {
            this.isEmptyObject = false;
            this.resolvableValue = value;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this.resolvableValue = undefined;
            this._type = value.type;
        }
    }
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
}
exports.SubscriptionCostManagementViewKpiOutputReference = SubscriptionCostManagementViewKpiOutputReference;
_h = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewKpiOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewKpiOutputReference", version: "12.27.0" };
class SubscriptionCostManagementViewKpiList extends cdktf.ComplexList {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, wrapsSet) {
        super(terraformResource, terraformAttribute, wrapsSet);
        this.terraformResource = terraformResource;
        this.terraformAttribute = terraformAttribute;
        this.wrapsSet = wrapsSet;
    }
    /**
    * @param index the index of the item to return
    */
    get(index) {
        return new SubscriptionCostManagementViewKpiOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
    }
}
exports.SubscriptionCostManagementViewKpiList = SubscriptionCostManagementViewKpiList;
_j = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewKpiList[_j] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewKpiList", version: "12.27.0" };
function subscriptionCostManagementViewPivotToTerraform(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),
        type: cdktf.stringToTerraform(struct.type),
    };
}
exports.subscriptionCostManagementViewPivotToTerraform = subscriptionCostManagementViewPivotToTerraform;
function subscriptionCostManagementViewPivotToHclTerraform(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");
    }
    const attrs = {
        name: {
            value: cdktf.stringToHclTerraform(struct.name),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
        type: {
            value: cdktf.stringToHclTerraform(struct.type),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
    };
    // remove undefined attributes
    return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionCostManagementViewPivotToHclTerraform = subscriptionCostManagementViewPivotToHclTerraform;
class SubscriptionCostManagementViewPivotOutputReference extends cdktf.ComplexObject {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param complexObjectIndex the index of this item in the list
    * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
        super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
        this.isEmptyObject = false;
    }
    get internalValue() {
        if (this.resolvableValue) {
            return this.resolvableValue;
        }
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        if (this._type !== undefined) {
            hasAnyValues = true;
            internalValueResult.type = this._type;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this.resolvableValue = undefined;
            this._name = undefined;
            this._type = undefined;
        }
        else if (cdktf.Tokenization.isResolvable(value)) {
            this.isEmptyObject = false;
            this.resolvableValue = value;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this.resolvableValue = undefined;
            this._name = value.name;
            this._type = value.type;
        }
    }
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
}
exports.SubscriptionCostManagementViewPivotOutputReference = SubscriptionCostManagementViewPivotOutputReference;
_k = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewPivotOutputReference[_k] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewPivotOutputReference", version: "12.27.0" };
class SubscriptionCostManagementViewPivotList extends cdktf.ComplexList {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
    */
    constructor(terraformResource, terraformAttribute, wrapsSet) {
        super(terraformResource, terraformAttribute, wrapsSet);
        this.terraformResource = terraformResource;
        this.terraformAttribute = terraformAttribute;
        this.wrapsSet = wrapsSet;
    }
    /**
    * @param index the index of the item to return
    */
    get(index) {
        return new SubscriptionCostManagementViewPivotOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
    }
}
exports.SubscriptionCostManagementViewPivotList = SubscriptionCostManagementViewPivotList;
_l = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewPivotList[_l] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewPivotList", version: "12.27.0" };
function subscriptionCostManagementViewTimeoutsToTerraform(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),
        read: cdktf.stringToTerraform(struct.read),
        update: cdktf.stringToTerraform(struct.update),
    };
}
exports.subscriptionCostManagementViewTimeoutsToTerraform = subscriptionCostManagementViewTimeoutsToTerraform;
function subscriptionCostManagementViewTimeoutsToHclTerraform(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");
    }
    const attrs = {
        create: {
            value: cdktf.stringToHclTerraform(struct.create),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
        delete: {
            value: cdktf.stringToHclTerraform(struct.delete),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
        read: {
            value: cdktf.stringToHclTerraform(struct.read),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
        update: {
            value: cdktf.stringToHclTerraform(struct.update),
            isBlock: false,
            type: "simple",
            storageClassType: "string",
        },
    };
    // remove undefined attributes
    return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionCostManagementViewTimeoutsToHclTerraform = subscriptionCostManagementViewTimeoutsToHclTerraform;
class SubscriptionCostManagementViewTimeoutsOutputReference extends cdktf.ComplexObject {
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    */
    constructor(terraformResource, terraformAttribute) {
        super(terraformResource, terraformAttribute, false);
        this.isEmptyObject = false;
    }
    get internalValue() {
        if (this.resolvableValue) {
            return this.resolvableValue;
        }
        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._read !== undefined) {
            hasAnyValues = true;
            internalValueResult.read = this._read;
        }
        if (this._update !== undefined) {
            hasAnyValues = true;
            internalValueResult.update = this._update;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this.resolvableValue = undefined;
            this._create = undefined;
            this._delete = undefined;
            this._read = undefined;
            this._update = undefined;
        }
        else if (cdktf.Tokenization.isResolvable(value)) {
            this.isEmptyObject = false;
            this.resolvableValue = value;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this.resolvableValue = undefined;
            this._create = value.create;
            this._delete = value.delete;
            this._read = value.read;
            this._update = value.update;
        }
    }
    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;
    }
    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;
    }
    get read() {
        return this.getStringAttribute('read');
    }
    set read(value) {
        this._read = value;
    }
    resetRead() {
        this._read = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get readInput() {
        return this._read;
    }
    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;
    }
}
exports.SubscriptionCostManagementViewTimeoutsOutputReference = SubscriptionCostManagementViewTimeoutsOutputReference;
_m = JSII_RTTI_SYMBOL_1;
SubscriptionCostManagementViewTimeoutsOutputReference[_m] = { fqn: "@cdktf/provider-azurerm.subscriptionCostManagementView.SubscriptionCostManagementViewTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/subscription_cost_management_view azurerm_subscription_cost_management_view}
*/
class SubscriptionCostManagementView extends cdktf.TerraformResource {
    // ==============
    // STATIC Methods
    // ==============
    /**
    * Generates CDKTF code for importing a SubscriptionCostManagementView resource upon running "cdktf plan <stack-name>"
    * @param scope The scope in which to define this construct
    * @param importToId The construct id used in the generated config for the SubscriptionCostManagementView to import
    * @param importFromId The id of the existing SubscriptionCostManagementView that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/subscription_cost_management_view#import import section} in the documentation of this resource for the id to use
    * @param provider? Optional instance of the provider where the SubscriptionCostManagementView to import is found
    */
    static generateConfigForImport(scope, importToId, importFromId, provider) {
        return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_subscription_cost_management_view", importId: importFromId, provider });
    }
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/subscription_cost_management_view azurerm_subscription_cost_management_view} 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 SubscriptionCostManagementViewConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'azurerm_subscription_cost_management_view',
            terraformGeneratorMetadata: {
                providerName: 'azurerm',
                providerVersion: '3.116.0',
                providerVersionConstraint: '~> 3.10'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle,
            provisioners: config.provisioners,
            connection: config.connection,
            forEach: config.forEach
        });
        // dataset - computed: false, optional: false, required: true
        this._dataset = new SubscriptionCostManagementViewDatasetOutputReference(this, "dataset");
        // kpi - computed: false, optional: true, required: false
        this._kpi = new SubscriptionCostManagementViewKpiList(this, "kpi", false);
        // pivot - computed: false, optional: true, required: false
        this._pivot = new SubscriptionCostManagementViewPivotList(this, "pivot", false);
        // timeouts - computed: false, optional: true, required: false
        this._timeouts = new SubscriptionCostManagementViewTimeoutsOutputReference(this, "timeouts");
        this._accumulated = config.accumulated;
        this._chartType = config.chartType;
        this._displayName = config.displayName;
        this._id = config.id;
        this._name = config.name;
        this._reportType = config.reportType;
        this._subscriptionId = config.subscriptionId;
        this._timeframe = config.timeframe;
        this._dataset.internalValue = config.dataset;
        this._kpi.internalValue = config.kpi;
        this._pivot.internalValue = config.pivot;
        this._timeouts.internalValue = config.timeouts;
    }
    get accumulated() {
        return this.getBooleanAttribute('accumulated');
    }
    set accumulated(value) {
        this._accumulated = value;
    }
    // Temporarily expose input value. Use with caution.
    get accumulatedInput() {
        return this._accumulated;
    }
    get chartType() {
        return this.getStringAttribute('chart_type');
    }
    set chartType(value) {
        this._chartType = value;
    }
    // Temporarily expose input value. Use with caution.
    get chartTypeInput() {
        return this._chartType;
    }
    get displayName() {
        return this.getStringAttribute('display_name');
    }
    set displayName(value) {
        this._displayName = value;
    }
    // Temporarily expose input value. Use with caution.
    get displayNameInput() {
        return this._displayName;
    }
    get id() {
        return this.getStringAttribute('id');
    }
    set id(value) {
        this._id = value;
    }
    resetId() {
        this._id = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get idInput() {
        return this._id;
    }
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    get reportType() {
        return this.getStringAttribute('report_type');
    }
    set reportType(value) {
        this._reportType = value;
    }
    // Temporarily expose input value. Use with caution.
    get reportTypeInput() {
        return this._reportType;
    }
    get subscriptionId() {
        return this.getStringAttribute('subscription_id');
    }
    set subscriptionId(value) {
        this._subscriptionId = value;
    }
    // Temporarily expose input value. Use with caution.
    get subscriptionIdInput() {
        return this._subscriptionId;
    }
    get timeframe() {
        return this.getStringAttribute('timeframe');
    }
    set timeframe(value) {
        this._timeframe = value;
    }
    // Temporarily expose input value. Use with caution.
    get timeframeInput() {
        return this._timeframe;
    }
    get dataset() {
        return this._dataset;
    }
    putDataset(value) {
        this._dataset.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get datasetInput() {
        return this._dataset.internalValue;
    }
    get kpi() {
        return this._kpi;
    }
    putKpi(value) {
        this._kpi.internalValue = value;
    }
    resetKpi() {
        this._kpi.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kpiInput() {
        return this._kpi.internalValue;
    }
    get pivot() {
        return this._pivot;
    }
    putPivot(value) {
        this._pivot.internalValue = value;
    }
    resetPivot() {
        this._pivot.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pivotInput() {
        return this._pivot.internalValue;
    }
    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 {
            accumulated: cdktf.booleanToTerraform(this._accumulated),
            chart_type: cdktf.stringToTerraform(this._chartType),
            display_name: cdktf.stringToTerraform(this._displayName),
            id: cdktf.stringToTerraform(this._id),
            name: cdktf.stringToTerraform(this._name),
            report_type: cdktf.stringToTerraform(this._reportType),
            subscription_id: cdktf.stringToTerraform(this._subscriptionId),
            timeframe: cdktf.stringToTerraform(this._timeframe),
            dataset: subscriptionCostManagementViewDatasetToTerraform(this._dataset.internalValue),
            kpi: cdktf.listMapper(subscriptionCostManagementViewKpiToTerraform, true)(this._kpi.internalValue),
            pivot: cdktf.listMapper(subscriptionCostManagementViewPivotToTerraform, true)(this._pivot.internalValue),
            timeouts: subscriptionCostManagementViewTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
    synthesizeHclAttributes() {
        const attrs = {
            accumulated: {
                value: cdktf.booleanToHclTerraform(this._accumulated),
                isBlock: false,
                type: "simple",
                storageClassType: "boolean",
            },
            chart_type: {
                value: c