UNPKG

@cdktf/provider-kubernetes

Version:

Prebuilt kubernetes Provider for Terraform CDK (cdktf)

990 lines 623 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.HorizontalPodAutoscalerV2 = exports.HorizontalPodAutoscalerV2SpecOutputReference = exports.HorizontalPodAutoscalerV2SpecScaleTargetRefOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricList = exports.HorizontalPodAutoscalerV2SpecMetricOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricResourceOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricResourceTargetOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricPodsOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricPodsTargetOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricPodsMetricOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricPodsMetricSelectorList = exports.HorizontalPodAutoscalerV2SpecMetricPodsMetricSelectorOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricPodsMetricSelectorMatchExpressionsList = exports.HorizontalPodAutoscalerV2SpecMetricPodsMetricSelectorMatchExpressionsOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricObjectOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricObjectTargetOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricObjectMetricOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricObjectMetricSelectorList = exports.HorizontalPodAutoscalerV2SpecMetricObjectMetricSelectorOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricObjectMetricSelectorMatchExpressionsList = exports.HorizontalPodAutoscalerV2SpecMetricObjectMetricSelectorMatchExpressionsOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricObjectDescribedObjectOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricExternalOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricExternalTargetOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricExternalMetricOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricExternalMetricSelectorList = exports.HorizontalPodAutoscalerV2SpecMetricExternalMetricSelectorOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricExternalMetricSelectorMatchExpressionsList = exports.HorizontalPodAutoscalerV2SpecMetricExternalMetricSelectorMatchExpressionsOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricContainerResourceOutputReference = exports.HorizontalPodAutoscalerV2SpecMetricContainerResourceTargetOutputReference = exports.HorizontalPodAutoscalerV2SpecBehaviorOutputReference = exports.HorizontalPodAutoscalerV2SpecBehaviorScaleUpList = exports.HorizontalPodAutoscalerV2SpecBehaviorScaleUpOutputReference = exports.HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyList = exports.HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyOutputReference = exports.HorizontalPodAutoscalerV2SpecBehaviorScaleDownList = exports.HorizontalPodAutoscalerV2SpecBehaviorScaleDownOutputReference = exports.HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyList = exports.HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyOutputReference = exports.HorizontalPodAutoscalerV2MetadataOutputReference = void 0; exports.horizontalPodAutoscalerV2MetadataToTerraform = horizontalPodAutoscalerV2MetadataToTerraform; exports.horizontalPodAutoscalerV2MetadataToHclTerraform = horizontalPodAutoscalerV2MetadataToHclTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyToTerraform = horizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyToTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyToHclTerraform = horizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyToHclTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorScaleDownToTerraform = horizontalPodAutoscalerV2SpecBehaviorScaleDownToTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorScaleDownToHclTerraform = horizontalPodAutoscalerV2SpecBehaviorScaleDownToHclTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyToTerraform = horizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyToTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyToHclTerraform = horizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyToHclTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorScaleUpToTerraform = horizontalPodAutoscalerV2SpecBehaviorScaleUpToTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorScaleUpToHclTerraform = horizontalPodAutoscalerV2SpecBehaviorScaleUpToHclTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorToTerraform = horizontalPodAutoscalerV2SpecBehaviorToTerraform; exports.horizontalPodAutoscalerV2SpecBehaviorToHclTerraform = horizontalPodAutoscalerV2SpecBehaviorToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricContainerResourceTargetToTerraform = horizontalPodAutoscalerV2SpecMetricContainerResourceTargetToTerraform; exports.horizontalPodAutoscalerV2SpecMetricContainerResourceTargetToHclTerraform = horizontalPodAutoscalerV2SpecMetricContainerResourceTargetToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricContainerResourceToTerraform = horizontalPodAutoscalerV2SpecMetricContainerResourceToTerraform; exports.horizontalPodAutoscalerV2SpecMetricContainerResourceToHclTerraform = horizontalPodAutoscalerV2SpecMetricContainerResourceToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalMetricSelectorMatchExpressionsToTerraform = horizontalPodAutoscalerV2SpecMetricExternalMetricSelectorMatchExpressionsToTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalMetricSelectorMatchExpressionsToHclTerraform = horizontalPodAutoscalerV2SpecMetricExternalMetricSelectorMatchExpressionsToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalMetricSelectorToTerraform = horizontalPodAutoscalerV2SpecMetricExternalMetricSelectorToTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalMetricSelectorToHclTerraform = horizontalPodAutoscalerV2SpecMetricExternalMetricSelectorToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalMetricToTerraform = horizontalPodAutoscalerV2SpecMetricExternalMetricToTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalMetricToHclTerraform = horizontalPodAutoscalerV2SpecMetricExternalMetricToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalTargetToTerraform = horizontalPodAutoscalerV2SpecMetricExternalTargetToTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalTargetToHclTerraform = horizontalPodAutoscalerV2SpecMetricExternalTargetToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalToTerraform = horizontalPodAutoscalerV2SpecMetricExternalToTerraform; exports.horizontalPodAutoscalerV2SpecMetricExternalToHclTerraform = horizontalPodAutoscalerV2SpecMetricExternalToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectDescribedObjectToTerraform = horizontalPodAutoscalerV2SpecMetricObjectDescribedObjectToTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectDescribedObjectToHclTerraform = horizontalPodAutoscalerV2SpecMetricObjectDescribedObjectToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectMetricSelectorMatchExpressionsToTerraform = horizontalPodAutoscalerV2SpecMetricObjectMetricSelectorMatchExpressionsToTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectMetricSelectorMatchExpressionsToHclTerraform = horizontalPodAutoscalerV2SpecMetricObjectMetricSelectorMatchExpressionsToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectMetricSelectorToTerraform = horizontalPodAutoscalerV2SpecMetricObjectMetricSelectorToTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectMetricSelectorToHclTerraform = horizontalPodAutoscalerV2SpecMetricObjectMetricSelectorToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectMetricToTerraform = horizontalPodAutoscalerV2SpecMetricObjectMetricToTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectMetricToHclTerraform = horizontalPodAutoscalerV2SpecMetricObjectMetricToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectTargetToTerraform = horizontalPodAutoscalerV2SpecMetricObjectTargetToTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectTargetToHclTerraform = horizontalPodAutoscalerV2SpecMetricObjectTargetToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectToTerraform = horizontalPodAutoscalerV2SpecMetricObjectToTerraform; exports.horizontalPodAutoscalerV2SpecMetricObjectToHclTerraform = horizontalPodAutoscalerV2SpecMetricObjectToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsMetricSelectorMatchExpressionsToTerraform = horizontalPodAutoscalerV2SpecMetricPodsMetricSelectorMatchExpressionsToTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsMetricSelectorMatchExpressionsToHclTerraform = horizontalPodAutoscalerV2SpecMetricPodsMetricSelectorMatchExpressionsToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsMetricSelectorToTerraform = horizontalPodAutoscalerV2SpecMetricPodsMetricSelectorToTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsMetricSelectorToHclTerraform = horizontalPodAutoscalerV2SpecMetricPodsMetricSelectorToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsMetricToTerraform = horizontalPodAutoscalerV2SpecMetricPodsMetricToTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsMetricToHclTerraform = horizontalPodAutoscalerV2SpecMetricPodsMetricToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsTargetToTerraform = horizontalPodAutoscalerV2SpecMetricPodsTargetToTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsTargetToHclTerraform = horizontalPodAutoscalerV2SpecMetricPodsTargetToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsToTerraform = horizontalPodAutoscalerV2SpecMetricPodsToTerraform; exports.horizontalPodAutoscalerV2SpecMetricPodsToHclTerraform = horizontalPodAutoscalerV2SpecMetricPodsToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricResourceTargetToTerraform = horizontalPodAutoscalerV2SpecMetricResourceTargetToTerraform; exports.horizontalPodAutoscalerV2SpecMetricResourceTargetToHclTerraform = horizontalPodAutoscalerV2SpecMetricResourceTargetToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricResourceToTerraform = horizontalPodAutoscalerV2SpecMetricResourceToTerraform; exports.horizontalPodAutoscalerV2SpecMetricResourceToHclTerraform = horizontalPodAutoscalerV2SpecMetricResourceToHclTerraform; exports.horizontalPodAutoscalerV2SpecMetricToTerraform = horizontalPodAutoscalerV2SpecMetricToTerraform; exports.horizontalPodAutoscalerV2SpecMetricToHclTerraform = horizontalPodAutoscalerV2SpecMetricToHclTerraform; exports.horizontalPodAutoscalerV2SpecScaleTargetRefToTerraform = horizontalPodAutoscalerV2SpecScaleTargetRefToTerraform; exports.horizontalPodAutoscalerV2SpecScaleTargetRefToHclTerraform = horizontalPodAutoscalerV2SpecScaleTargetRefToHclTerraform; exports.horizontalPodAutoscalerV2SpecToTerraform = horizontalPodAutoscalerV2SpecToTerraform; exports.horizontalPodAutoscalerV2SpecToHclTerraform = horizontalPodAutoscalerV2SpecToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function horizontalPodAutoscalerV2MetadataToTerraform(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 horizontalPodAutoscalerV2MetadataToHclTerraform(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 HorizontalPodAutoscalerV2MetadataOutputReference 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.HorizontalPodAutoscalerV2MetadataOutputReference = HorizontalPodAutoscalerV2MetadataOutputReference; _a = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2MetadataOutputReference[_a] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2MetadataOutputReference", version: "12.1.1" }; function horizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyToTerraform(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 horizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyToHclTerraform(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 HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyOutputReference 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.HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyOutputReference = HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyOutputReference; _b = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyOutputReference[_b] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyOutputReference", version: "12.1.1" }; class HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyList 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 HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyList = HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyList; _c = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyList[_c] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyList", version: "12.1.1" }; function horizontalPodAutoscalerV2SpecBehaviorScaleDownToTerraform(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(horizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyToTerraform, true)(struct.policy), }; } function horizontalPodAutoscalerV2SpecBehaviorScaleDownToHclTerraform(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(horizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyToHclTerraform, true)(struct.policy), isBlock: true, type: "list", storageClassType: "HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class HorizontalPodAutoscalerV2SpecBehaviorScaleDownOutputReference 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 HorizontalPodAutoscalerV2SpecBehaviorScaleDownPolicyList(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.HorizontalPodAutoscalerV2SpecBehaviorScaleDownOutputReference = HorizontalPodAutoscalerV2SpecBehaviorScaleDownOutputReference; _d = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2SpecBehaviorScaleDownOutputReference[_d] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2SpecBehaviorScaleDownOutputReference", version: "12.1.1" }; class HorizontalPodAutoscalerV2SpecBehaviorScaleDownList 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 HorizontalPodAutoscalerV2SpecBehaviorScaleDownOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.HorizontalPodAutoscalerV2SpecBehaviorScaleDownList = HorizontalPodAutoscalerV2SpecBehaviorScaleDownList; _e = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2SpecBehaviorScaleDownList[_e] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2SpecBehaviorScaleDownList", version: "12.1.1" }; function horizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyToTerraform(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 horizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyToHclTerraform(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 HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyOutputReference 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.HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyOutputReference = HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyOutputReference; _f = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyOutputReference[_f] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyOutputReference", version: "12.1.1" }; class HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyList 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 HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyList = HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyList; _g = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyList[_g] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyList", version: "12.1.1" }; function horizontalPodAutoscalerV2SpecBehaviorScaleUpToTerraform(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(horizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyToTerraform, true)(struct.policy), }; } function horizontalPodAutoscalerV2SpecBehaviorScaleUpToHclTerraform(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(horizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyToHclTerraform, true)(struct.policy), isBlock: true, type: "list", storageClassType: "HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class HorizontalPodAutoscalerV2SpecBehaviorScaleUpOutputReference 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 HorizontalPodAutoscalerV2SpecBehaviorScaleUpPolicyList(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.HorizontalPodAutoscalerV2SpecBehaviorScaleUpOutputReference = HorizontalPodAutoscalerV2SpecBehaviorScaleUpOutputReference; _h = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2SpecBehaviorScaleUpOutputReference[_h] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2SpecBehaviorScaleUpOutputReference", version: "12.1.1" }; class HorizontalPodAutoscalerV2SpecBehaviorScaleUpList 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 HorizontalPodAutoscalerV2SpecBehaviorScaleUpOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.HorizontalPodAutoscalerV2SpecBehaviorScaleUpList = HorizontalPodAutoscalerV2SpecBehaviorScaleUpList; _j = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2SpecBehaviorScaleUpList[_j] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2SpecBehaviorScaleUpList", version: "12.1.1" }; function horizontalPodAutoscalerV2SpecBehaviorToTerraform(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(horizontalPodAutoscalerV2SpecBehaviorScaleDownToTerraform, true)(struct.scaleDown), scale_up: cdktf.listMapper(horizontalPodAutoscalerV2SpecBehaviorScaleUpToTerraform, true)(struct.scaleUp), }; } function horizontalPodAutoscalerV2SpecBehaviorToHclTerraform(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(horizontalPodAutoscalerV2SpecBehaviorScaleDownToHclTerraform, true)(struct.scaleDown), isBlock: true, type: "list", storageClassType: "HorizontalPodAutoscalerV2SpecBehaviorScaleDownList", }, scale_up: { value: cdktf.listMapperHcl(horizontalPodAutoscalerV2SpecBehaviorScaleUpToHclTerraform, true)(struct.scaleUp), isBlock: true, type: "list", storageClassType: "HorizontalPodAutoscalerV2SpecBehaviorScaleUpList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class HorizontalPodAutoscalerV2SpecBehaviorOutputReference 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 HorizontalPodAutoscalerV2SpecBehaviorScaleDownList(this, "scale_down", false); // scale_up - computed: false, optional: true, required: false this._scaleUp = new HorizontalPodAutoscalerV2SpecBehaviorScaleUpList(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.HorizontalPodAutoscalerV2SpecBehaviorOutputReference = HorizontalPodAutoscalerV2SpecBehaviorOutputReference; _k = JSII_RTTI_SYMBOL_1; HorizontalPodAutoscalerV2SpecBehaviorOutputReference[_k] = { fqn: "@cdktf/provider-kubernetes.horizontalPodAutoscalerV2.HorizontalPodAutoscalerV2SpecBehaviorOutputReference", version: "12.1.1" }; function horizontalPodAutoscalerV2SpecMetricContainerResourceTargetToTerraform(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 horizontalPodAutoscalerV2SpecMetricContainerResourceTargetToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct))