UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,141 lines 224 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputeRegionAutoscaler = exports.ComputeRegionAutoscalerTimeoutsOutputReference = exports.computeRegionAutoscalerTimeoutsToHclTerraform = exports.computeRegionAutoscalerTimeoutsToTerraform = exports.ComputeRegionAutoscalerAutoscalingPolicyOutputReference = exports.computeRegionAutoscalerAutoscalingPolicyToHclTerraform = exports.computeRegionAutoscalerAutoscalingPolicyToTerraform = exports.ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesList = exports.ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesOutputReference = exports.computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToHclTerraform = exports.computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToTerraform = exports.ComputeRegionAutoscalerAutoscalingPolicyScaleInControlOutputReference = exports.computeRegionAutoscalerAutoscalingPolicyScaleInControlToHclTerraform = exports.computeRegionAutoscalerAutoscalingPolicyScaleInControlToTerraform = exports.ComputeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasOutputReference = exports.computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToHclTerraform = exports.computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToTerraform = exports.ComputeRegionAutoscalerAutoscalingPolicyMetricList = exports.ComputeRegionAutoscalerAutoscalingPolicyMetricOutputReference = exports.computeRegionAutoscalerAutoscalingPolicyMetricToHclTerraform = exports.computeRegionAutoscalerAutoscalingPolicyMetricToTerraform = exports.ComputeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationOutputReference = exports.computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToHclTerraform = exports.computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToTerraform = exports.ComputeRegionAutoscalerAutoscalingPolicyCpuUtilizationOutputReference = exports.computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToHclTerraform = exports.computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToTerraform(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 { predictive_method: cdktf.stringToTerraform(struct.predictiveMethod), target: cdktf.numberToTerraform(struct.target), }; } exports.computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToTerraform = computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToTerraform; function computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToHclTerraform(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 = { predictive_method: { value: cdktf.stringToHclTerraform(struct.predictiveMethod), isBlock: false, type: "simple", storageClassType: "string", }, target: { value: cdktf.numberToHclTerraform(struct.target), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToHclTerraform = computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToHclTerraform; class ComputeRegionAutoscalerAutoscalingPolicyCpuUtilizationOutputReference 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; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._predictiveMethod !== undefined) { hasAnyValues = true; internalValueResult.predictiveMethod = this._predictiveMethod; } if (this._target !== undefined) { hasAnyValues = true; internalValueResult.target = this._target; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._predictiveMethod = undefined; this._target = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._predictiveMethod = value.predictiveMethod; this._target = value.target; } } get predictiveMethod() { return this.getStringAttribute('predictive_method'); } set predictiveMethod(value) { this._predictiveMethod = value; } resetPredictiveMethod() { this._predictiveMethod = undefined; } // Temporarily expose input value. Use with caution. get predictiveMethodInput() { return this._predictiveMethod; } get target() { return this.getNumberAttribute('target'); } set target(value) { this._target = value; } // Temporarily expose input value. Use with caution. get targetInput() { return this._target; } } exports.ComputeRegionAutoscalerAutoscalingPolicyCpuUtilizationOutputReference = ComputeRegionAutoscalerAutoscalingPolicyCpuUtilizationOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeRegionAutoscalerAutoscalingPolicyCpuUtilizationOutputReference[_a] = { fqn: "@cdktf/provider-google.computeRegionAutoscaler.ComputeRegionAutoscalerAutoscalingPolicyCpuUtilizationOutputReference", version: "14.12.0" }; function computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToTerraform(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 { target: cdktf.numberToTerraform(struct.target), }; } exports.computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToTerraform = computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToTerraform; function computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToHclTerraform(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 = { target: { value: cdktf.numberToHclTerraform(struct.target), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToHclTerraform = computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToHclTerraform; class ComputeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationOutputReference 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; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._target !== undefined) { hasAnyValues = true; internalValueResult.target = this._target; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._target = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._target = value.target; } } get target() { return this.getNumberAttribute('target'); } set target(value) { this._target = value; } // Temporarily expose input value. Use with caution. get targetInput() { return this._target; } } exports.ComputeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationOutputReference = ComputeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationOutputReference; _b = JSII_RTTI_SYMBOL_1; ComputeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationOutputReference[_b] = { fqn: "@cdktf/provider-google.computeRegionAutoscaler.ComputeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationOutputReference", version: "14.12.0" }; function computeRegionAutoscalerAutoscalingPolicyMetricToTerraform(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 { filter: cdktf.stringToTerraform(struct.filter), name: cdktf.stringToTerraform(struct.name), single_instance_assignment: cdktf.numberToTerraform(struct.singleInstanceAssignment), target: cdktf.numberToTerraform(struct.target), type: cdktf.stringToTerraform(struct.type), }; } exports.computeRegionAutoscalerAutoscalingPolicyMetricToTerraform = computeRegionAutoscalerAutoscalingPolicyMetricToTerraform; function computeRegionAutoscalerAutoscalingPolicyMetricToHclTerraform(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 = { filter: { value: cdktf.stringToHclTerraform(struct.filter), isBlock: false, type: "simple", storageClassType: "string", }, name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, single_instance_assignment: { value: cdktf.numberToHclTerraform(struct.singleInstanceAssignment), isBlock: false, type: "simple", storageClassType: "number", }, target: { value: cdktf.numberToHclTerraform(struct.target), isBlock: false, type: "simple", storageClassType: "number", }, 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.computeRegionAutoscalerAutoscalingPolicyMetricToHclTerraform = computeRegionAutoscalerAutoscalingPolicyMetricToHclTerraform; class ComputeRegionAutoscalerAutoscalingPolicyMetricOutputReference 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._filter !== undefined) { hasAnyValues = true; internalValueResult.filter = this._filter; } if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._singleInstanceAssignment !== undefined) { hasAnyValues = true; internalValueResult.singleInstanceAssignment = this._singleInstanceAssignment; } if (this._target !== undefined) { hasAnyValues = true; internalValueResult.target = this._target; } 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._filter = undefined; this._name = undefined; this._singleInstanceAssignment = undefined; this._target = 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._filter = value.filter; this._name = value.name; this._singleInstanceAssignment = value.singleInstanceAssignment; this._target = value.target; this._type = value.type; } } get filter() { return this.getStringAttribute('filter'); } set filter(value) { this._filter = value; } resetFilter() { this._filter = undefined; } // Temporarily expose input value. Use with caution. get filterInput() { return this._filter; } 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 singleInstanceAssignment() { return this.getNumberAttribute('single_instance_assignment'); } set singleInstanceAssignment(value) { this._singleInstanceAssignment = value; } resetSingleInstanceAssignment() { this._singleInstanceAssignment = undefined; } // Temporarily expose input value. Use with caution. get singleInstanceAssignmentInput() { return this._singleInstanceAssignment; } get target() { return this.getNumberAttribute('target'); } set target(value) { this._target = value; } resetTarget() { this._target = undefined; } // Temporarily expose input value. Use with caution. get targetInput() { return this._target; } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } resetType() { this._type = undefined; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } } exports.ComputeRegionAutoscalerAutoscalingPolicyMetricOutputReference = ComputeRegionAutoscalerAutoscalingPolicyMetricOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeRegionAutoscalerAutoscalingPolicyMetricOutputReference[_c] = { fqn: "@cdktf/provider-google.computeRegionAutoscaler.ComputeRegionAutoscalerAutoscalingPolicyMetricOutputReference", version: "14.12.0" }; class ComputeRegionAutoscalerAutoscalingPolicyMetricList 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 ComputeRegionAutoscalerAutoscalingPolicyMetricOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionAutoscalerAutoscalingPolicyMetricList = ComputeRegionAutoscalerAutoscalingPolicyMetricList; _d = JSII_RTTI_SYMBOL_1; ComputeRegionAutoscalerAutoscalingPolicyMetricList[_d] = { fqn: "@cdktf/provider-google.computeRegionAutoscaler.ComputeRegionAutoscalerAutoscalingPolicyMetricList", version: "14.12.0" }; function computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToTerraform(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 { fixed: cdktf.numberToTerraform(struct.fixed), percent: cdktf.numberToTerraform(struct.percent), }; } exports.computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToTerraform = computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToTerraform; function computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToHclTerraform(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 = { fixed: { value: cdktf.numberToHclTerraform(struct.fixed), isBlock: false, type: "simple", storageClassType: "number", }, percent: { value: cdktf.numberToHclTerraform(struct.percent), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToHclTerraform = computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToHclTerraform; class ComputeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasOutputReference 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; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._fixed !== undefined) { hasAnyValues = true; internalValueResult.fixed = this._fixed; } if (this._percent !== undefined) { hasAnyValues = true; internalValueResult.percent = this._percent; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._fixed = undefined; this._percent = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._fixed = value.fixed; this._percent = value.percent; } } get fixed() { return this.getNumberAttribute('fixed'); } set fixed(value) { this._fixed = value; } resetFixed() { this._fixed = undefined; } // Temporarily expose input value. Use with caution. get fixedInput() { return this._fixed; } get percent() { return this.getNumberAttribute('percent'); } set percent(value) { this._percent = value; } resetPercent() { this._percent = undefined; } // Temporarily expose input value. Use with caution. get percentInput() { return this._percent; } } exports.ComputeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasOutputReference = ComputeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasOutputReference; _e = JSII_RTTI_SYMBOL_1; ComputeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasOutputReference[_e] = { fqn: "@cdktf/provider-google.computeRegionAutoscaler.ComputeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasOutputReference", version: "14.12.0" }; function computeRegionAutoscalerAutoscalingPolicyScaleInControlToTerraform(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 { time_window_sec: cdktf.numberToTerraform(struct.timeWindowSec), max_scaled_in_replicas: computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToTerraform(struct.maxScaledInReplicas), }; } exports.computeRegionAutoscalerAutoscalingPolicyScaleInControlToTerraform = computeRegionAutoscalerAutoscalingPolicyScaleInControlToTerraform; function computeRegionAutoscalerAutoscalingPolicyScaleInControlToHclTerraform(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 = { time_window_sec: { value: cdktf.numberToHclTerraform(struct.timeWindowSec), isBlock: false, type: "simple", storageClassType: "number", }, max_scaled_in_replicas: { value: computeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasToHclTerraform(struct.maxScaledInReplicas), isBlock: true, type: "list", storageClassType: "ComputeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionAutoscalerAutoscalingPolicyScaleInControlToHclTerraform = computeRegionAutoscalerAutoscalingPolicyScaleInControlToHclTerraform; class ComputeRegionAutoscalerAutoscalingPolicyScaleInControlOutputReference 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; // max_scaled_in_replicas - computed: false, optional: true, required: false this._maxScaledInReplicas = new ComputeRegionAutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicasOutputReference(this, "max_scaled_in_replicas"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._timeWindowSec !== undefined) { hasAnyValues = true; internalValueResult.timeWindowSec = this._timeWindowSec; } if (this._maxScaledInReplicas?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.maxScaledInReplicas = this._maxScaledInReplicas?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._timeWindowSec = undefined; this._maxScaledInReplicas.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._timeWindowSec = value.timeWindowSec; this._maxScaledInReplicas.internalValue = value.maxScaledInReplicas; } } get timeWindowSec() { return this.getNumberAttribute('time_window_sec'); } set timeWindowSec(value) { this._timeWindowSec = value; } resetTimeWindowSec() { this._timeWindowSec = undefined; } // Temporarily expose input value. Use with caution. get timeWindowSecInput() { return this._timeWindowSec; } get maxScaledInReplicas() { return this._maxScaledInReplicas; } putMaxScaledInReplicas(value) { this._maxScaledInReplicas.internalValue = value; } resetMaxScaledInReplicas() { this._maxScaledInReplicas.internalValue = undefined; } // Temporarily expose input value. Use with caution. get maxScaledInReplicasInput() { return this._maxScaledInReplicas.internalValue; } } exports.ComputeRegionAutoscalerAutoscalingPolicyScaleInControlOutputReference = ComputeRegionAutoscalerAutoscalingPolicyScaleInControlOutputReference; _f = JSII_RTTI_SYMBOL_1; ComputeRegionAutoscalerAutoscalingPolicyScaleInControlOutputReference[_f] = { fqn: "@cdktf/provider-google.computeRegionAutoscaler.ComputeRegionAutoscalerAutoscalingPolicyScaleInControlOutputReference", version: "14.12.0" }; function computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToTerraform(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 { description: cdktf.stringToTerraform(struct.description), disabled: cdktf.booleanToTerraform(struct.disabled), duration_sec: cdktf.numberToTerraform(struct.durationSec), min_required_replicas: cdktf.numberToTerraform(struct.minRequiredReplicas), name: cdktf.stringToTerraform(struct.name), schedule: cdktf.stringToTerraform(struct.schedule), time_zone: cdktf.stringToTerraform(struct.timeZone), }; } exports.computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToTerraform = computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToTerraform; function computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToHclTerraform(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 = { description: { value: cdktf.stringToHclTerraform(struct.description), isBlock: false, type: "simple", storageClassType: "string", }, disabled: { value: cdktf.booleanToHclTerraform(struct.disabled), isBlock: false, type: "simple", storageClassType: "boolean", }, duration_sec: { value: cdktf.numberToHclTerraform(struct.durationSec), isBlock: false, type: "simple", storageClassType: "number", }, min_required_replicas: { value: cdktf.numberToHclTerraform(struct.minRequiredReplicas), isBlock: false, type: "simple", storageClassType: "number", }, name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, schedule: { value: cdktf.stringToHclTerraform(struct.schedule), isBlock: false, type: "simple", storageClassType: "string", }, time_zone: { value: cdktf.stringToHclTerraform(struct.timeZone), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToHclTerraform = computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToHclTerraform; class ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesOutputReference 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._description !== undefined) { hasAnyValues = true; internalValueResult.description = this._description; } if (this._disabled !== undefined) { hasAnyValues = true; internalValueResult.disabled = this._disabled; } if (this._durationSec !== undefined) { hasAnyValues = true; internalValueResult.durationSec = this._durationSec; } if (this._minRequiredReplicas !== undefined) { hasAnyValues = true; internalValueResult.minRequiredReplicas = this._minRequiredReplicas; } if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._schedule !== undefined) { hasAnyValues = true; internalValueResult.schedule = this._schedule; } if (this._timeZone !== undefined) { hasAnyValues = true; internalValueResult.timeZone = this._timeZone; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._description = undefined; this._disabled = undefined; this._durationSec = undefined; this._minRequiredReplicas = undefined; this._name = undefined; this._schedule = undefined; this._timeZone = 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._description = value.description; this._disabled = value.disabled; this._durationSec = value.durationSec; this._minRequiredReplicas = value.minRequiredReplicas; this._name = value.name; this._schedule = value.schedule; this._timeZone = value.timeZone; } } 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; } get disabled() { return this.getBooleanAttribute('disabled'); } set disabled(value) { this._disabled = value; } resetDisabled() { this._disabled = undefined; } // Temporarily expose input value. Use with caution. get disabledInput() { return this._disabled; } get durationSec() { return this.getNumberAttribute('duration_sec'); } set durationSec(value) { this._durationSec = value; } // Temporarily expose input value. Use with caution. get durationSecInput() { return this._durationSec; } get minRequiredReplicas() { return this.getNumberAttribute('min_required_replicas'); } set minRequiredReplicas(value) { this._minRequiredReplicas = value; } // Temporarily expose input value. Use with caution. get minRequiredReplicasInput() { return this._minRequiredReplicas; } 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 schedule() { return this.getStringAttribute('schedule'); } set schedule(value) { this._schedule = value; } // Temporarily expose input value. Use with caution. get scheduleInput() { return this._schedule; } get timeZone() { return this.getStringAttribute('time_zone'); } set timeZone(value) { this._timeZone = value; } resetTimeZone() { this._timeZone = undefined; } // Temporarily expose input value. Use with caution. get timeZoneInput() { return this._timeZone; } } exports.ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesOutputReference = ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesOutputReference; _g = JSII_RTTI_SYMBOL_1; ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesOutputReference[_g] = { fqn: "@cdktf/provider-google.computeRegionAutoscaler.ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesOutputReference", version: "14.12.0" }; class ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesList 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 ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesList = ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesList; _h = JSII_RTTI_SYMBOL_1; ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesList[_h] = { fqn: "@cdktf/provider-google.computeRegionAutoscaler.ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesList", version: "14.12.0" }; function computeRegionAutoscalerAutoscalingPolicyToTerraform(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 { cooldown_period: cdktf.numberToTerraform(struct.cooldownPeriod), max_replicas: cdktf.numberToTerraform(struct.maxReplicas), min_replicas: cdktf.numberToTerraform(struct.minReplicas), mode: cdktf.stringToTerraform(struct.mode), cpu_utilization: computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToTerraform(struct.cpuUtilization), load_balancing_utilization: computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToTerraform(struct.loadBalancingUtilization), metric: cdktf.listMapper(computeRegionAutoscalerAutoscalingPolicyMetricToTerraform, true)(struct.metric), scale_in_control: computeRegionAutoscalerAutoscalingPolicyScaleInControlToTerraform(struct.scaleInControl), scaling_schedules: cdktf.listMapper(computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToTerraform, true)(struct.scalingSchedules), }; } exports.computeRegionAutoscalerAutoscalingPolicyToTerraform = computeRegionAutoscalerAutoscalingPolicyToTerraform; function computeRegionAutoscalerAutoscalingPolicyToHclTerraform(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 = { cooldown_period: { value: cdktf.numberToHclTerraform(struct.cooldownPeriod), isBlock: false, type: "simple", storageClassType: "number", }, max_replicas: { value: cdktf.numberToHclTerraform(struct.maxReplicas), isBlock: false, type: "simple", storageClassType: "number", }, min_replicas: { value: cdktf.numberToHclTerraform(struct.minReplicas), isBlock: false, type: "simple", storageClassType: "number", }, mode: { value: cdktf.stringToHclTerraform(struct.mode), isBlock: false, type: "simple", storageClassType: "string", }, cpu_utilization: { value: computeRegionAutoscalerAutoscalingPolicyCpuUtilizationToHclTerraform(struct.cpuUtilization), isBlock: true, type: "list", storageClassType: "ComputeRegionAutoscalerAutoscalingPolicyCpuUtilizationList", }, load_balancing_utilization: { value: computeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationToHclTerraform(struct.loadBalancingUtilization), isBlock: true, type: "list", storageClassType: "ComputeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationList", }, metric: { value: cdktf.listMapperHcl(computeRegionAutoscalerAutoscalingPolicyMetricToHclTerraform, true)(struct.metric), isBlock: true, type: "list", storageClassType: "ComputeRegionAutoscalerAutoscalingPolicyMetricList", }, scale_in_control: { value: computeRegionAutoscalerAutoscalingPolicyScaleInControlToHclTerraform(struct.scaleInControl), isBlock: true, type: "list", storageClassType: "ComputeRegionAutoscalerAutoscalingPolicyScaleInControlList", }, scaling_schedules: { value: cdktf.listMapperHcl(computeRegionAutoscalerAutoscalingPolicyScalingSchedulesToHclTerraform, true)(struct.scalingSchedules), isBlock: true, type: "set", storageClassType: "ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionAutoscalerAutoscalingPolicyToHclTerraform = computeRegionAutoscalerAutoscalingPolicyToHclTerraform; class ComputeRegionAutoscalerAutoscalingPolicyOutputReference 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; // cpu_utilization - computed: false, optional: true, required: false this._cpuUtilization = new ComputeRegionAutoscalerAutoscalingPolicyCpuUtilizationOutputReference(this, "cpu_utilization"); // load_balancing_utilization - computed: false, optional: true, required: false this._loadBalancingUtilization = new ComputeRegionAutoscalerAutoscalingPolicyLoadBalancingUtilizationOutputReference(this, "load_balancing_utilization"); // metric - computed: false, optional: true, required: false this._metric = new ComputeRegionAutoscalerAutoscalingPolicyMetricList(this, "metric", false); // scale_in_control - computed: false, optional: true, required: false this._scaleInControl = new ComputeRegionAutoscalerAutoscalingPolicyScaleInControlOutputReference(this, "scale_in_control"); // scaling_schedules - computed: false, optional: true, required: false this._scalingSchedules = new ComputeRegionAutoscalerAutoscalingPolicyScalingSchedulesList(this, "scaling_schedules", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._cooldownPeriod !== undefined) { hasAnyValues = true; internalValueResult.cooldownPeriod = this._cooldownPeriod; } if (this._maxReplicas !== undefined) { hasAnyValues = true; internalValueResult.maxReplicas = this._maxReplicas; } if (this._minReplicas !== undefined) { hasAnyValues = true; internalValueResult.minReplicas = this._minReplicas; } if (this._mode !== undefined) { hasAnyValues = true; internalValueResult.mode = this._mode; } if (this._cpuUtilization?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.cpuUtilization = this._cpuUtilization?.internalValue; } if (this._loadBalancingUtilization?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.loadBalancingUtilization = this._loadBalancingUtilization?.internalValue; } if (this._metric?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.metric = this._metric?.internalValue; } if (this._scaleInControl?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.scaleInControl = this._scaleInControl?.internalValue; } if (this._scalingSchedules?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.scalingSchedules = this._scalingSchedules?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._cooldownPeriod = undefined; this._maxReplicas = undefined; this._minReplicas = undefined; this._mode = undefined; this._cpuUtilization.internalValue = undefined; this._loadBalancingUtilization.internalValue = undefined; this._metric.internalValue = undefined; this._scaleInControl.internalValue = undefined; this._scalingSchedules.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cooldownPeriod = value.cooldownPeriod; this._maxReplicas = value.maxReplicas; this._minReplicas = value.minReplicas; this._mode = value.mode; this._cpuUtilization.internalValue = value.cpuUtilization; this._loadBalancingUtilization.internalValue = value.loadBalancingUtilization; this._metric.internalValue = value.metric; this._scaleInControl.internalValue = value.scaleInControl; this._scalingSchedules.internalValue = value.scalingSchedules; } } get cooldownPeriod() { return this.getNumberAttribute('cooldown_period'); } set cooldownPeriod(value) { this._cooldownPeriod = value; } resetCooldownPeriod() { this._cooldownPeriod = undefined; } // Temporarily expose input value. Use with caution. get cooldownPeriodInput() { return this._cooldownPeriod; } get maxReplicas() { return this.getNumberAttribute('max_replicas'); } set maxReplicas(value) { this._maxReplicas = value; } // Temporarily expose input value. Use with caution. get maxReplicasInput() { return this._maxReplicas; } get minReplicas() { return this.getNumberAttribute('min_replicas'); } set minReplicas(value) { this._minReplicas = value; } // Temporarily expose input value. Use with caution. get minReplicasInput() { return this._minReplicas; } get mode() { return this.getStringAttribute('mode'); } set mode(value) { this._mode = value; } resetMode() { this._mode = undefined; } // Temporarily expose input value. Use with caution. get modeInput() { return this._mode; } get cpuUtilization() { return this._cpuUtilization; } putCpuUtilization(value) { this._cpuUtilization.internalValue = value; } resetCpuUtilization() { this._cpuUtilization.internalValue = undefined; } // Temporarily expose input value. Use with caution. get cpuUtilizationInput() { return this._cpuUtilization.internalValue; } get loadBalancingUtilization() { return this._loadBalancingUtilization; } putLoadBalancingUtilization(value) { this._loadBalancingUtilization.internalValue = value; } resetLoadBalancingUtilization() { this._loadBalancingUtilization.internalValue = undefined; } // Temporarily expose input value. Use with caution. get loadBalancingUtilizationInput() { return this._loadBalancingUtilization.internalValue; } get metric() { return this._metric; } putMetric(value) { this._metric.internalValue = value; } resetMetric() { this._metric.internalValue = undefined; } // Temporarily expose input value. Use with caution. get metricInput() { return this._metric.internalValue; } get scaleInControl() { return this._scaleInControl; } putScaleInControl(value) { this._scaleInControl.internalValue = value; } resetScaleInControl() { this._scaleInControl.internalValue = undefined; } // Temporarily expose input value. Use with caution. get scaleInControlInput() { return this._scaleInControl.internalValue; } get scalingSchedules() { return this._scalingSchedules; } putScalingSchedules(value) { this._scalingSchedules.internalValue = value; } resetScalingSchedules() { this._scalingSchedules.internalValue = undefined; } // Temporarily expose input value. Use with caution. get scalingSchedulesInput() { return this._scalingSchedules.internalValue; } } exports.ComputeRegionAutoscalerAutoscalingPolicyOutputReference = ComputeRegionAutoscalerAutoscalingPolicyOutputReference; _j = JSII_RTTI_SYMBOL_1; ComputeRegionAutoscalerAutoscalingPolicyOutputReference[_j] = { fqn: "@cdktf/provider-google.computeRegionAutoscaler.ComputeRegionAutoscalerAutoscalingPolicyOutputReference", version: "14.12.0" }; function computeRegionAutoscalerTimeoutsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Erro