UNPKG

@cdktf/provider-kubernetes

Version:

Prebuilt kubernetes Provider for Terraform CDK (cdktf)

1,172 lines 247 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; Object.defineProperty(exports, "__esModule", { value: true }); exports.ValidatingWebhookConfigurationV1 = exports.ValidatingWebhookConfigurationV1WebhookList = exports.ValidatingWebhookConfigurationV1WebhookOutputReference = exports.ValidatingWebhookConfigurationV1WebhookRuleList = exports.ValidatingWebhookConfigurationV1WebhookRuleOutputReference = exports.ValidatingWebhookConfigurationV1WebhookObjectSelectorOutputReference = exports.ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsList = exports.ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsOutputReference = exports.ValidatingWebhookConfigurationV1WebhookNamespaceSelectorOutputReference = exports.ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsList = exports.ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsOutputReference = exports.ValidatingWebhookConfigurationV1WebhookClientConfigOutputReference = exports.ValidatingWebhookConfigurationV1WebhookClientConfigServiceOutputReference = exports.ValidatingWebhookConfigurationV1MetadataOutputReference = void 0; exports.validatingWebhookConfigurationV1MetadataToTerraform = validatingWebhookConfigurationV1MetadataToTerraform; exports.validatingWebhookConfigurationV1MetadataToHclTerraform = validatingWebhookConfigurationV1MetadataToHclTerraform; exports.validatingWebhookConfigurationV1WebhookClientConfigServiceToTerraform = validatingWebhookConfigurationV1WebhookClientConfigServiceToTerraform; exports.validatingWebhookConfigurationV1WebhookClientConfigServiceToHclTerraform = validatingWebhookConfigurationV1WebhookClientConfigServiceToHclTerraform; exports.validatingWebhookConfigurationV1WebhookClientConfigToTerraform = validatingWebhookConfigurationV1WebhookClientConfigToTerraform; exports.validatingWebhookConfigurationV1WebhookClientConfigToHclTerraform = validatingWebhookConfigurationV1WebhookClientConfigToHclTerraform; exports.validatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsToTerraform = validatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsToTerraform; exports.validatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsToHclTerraform = validatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsToHclTerraform; exports.validatingWebhookConfigurationV1WebhookNamespaceSelectorToTerraform = validatingWebhookConfigurationV1WebhookNamespaceSelectorToTerraform; exports.validatingWebhookConfigurationV1WebhookNamespaceSelectorToHclTerraform = validatingWebhookConfigurationV1WebhookNamespaceSelectorToHclTerraform; exports.validatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsToTerraform = validatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsToTerraform; exports.validatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsToHclTerraform = validatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsToHclTerraform; exports.validatingWebhookConfigurationV1WebhookObjectSelectorToTerraform = validatingWebhookConfigurationV1WebhookObjectSelectorToTerraform; exports.validatingWebhookConfigurationV1WebhookObjectSelectorToHclTerraform = validatingWebhookConfigurationV1WebhookObjectSelectorToHclTerraform; exports.validatingWebhookConfigurationV1WebhookRuleToTerraform = validatingWebhookConfigurationV1WebhookRuleToTerraform; exports.validatingWebhookConfigurationV1WebhookRuleToHclTerraform = validatingWebhookConfigurationV1WebhookRuleToHclTerraform; exports.validatingWebhookConfigurationV1WebhookToTerraform = validatingWebhookConfigurationV1WebhookToTerraform; exports.validatingWebhookConfigurationV1WebhookToHclTerraform = validatingWebhookConfigurationV1WebhookToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function validatingWebhookConfigurationV1MetadataToTerraform(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), }; } function validatingWebhookConfigurationV1MetadataToHclTerraform(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", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ValidatingWebhookConfigurationV1MetadataOutputReference 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; } 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; } else { this.isEmptyObject = Object.keys(value).length === 0; this._annotations = value.annotations; this._generateName = value.generateName; this._labels = value.labels; this._name = value.name; } } 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; } // 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.ValidatingWebhookConfigurationV1MetadataOutputReference = ValidatingWebhookConfigurationV1MetadataOutputReference; _a = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1MetadataOutputReference[_a] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1MetadataOutputReference", version: "12.1.1" }; function validatingWebhookConfigurationV1WebhookClientConfigServiceToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { name: cdktf.stringToTerraform(struct.name), namespace: cdktf.stringToTerraform(struct.namespace), path: cdktf.stringToTerraform(struct.path), port: cdktf.numberToTerraform(struct.port), }; } function validatingWebhookConfigurationV1WebhookClientConfigServiceToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, namespace: { value: cdktf.stringToHclTerraform(struct.namespace), isBlock: false, type: "simple", storageClassType: "string", }, path: { value: cdktf.stringToHclTerraform(struct.path), isBlock: false, type: "simple", storageClassType: "string", }, port: { value: cdktf.numberToHclTerraform(struct.port), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ValidatingWebhookConfigurationV1WebhookClientConfigServiceOutputReference 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._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._namespace !== undefined) { hasAnyValues = true; internalValueResult.namespace = this._namespace; } if (this._path !== undefined) { hasAnyValues = true; internalValueResult.path = this._path; } if (this._port !== undefined) { hasAnyValues = true; internalValueResult.port = this._port; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._name = undefined; this._namespace = undefined; this._path = undefined; this._port = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._name = value.name; this._namespace = value.namespace; this._path = value.path; this._port = value.port; } } 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 namespace() { return this.getStringAttribute('namespace'); } set namespace(value) { this._namespace = value; } // Temporarily expose input value. Use with caution. get namespaceInput() { return this._namespace; } get path() { return this.getStringAttribute('path'); } set path(value) { this._path = value; } resetPath() { this._path = undefined; } // Temporarily expose input value. Use with caution. get pathInput() { return this._path; } get port() { return this.getNumberAttribute('port'); } set port(value) { this._port = value; } resetPort() { this._port = undefined; } // Temporarily expose input value. Use with caution. get portInput() { return this._port; } } exports.ValidatingWebhookConfigurationV1WebhookClientConfigServiceOutputReference = ValidatingWebhookConfigurationV1WebhookClientConfigServiceOutputReference; _b = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1WebhookClientConfigServiceOutputReference[_b] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1WebhookClientConfigServiceOutputReference", version: "12.1.1" }; function validatingWebhookConfigurationV1WebhookClientConfigToTerraform(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 { ca_bundle: cdktf.stringToTerraform(struct.caBundle), url: cdktf.stringToTerraform(struct.url), service: validatingWebhookConfigurationV1WebhookClientConfigServiceToTerraform(struct.service), }; } function validatingWebhookConfigurationV1WebhookClientConfigToHclTerraform(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 = { ca_bundle: { value: cdktf.stringToHclTerraform(struct.caBundle), isBlock: false, type: "simple", storageClassType: "string", }, url: { value: cdktf.stringToHclTerraform(struct.url), isBlock: false, type: "simple", storageClassType: "string", }, service: { value: validatingWebhookConfigurationV1WebhookClientConfigServiceToHclTerraform(struct.service), isBlock: true, type: "list", storageClassType: "ValidatingWebhookConfigurationV1WebhookClientConfigServiceList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ValidatingWebhookConfigurationV1WebhookClientConfigOutputReference 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; // service - computed: false, optional: true, required: false this._service = new ValidatingWebhookConfigurationV1WebhookClientConfigServiceOutputReference(this, "service"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._caBundle !== undefined) { hasAnyValues = true; internalValueResult.caBundle = this._caBundle; } if (this._url !== undefined) { hasAnyValues = true; internalValueResult.url = this._url; } if (this._service?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.service = this._service?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._caBundle = undefined; this._url = undefined; this._service.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._caBundle = value.caBundle; this._url = value.url; this._service.internalValue = value.service; } } get caBundle() { return this.getStringAttribute('ca_bundle'); } set caBundle(value) { this._caBundle = value; } resetCaBundle() { this._caBundle = undefined; } // Temporarily expose input value. Use with caution. get caBundleInput() { return this._caBundle; } get url() { return this.getStringAttribute('url'); } set url(value) { this._url = value; } resetUrl() { this._url = undefined; } // Temporarily expose input value. Use with caution. get urlInput() { return this._url; } get service() { return this._service; } putService(value) { this._service.internalValue = value; } resetService() { this._service.internalValue = undefined; } // Temporarily expose input value. Use with caution. get serviceInput() { return this._service.internalValue; } } exports.ValidatingWebhookConfigurationV1WebhookClientConfigOutputReference = ValidatingWebhookConfigurationV1WebhookClientConfigOutputReference; _c = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1WebhookClientConfigOutputReference[_c] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1WebhookClientConfigOutputReference", version: "12.1.1" }; function validatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { key: cdktf.stringToTerraform(struct.key), operator: cdktf.stringToTerraform(struct.operator), values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values), }; } function validatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsToHclTerraform(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 = { key: { value: cdktf.stringToHclTerraform(struct.key), isBlock: false, type: "simple", storageClassType: "string", }, operator: { value: cdktf.stringToHclTerraform(struct.operator), isBlock: false, type: "simple", storageClassType: "string", }, values: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.values), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsOutputReference 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._key !== undefined) { hasAnyValues = true; internalValueResult.key = this._key; } if (this._operator !== undefined) { hasAnyValues = true; internalValueResult.operator = this._operator; } if (this._values !== undefined) { hasAnyValues = true; internalValueResult.values = this._values; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._key = undefined; this._operator = undefined; this._values = 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._key = value.key; this._operator = value.operator; this._values = value.values; } } get key() { return this.getStringAttribute('key'); } set key(value) { this._key = value; } resetKey() { this._key = undefined; } // Temporarily expose input value. Use with caution. get keyInput() { return this._key; } get operator() { return this.getStringAttribute('operator'); } set operator(value) { this._operator = value; } resetOperator() { this._operator = undefined; } // Temporarily expose input value. Use with caution. get operatorInput() { return this._operator; } get values() { return cdktf.Fn.tolist(this.getListAttribute('values')); } set values(value) { this._values = value; } resetValues() { this._values = undefined; } // Temporarily expose input value. Use with caution. get valuesInput() { return this._values; } } exports.ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsOutputReference = ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsOutputReference; _d = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsOutputReference[_d] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsOutputReference", version: "12.1.1" }; class ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsList 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 ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsList = ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsList; _e = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsList[_e] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsList", version: "12.1.1" }; function validatingWebhookConfigurationV1WebhookNamespaceSelectorToTerraform(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 { match_labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.matchLabels), match_expressions: cdktf.listMapper(validatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsToTerraform, true)(struct.matchExpressions), }; } function validatingWebhookConfigurationV1WebhookNamespaceSelectorToHclTerraform(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 = { match_labels: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.matchLabels), isBlock: false, type: "map", storageClassType: "stringMap", }, match_expressions: { value: cdktf.listMapperHcl(validatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsToHclTerraform, true)(struct.matchExpressions), isBlock: true, type: "list", storageClassType: "ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ValidatingWebhookConfigurationV1WebhookNamespaceSelectorOutputReference 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; // match_expressions - computed: false, optional: true, required: false this._matchExpressions = new ValidatingWebhookConfigurationV1WebhookNamespaceSelectorMatchExpressionsList(this, "match_expressions", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._matchLabels !== undefined) { hasAnyValues = true; internalValueResult.matchLabels = this._matchLabels; } if (this._matchExpressions?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.matchExpressions = this._matchExpressions?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._matchLabels = undefined; this._matchExpressions.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._matchLabels = value.matchLabels; this._matchExpressions.internalValue = value.matchExpressions; } } get matchLabels() { return this.getStringMapAttribute('match_labels'); } set matchLabels(value) { this._matchLabels = value; } resetMatchLabels() { this._matchLabels = undefined; } // Temporarily expose input value. Use with caution. get matchLabelsInput() { return this._matchLabels; } get matchExpressions() { return this._matchExpressions; } putMatchExpressions(value) { this._matchExpressions.internalValue = value; } resetMatchExpressions() { this._matchExpressions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get matchExpressionsInput() { return this._matchExpressions.internalValue; } } exports.ValidatingWebhookConfigurationV1WebhookNamespaceSelectorOutputReference = ValidatingWebhookConfigurationV1WebhookNamespaceSelectorOutputReference; _f = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1WebhookNamespaceSelectorOutputReference[_f] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1WebhookNamespaceSelectorOutputReference", version: "12.1.1" }; function validatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { key: cdktf.stringToTerraform(struct.key), operator: cdktf.stringToTerraform(struct.operator), values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values), }; } function validatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsToHclTerraform(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 = { key: { value: cdktf.stringToHclTerraform(struct.key), isBlock: false, type: "simple", storageClassType: "string", }, operator: { value: cdktf.stringToHclTerraform(struct.operator), isBlock: false, type: "simple", storageClassType: "string", }, values: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.values), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsOutputReference 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._key !== undefined) { hasAnyValues = true; internalValueResult.key = this._key; } if (this._operator !== undefined) { hasAnyValues = true; internalValueResult.operator = this._operator; } if (this._values !== undefined) { hasAnyValues = true; internalValueResult.values = this._values; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._key = undefined; this._operator = undefined; this._values = 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._key = value.key; this._operator = value.operator; this._values = value.values; } } get key() { return this.getStringAttribute('key'); } set key(value) { this._key = value; } resetKey() { this._key = undefined; } // Temporarily expose input value. Use with caution. get keyInput() { return this._key; } get operator() { return this.getStringAttribute('operator'); } set operator(value) { this._operator = value; } resetOperator() { this._operator = undefined; } // Temporarily expose input value. Use with caution. get operatorInput() { return this._operator; } get values() { return cdktf.Fn.tolist(this.getListAttribute('values')); } set values(value) { this._values = value; } resetValues() { this._values = undefined; } // Temporarily expose input value. Use with caution. get valuesInput() { return this._values; } } exports.ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsOutputReference = ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsOutputReference; _g = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsOutputReference[_g] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsOutputReference", version: "12.1.1" }; class ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsList 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 ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsList = ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsList; _h = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsList[_h] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsList", version: "12.1.1" }; function validatingWebhookConfigurationV1WebhookObjectSelectorToTerraform(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 { match_labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.matchLabels), match_expressions: cdktf.listMapper(validatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsToTerraform, true)(struct.matchExpressions), }; } function validatingWebhookConfigurationV1WebhookObjectSelectorToHclTerraform(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 = { match_labels: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.matchLabels), isBlock: false, type: "map", storageClassType: "stringMap", }, match_expressions: { value: cdktf.listMapperHcl(validatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsToHclTerraform, true)(struct.matchExpressions), isBlock: true, type: "list", storageClassType: "ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ValidatingWebhookConfigurationV1WebhookObjectSelectorOutputReference 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; // match_expressions - computed: false, optional: true, required: false this._matchExpressions = new ValidatingWebhookConfigurationV1WebhookObjectSelectorMatchExpressionsList(this, "match_expressions", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._matchLabels !== undefined) { hasAnyValues = true; internalValueResult.matchLabels = this._matchLabels; } if (this._matchExpressions?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.matchExpressions = this._matchExpressions?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._matchLabels = undefined; this._matchExpressions.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._matchLabels = value.matchLabels; this._matchExpressions.internalValue = value.matchExpressions; } } get matchLabels() { return this.getStringMapAttribute('match_labels'); } set matchLabels(value) { this._matchLabels = value; } resetMatchLabels() { this._matchLabels = undefined; } // Temporarily expose input value. Use with caution. get matchLabelsInput() { return this._matchLabels; } get matchExpressions() { return this._matchExpressions; } putMatchExpressions(value) { this._matchExpressions.internalValue = value; } resetMatchExpressions() { this._matchExpressions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get matchExpressionsInput() { return this._matchExpressions.internalValue; } } exports.ValidatingWebhookConfigurationV1WebhookObjectSelectorOutputReference = ValidatingWebhookConfigurationV1WebhookObjectSelectorOutputReference; _j = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1WebhookObjectSelectorOutputReference[_j] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1WebhookObjectSelectorOutputReference", version: "12.1.1" }; function validatingWebhookConfigurationV1WebhookRuleToTerraform(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 { api_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.apiGroups), api_versions: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.apiVersions), operations: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.operations), resources: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.resources), scope: cdktf.stringToTerraform(struct.scope), }; } function validatingWebhookConfigurationV1WebhookRuleToHclTerraform(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 = { api_groups: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.apiGroups), isBlock: false, type: "list", storageClassType: "stringList", }, api_versions: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.apiVersions), isBlock: false, type: "list", storageClassType: "stringList", }, operations: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.operations), isBlock: false, type: "list", storageClassType: "stringList", }, resources: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.resources), isBlock: false, type: "list", storageClassType: "stringList", }, scope: { value: cdktf.stringToHclTerraform(struct.scope), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ValidatingWebhookConfigurationV1WebhookRuleOutputReference 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._apiGroups !== undefined) { hasAnyValues = true; internalValueResult.apiGroups = this._apiGroups; } if (this._apiVersions !== undefined) { hasAnyValues = true; internalValueResult.apiVersions = this._apiVersions; } if (this._operations !== undefined) { hasAnyValues = true; internalValueResult.operations = this._operations; } if (this._resources !== undefined) { hasAnyValues = true; internalValueResult.resources = this._resources; } if (this._scope !== undefined) { hasAnyValues = true; internalValueResult.scope = this._scope; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._apiGroups = undefined; this._apiVersions = undefined; this._operations = undefined; this._resources = undefined; this._scope = 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._apiGroups = value.apiGroups; this._apiVersions = value.apiVersions; this._operations = value.operations; this._resources = value.resources; this._scope = value.scope; } } get apiGroups() { return this.getListAttribute('api_groups'); } set apiGroups(value) { this._apiGroups = value; } // Temporarily expose input value. Use with caution. get apiGroupsInput() { return this._apiGroups; } get apiVersions() { return this.getListAttribute('api_versions'); } set apiVersions(value) { this._apiVersions = value; } // Temporarily expose input value. Use with caution. get apiVersionsInput() { return this._apiVersions; } get operations() { return this.getListAttribute('operations'); } set operations(value) { this._operations = value; } // Temporarily expose input value. Use with caution. get operationsInput() { return this._operations; } get resources() { return this.getListAttribute('resources'); } set resources(value) { this._resources = value; } // Temporarily expose input value. Use with caution. get resourcesInput() { return this._resources; } get scope() { return this.getStringAttribute('scope'); } set scope(value) { this._scope = value; } resetScope() { this._scope = undefined; } // Temporarily expose input value. Use with caution. get scopeInput() { return this._scope; } } exports.ValidatingWebhookConfigurationV1WebhookRuleOutputReference = ValidatingWebhookConfigurationV1WebhookRuleOutputReference; _k = JSII_RTTI_SYMBOL_1; ValidatingWebhookConfigurationV1WebhookRuleOutputReference[_k] = { fqn: "@cdktf/provider-kubernetes.validatingWebhookConfigurationV1.ValidatingWebhookConfigurationV1WebhookRuleOutputReference", version: "12.1.1" }; class ValidatingWebhookConfigurationV1WebhookRuleList 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 = wrap