UNPKG

@cdktf/provider-azurerm

Version:

Prebuilt azurerm Provider for Terraform CDK (cdktf)

1,209 lines 195 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j; Object.defineProperty(exports, "__esModule", { value: true }); exports.CognitiveAccount = exports.CognitiveAccountTimeoutsOutputReference = exports.cognitiveAccountTimeoutsToHclTerraform = exports.cognitiveAccountTimeoutsToTerraform = exports.CognitiveAccountStorageList = exports.CognitiveAccountStorageOutputReference = exports.cognitiveAccountStorageToHclTerraform = exports.cognitiveAccountStorageToTerraform = exports.CognitiveAccountNetworkAclsOutputReference = exports.cognitiveAccountNetworkAclsToHclTerraform = exports.cognitiveAccountNetworkAclsToTerraform = exports.CognitiveAccountNetworkAclsVirtualNetworkRulesList = exports.CognitiveAccountNetworkAclsVirtualNetworkRulesOutputReference = exports.cognitiveAccountNetworkAclsVirtualNetworkRulesToHclTerraform = exports.cognitiveAccountNetworkAclsVirtualNetworkRulesToTerraform = exports.CognitiveAccountIdentityOutputReference = exports.cognitiveAccountIdentityToHclTerraform = exports.cognitiveAccountIdentityToTerraform = exports.CognitiveAccountCustomerManagedKeyOutputReference = exports.cognitiveAccountCustomerManagedKeyToHclTerraform = exports.cognitiveAccountCustomerManagedKeyToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function cognitiveAccountCustomerManagedKeyToTerraform(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 { identity_client_id: cdktf.stringToTerraform(struct.identityClientId), key_vault_key_id: cdktf.stringToTerraform(struct.keyVaultKeyId), }; } exports.cognitiveAccountCustomerManagedKeyToTerraform = cognitiveAccountCustomerManagedKeyToTerraform; function cognitiveAccountCustomerManagedKeyToHclTerraform(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 = { identity_client_id: { value: cdktf.stringToHclTerraform(struct.identityClientId), isBlock: false, type: "simple", storageClassType: "string", }, key_vault_key_id: { value: cdktf.stringToHclTerraform(struct.keyVaultKeyId), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cognitiveAccountCustomerManagedKeyToHclTerraform = cognitiveAccountCustomerManagedKeyToHclTerraform; class CognitiveAccountCustomerManagedKeyOutputReference 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._identityClientId !== undefined) { hasAnyValues = true; internalValueResult.identityClientId = this._identityClientId; } if (this._keyVaultKeyId !== undefined) { hasAnyValues = true; internalValueResult.keyVaultKeyId = this._keyVaultKeyId; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._identityClientId = undefined; this._keyVaultKeyId = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._identityClientId = value.identityClientId; this._keyVaultKeyId = value.keyVaultKeyId; } } get identityClientId() { return this.getStringAttribute('identity_client_id'); } set identityClientId(value) { this._identityClientId = value; } resetIdentityClientId() { this._identityClientId = undefined; } // Temporarily expose input value. Use with caution. get identityClientIdInput() { return this._identityClientId; } get keyVaultKeyId() { return this.getStringAttribute('key_vault_key_id'); } set keyVaultKeyId(value) { this._keyVaultKeyId = value; } // Temporarily expose input value. Use with caution. get keyVaultKeyIdInput() { return this._keyVaultKeyId; } } exports.CognitiveAccountCustomerManagedKeyOutputReference = CognitiveAccountCustomerManagedKeyOutputReference; _a = JSII_RTTI_SYMBOL_1; CognitiveAccountCustomerManagedKeyOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.cognitiveAccount.CognitiveAccountCustomerManagedKeyOutputReference", version: "12.27.0" }; function cognitiveAccountIdentityToTerraform(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 { identity_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.identityIds), type: cdktf.stringToTerraform(struct.type), }; } exports.cognitiveAccountIdentityToTerraform = cognitiveAccountIdentityToTerraform; function cognitiveAccountIdentityToHclTerraform(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 = { identity_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.identityIds), isBlock: false, type: "set", storageClassType: "stringList", }, type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cognitiveAccountIdentityToHclTerraform = cognitiveAccountIdentityToHclTerraform; class CognitiveAccountIdentityOutputReference 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._identityIds !== undefined) { hasAnyValues = true; internalValueResult.identityIds = this._identityIds; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._identityIds = undefined; this._type = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._identityIds = value.identityIds; this._type = value.type; } } get identityIds() { return cdktf.Fn.tolist(this.getListAttribute('identity_ids')); } set identityIds(value) { this._identityIds = value; } resetIdentityIds() { this._identityIds = undefined; } // Temporarily expose input value. Use with caution. get identityIdsInput() { return this._identityIds; } // principal_id - computed: true, optional: false, required: false get principalId() { return this.getStringAttribute('principal_id'); } // tenant_id - computed: true, optional: false, required: false get tenantId() { return this.getStringAttribute('tenant_id'); } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } } exports.CognitiveAccountIdentityOutputReference = CognitiveAccountIdentityOutputReference; _b = JSII_RTTI_SYMBOL_1; CognitiveAccountIdentityOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.cognitiveAccount.CognitiveAccountIdentityOutputReference", version: "12.27.0" }; function cognitiveAccountNetworkAclsVirtualNetworkRulesToTerraform(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 { ignore_missing_vnet_service_endpoint: cdktf.booleanToTerraform(struct.ignoreMissingVnetServiceEndpoint), subnet_id: cdktf.stringToTerraform(struct.subnetId), }; } exports.cognitiveAccountNetworkAclsVirtualNetworkRulesToTerraform = cognitiveAccountNetworkAclsVirtualNetworkRulesToTerraform; function cognitiveAccountNetworkAclsVirtualNetworkRulesToHclTerraform(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 = { ignore_missing_vnet_service_endpoint: { value: cdktf.booleanToHclTerraform(struct.ignoreMissingVnetServiceEndpoint), isBlock: false, type: "simple", storageClassType: "boolean", }, subnet_id: { value: cdktf.stringToHclTerraform(struct.subnetId), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cognitiveAccountNetworkAclsVirtualNetworkRulesToHclTerraform = cognitiveAccountNetworkAclsVirtualNetworkRulesToHclTerraform; class CognitiveAccountNetworkAclsVirtualNetworkRulesOutputReference 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._ignoreMissingVnetServiceEndpoint !== undefined) { hasAnyValues = true; internalValueResult.ignoreMissingVnetServiceEndpoint = this._ignoreMissingVnetServiceEndpoint; } if (this._subnetId !== undefined) { hasAnyValues = true; internalValueResult.subnetId = this._subnetId; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._ignoreMissingVnetServiceEndpoint = undefined; this._subnetId = 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._ignoreMissingVnetServiceEndpoint = value.ignoreMissingVnetServiceEndpoint; this._subnetId = value.subnetId; } } get ignoreMissingVnetServiceEndpoint() { return this.getBooleanAttribute('ignore_missing_vnet_service_endpoint'); } set ignoreMissingVnetServiceEndpoint(value) { this._ignoreMissingVnetServiceEndpoint = value; } resetIgnoreMissingVnetServiceEndpoint() { this._ignoreMissingVnetServiceEndpoint = undefined; } // Temporarily expose input value. Use with caution. get ignoreMissingVnetServiceEndpointInput() { return this._ignoreMissingVnetServiceEndpoint; } get subnetId() { return this.getStringAttribute('subnet_id'); } set subnetId(value) { this._subnetId = value; } // Temporarily expose input value. Use with caution. get subnetIdInput() { return this._subnetId; } } exports.CognitiveAccountNetworkAclsVirtualNetworkRulesOutputReference = CognitiveAccountNetworkAclsVirtualNetworkRulesOutputReference; _c = JSII_RTTI_SYMBOL_1; CognitiveAccountNetworkAclsVirtualNetworkRulesOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.cognitiveAccount.CognitiveAccountNetworkAclsVirtualNetworkRulesOutputReference", version: "12.27.0" }; class CognitiveAccountNetworkAclsVirtualNetworkRulesList 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 CognitiveAccountNetworkAclsVirtualNetworkRulesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.CognitiveAccountNetworkAclsVirtualNetworkRulesList = CognitiveAccountNetworkAclsVirtualNetworkRulesList; _d = JSII_RTTI_SYMBOL_1; CognitiveAccountNetworkAclsVirtualNetworkRulesList[_d] = { fqn: "@cdktf/provider-azurerm.cognitiveAccount.CognitiveAccountNetworkAclsVirtualNetworkRulesList", version: "12.27.0" }; function cognitiveAccountNetworkAclsToTerraform(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 { default_action: cdktf.stringToTerraform(struct.defaultAction), ip_rules: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.ipRules), virtual_network_rules: cdktf.listMapper(cognitiveAccountNetworkAclsVirtualNetworkRulesToTerraform, true)(struct.virtualNetworkRules), }; } exports.cognitiveAccountNetworkAclsToTerraform = cognitiveAccountNetworkAclsToTerraform; function cognitiveAccountNetworkAclsToHclTerraform(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 = { default_action: { value: cdktf.stringToHclTerraform(struct.defaultAction), isBlock: false, type: "simple", storageClassType: "string", }, ip_rules: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.ipRules), isBlock: false, type: "set", storageClassType: "stringList", }, virtual_network_rules: { value: cdktf.listMapperHcl(cognitiveAccountNetworkAclsVirtualNetworkRulesToHclTerraform, true)(struct.virtualNetworkRules), isBlock: true, type: "set", storageClassType: "CognitiveAccountNetworkAclsVirtualNetworkRulesList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cognitiveAccountNetworkAclsToHclTerraform = cognitiveAccountNetworkAclsToHclTerraform; class CognitiveAccountNetworkAclsOutputReference 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; // virtual_network_rules - computed: false, optional: true, required: false this._virtualNetworkRules = new CognitiveAccountNetworkAclsVirtualNetworkRulesList(this, "virtual_network_rules", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._defaultAction !== undefined) { hasAnyValues = true; internalValueResult.defaultAction = this._defaultAction; } if (this._ipRules !== undefined) { hasAnyValues = true; internalValueResult.ipRules = this._ipRules; } if (this._virtualNetworkRules?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.virtualNetworkRules = this._virtualNetworkRules?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._defaultAction = undefined; this._ipRules = undefined; this._virtualNetworkRules.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._defaultAction = value.defaultAction; this._ipRules = value.ipRules; this._virtualNetworkRules.internalValue = value.virtualNetworkRules; } } get defaultAction() { return this.getStringAttribute('default_action'); } set defaultAction(value) { this._defaultAction = value; } // Temporarily expose input value. Use with caution. get defaultActionInput() { return this._defaultAction; } get ipRules() { return cdktf.Fn.tolist(this.getListAttribute('ip_rules')); } set ipRules(value) { this._ipRules = value; } resetIpRules() { this._ipRules = undefined; } // Temporarily expose input value. Use with caution. get ipRulesInput() { return this._ipRules; } get virtualNetworkRules() { return this._virtualNetworkRules; } putVirtualNetworkRules(value) { this._virtualNetworkRules.internalValue = value; } resetVirtualNetworkRules() { this._virtualNetworkRules.internalValue = undefined; } // Temporarily expose input value. Use with caution. get virtualNetworkRulesInput() { return this._virtualNetworkRules.internalValue; } } exports.CognitiveAccountNetworkAclsOutputReference = CognitiveAccountNetworkAclsOutputReference; _e = JSII_RTTI_SYMBOL_1; CognitiveAccountNetworkAclsOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.cognitiveAccount.CognitiveAccountNetworkAclsOutputReference", version: "12.27.0" }; function cognitiveAccountStorageToTerraform(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 { identity_client_id: cdktf.stringToTerraform(struct.identityClientId), storage_account_id: cdktf.stringToTerraform(struct.storageAccountId), }; } exports.cognitiveAccountStorageToTerraform = cognitiveAccountStorageToTerraform; function cognitiveAccountStorageToHclTerraform(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 = { identity_client_id: { value: cdktf.stringToHclTerraform(struct.identityClientId), isBlock: false, type: "simple", storageClassType: "string", }, storage_account_id: { value: cdktf.stringToHclTerraform(struct.storageAccountId), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cognitiveAccountStorageToHclTerraform = cognitiveAccountStorageToHclTerraform; class CognitiveAccountStorageOutputReference 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._identityClientId !== undefined) { hasAnyValues = true; internalValueResult.identityClientId = this._identityClientId; } if (this._storageAccountId !== undefined) { hasAnyValues = true; internalValueResult.storageAccountId = this._storageAccountId; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._identityClientId = undefined; this._storageAccountId = 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._identityClientId = value.identityClientId; this._storageAccountId = value.storageAccountId; } } get identityClientId() { return this.getStringAttribute('identity_client_id'); } set identityClientId(value) { this._identityClientId = value; } resetIdentityClientId() { this._identityClientId = undefined; } // Temporarily expose input value. Use with caution. get identityClientIdInput() { return this._identityClientId; } get storageAccountId() { return this.getStringAttribute('storage_account_id'); } set storageAccountId(value) { this._storageAccountId = value; } // Temporarily expose input value. Use with caution. get storageAccountIdInput() { return this._storageAccountId; } } exports.CognitiveAccountStorageOutputReference = CognitiveAccountStorageOutputReference; _f = JSII_RTTI_SYMBOL_1; CognitiveAccountStorageOutputReference[_f] = { fqn: "@cdktf/provider-azurerm.cognitiveAccount.CognitiveAccountStorageOutputReference", version: "12.27.0" }; class CognitiveAccountStorageList 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 CognitiveAccountStorageOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.CognitiveAccountStorageList = CognitiveAccountStorageList; _g = JSII_RTTI_SYMBOL_1; CognitiveAccountStorageList[_g] = { fqn: "@cdktf/provider-azurerm.cognitiveAccount.CognitiveAccountStorageList", version: "12.27.0" }; function cognitiveAccountTimeoutsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), read: cdktf.stringToTerraform(struct.read), update: cdktf.stringToTerraform(struct.update), }; } exports.cognitiveAccountTimeoutsToTerraform = cognitiveAccountTimeoutsToTerraform; function cognitiveAccountTimeoutsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, read: { value: cdktf.stringToHclTerraform(struct.read), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cognitiveAccountTimeoutsToHclTerraform = cognitiveAccountTimeoutsToHclTerraform; class CognitiveAccountTimeoutsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._read !== undefined) { hasAnyValues = true; internalValueResult.read = this._read; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._read = undefined; this._update = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._create = value.create; this._delete = value.delete; this._read = value.read; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get read() { return this.getStringAttribute('read'); } set read(value) { this._read = value; } resetRead() { this._read = undefined; } // Temporarily expose input value. Use with caution. get readInput() { return this._read; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.CognitiveAccountTimeoutsOutputReference = CognitiveAccountTimeoutsOutputReference; _h = JSII_RTTI_SYMBOL_1; CognitiveAccountTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.cognitiveAccount.CognitiveAccountTimeoutsOutputReference", version: "12.27.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/cognitive_account azurerm_cognitive_account} */ class CognitiveAccount extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a CognitiveAccount resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the CognitiveAccount to import * @param importFromId The id of the existing CognitiveAccount that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/cognitive_account#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the CognitiveAccount to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_cognitive_account", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/cognitive_account azurerm_cognitive_account} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options CognitiveAccountConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'azurerm_cognitive_account', terraformGeneratorMetadata: { providerName: 'azurerm', providerVersion: '3.116.0', providerVersionConstraint: '~> 3.10' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // customer_managed_key - computed: false, optional: true, required: false this._customerManagedKey = new CognitiveAccountCustomerManagedKeyOutputReference(this, "customer_managed_key"); // identity - computed: false, optional: true, required: false this._identity = new CognitiveAccountIdentityOutputReference(this, "identity"); // network_acls - computed: false, optional: true, required: false this._networkAcls = new CognitiveAccountNetworkAclsOutputReference(this, "network_acls"); // storage - computed: false, optional: true, required: false this._storage = new CognitiveAccountStorageList(this, "storage", false); // timeouts - computed: false, optional: true, required: false this._timeouts = new CognitiveAccountTimeoutsOutputReference(this, "timeouts"); this._customQuestionAnsweringSearchServiceId = config.customQuestionAnsweringSearchServiceId; this._customQuestionAnsweringSearchServiceKey = config.customQuestionAnsweringSearchServiceKey; this._customSubdomainName = config.customSubdomainName; this._dynamicThrottlingEnabled = config.dynamicThrottlingEnabled; this._fqdns = config.fqdns; this._id = config.id; this._kind = config.kind; this._localAuthEnabled = config.localAuthEnabled; this._location = config.location; this._metricsAdvisorAadClientId = config.metricsAdvisorAadClientId; this._metricsAdvisorAadTenantId = config.metricsAdvisorAadTenantId; this._metricsAdvisorSuperUserName = config.metricsAdvisorSuperUserName; this._metricsAdvisorWebsiteName = config.metricsAdvisorWebsiteName; this._name = config.name; this._outboundNetworkAccessRestricted = config.outboundNetworkAccessRestricted; this._publicNetworkAccessEnabled = config.publicNetworkAccessEnabled; this._qnaRuntimeEndpoint = config.qnaRuntimeEndpoint; this._resourceGroupName = config.resourceGroupName; this._skuName = config.skuName; this._tags = config.tags; this._customerManagedKey.internalValue = config.customerManagedKey; this._identity.internalValue = config.identity; this._networkAcls.internalValue = config.networkAcls; this._storage.internalValue = config.storage; this._timeouts.internalValue = config.timeouts; } get customQuestionAnsweringSearchServiceId() { return this.getStringAttribute('custom_question_answering_search_service_id'); } set customQuestionAnsweringSearchServiceId(value) { this._customQuestionAnsweringSearchServiceId = value; } resetCustomQuestionAnsweringSearchServiceId() { this._customQuestionAnsweringSearchServiceId = undefined; } // Temporarily expose input value. Use with caution. get customQuestionAnsweringSearchServiceIdInput() { return this._customQuestionAnsweringSearchServiceId; } get customQuestionAnsweringSearchServiceKey() { return this.getStringAttribute('custom_question_answering_search_service_key'); } set customQuestionAnsweringSearchServiceKey(value) { this._customQuestionAnsweringSearchServiceKey = value; } resetCustomQuestionAnsweringSearchServiceKey() { this._customQuestionAnsweringSearchServiceKey = undefined; } // Temporarily expose input value. Use with caution. get customQuestionAnsweringSearchServiceKeyInput() { return this._customQuestionAnsweringSearchServiceKey; } get customSubdomainName() { return this.getStringAttribute('custom_subdomain_name'); } set customSubdomainName(value) { this._customSubdomainName = value; } resetCustomSubdomainName() { this._customSubdomainName = undefined; } // Temporarily expose input value. Use with caution. get customSubdomainNameInput() { return this._customSubdomainName; } get dynamicThrottlingEnabled() { return this.getBooleanAttribute('dynamic_throttling_enabled'); } set dynamicThrottlingEnabled(value) { this._dynamicThrottlingEnabled = value; } resetDynamicThrottlingEnabled() { this._dynamicThrottlingEnabled = undefined; } // Temporarily expose input value. Use with caution. get dynamicThrottlingEnabledInput() { return this._dynamicThrottlingEnabled; } // endpoint - computed: true, optional: false, required: false get endpoint() { return this.getStringAttribute('endpoint'); } get fqdns() { return this.getListAttribute('fqdns'); } set fqdns(value) { this._fqdns = value; } resetFqdns() { this._fqdns = undefined; } // Temporarily expose input value. Use with caution. get fqdnsInput() { return this._fqdns; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get kind() { return this.getStringAttribute('kind'); } set kind(value) { this._kind = value; } // Temporarily expose input value. Use with caution. get kindInput() { return this._kind; } get localAuthEnabled() { return this.getBooleanAttribute('local_auth_enabled'); } set localAuthEnabled(value) { this._localAuthEnabled = value; } resetLocalAuthEnabled() { this._localAuthEnabled = undefined; } // Temporarily expose input value. Use with caution. get localAuthEnabledInput() { return this._localAuthEnabled; } get location() { return this.getStringAttribute('location'); } set location(value) { this._location = value; } // Temporarily expose input value. Use with caution. get locationInput() { return this._location; } get metricsAdvisorAadClientId() { return this.getStringAttribute('metrics_advisor_aad_client_id'); } set metricsAdvisorAadClientId(value) { this._metricsAdvisorAadClientId = value; } resetMetricsAdvisorAadClientId() { this._metricsAdvisorAadClientId = undefined; } // Temporarily expose input value. Use with caution. get metricsAdvisorAadClientIdInput() { return this._metricsAdvisorAadClientId; } get metricsAdvisorAadTenantId() { return this.getStringAttribute('metrics_advisor_aad_tenant_id'); } set metricsAdvisorAadTenantId(value) { this._metricsAdvisorAadTenantId = value; } resetMetricsAdvisorAadTenantId() { this._metricsAdvisorAadTenantId = undefined; } // Temporarily expose input value. Use with caution. get metricsAdvisorAadTenantIdInput() { return this._metricsAdvisorAadTenantId; } get metricsAdvisorSuperUserName() { return this.getStringAttribute('metrics_advisor_super_user_name'); } set metricsAdvisorSuperUserName(value) { this._metricsAdvisorSuperUserName = value; } resetMetricsAdvisorSuperUserName() { this._metricsAdvisorSuperUserName = undefined; } // Temporarily expose input value. Use with caution. get metricsAdvisorSuperUserNameInput() { return this._metricsAdvisorSuperUserName; } get metricsAdvisorWebsiteName() { return this.getStringAttribute('metrics_advisor_website_name'); } set metricsAdvisorWebsiteName(value) { this._metricsAdvisorWebsiteName = value; } resetMetricsAdvisorWebsiteName() { this._metricsAdvisorWebsiteName = undefined; } // Temporarily expose input value. Use with caution. get metricsAdvisorWebsiteNameInput() { return this._metricsAdvisorWebsiteName; } 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 outboundNetworkAccessRestricted() { return this.getBooleanAttribute('outbound_network_access_restricted'); } set outboundNetworkAccessRestricted(value) { this._outboundNetworkAccessRestricted = value; } resetOutboundNetworkAccessRestricted() { this._outboundNetworkAccessRestricted = undefined; } // Temporarily expose input value. Use with caution. get outboundNetworkAccessRestrictedInput() { return this._outboundNetworkAccessRestricted; } // primary_access_key - computed: true, optional: false, required: false get primaryAccessKey() { return this.getStringAttribute('primary_access_key'); } get publicNetworkAccessEnabled() { return this.getBooleanAttribute('public_network_access_enabled'); } set publicNetworkAccessEnabled(value) { this._publicNetworkAccessEnabled = value; } resetPublicNetworkAccessEnabled() { this._publicNetworkAccessEnabled = undefined; } // Temporarily expose input value. Use with caution. get publicNetworkAccessEnabledInput() { return this._publicNetworkAccessEnabled; } get qnaRuntimeEndpoint() { return this.getStringAttribute('qna_runtime_endpoint'); } set qnaRuntimeEndpoint(value) { this._qnaRuntimeEndpoint = value; } resetQnaRuntimeEndpoint() { this._qnaRuntimeEndpoint = undefined; } // Temporarily expose input value. Use with caution. get qnaRuntimeEndpointInput() { return this._qnaRuntimeEndpoint; } get resourceGroupName() { return this.getStringAttribute('resource_group_name'); } set resourceGroupName(value) { this._resourceGroupName = value; } // Temporarily expose input value. Use with caution. get resourceGroupNameInput() { return this._resourceGroupName; } // secondary_access_key - computed: true, optional: false, required: false get secondaryAccessKey() { return this.getStringAttribute('secondary_access_key'); } get skuName() { return this.getStringAttribute('sku_name'); } set skuName(value) { this._skuName = value; } // Temporarily expose input value. Use with caution. get skuNameInput() { return this._skuName; } get tags() { return this.getStringMapAttribute('tags'); } set tags(value) { this._tags = value; } resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. get tagsInput() { return this._tags; } get customerManagedKey() { return this._customerManagedKey; } putCustomerManagedKey(value) { this._customerManagedKey.internalValue = value; } resetCustomerManagedKey() { this._customerManagedKey.internalValue = undefined; } // Temporarily expose input value. Use with caution. get customerManagedKeyInput() { return this._customerManagedKey.internalValue; } get identity() { return this._identity; } putIdentity(value) { this._identity.internalValue = value; } resetIdentity() { this._identity.internalValue = undefined; } // Temporarily expose input value. Use with caution. get identityInput() { return this._identity.internalValue; } get networkAcls() { return this._networkAcls; } putNetworkAcls(value) { this._networkAcls.internalValue = value; } resetNetworkAcls() { this._networkAcls.internalValue = undefined; } // Temporarily expose input value. Use with caution. get networkAclsInput() { return this._networkAcls.internalValue; } get storage() { return this._storage; } putStorage(value) { this._storage.internalValue = value; } resetStorage() { this._storage.internalValue = undefined; } // Temporarily expose input value. Use with caution. get storageInput() { return this._storage.internalValue; } get timeouts() { return this._timeouts; } putTimeouts(value) { this._timeouts.internalValue = value; } resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { custom_question_answering_search_service_id: cdktf.stringToTerraform(this._customQuestionAnsweringSearchServiceId), custom_question_answering_search_service_key: cdktf.stringToTerraform(this._customQuestionAnsweringSearchServiceKey), custom_subdomain_name: cdktf.stringToTerraform(this._customSubdomainName), dynamic_throttling_enabled: cdktf.booleanToTerraform(this._dynamicThrottlingEnabled), fqdns: cdktf.listMapper(cdktf.stringToTerraform, false)(this._fqdns), id: cdktf.stringToTerraform(this._id), kind: cdktf.stringToTerraform(this._kind), local_auth_enabled: cdktf.booleanToTerraform(this._localAuthEnabled), location: cdktf.stringToTerraform(this._location), metrics_advisor_aad_client_id: cdktf.stringToTerraform(this._metricsAdvisorAadClientId), metrics_advisor_aad_tenant_id: cdktf.stringToTerraform(this._metricsAdvisorAadTenantId), metrics_advisor_super_user_name: cdktf.stringToTerraform(this._metricsAdvisorSuperUserName), metrics_advisor_website_name: cdktf.stringToTerraform(this._metricsAdvisorWebsiteName), name: cdktf.stringToTerraform(this._name), outbound_network_access_restricted: cdktf.booleanToTerraform(this._outboundNetworkAccessRestricted), public_network_access_enabled: cdktf.booleanToTerraform(this._publicNetworkAccessEnabled), qna_runtime_endpoint: cdktf.stringToTerraform(this._qnaRuntimeEndpoint), resource_group_name: cdktf.stringToTerraform(this._resourceGroupName), sku_name: cdktf.stringToTerraform(this._skuName), tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags), customer_managed_key: cognitiveAccountCustomerManagedKeyToTerraform(this._customerManagedKey.internalValue), identity: cognitiveAccountIdentityToTerraform(this._identity.internalValue), network_acls: cognitiveAccountNetworkAclsToTerraform(this._networkAcls.internalValue), storage: cdktf.listMapper(cognitiveAccountStorageToTerraform, true)(this._storage.internalValue), timeouts: cognitiveAccountTimeoutsToTerraform(this._timeouts.internalValue), }; } synthesizeHclAttributes() { const attrs = { custom_question_answering_search_service_id: { value: cdktf.stringToHclTerraform(this._customQuestionAnsweringSearchServiceId), isBlock: false, type: "simple", storageClassType: "string", }, custom_question_answering_search_service_key: { value: cdktf.stringToHclTerraform(this._cus