UNPKG

@cdktf/provider-azurerm

Version:

Prebuilt azurerm Provider for Terraform CDK (cdktf)

1,139 lines 319 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; Object.defineProperty(exports, "__esModule", { value: true }); exports.MonitorAutoscaleSetting = exports.MonitorAutoscaleSettingTimeoutsOutputReference = exports.monitorAutoscaleSettingTimeoutsToHclTerraform = exports.monitorAutoscaleSettingTimeoutsToTerraform = exports.MonitorAutoscaleSettingProfileList = exports.MonitorAutoscaleSettingProfileOutputReference = exports.monitorAutoscaleSettingProfileToHclTerraform = exports.monitorAutoscaleSettingProfileToTerraform = exports.MonitorAutoscaleSettingProfileRuleList = exports.MonitorAutoscaleSettingProfileRuleOutputReference = exports.monitorAutoscaleSettingProfileRuleToHclTerraform = exports.monitorAutoscaleSettingProfileRuleToTerraform = exports.MonitorAutoscaleSettingProfileRuleScaleActionOutputReference = exports.monitorAutoscaleSettingProfileRuleScaleActionToHclTerraform = exports.monitorAutoscaleSettingProfileRuleScaleActionToTerraform = exports.MonitorAutoscaleSettingProfileRuleMetricTriggerOutputReference = exports.monitorAutoscaleSettingProfileRuleMetricTriggerToHclTerraform = exports.monitorAutoscaleSettingProfileRuleMetricTriggerToTerraform = exports.MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsList = exports.MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsOutputReference = exports.monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToHclTerraform = exports.monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToTerraform = exports.MonitorAutoscaleSettingProfileRecurrenceOutputReference = exports.monitorAutoscaleSettingProfileRecurrenceToHclTerraform = exports.monitorAutoscaleSettingProfileRecurrenceToTerraform = exports.MonitorAutoscaleSettingProfileFixedDateOutputReference = exports.monitorAutoscaleSettingProfileFixedDateToHclTerraform = exports.monitorAutoscaleSettingProfileFixedDateToTerraform = exports.MonitorAutoscaleSettingProfileCapacityOutputReference = exports.monitorAutoscaleSettingProfileCapacityToHclTerraform = exports.monitorAutoscaleSettingProfileCapacityToTerraform = exports.MonitorAutoscaleSettingPredictiveOutputReference = exports.monitorAutoscaleSettingPredictiveToHclTerraform = exports.monitorAutoscaleSettingPredictiveToTerraform = exports.MonitorAutoscaleSettingNotificationOutputReference = exports.monitorAutoscaleSettingNotificationToHclTerraform = exports.monitorAutoscaleSettingNotificationToTerraform = exports.MonitorAutoscaleSettingNotificationWebhookList = exports.MonitorAutoscaleSettingNotificationWebhookOutputReference = exports.monitorAutoscaleSettingNotificationWebhookToHclTerraform = exports.monitorAutoscaleSettingNotificationWebhookToTerraform = exports.MonitorAutoscaleSettingNotificationEmailOutputReference = exports.monitorAutoscaleSettingNotificationEmailToHclTerraform = exports.monitorAutoscaleSettingNotificationEmailToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function monitorAutoscaleSettingNotificationEmailToTerraform(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 { custom_emails: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.customEmails), send_to_subscription_administrator: cdktf.booleanToTerraform(struct.sendToSubscriptionAdministrator), send_to_subscription_co_administrator: cdktf.booleanToTerraform(struct.sendToSubscriptionCoAdministrator), }; } exports.monitorAutoscaleSettingNotificationEmailToTerraform = monitorAutoscaleSettingNotificationEmailToTerraform; function monitorAutoscaleSettingNotificationEmailToHclTerraform(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 = { custom_emails: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.customEmails), isBlock: false, type: "list", storageClassType: "stringList", }, send_to_subscription_administrator: { value: cdktf.booleanToHclTerraform(struct.sendToSubscriptionAdministrator), isBlock: false, type: "simple", storageClassType: "boolean", }, send_to_subscription_co_administrator: { value: cdktf.booleanToHclTerraform(struct.sendToSubscriptionCoAdministrator), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorAutoscaleSettingNotificationEmailToHclTerraform = monitorAutoscaleSettingNotificationEmailToHclTerraform; class MonitorAutoscaleSettingNotificationEmailOutputReference 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._customEmails !== undefined) { hasAnyValues = true; internalValueResult.customEmails = this._customEmails; } if (this._sendToSubscriptionAdministrator !== undefined) { hasAnyValues = true; internalValueResult.sendToSubscriptionAdministrator = this._sendToSubscriptionAdministrator; } if (this._sendToSubscriptionCoAdministrator !== undefined) { hasAnyValues = true; internalValueResult.sendToSubscriptionCoAdministrator = this._sendToSubscriptionCoAdministrator; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._customEmails = undefined; this._sendToSubscriptionAdministrator = undefined; this._sendToSubscriptionCoAdministrator = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._customEmails = value.customEmails; this._sendToSubscriptionAdministrator = value.sendToSubscriptionAdministrator; this._sendToSubscriptionCoAdministrator = value.sendToSubscriptionCoAdministrator; } } get customEmails() { return this.getListAttribute('custom_emails'); } set customEmails(value) { this._customEmails = value; } resetCustomEmails() { this._customEmails = undefined; } // Temporarily expose input value. Use with caution. get customEmailsInput() { return this._customEmails; } get sendToSubscriptionAdministrator() { return this.getBooleanAttribute('send_to_subscription_administrator'); } set sendToSubscriptionAdministrator(value) { this._sendToSubscriptionAdministrator = value; } resetSendToSubscriptionAdministrator() { this._sendToSubscriptionAdministrator = undefined; } // Temporarily expose input value. Use with caution. get sendToSubscriptionAdministratorInput() { return this._sendToSubscriptionAdministrator; } get sendToSubscriptionCoAdministrator() { return this.getBooleanAttribute('send_to_subscription_co_administrator'); } set sendToSubscriptionCoAdministrator(value) { this._sendToSubscriptionCoAdministrator = value; } resetSendToSubscriptionCoAdministrator() { this._sendToSubscriptionCoAdministrator = undefined; } // Temporarily expose input value. Use with caution. get sendToSubscriptionCoAdministratorInput() { return this._sendToSubscriptionCoAdministrator; } } exports.MonitorAutoscaleSettingNotificationEmailOutputReference = MonitorAutoscaleSettingNotificationEmailOutputReference; _a = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingNotificationEmailOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingNotificationEmailOutputReference", version: "12.27.0" }; function monitorAutoscaleSettingNotificationWebhookToTerraform(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 { properties: cdktf.hashMapper(cdktf.stringToTerraform)(struct.properties), service_uri: cdktf.stringToTerraform(struct.serviceUri), }; } exports.monitorAutoscaleSettingNotificationWebhookToTerraform = monitorAutoscaleSettingNotificationWebhookToTerraform; function monitorAutoscaleSettingNotificationWebhookToHclTerraform(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 = { properties: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.properties), isBlock: false, type: "map", storageClassType: "stringMap", }, service_uri: { value: cdktf.stringToHclTerraform(struct.serviceUri), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorAutoscaleSettingNotificationWebhookToHclTerraform = monitorAutoscaleSettingNotificationWebhookToHclTerraform; class MonitorAutoscaleSettingNotificationWebhookOutputReference 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._properties !== undefined) { hasAnyValues = true; internalValueResult.properties = this._properties; } if (this._serviceUri !== undefined) { hasAnyValues = true; internalValueResult.serviceUri = this._serviceUri; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._properties = undefined; this._serviceUri = 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._properties = value.properties; this._serviceUri = value.serviceUri; } } get properties() { return this.getStringMapAttribute('properties'); } set properties(value) { this._properties = value; } resetProperties() { this._properties = undefined; } // Temporarily expose input value. Use with caution. get propertiesInput() { return this._properties; } get serviceUri() { return this.getStringAttribute('service_uri'); } set serviceUri(value) { this._serviceUri = value; } // Temporarily expose input value. Use with caution. get serviceUriInput() { return this._serviceUri; } } exports.MonitorAutoscaleSettingNotificationWebhookOutputReference = MonitorAutoscaleSettingNotificationWebhookOutputReference; _b = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingNotificationWebhookOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingNotificationWebhookOutputReference", version: "12.27.0" }; class MonitorAutoscaleSettingNotificationWebhookList 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 MonitorAutoscaleSettingNotificationWebhookOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.MonitorAutoscaleSettingNotificationWebhookList = MonitorAutoscaleSettingNotificationWebhookList; _c = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingNotificationWebhookList[_c] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingNotificationWebhookList", version: "12.27.0" }; function monitorAutoscaleSettingNotificationToTerraform(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 { email: monitorAutoscaleSettingNotificationEmailToTerraform(struct.email), webhook: cdktf.listMapper(monitorAutoscaleSettingNotificationWebhookToTerraform, true)(struct.webhook), }; } exports.monitorAutoscaleSettingNotificationToTerraform = monitorAutoscaleSettingNotificationToTerraform; function monitorAutoscaleSettingNotificationToHclTerraform(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 = { email: { value: monitorAutoscaleSettingNotificationEmailToHclTerraform(struct.email), isBlock: true, type: "list", storageClassType: "MonitorAutoscaleSettingNotificationEmailList", }, webhook: { value: cdktf.listMapperHcl(monitorAutoscaleSettingNotificationWebhookToHclTerraform, true)(struct.webhook), isBlock: true, type: "list", storageClassType: "MonitorAutoscaleSettingNotificationWebhookList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorAutoscaleSettingNotificationToHclTerraform = monitorAutoscaleSettingNotificationToHclTerraform; class MonitorAutoscaleSettingNotificationOutputReference 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; // email - computed: false, optional: true, required: false this._email = new MonitorAutoscaleSettingNotificationEmailOutputReference(this, "email"); // webhook - computed: false, optional: true, required: false this._webhook = new MonitorAutoscaleSettingNotificationWebhookList(this, "webhook", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._email?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.email = this._email?.internalValue; } if (this._webhook?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.webhook = this._webhook?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._email.internalValue = undefined; this._webhook.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._email.internalValue = value.email; this._webhook.internalValue = value.webhook; } } get email() { return this._email; } putEmail(value) { this._email.internalValue = value; } resetEmail() { this._email.internalValue = undefined; } // Temporarily expose input value. Use with caution. get emailInput() { return this._email.internalValue; } get webhook() { return this._webhook; } putWebhook(value) { this._webhook.internalValue = value; } resetWebhook() { this._webhook.internalValue = undefined; } // Temporarily expose input value. Use with caution. get webhookInput() { return this._webhook.internalValue; } } exports.MonitorAutoscaleSettingNotificationOutputReference = MonitorAutoscaleSettingNotificationOutputReference; _d = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingNotificationOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingNotificationOutputReference", version: "12.27.0" }; function monitorAutoscaleSettingPredictiveToTerraform(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 { look_ahead_time: cdktf.stringToTerraform(struct.lookAheadTime), scale_mode: cdktf.stringToTerraform(struct.scaleMode), }; } exports.monitorAutoscaleSettingPredictiveToTerraform = monitorAutoscaleSettingPredictiveToTerraform; function monitorAutoscaleSettingPredictiveToHclTerraform(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 = { look_ahead_time: { value: cdktf.stringToHclTerraform(struct.lookAheadTime), isBlock: false, type: "simple", storageClassType: "string", }, scale_mode: { value: cdktf.stringToHclTerraform(struct.scaleMode), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorAutoscaleSettingPredictiveToHclTerraform = monitorAutoscaleSettingPredictiveToHclTerraform; class MonitorAutoscaleSettingPredictiveOutputReference 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._lookAheadTime !== undefined) { hasAnyValues = true; internalValueResult.lookAheadTime = this._lookAheadTime; } if (this._scaleMode !== undefined) { hasAnyValues = true; internalValueResult.scaleMode = this._scaleMode; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._lookAheadTime = undefined; this._scaleMode = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._lookAheadTime = value.lookAheadTime; this._scaleMode = value.scaleMode; } } get lookAheadTime() { return this.getStringAttribute('look_ahead_time'); } set lookAheadTime(value) { this._lookAheadTime = value; } resetLookAheadTime() { this._lookAheadTime = undefined; } // Temporarily expose input value. Use with caution. get lookAheadTimeInput() { return this._lookAheadTime; } get scaleMode() { return this.getStringAttribute('scale_mode'); } set scaleMode(value) { this._scaleMode = value; } // Temporarily expose input value. Use with caution. get scaleModeInput() { return this._scaleMode; } } exports.MonitorAutoscaleSettingPredictiveOutputReference = MonitorAutoscaleSettingPredictiveOutputReference; _e = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingPredictiveOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingPredictiveOutputReference", version: "12.27.0" }; function monitorAutoscaleSettingProfileCapacityToTerraform(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: cdktf.numberToTerraform(struct.default), maximum: cdktf.numberToTerraform(struct.maximum), minimum: cdktf.numberToTerraform(struct.minimum), }; } exports.monitorAutoscaleSettingProfileCapacityToTerraform = monitorAutoscaleSettingProfileCapacityToTerraform; function monitorAutoscaleSettingProfileCapacityToHclTerraform(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: { value: cdktf.numberToHclTerraform(struct.default), isBlock: false, type: "simple", storageClassType: "number", }, maximum: { value: cdktf.numberToHclTerraform(struct.maximum), isBlock: false, type: "simple", storageClassType: "number", }, minimum: { value: cdktf.numberToHclTerraform(struct.minimum), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorAutoscaleSettingProfileCapacityToHclTerraform = monitorAutoscaleSettingProfileCapacityToHclTerraform; class MonitorAutoscaleSettingProfileCapacityOutputReference 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._default !== undefined) { hasAnyValues = true; internalValueResult.default = this._default; } if (this._maximum !== undefined) { hasAnyValues = true; internalValueResult.maximum = this._maximum; } if (this._minimum !== undefined) { hasAnyValues = true; internalValueResult.minimum = this._minimum; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._default = undefined; this._maximum = undefined; this._minimum = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._default = value.default; this._maximum = value.maximum; this._minimum = value.minimum; } } get default() { return this.getNumberAttribute('default'); } set default(value) { this._default = value; } // Temporarily expose input value. Use with caution. get defaultInput() { return this._default; } get maximum() { return this.getNumberAttribute('maximum'); } set maximum(value) { this._maximum = value; } // Temporarily expose input value. Use with caution. get maximumInput() { return this._maximum; } get minimum() { return this.getNumberAttribute('minimum'); } set minimum(value) { this._minimum = value; } // Temporarily expose input value. Use with caution. get minimumInput() { return this._minimum; } } exports.MonitorAutoscaleSettingProfileCapacityOutputReference = MonitorAutoscaleSettingProfileCapacityOutputReference; _f = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingProfileCapacityOutputReference[_f] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingProfileCapacityOutputReference", version: "12.27.0" }; function monitorAutoscaleSettingProfileFixedDateToTerraform(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 { end: cdktf.stringToTerraform(struct.end), start: cdktf.stringToTerraform(struct.start), timezone: cdktf.stringToTerraform(struct.timezone), }; } exports.monitorAutoscaleSettingProfileFixedDateToTerraform = monitorAutoscaleSettingProfileFixedDateToTerraform; function monitorAutoscaleSettingProfileFixedDateToHclTerraform(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 = { end: { value: cdktf.stringToHclTerraform(struct.end), isBlock: false, type: "simple", storageClassType: "string", }, start: { value: cdktf.stringToHclTerraform(struct.start), isBlock: false, type: "simple", storageClassType: "string", }, timezone: { value: cdktf.stringToHclTerraform(struct.timezone), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorAutoscaleSettingProfileFixedDateToHclTerraform = monitorAutoscaleSettingProfileFixedDateToHclTerraform; class MonitorAutoscaleSettingProfileFixedDateOutputReference 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._end !== undefined) { hasAnyValues = true; internalValueResult.end = this._end; } if (this._start !== undefined) { hasAnyValues = true; internalValueResult.start = this._start; } if (this._timezone !== undefined) { hasAnyValues = true; internalValueResult.timezone = this._timezone; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._end = undefined; this._start = undefined; this._timezone = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._end = value.end; this._start = value.start; this._timezone = value.timezone; } } get end() { return this.getStringAttribute('end'); } set end(value) { this._end = value; } // Temporarily expose input value. Use with caution. get endInput() { return this._end; } get start() { return this.getStringAttribute('start'); } set start(value) { this._start = value; } // Temporarily expose input value. Use with caution. get startInput() { return this._start; } get timezone() { return this.getStringAttribute('timezone'); } set timezone(value) { this._timezone = value; } resetTimezone() { this._timezone = undefined; } // Temporarily expose input value. Use with caution. get timezoneInput() { return this._timezone; } } exports.MonitorAutoscaleSettingProfileFixedDateOutputReference = MonitorAutoscaleSettingProfileFixedDateOutputReference; _g = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingProfileFixedDateOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingProfileFixedDateOutputReference", version: "12.27.0" }; function monitorAutoscaleSettingProfileRecurrenceToTerraform(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 { days: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.days), hours: cdktf.listMapper(cdktf.numberToTerraform, false)(struct.hours), minutes: cdktf.listMapper(cdktf.numberToTerraform, false)(struct.minutes), timezone: cdktf.stringToTerraform(struct.timezone), }; } exports.monitorAutoscaleSettingProfileRecurrenceToTerraform = monitorAutoscaleSettingProfileRecurrenceToTerraform; function monitorAutoscaleSettingProfileRecurrenceToHclTerraform(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 = { days: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.days), isBlock: false, type: "list", storageClassType: "stringList", }, hours: { value: cdktf.listMapperHcl(cdktf.numberToHclTerraform, false)(struct.hours), isBlock: false, type: "list", storageClassType: "numberList", }, minutes: { value: cdktf.listMapperHcl(cdktf.numberToHclTerraform, false)(struct.minutes), isBlock: false, type: "list", storageClassType: "numberList", }, timezone: { value: cdktf.stringToHclTerraform(struct.timezone), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorAutoscaleSettingProfileRecurrenceToHclTerraform = monitorAutoscaleSettingProfileRecurrenceToHclTerraform; class MonitorAutoscaleSettingProfileRecurrenceOutputReference 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._days !== undefined) { hasAnyValues = true; internalValueResult.days = this._days; } if (this._hours !== undefined) { hasAnyValues = true; internalValueResult.hours = this._hours; } if (this._minutes !== undefined) { hasAnyValues = true; internalValueResult.minutes = this._minutes; } if (this._timezone !== undefined) { hasAnyValues = true; internalValueResult.timezone = this._timezone; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._days = undefined; this._hours = undefined; this._minutes = undefined; this._timezone = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._days = value.days; this._hours = value.hours; this._minutes = value.minutes; this._timezone = value.timezone; } } get days() { return this.getListAttribute('days'); } set days(value) { this._days = value; } // Temporarily expose input value. Use with caution. get daysInput() { return this._days; } get hours() { return this.getNumberListAttribute('hours'); } set hours(value) { this._hours = value; } // Temporarily expose input value. Use with caution. get hoursInput() { return this._hours; } get minutes() { return this.getNumberListAttribute('minutes'); } set minutes(value) { this._minutes = value; } // Temporarily expose input value. Use with caution. get minutesInput() { return this._minutes; } get timezone() { return this.getStringAttribute('timezone'); } set timezone(value) { this._timezone = value; } resetTimezone() { this._timezone = undefined; } // Temporarily expose input value. Use with caution. get timezoneInput() { return this._timezone; } } exports.MonitorAutoscaleSettingProfileRecurrenceOutputReference = MonitorAutoscaleSettingProfileRecurrenceOutputReference; _h = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingProfileRecurrenceOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingProfileRecurrenceOutputReference", version: "12.27.0" }; function monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToTerraform(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), operator: cdktf.stringToTerraform(struct.operator), values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values), }; } exports.monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToTerraform = monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToTerraform; function monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToHclTerraform(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", }, operator: { value: cdktf.stringToHclTerraform(struct.operator), isBlock: false, type: "simple", storageClassType: "string", }, values: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.values), isBlock: false, type: "list", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToHclTerraform = monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToHclTerraform; class MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsOutputReference 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._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } 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._name = 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._name = value.name; this._operator = value.operator; this._values = value.values; } } 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 operator() { return this.getStringAttribute('operator'); } set operator(value) { this._operator = value; } // Temporarily expose input value. Use with caution. get operatorInput() { return this._operator; } get values() { return this.getListAttribute('values'); } set values(value) { this._values = value; } // Temporarily expose input value. Use with caution. get valuesInput() { return this._values; } } exports.MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsOutputReference = MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsOutputReference; _j = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsOutputReference[_j] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsOutputReference", version: "12.27.0" }; class MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsList 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 MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsList = MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsList; _k = JSII_RTTI_SYMBOL_1; MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsList[_k] = { fqn: "@cdktf/provider-azurerm.monitorAutoscaleSetting.MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsList", version: "12.27.0" }; function monitorAutoscaleSettingProfileRuleMetricTriggerToTerraform(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 { divide_by_instance_count: cdktf.booleanToTerraform(struct.divideByInstanceCount), metric_name: cdktf.stringToTerraform(struct.metricName), metric_namespace: cdktf.stringToTerraform(struct.metricNamespace), metric_resource_id: cdktf.stringToTerraform(struct.metricResourceId), operator: cdktf.stringToTerraform(struct.operator), statistic: cdktf.stringToTerraform(struct.statistic), threshold: cdktf.numberToTerraform(struct.threshold), time_aggregation: cdktf.stringToTerraform(struct.timeAggregation), time_grain: cdktf.stringToTerraform(struct.timeGrain), time_window: cdktf.stringToTerraform(struct.timeWindow), dimensions: cdktf.listMapper(monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToTerraform, true)(struct.dimensions), }; } exports.monitorAutoscaleSettingProfileRuleMetricTriggerToTerraform = monitorAutoscaleSettingProfileRuleMetricTriggerToTerraform; function monitorAutoscaleSettingProfileRuleMetricTriggerToHclTerraform(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 = { divide_by_instance_count: { value: cdktf.booleanToHclTerraform(struct.divideByInstanceCount), isBlock: false, type: "simple", storageClassType: "boolean", }, metric_name: { value: cdktf.stringToHclTerraform(struct.metricName), isBlock: false, type: "simple", storageClassType: "string", }, metric_namespace: { value: cdktf.stringToHclTerraform(struct.metricNamespace), isBlock: false, type: "simple", storageClassType: "string", }, metric_resource_id: { value: cdktf.stringToHclTerraform(struct.metricResourceId), isBlock: false, type: "simple", storageClassType: "string", }, operator: { value: cdktf.stringToHclTerraform(struct.operator), isBlock: false, type: "simple", storageClassType: "string", }, statistic: { value: cdktf.stringToHclTerraform(struct.statistic), isBlock: false, type: "simple", storageClassType: "string", }, threshold: { value: cdktf.numberToHclTerraform(struct.threshold), isBlock: false, type: "simple", storageClassType: "number", }, time_aggregation: { value: cdktf.stringToHclTerraform(struct.timeAggregation), isBlock: false, type: "simple", storageClassType: "string", }, time_grain: { value: cdktf.stringToHclTerraform(struct.timeGrain), isBlock: false, type: "simple", storageClassType: "string", }, time_window: { value: cdktf.stringToHclTerraform(struct.timeWindow), isBlock: false, type: "simple", storageClassType: "string", }, dimensions: { value: cdktf.listMapperHcl(monitorAutoscaleSettingProfileRuleMetricTriggerDimensionsToHclTerraform, true)(struct.dimensions), isBlock: true, type: "list", storageClassType: "MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorAutoscaleSettingProfileRuleMetricTriggerToHclTerraform = monitorAutoscaleSettingProfileRuleMetricTriggerToHclTerraform; class MonitorAutoscaleSettingProfileRuleMetricTriggerOutputReference 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; // dimensions - computed: false, optional: true, required: false this._dimensions = new MonitorAutoscaleSettingProfileRuleMetricTriggerDimensionsList(this, "dimensions", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._divideByInstanceCount !== undefined) { hasAnyValues = true; internalValueResult.divideByInstanceCount = this._divideByInstanceCount; } if (this._metricName !== undefined) { hasAnyValues = true; internalValueResult.metricName = this._metricName; } if (this._metricNamespace !== undefined) { hasAnyValues = true; internalValueResult.metricNamespace = this._metricNamespace; } if (this._metricResourceId !== undefined) { hasAnyValues = true; internalValueResult.metricResourceId = this._met