@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,182 lines (1,181 loc) • 174 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventhubNamespace = exports.EventhubNamespaceTimeoutsOutputReference = exports.eventhubNamespaceTimeoutsToHclTerraform = exports.eventhubNamespaceTimeoutsToTerraform = exports.EventhubNamespaceIdentityOutputReference = exports.eventhubNamespaceIdentityToHclTerraform = exports.eventhubNamespaceIdentityToTerraform = exports.EventhubNamespaceNetworkRulesetsList = exports.EventhubNamespaceNetworkRulesetsOutputReference = exports.eventhubNamespaceNetworkRulesetsToHclTerraform = exports.eventhubNamespaceNetworkRulesetsToTerraform = exports.EventhubNamespaceNetworkRulesetsVirtualNetworkRuleList = exports.EventhubNamespaceNetworkRulesetsVirtualNetworkRuleOutputReference = exports.eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToHclTerraform = exports.eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToTerraform = exports.EventhubNamespaceNetworkRulesetsIpRuleList = exports.EventhubNamespaceNetworkRulesetsIpRuleOutputReference = exports.eventhubNamespaceNetworkRulesetsIpRuleToHclTerraform = exports.eventhubNamespaceNetworkRulesetsIpRuleToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function eventhubNamespaceNetworkRulesetsIpRuleToTerraform(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 {
action: struct.action === undefined ? null : cdktf.stringToTerraform(struct.action),
ip_mask: struct.ipMask === undefined ? null : cdktf.stringToTerraform(struct.ipMask),
};
}
exports.eventhubNamespaceNetworkRulesetsIpRuleToTerraform = eventhubNamespaceNetworkRulesetsIpRuleToTerraform;
function eventhubNamespaceNetworkRulesetsIpRuleToHclTerraform(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 = {
action: {
value: struct.action === undefined ? null : cdktf.stringToHclTerraform(struct.action),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ip_mask: {
value: struct.ipMask === undefined ? null : cdktf.stringToHclTerraform(struct.ipMask),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.eventhubNamespaceNetworkRulesetsIpRuleToHclTerraform = eventhubNamespaceNetworkRulesetsIpRuleToHclTerraform;
class EventhubNamespaceNetworkRulesetsIpRuleOutputReference 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._action !== undefined) {
hasAnyValues = true;
internalValueResult.action = this._action;
}
if (this._ipMask !== undefined) {
hasAnyValues = true;
internalValueResult.ipMask = this._ipMask;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._action = undefined;
this._ipMask = 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._action = value.action;
this._ipMask = value.ipMask;
}
}
get action() {
return this.getStringAttribute('action');
}
set action(value) {
this._action = value;
}
resetAction() {
this._action = undefined;
}
// Temporarily expose input value. Use with caution.
get actionInput() {
return this._action;
}
get ipMask() {
return this.getStringAttribute('ip_mask');
}
set ipMask(value) {
this._ipMask = value;
}
resetIpMask() {
this._ipMask = undefined;
}
// Temporarily expose input value. Use with caution.
get ipMaskInput() {
return this._ipMask;
}
}
exports.EventhubNamespaceNetworkRulesetsIpRuleOutputReference = EventhubNamespaceNetworkRulesetsIpRuleOutputReference;
_a = JSII_RTTI_SYMBOL_1;
EventhubNamespaceNetworkRulesetsIpRuleOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.eventhubNamespace.EventhubNamespaceNetworkRulesetsIpRuleOutputReference", version: "12.27.0" };
class EventhubNamespaceNetworkRulesetsIpRuleList 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 EventhubNamespaceNetworkRulesetsIpRuleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.EventhubNamespaceNetworkRulesetsIpRuleList = EventhubNamespaceNetworkRulesetsIpRuleList;
_b = JSII_RTTI_SYMBOL_1;
EventhubNamespaceNetworkRulesetsIpRuleList[_b] = { fqn: "@cdktf/provider-azurerm.eventhubNamespace.EventhubNamespaceNetworkRulesetsIpRuleList", version: "12.27.0" };
function eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToTerraform(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_virtual_network_service_endpoint: struct.ignoreMissingVirtualNetworkServiceEndpoint === undefined ? null : cdktf.booleanToTerraform(struct.ignoreMissingVirtualNetworkServiceEndpoint),
subnet_id: struct.subnetId === undefined ? null : cdktf.stringToTerraform(struct.subnetId),
};
}
exports.eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToTerraform = eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToTerraform;
function eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToHclTerraform(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_virtual_network_service_endpoint: {
value: struct.ignoreMissingVirtualNetworkServiceEndpoint === undefined ? null : cdktf.booleanToHclTerraform(struct.ignoreMissingVirtualNetworkServiceEndpoint),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
subnet_id: {
value: struct.subnetId === undefined ? null : 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.eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToHclTerraform = eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToHclTerraform;
class EventhubNamespaceNetworkRulesetsVirtualNetworkRuleOutputReference 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._ignoreMissingVirtualNetworkServiceEndpoint !== undefined) {
hasAnyValues = true;
internalValueResult.ignoreMissingVirtualNetworkServiceEndpoint = this._ignoreMissingVirtualNetworkServiceEndpoint;
}
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._ignoreMissingVirtualNetworkServiceEndpoint = 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._ignoreMissingVirtualNetworkServiceEndpoint = value.ignoreMissingVirtualNetworkServiceEndpoint;
this._subnetId = value.subnetId;
}
}
get ignoreMissingVirtualNetworkServiceEndpoint() {
return this.getBooleanAttribute('ignore_missing_virtual_network_service_endpoint');
}
set ignoreMissingVirtualNetworkServiceEndpoint(value) {
this._ignoreMissingVirtualNetworkServiceEndpoint = value;
}
resetIgnoreMissingVirtualNetworkServiceEndpoint() {
this._ignoreMissingVirtualNetworkServiceEndpoint = undefined;
}
// Temporarily expose input value. Use with caution.
get ignoreMissingVirtualNetworkServiceEndpointInput() {
return this._ignoreMissingVirtualNetworkServiceEndpoint;
}
get subnetId() {
return this.getStringAttribute('subnet_id');
}
set subnetId(value) {
this._subnetId = value;
}
resetSubnetId() {
this._subnetId = undefined;
}
// Temporarily expose input value. Use with caution.
get subnetIdInput() {
return this._subnetId;
}
}
exports.EventhubNamespaceNetworkRulesetsVirtualNetworkRuleOutputReference = EventhubNamespaceNetworkRulesetsVirtualNetworkRuleOutputReference;
_c = JSII_RTTI_SYMBOL_1;
EventhubNamespaceNetworkRulesetsVirtualNetworkRuleOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.eventhubNamespace.EventhubNamespaceNetworkRulesetsVirtualNetworkRuleOutputReference", version: "12.27.0" };
class EventhubNamespaceNetworkRulesetsVirtualNetworkRuleList 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 EventhubNamespaceNetworkRulesetsVirtualNetworkRuleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.EventhubNamespaceNetworkRulesetsVirtualNetworkRuleList = EventhubNamespaceNetworkRulesetsVirtualNetworkRuleList;
_d = JSII_RTTI_SYMBOL_1;
EventhubNamespaceNetworkRulesetsVirtualNetworkRuleList[_d] = { fqn: "@cdktf/provider-azurerm.eventhubNamespace.EventhubNamespaceNetworkRulesetsVirtualNetworkRuleList", version: "12.27.0" };
function eventhubNamespaceNetworkRulesetsToTerraform(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: struct.defaultAction === undefined ? null : cdktf.stringToTerraform(struct.defaultAction),
ip_rule: struct.ipRule === undefined ? null : cdktf.listMapper(eventhubNamespaceNetworkRulesetsIpRuleToTerraform, false)(struct.ipRule),
public_network_access_enabled: struct.publicNetworkAccessEnabled === undefined ? null : cdktf.booleanToTerraform(struct.publicNetworkAccessEnabled),
trusted_service_access_enabled: struct.trustedServiceAccessEnabled === undefined ? null : cdktf.booleanToTerraform(struct.trustedServiceAccessEnabled),
virtual_network_rule: struct.virtualNetworkRule === undefined ? null : cdktf.listMapper(eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToTerraform, false)(struct.virtualNetworkRule),
};
}
exports.eventhubNamespaceNetworkRulesetsToTerraform = eventhubNamespaceNetworkRulesetsToTerraform;
function eventhubNamespaceNetworkRulesetsToHclTerraform(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: struct.defaultAction === undefined ? null : cdktf.stringToHclTerraform(struct.defaultAction),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ip_rule: {
value: struct.ipRule === undefined ? null : cdktf.listMapperHcl(eventhubNamespaceNetworkRulesetsIpRuleToHclTerraform, false)(struct.ipRule),
isBlock: true,
type: "list",
storageClassType: "EventhubNamespaceNetworkRulesetsIpRuleList",
},
public_network_access_enabled: {
value: struct.publicNetworkAccessEnabled === undefined ? null : cdktf.booleanToHclTerraform(struct.publicNetworkAccessEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
trusted_service_access_enabled: {
value: struct.trustedServiceAccessEnabled === undefined ? null : cdktf.booleanToHclTerraform(struct.trustedServiceAccessEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
virtual_network_rule: {
value: struct.virtualNetworkRule === undefined ? null : cdktf.listMapperHcl(eventhubNamespaceNetworkRulesetsVirtualNetworkRuleToHclTerraform, false)(struct.virtualNetworkRule),
isBlock: true,
type: "set",
storageClassType: "EventhubNamespaceNetworkRulesetsVirtualNetworkRuleList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.eventhubNamespaceNetworkRulesetsToHclTerraform = eventhubNamespaceNetworkRulesetsToHclTerraform;
class EventhubNamespaceNetworkRulesetsOutputReference 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;
// ip_rule - computed: true, optional: true, required: false
this._ipRule = new EventhubNamespaceNetworkRulesetsIpRuleList(this, "ip_rule", false);
// virtual_network_rule - computed: true, optional: true, required: false
this._virtualNetworkRule = new EventhubNamespaceNetworkRulesetsVirtualNetworkRuleList(this, "virtual_network_rule", true);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._defaultAction !== undefined) {
hasAnyValues = true;
internalValueResult.defaultAction = this._defaultAction;
}
if (this._ipRule?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ipRule = this._ipRule?.internalValue;
}
if (this._publicNetworkAccessEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.publicNetworkAccessEnabled = this._publicNetworkAccessEnabled;
}
if (this._trustedServiceAccessEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.trustedServiceAccessEnabled = this._trustedServiceAccessEnabled;
}
if (this._virtualNetworkRule?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.virtualNetworkRule = this._virtualNetworkRule?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._defaultAction = undefined;
this._ipRule.internalValue = undefined;
this._publicNetworkAccessEnabled = undefined;
this._trustedServiceAccessEnabled = undefined;
this._virtualNetworkRule.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._defaultAction = value.defaultAction;
this._ipRule.internalValue = value.ipRule;
this._publicNetworkAccessEnabled = value.publicNetworkAccessEnabled;
this._trustedServiceAccessEnabled = value.trustedServiceAccessEnabled;
this._virtualNetworkRule.internalValue = value.virtualNetworkRule;
}
}
get defaultAction() {
return this.getStringAttribute('default_action');
}
set defaultAction(value) {
this._defaultAction = value;
}
resetDefaultAction() {
this._defaultAction = undefined;
}
// Temporarily expose input value. Use with caution.
get defaultActionInput() {
return this._defaultAction;
}
get ipRule() {
return this._ipRule;
}
putIpRule(value) {
this._ipRule.internalValue = value;
}
resetIpRule() {
this._ipRule.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ipRuleInput() {
return this._ipRule.internalValue;
}
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 trustedServiceAccessEnabled() {
return this.getBooleanAttribute('trusted_service_access_enabled');
}
set trustedServiceAccessEnabled(value) {
this._trustedServiceAccessEnabled = value;
}
resetTrustedServiceAccessEnabled() {
this._trustedServiceAccessEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get trustedServiceAccessEnabledInput() {
return this._trustedServiceAccessEnabled;
}
get virtualNetworkRule() {
return this._virtualNetworkRule;
}
putVirtualNetworkRule(value) {
this._virtualNetworkRule.internalValue = value;
}
resetVirtualNetworkRule() {
this._virtualNetworkRule.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get virtualNetworkRuleInput() {
return this._virtualNetworkRule.internalValue;
}
}
exports.EventhubNamespaceNetworkRulesetsOutputReference = EventhubNamespaceNetworkRulesetsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
EventhubNamespaceNetworkRulesetsOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.eventhubNamespace.EventhubNamespaceNetworkRulesetsOutputReference", version: "12.27.0" };
class EventhubNamespaceNetworkRulesetsList 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 EventhubNamespaceNetworkRulesetsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.EventhubNamespaceNetworkRulesetsList = EventhubNamespaceNetworkRulesetsList;
_f = JSII_RTTI_SYMBOL_1;
EventhubNamespaceNetworkRulesetsList[_f] = { fqn: "@cdktf/provider-azurerm.eventhubNamespace.EventhubNamespaceNetworkRulesetsList", version: "12.27.0" };
function eventhubNamespaceIdentityToTerraform(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.eventhubNamespaceIdentityToTerraform = eventhubNamespaceIdentityToTerraform;
function eventhubNamespaceIdentityToHclTerraform(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.eventhubNamespaceIdentityToHclTerraform = eventhubNamespaceIdentityToHclTerraform;
class EventhubNamespaceIdentityOutputReference 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.EventhubNamespaceIdentityOutputReference = EventhubNamespaceIdentityOutputReference;
_g = JSII_RTTI_SYMBOL_1;
EventhubNamespaceIdentityOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.eventhubNamespace.EventhubNamespaceIdentityOutputReference", version: "12.27.0" };
function eventhubNamespaceTimeoutsToTerraform(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.eventhubNamespaceTimeoutsToTerraform = eventhubNamespaceTimeoutsToTerraform;
function eventhubNamespaceTimeoutsToHclTerraform(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.eventhubNamespaceTimeoutsToHclTerraform = eventhubNamespaceTimeoutsToHclTerraform;
class EventhubNamespaceTimeoutsOutputReference 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.EventhubNamespaceTimeoutsOutputReference = EventhubNamespaceTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
EventhubNamespaceTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.eventhubNamespace.EventhubNamespaceTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/eventhub_namespace azurerm_eventhub_namespace}
*/
class EventhubNamespace extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a EventhubNamespace 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 EventhubNamespace to import
* @param importFromId The id of the existing EventhubNamespace that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/eventhub_namespace#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the EventhubNamespace to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_eventhub_namespace", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/eventhub_namespace azurerm_eventhub_namespace} 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 EventhubNamespaceConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_eventhub_namespace',
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
});
// network_rulesets - computed: true, optional: true, required: false
this._networkRulesets = new EventhubNamespaceNetworkRulesetsList(this, "network_rulesets", false);
// identity - computed: false, optional: true, required: false
this._identity = new EventhubNamespaceIdentityOutputReference(this, "identity");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new EventhubNamespaceTimeoutsOutputReference(this, "timeouts");
this._autoInflateEnabled = config.autoInflateEnabled;
this._capacity = config.capacity;
this._dedicatedClusterId = config.dedicatedClusterId;
this._id = config.id;
this._localAuthenticationEnabled = config.localAuthenticationEnabled;
this._location = config.location;
this._maximumThroughputUnits = config.maximumThroughputUnits;
this._minimumTlsVersion = config.minimumTlsVersion;
this._name = config.name;
this._networkRulesets.internalValue = config.networkRulesets;
this._publicNetworkAccessEnabled = config.publicNetworkAccessEnabled;
this._resourceGroupName = config.resourceGroupName;
this._sku = config.sku;
this._tags = config.tags;
this._zoneRedundant = config.zoneRedundant;
this._identity.internalValue = config.identity;
this._timeouts.internalValue = config.timeouts;
}
get autoInflateEnabled() {
return this.getBooleanAttribute('auto_inflate_enabled');
}
set autoInflateEnabled(value) {
this._autoInflateEnabled = value;
}
resetAutoInflateEnabled() {
this._autoInflateEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get autoInflateEnabledInput() {
return this._autoInflateEnabled;
}
get capacity() {
return this.getNumberAttribute('capacity');
}
set capacity(value) {
this._capacity = value;
}
resetCapacity() {
this._capacity = undefined;
}
// Temporarily expose input value. Use with caution.
get capacityInput() {
return this._capacity;
}
get dedicatedClusterId() {
return this.getStringAttribute('dedicated_cluster_id');
}
set dedicatedClusterId(value) {
this._dedicatedClusterId = value;
}
resetDedicatedClusterId() {
this._dedicatedClusterId = undefined;
}
// Temporarily expose input value. Use with caution.
get dedicatedClusterIdInput() {
return this._dedicatedClusterId;
}
// default_primary_connection_string - computed: true, optional: false, required: false
get defaultPrimaryConnectionString() {
return this.getStringAttribute('default_primary_connection_string');
}
// default_primary_connection_string_alias - computed: true, optional: false, required: false
get defaultPrimaryConnectionStringAlias() {
return this.getStringAttribute('default_primary_connection_string_alias');
}
// default_primary_key - computed: true, optional: false, required: false
get defaultPrimaryKey() {
return this.getStringAttribute('default_primary_key');
}
// default_secondary_connection_string - computed: true, optional: false, required: false
get defaultSecondaryConnectionString() {
return this.getStringAttribute('default_secondary_connection_string');
}
// default_secondary_connection_string_alias - computed: true, optional: false, required: false
get defaultSecondaryConnectionStringAlias() {
return this.getStringAttribute('default_secondary_connection_string_alias');
}
// default_secondary_key - computed: true, optional: false, required: false
get defaultSecondaryKey() {
return this.getStringAttribute('default_secondary_key');
}
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 localAuthenticationEnabled() {
return this.getBooleanAttribute('local_authentication_enabled');
}
set localAuthenticationEnabled(value) {
this._localAuthenticationEnabled = value;
}
resetLocalAuthenticationEnabled() {
this._localAuthenticationEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get localAuthenticationEnabledInput() {
return this._localAuthenticationEnabled;
}
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 maximumThroughputUnits() {
return this.getNumberAttribute('maximum_throughput_units');
}
set maximumThroughputUnits(value) {
this._maximumThroughputUnits = value;
}
resetMaximumThroughputUnits() {
this._maximumThroughputUnits = undefined;
}
// Temporarily expose input value. Use with caution.
get maximumThroughputUnitsInput() {
return this._maximumThroughputUnits;
}
get minimumTlsVersion() {
return this.getStringAttribute('minimum_tls_version');
}
set minimumTlsVersion(value) {
this._minimumTlsVersion = value;
}
resetMinimumTlsVersion() {
this._minimumTlsVersion = undefined;
}
// Temporarily expose input value. Use with caution.
get minimumTlsVersionInput() {
return this._minimumTlsVersion;
}
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 networkRulesets() {
return this._networkRulesets;
}
putNetworkRulesets(value) {
this._networkRulesets.internalValue = value;
}
resetNetworkRulesets() {
this._networkRulesets.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get networkRulesetsInput() {
return this._networkRulesets.internalValue;
}
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 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;
}
get sku() {
return this.getStringAttribute('sku');
}
set sku(value) {
this._sku = value;
}
// Temporarily expose input value. Use with caution.
get skuInput() {
return this._sku;
}
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 zoneRedundant() {
return this.getBooleanAttribute('zone_redundant');
}
set zoneRedundant(value) {
this._zoneRedundant = value;
}
resetZoneRedundant() {
this._zoneRedundant = undefined;
}
// Temporarily expose input value. Use with caution.
get zoneRedundantInput() {
return this._zoneRedundant;
}
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 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 {
auto_inflate_enabled: cdktf.booleanToTerraform(this._autoInflateEnabled),
capacity: cdktf.numberToTerraform(this._capacity),
dedicated_cluster_id: cdktf.stringToTerraform(this._dedicatedClusterId),
id: cdktf.stringToTerraform(this._id),
local_authentication_enabled: cdktf.booleanToTerraform(this._localAuthenticationEnabled),
location: cdktf.stringToTerraform(this._location),
maximum_throughput_units: cdktf.numberToTerraform(this._maximumThroughputUnits),
minimum_tls_version: cdktf.stringToTerraform(this._minimumTlsVersion),
name: cdktf.stringToTerraform(this._name),
network_rulesets: cdktf.listMapper(eventhubNamespaceNetworkRulesetsToTerraform, false)(this._networkRulesets.internalValue),
public_network_access_enabled: cdktf.booleanToTerraform(this._publicNetworkAccessEnabled),
resource_group_name: cdktf.stringToTerraform(this._resourceGroupName),
sku: cdktf.stringToTerraform(this._sku),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
zone_redundant: cdktf.booleanToTerraform(this._zoneRedundant),
identity: eventhubNamespaceIdentityToTerraform(this._identity.internalValue),
timeouts: eventhubNamespaceTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
auto_inflate_enabled: {
value: cdktf.booleanToHclTerraform(this._autoInflateEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
capacity: {
value: cdktf.numberToHclTerraform(this._capacity),
isBlock: false,
type: "simple",
storageClassType: "number",
},
dedicated_cluster_id: {
value: cdktf.stringToHclTerraform(this._dedicatedClusterId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
local_authentication_enabled: {
value: cdktf.booleanToHclTerraform(this._localAuthenticationEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
location: {
value: cdktf.stringToHclTerraform(this._location),
isBlock: false,
type: "simple",
storageClassType: "string",
},
maximum_throughput_units: {
value: cdktf.numberToHclTerraform(this._maximumThroughputUnits),
isBlock: false,
type: "simple",
storageClassType: "number",
},
minimum_tls_version: {
value: cdktf.stringToHclTerraform(this._minimumTlsVersion),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
network_rulesets: {
value: cdktf.listMapperHcl(eventhubNamespaceNetworkRulesetsToHclTerraform, false)(this._networkRulesets.internalValue),
isBlock: true,
type: "list",
storageClassType: "EventhubNamespaceNetworkRulesetsList",
},
public_network_access_enabled: {
value: cdktf.booleanToHclTerraform(this._publicNetworkAccessEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
resource_group_name: {
value: cdktf.stringToHclTerraform(this._resourceGroupName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
sku: {
value: cdktf.stringToHclTerraform(this._sku),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
zone_redundant: {
value: cdktf.booleanToHclTerraform(this._zoneRedundant),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
identity: {
value: eventhubNamespaceIdentityToHclTerraform(this._identity.internalValue),