UNPKG

@cdktf/provider-kubernetes

Version:

Prebuilt kubernetes Provider for Terraform CDK (cdktf)

1,004 lines 620 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16; Object.defineProperty(exports, "__esModule", { value: true }); exports.HorizontalPodAutoscaler = exports.HorizontalPodAutoscalerSpecOutputReference = exports.HorizontalPodAutoscalerSpecScaleTargetRefOutputReference = exports.HorizontalPodAutoscalerSpecMetricList = exports.HorizontalPodAutoscalerSpecMetricOutputReference = exports.HorizontalPodAutoscalerSpecMetricResourceOutputReference = exports.HorizontalPodAutoscalerSpecMetricResourceTargetOutputReference = exports.HorizontalPodAutoscalerSpecMetricPodsOutputReference = exports.HorizontalPodAutoscalerSpecMetricPodsTargetOutputReference = exports.HorizontalPodAutoscalerSpecMetricPodsMetricOutputReference = exports.HorizontalPodAutoscalerSpecMetricPodsMetricSelectorList = exports.HorizontalPodAutoscalerSpecMetricPodsMetricSelectorOutputReference = exports.HorizontalPodAutoscalerSpecMetricPodsMetricSelectorMatchExpressionsList = exports.HorizontalPodAutoscalerSpecMetricPodsMetricSelectorMatchExpressionsOutputReference = exports.HorizontalPodAutoscalerSpecMetricObjectOutputReference = exports.HorizontalPodAutoscalerSpecMetricObjectTargetOutputReference = exports.HorizontalPodAutoscalerSpecMetricObjectMetricOutputReference = exports.HorizontalPodAutoscalerSpecMetricObjectMetricSelectorList = exports.HorizontalPodAutoscalerSpecMetricObjectMetricSelectorOutputReference = exports.HorizontalPodAutoscalerSpecMetricObjectMetricSelectorMatchExpressionsList = exports.HorizontalPodAutoscalerSpecMetricObjectMetricSelectorMatchExpressionsOutputReference = exports.HorizontalPodAutoscalerSpecMetricObjectDescribedObjectOutputReference = exports.HorizontalPodAutoscalerSpecMetricExternalOutputReference = exports.HorizontalPodAutoscalerSpecMetricExternalTargetOutputReference = exports.HorizontalPodAutoscalerSpecMetricExternalMetricOutputReference = exports.HorizontalPodAutoscalerSpecMetricExternalMetricSelectorList = exports.HorizontalPodAutoscalerSpecMetricExternalMetricSelectorOutputReference = exports.HorizontalPodAutoscalerSpecMetricExternalMetricSelectorMatchExpressionsList = exports.HorizontalPodAutoscalerSpecMetricExternalMetricSelectorMatchExpressionsOutputReference = exports.HorizontalPodAutoscalerSpecMetricContainerResourceOutputReference = exports.HorizontalPodAutoscalerSpecMetricContainerResourceTargetOutputReference = exports.HorizontalPodAutoscalerSpecBehaviorOutputReference = exports.HorizontalPodAutoscalerSpecBehaviorScaleUpList = exports.HorizontalPodAutoscalerSpecBehaviorScaleUpOutputReference = exports.HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyList = exports.HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyOutputReference = exports.HorizontalPodAutoscalerSpecBehaviorScaleDownList = exports.HorizontalPodAutoscalerSpecBehaviorScaleDownOutputReference = exports.HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyList = exports.HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyOutputReference = exports.HorizontalPodAutoscalerMetadataOutputReference = void 0; exports.horizontalPodAutoscalerMetadataToTerraform = horizontalPodAutoscalerMetadataToTerraform; exports.horizontalPodAutoscalerMetadataToHclTerraform = horizontalPodAutoscalerMetadataToHclTerraform; exports.horizontalPodAutoscalerSpecBehaviorScaleDownPolicyToTerraform = horizontalPodAutoscalerSpecBehaviorScaleDownPolicyToTerraform; exports.horizontalPodAutoscalerSpecBehaviorScaleDownPolicyToHclTerraform = horizontalPodAutoscalerSpecBehaviorScaleDownPolicyToHclTerraform; exports.horizontalPodAutoscalerSpecBehaviorScaleDownToTerraform = horizontalPodAutoscalerSpecBehaviorScaleDownToTerraform; exports.horizontalPodAutoscalerSpecBehaviorScaleDownToHclTerraform = horizontalPodAutoscalerSpecBehaviorScaleDownToHclTerraform; exports.horizontalPodAutoscalerSpecBehaviorScaleUpPolicyToTerraform = horizontalPodAutoscalerSpecBehaviorScaleUpPolicyToTerraform; exports.horizontalPodAutoscalerSpecBehaviorScaleUpPolicyToHclTerraform = horizontalPodAutoscalerSpecBehaviorScaleUpPolicyToHclTerraform; exports.horizontalPodAutoscalerSpecBehaviorScaleUpToTerraform = horizontalPodAutoscalerSpecBehaviorScaleUpToTerraform; exports.horizontalPodAutoscalerSpecBehaviorScaleUpToHclTerraform = horizontalPodAutoscalerSpecBehaviorScaleUpToHclTerraform; exports.horizontalPodAutoscalerSpecBehaviorToTerraform = horizontalPodAutoscalerSpecBehaviorToTerraform; exports.horizontalPodAutoscalerSpecBehaviorToHclTerraform = horizontalPodAutoscalerSpecBehaviorToHclTerraform; exports.horizontalPodAutoscalerSpecMetricContainerResourceTargetToTerraform = horizontalPodAutoscalerSpecMetricContainerResourceTargetToTerraform; exports.horizontalPodAutoscalerSpecMetricContainerResourceTargetToHclTerraform = horizontalPodAutoscalerSpecMetricContainerResourceTargetToHclTerraform; exports.horizontalPodAutoscalerSpecMetricContainerResourceToTerraform = horizontalPodAutoscalerSpecMetricContainerResourceToTerraform; exports.horizontalPodAutoscalerSpecMetricContainerResourceToHclTerraform = horizontalPodAutoscalerSpecMetricContainerResourceToHclTerraform; exports.horizontalPodAutoscalerSpecMetricExternalMetricSelectorMatchExpressionsToTerraform = horizontalPodAutoscalerSpecMetricExternalMetricSelectorMatchExpressionsToTerraform; exports.horizontalPodAutoscalerSpecMetricExternalMetricSelectorMatchExpressionsToHclTerraform = horizontalPodAutoscalerSpecMetricExternalMetricSelectorMatchExpressionsToHclTerraform; exports.horizontalPodAutoscalerSpecMetricExternalMetricSelectorToTerraform = horizontalPodAutoscalerSpecMetricExternalMetricSelectorToTerraform; exports.horizontalPodAutoscalerSpecMetricExternalMetricSelectorToHclTerraform = horizontalPodAutoscalerSpecMetricExternalMetricSelectorToHclTerraform; exports.horizontalPodAutoscalerSpecMetricExternalMetricToTerraform = horizontalPodAutoscalerSpecMetricExternalMetricToTerraform; exports.horizontalPodAutoscalerSpecMetricExternalMetricToHclTerraform = horizontalPodAutoscalerSpecMetricExternalMetricToHclTerraform; exports.horizontalPodAutoscalerSpecMetricExternalTargetToTerraform = horizontalPodAutoscalerSpecMetricExternalTargetToTerraform; exports.horizontalPodAutoscalerSpecMetricExternalTargetToHclTerraform = horizontalPodAutoscalerSpecMetricExternalTargetToHclTerraform; exports.horizontalPodAutoscalerSpecMetricExternalToTerraform = horizontalPodAutoscalerSpecMetricExternalToTerraform; exports.horizontalPodAutoscalerSpecMetricExternalToHclTerraform = horizontalPodAutoscalerSpecMetricExternalToHclTerraform; exports.horizontalPodAutoscalerSpecMetricObjectDescribedObjectToTerraform = horizontalPodAutoscalerSpecMetricObjectDescribedObjectToTerraform; exports.horizontalPodAutoscalerSpecMetricObjectDescribedObjectToHclTerraform = horizontalPodAutoscalerSpecMetricObjectDescribedObjectToHclTerraform; exports.horizontalPodAutoscalerSpecMetricObjectMetricSelectorMatchExpressionsToTerraform = horizontalPodAutoscalerSpecMetricObjectMetricSelectorMatchExpressionsToTerraform; exports.horizontalPodAutoscalerSpecMetricObjectMetricSelectorMatchExpressionsToHclTerraform = horizontalPodAutoscalerSpecMetricObjectMetricSelectorMatchExpressionsToHclTerraform; exports.horizontalPodAutoscalerSpecMetricObjectMetricSelectorToTerraform = horizontalPodAutoscalerSpecMetricObjectMetricSelectorToTerraform; exports.horizontalPodAutoscalerSpecMetricObjectMetricSelectorToHclTerraform = horizontalPodAutoscalerSpecMetricObjectMetricSelectorToHclTerraform; exports.horizontalPodAutoscalerSpecMetricObjectMetricToTerraform = horizontalPodAutoscalerSpecMetricObjectMetricToTerraform; exports.horizontalPodAutoscalerSpecMetricObjectMetricToHclTerraform = horizontalPodAutoscalerSpecMetricObjectMetricToHclTerraform; exports.horizontalPodAutoscalerSpecMetricObjectTargetToTerraform = horizontalPodAutoscalerSpecMetricObjectTargetToTerraform; exports.horizontalPodAutoscalerSpecMetricObjectTargetToHclTerraform = horizontalPodAutoscalerSpecMetricObjectTargetToHclTerraform; exports.horizontalPodAutoscalerSpecMetricObjectToTerraform = horizontalPodAutoscalerSpecMetricObjectToTerraform; exports.horizontalPodAutoscalerSpecMetricObjectToHclTerraform = horizontalPodAutoscalerSpecMetricObjectToHclTerraform; exports.horizontalPodAutoscalerSpecMetricPodsMetricSelectorMatchExpressionsToTerraform = horizontalPodAutoscalerSpecMetricPodsMetricSelectorMatchExpressionsToTerraform; exports.horizontalPodAutoscalerSpecMetricPodsMetricSelectorMatchExpressionsToHclTerraform = horizontalPodAutoscalerSpecMetricPodsMetricSelectorMatchExpressionsToHclTerraform; exports.horizontalPodAutoscalerSpecMetricPodsMetricSelectorToTerraform = horizontalPodAutoscalerSpecMetricPodsMetricSelectorToTerraform; exports.horizontalPodAutoscalerSpecMetricPodsMetricSelectorToHclTerraform = horizontalPodAutoscalerSpecMetricPodsMetricSelectorToHclTerraform; exports.horizontalPodAutoscalerSpecMetricPodsMetricToTerraform = horizontalPodAutoscalerSpecMetricPodsMetricToTerraform; exports.horizontalPodAutoscalerSpecMetricPodsMetricToHclTerraform = horizontalPodAutoscalerSpecMetricPodsMetricToHclTerraform; exports.horizontalPodAutoscalerSpecMetricPodsTargetToTerraform = horizontalPodAutoscalerSpecMetricPodsTargetToTerraform; exports.horizontalPodAutoscalerSpecMetricPodsTargetToHclTerraform = horizontalPodAutoscalerSpecMetricPodsTargetToHclTerraform; exports.horizontalPodAutoscalerSpecMetricPodsToTerraform = horizontalPodAutoscalerSpecMetricPodsToTerraform; exports.horizontalPodAutoscalerSpecMetricPodsToHclTerraform = horizontalPodAutoscalerSpecMetricPodsToHclTerraform; exports.horizontalPodAutoscalerSpecMetricResourceTargetToTerraform = horizontalPodAutoscalerSpecMetricResourceTargetToTerraform; exports.horizontalPodAutoscalerSpecMetricResourceTargetToHclTerraform = horizontalPodAutoscalerSpecMetricResourceTargetToHclTerraform; exports.horizontalPodAutoscalerSpecMetricResourceToTerraform = horizontalPodAutoscalerSpecMetricResourceToTerraform; exports.horizontalPodAutoscalerSpecMetricResourceToHclTerraform = horizontalPodAutoscalerSpecMetricResourceToHclTerraform; exports.horizontalPodAutoscalerSpecMetricToTerraform = horizontalPodAutoscalerSpecMetricToTerraform; exports.horizontalPodAutoscalerSpecMetricToHclTerraform = horizontalPodAutoscalerSpecMetricToHclTerraform; exports.horizontalPodAutoscalerSpecScaleTargetRefToTerraform = horizontalPodAutoscalerSpecScaleTargetRefToTerraform; exports.horizontalPodAutoscalerSpecScaleTargetRefToHclTerraform = horizontalPodAutoscalerSpecScaleTargetRefToHclTerraform; exports.horizontalPodAutoscalerSpecToTerraform = horizontalPodAutoscalerSpecToTerraform; exports.horizontalPodAutoscalerSpecToHclTerraform = horizontalPodAutoscalerSpecToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function horizontalPodAutoscalerMetadataToTerraform(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 { annotations: cdktf.hashMapper(cdktf.stringToTerraform)(struct.annotations), generate_name: cdktf.stringToTerraform(struct.generateName), labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labels), name: cdktf.stringToTerraform(struct.name), namespace: cdktf.stringToTerraform(struct.namespace), }; } function horizontalPodAutoscalerMetadataToHclTerraform(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 = { annotations: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.annotations), isBlock: false, type: "map", storageClassType: "stringMap", }, generate_name: { value: cdktf.stringToHclTerraform(struct.generateName), isBlock: false, type: "simple", storageClassType: "string", }, labels: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.labels), isBlock: false, type: "map", storageClassType: "stringMap", }, name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, namespace: { value: cdktf.stringToHclTerraform(struct.namespace), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class HorizontalPodAutoscalerMetadataOutputReference 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._annotations !== undefined) { hasAnyValues = true; internalValueResult.annotations = this._annotations; } if (this._generateName !== undefined) { hasAnyValues = true; internalValueResult.generateName = this._generateName; } if (this._labels !== undefined) { hasAnyValues = true; internalValueResult.labels = this._labels; } if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._namespace !== undefined) { hasAnyValues = true; internalValueResult.namespace = this._namespace; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._annotations = undefined; this._generateName = undefined; this._labels = undefined; this._name = undefined; this._namespace = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._annotations = value.annotations; this._generateName = value.generateName; this._labels = value.labels; this._name = value.name; this._namespace = value.namespace; } } get annotations() { return this.getStringMapAttribute('annotations'); } set annotations(value) { this._annotations = value; } resetAnnotations() { this._annotations = undefined; } // Temporarily expose input value. Use with caution. get annotationsInput() { return this._annotations; } get generateName() { return this.getStringAttribute('generate_name'); } set generateName(value) { this._generateName = value; } resetGenerateName() { this._generateName = undefined; } // Temporarily expose input value. Use with caution. get generateNameInput() { return this._generateName; } // generation - computed: true, optional: false, required: false get generation() { return this.getNumberAttribute('generation'); } get labels() { return this.getStringMapAttribute('labels'); } set labels(value) { this._labels = value; } resetLabels() { this._labels = undefined; } // Temporarily expose input value. Use with caution. get labelsInput() { return this._labels; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get namespace() { return this.getStringAttribute('namespace'); } set namespace(value) { this._namespace = value; } resetNamespace() { this._namespace = undefined; } // Temporarily expose input value. Use with caution. get namespaceInput() { return this._namespace; } // resource_version - computed: true, optional: false, required: false get resourceVersion() { return this.getStringAttribute('resource_version'); } // uid - computed: true, optional: false, required: false get uid() { return this.getStringAttribute('uid'); } } exports.HorizontalPodAutoscalerMetadataOutputReference = HorizontalPodAutoscalerMetadataOutputReference; _a = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerMetadataOutputReference[_a] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerMetadataOutputReference", version: "12.0.0" }; function horizontalPodAutoscalerSpecBehaviorScaleDownPolicyToTerraform(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 { period_seconds: cdktf.numberToTerraform(struct.periodSeconds), type: cdktf.stringToTerraform(struct.type), value: cdktf.numberToTerraform(struct.value), }; } function horizontalPodAutoscalerSpecBehaviorScaleDownPolicyToHclTerraform(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 = { period_seconds: { value: cdktf.numberToHclTerraform(struct.periodSeconds), isBlock: false, type: "simple", storageClassType: "number", }, type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.numberToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyOutputReference 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._periodSeconds !== undefined) { hasAnyValues = true; internalValueResult.periodSeconds = this._periodSeconds; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._periodSeconds = undefined; this._type = undefined; this._value = 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._periodSeconds = value.periodSeconds; this._type = value.type; this._value = value.value; } } get periodSeconds() { return this.getNumberAttribute('period_seconds'); } set periodSeconds(value) { this._periodSeconds = value; } // Temporarily expose input value. Use with caution. get periodSecondsInput() { return this._periodSeconds; } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } get value() { return this.getNumberAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyOutputReference = HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyOutputReference; _b = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyOutputReference[_b] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyOutputReference", version: "12.0.0" }; class HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyList 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 HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyList = HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyList; _c = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyList[_c] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyList", version: "12.0.0" }; function horizontalPodAutoscalerSpecBehaviorScaleDownToTerraform(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 { select_policy: cdktf.stringToTerraform(struct.selectPolicy), stabilization_window_seconds: cdktf.numberToTerraform(struct.stabilizationWindowSeconds), policy: cdktf.listMapper(horizontalPodAutoscalerSpecBehaviorScaleDownPolicyToTerraform, true)(struct.policy), }; } function horizontalPodAutoscalerSpecBehaviorScaleDownToHclTerraform(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 = { select_policy: { value: cdktf.stringToHclTerraform(struct.selectPolicy), isBlock: false, type: "simple", storageClassType: "string", }, stabilization_window_seconds: { value: cdktf.numberToHclTerraform(struct.stabilizationWindowSeconds), isBlock: false, type: "simple", storageClassType: "number", }, policy: { value: cdktf.listMapperHcl(horizontalPodAutoscalerSpecBehaviorScaleDownPolicyToHclTerraform, true)(struct.policy), isBlock: true, type: "list", storageClassType: "HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class HorizontalPodAutoscalerSpecBehaviorScaleDownOutputReference 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; // policy - computed: false, optional: false, required: true this._policy = new HorizontalPodAutoscalerSpecBehaviorScaleDownPolicyList(this, "policy", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._selectPolicy !== undefined) { hasAnyValues = true; internalValueResult.selectPolicy = this._selectPolicy; } if (this._stabilizationWindowSeconds !== undefined) { hasAnyValues = true; internalValueResult.stabilizationWindowSeconds = this._stabilizationWindowSeconds; } if (this._policy?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.policy = this._policy?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._selectPolicy = undefined; this._stabilizationWindowSeconds = undefined; this._policy.internalValue = 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._selectPolicy = value.selectPolicy; this._stabilizationWindowSeconds = value.stabilizationWindowSeconds; this._policy.internalValue = value.policy; } } get selectPolicy() { return this.getStringAttribute('select_policy'); } set selectPolicy(value) { this._selectPolicy = value; } resetSelectPolicy() { this._selectPolicy = undefined; } // Temporarily expose input value. Use with caution. get selectPolicyInput() { return this._selectPolicy; } get stabilizationWindowSeconds() { return this.getNumberAttribute('stabilization_window_seconds'); } set stabilizationWindowSeconds(value) { this._stabilizationWindowSeconds = value; } resetStabilizationWindowSeconds() { this._stabilizationWindowSeconds = undefined; } // Temporarily expose input value. Use with caution. get stabilizationWindowSecondsInput() { return this._stabilizationWindowSeconds; } get policy() { return this._policy; } putPolicy(value) { this._policy.internalValue = value; } // Temporarily expose input value. Use with caution. get policyInput() { return this._policy.internalValue; } } exports.HorizontalPodAutoscalerSpecBehaviorScaleDownOutputReference = HorizontalPodAutoscalerSpecBehaviorScaleDownOutputReference; _d = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerSpecBehaviorScaleDownOutputReference[_d] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerSpecBehaviorScaleDownOutputReference", version: "12.0.0" }; class HorizontalPodAutoscalerSpecBehaviorScaleDownList 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 HorizontalPodAutoscalerSpecBehaviorScaleDownOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.HorizontalPodAutoscalerSpecBehaviorScaleDownList = HorizontalPodAutoscalerSpecBehaviorScaleDownList; _e = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerSpecBehaviorScaleDownList[_e] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerSpecBehaviorScaleDownList", version: "12.0.0" }; function horizontalPodAutoscalerSpecBehaviorScaleUpPolicyToTerraform(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 { period_seconds: cdktf.numberToTerraform(struct.periodSeconds), type: cdktf.stringToTerraform(struct.type), value: cdktf.numberToTerraform(struct.value), }; } function horizontalPodAutoscalerSpecBehaviorScaleUpPolicyToHclTerraform(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 = { period_seconds: { value: cdktf.numberToHclTerraform(struct.periodSeconds), isBlock: false, type: "simple", storageClassType: "number", }, type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.numberToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyOutputReference 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._periodSeconds !== undefined) { hasAnyValues = true; internalValueResult.periodSeconds = this._periodSeconds; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._periodSeconds = undefined; this._type = undefined; this._value = 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._periodSeconds = value.periodSeconds; this._type = value.type; this._value = value.value; } } get periodSeconds() { return this.getNumberAttribute('period_seconds'); } set periodSeconds(value) { this._periodSeconds = value; } // Temporarily expose input value. Use with caution. get periodSecondsInput() { return this._periodSeconds; } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } get value() { return this.getNumberAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyOutputReference = HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyOutputReference; _f = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyOutputReference[_f] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyOutputReference", version: "12.0.0" }; class HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyList 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 HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyList = HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyList; _g = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyList[_g] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyList", version: "12.0.0" }; function horizontalPodAutoscalerSpecBehaviorScaleUpToTerraform(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 { select_policy: cdktf.stringToTerraform(struct.selectPolicy), stabilization_window_seconds: cdktf.numberToTerraform(struct.stabilizationWindowSeconds), policy: cdktf.listMapper(horizontalPodAutoscalerSpecBehaviorScaleUpPolicyToTerraform, true)(struct.policy), }; } function horizontalPodAutoscalerSpecBehaviorScaleUpToHclTerraform(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 = { select_policy: { value: cdktf.stringToHclTerraform(struct.selectPolicy), isBlock: false, type: "simple", storageClassType: "string", }, stabilization_window_seconds: { value: cdktf.numberToHclTerraform(struct.stabilizationWindowSeconds), isBlock: false, type: "simple", storageClassType: "number", }, policy: { value: cdktf.listMapperHcl(horizontalPodAutoscalerSpecBehaviorScaleUpPolicyToHclTerraform, true)(struct.policy), isBlock: true, type: "list", storageClassType: "HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class HorizontalPodAutoscalerSpecBehaviorScaleUpOutputReference 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; // policy - computed: false, optional: false, required: true this._policy = new HorizontalPodAutoscalerSpecBehaviorScaleUpPolicyList(this, "policy", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._selectPolicy !== undefined) { hasAnyValues = true; internalValueResult.selectPolicy = this._selectPolicy; } if (this._stabilizationWindowSeconds !== undefined) { hasAnyValues = true; internalValueResult.stabilizationWindowSeconds = this._stabilizationWindowSeconds; } if (this._policy?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.policy = this._policy?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._selectPolicy = undefined; this._stabilizationWindowSeconds = undefined; this._policy.internalValue = 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._selectPolicy = value.selectPolicy; this._stabilizationWindowSeconds = value.stabilizationWindowSeconds; this._policy.internalValue = value.policy; } } get selectPolicy() { return this.getStringAttribute('select_policy'); } set selectPolicy(value) { this._selectPolicy = value; } resetSelectPolicy() { this._selectPolicy = undefined; } // Temporarily expose input value. Use with caution. get selectPolicyInput() { return this._selectPolicy; } get stabilizationWindowSeconds() { return this.getNumberAttribute('stabilization_window_seconds'); } set stabilizationWindowSeconds(value) { this._stabilizationWindowSeconds = value; } resetStabilizationWindowSeconds() { this._stabilizationWindowSeconds = undefined; } // Temporarily expose input value. Use with caution. get stabilizationWindowSecondsInput() { return this._stabilizationWindowSeconds; } get policy() { return this._policy; } putPolicy(value) { this._policy.internalValue = value; } // Temporarily expose input value. Use with caution. get policyInput() { return this._policy.internalValue; } } exports.HorizontalPodAutoscalerSpecBehaviorScaleUpOutputReference = HorizontalPodAutoscalerSpecBehaviorScaleUpOutputReference; _h = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerSpecBehaviorScaleUpOutputReference[_h] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerSpecBehaviorScaleUpOutputReference", version: "12.0.0" }; class HorizontalPodAutoscalerSpecBehaviorScaleUpList 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 HorizontalPodAutoscalerSpecBehaviorScaleUpOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.HorizontalPodAutoscalerSpecBehaviorScaleUpList = HorizontalPodAutoscalerSpecBehaviorScaleUpList; _j = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerSpecBehaviorScaleUpList[_j] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerSpecBehaviorScaleUpList", version: "12.0.0" }; function horizontalPodAutoscalerSpecBehaviorToTerraform(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 { scale_down: cdktf.listMapper(horizontalPodAutoscalerSpecBehaviorScaleDownToTerraform, true)(struct.scaleDown), scale_up: cdktf.listMapper(horizontalPodAutoscalerSpecBehaviorScaleUpToTerraform, true)(struct.scaleUp), }; } function horizontalPodAutoscalerSpecBehaviorToHclTerraform(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 = { scale_down: { value: cdktf.listMapperHcl(horizontalPodAutoscalerSpecBehaviorScaleDownToHclTerraform, true)(struct.scaleDown), isBlock: true, type: "list", storageClassType: "HorizontalPodAutoscalerSpecBehaviorScaleDownList", }, scale_up: { value: cdktf.listMapperHcl(horizontalPodAutoscalerSpecBehaviorScaleUpToHclTerraform, true)(struct.scaleUp), isBlock: true, type: "list", storageClassType: "HorizontalPodAutoscalerSpecBehaviorScaleUpList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class HorizontalPodAutoscalerSpecBehaviorOutputReference 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; // scale_down - computed: false, optional: true, required: false this._scaleDown = new HorizontalPodAutoscalerSpecBehaviorScaleDownList(this, "scale_down", false); // scale_up - computed: false, optional: true, required: false this._scaleUp = new HorizontalPodAutoscalerSpecBehaviorScaleUpList(this, "scale_up", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._scaleDown?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.scaleDown = this._scaleDown?.internalValue; } if (this._scaleUp?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.scaleUp = this._scaleUp?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._scaleDown.internalValue = undefined; this._scaleUp.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._scaleDown.internalValue = value.scaleDown; this._scaleUp.internalValue = value.scaleUp; } } get scaleDown() { return this._scaleDown; } putScaleDown(value) { this._scaleDown.internalValue = value; } resetScaleDown() { this._scaleDown.internalValue = undefined; } // Temporarily expose input value. Use with caution. get scaleDownInput() { return this._scaleDown.internalValue; } get scaleUp() { return this._scaleUp; } putScaleUp(value) { this._scaleUp.internalValue = value; } resetScaleUp() { this._scaleUp.internalValue = undefined; } // Temporarily expose input value. Use with caution. get scaleUpInput() { return this._scaleUp.internalValue; } } exports.HorizontalPodAutoscalerSpecBehaviorOutputReference = HorizontalPodAutoscalerSpecBehaviorOutputReference; _k = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerSpecBehaviorOutputReference[_k] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscaler.HorizontalPodAutoscalerSpecBehaviorOutputReference", version: "12.0.0" }; function horizontalPodAutoscalerSpecMetricContainerResourceTargetToTerraform(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 { average_utilization: cdktf.numberToTerraform(struct.averageUtilization), average_value: cdktf.stringToTerraform(struct.averageValue), type: cdktf.stringToTerraform(struct.type), value: cdktf.stringToTerraform(struct.value), }; } function horizontalPodAutoscalerSpecMetricContainerResourceTargetToHclTerraform(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 = { average_utilization: { value: cdktf.numberToHclTerraform(struct.averageUtilization), isBlock: false, type: "simple", storageClassType: "number", }, average_value: { value: cdk