@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
973 lines • 637 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MonitoringAlertPolicy = exports.MonitoringAlertPolicyTimeoutsOutputReference = exports.MonitoringAlertPolicyDocumentationOutputReference = exports.MonitoringAlertPolicyDocumentationLinksList = exports.MonitoringAlertPolicyDocumentationLinksOutputReference = exports.MonitoringAlertPolicyConditionsList = exports.MonitoringAlertPolicyConditionsOutputReference = exports.MonitoringAlertPolicyConditionsConditionThresholdOutputReference = exports.MonitoringAlertPolicyConditionsConditionThresholdTriggerOutputReference = exports.MonitoringAlertPolicyConditionsConditionThresholdForecastOptionsOutputReference = exports.MonitoringAlertPolicyConditionsConditionThresholdDenominatorAggregationsList = exports.MonitoringAlertPolicyConditionsConditionThresholdDenominatorAggregationsOutputReference = exports.MonitoringAlertPolicyConditionsConditionThresholdAggregationsList = exports.MonitoringAlertPolicyConditionsConditionThresholdAggregationsOutputReference = exports.MonitoringAlertPolicyConditionsConditionSqlOutputReference = exports.MonitoringAlertPolicyConditionsConditionSqlRowCountTestOutputReference = exports.MonitoringAlertPolicyConditionsConditionSqlMinutesOutputReference = exports.MonitoringAlertPolicyConditionsConditionSqlHourlyOutputReference = exports.MonitoringAlertPolicyConditionsConditionSqlDailyOutputReference = exports.MonitoringAlertPolicyConditionsConditionSqlDailyExecutionTimeOutputReference = exports.MonitoringAlertPolicyConditionsConditionSqlBooleanTestOutputReference = exports.MonitoringAlertPolicyConditionsConditionPrometheusQueryLanguageOutputReference = exports.MonitoringAlertPolicyConditionsConditionMonitoringQueryLanguageOutputReference = exports.MonitoringAlertPolicyConditionsConditionMonitoringQueryLanguageTriggerOutputReference = exports.MonitoringAlertPolicyConditionsConditionMatchedLogOutputReference = exports.MonitoringAlertPolicyConditionsConditionAbsentOutputReference = exports.MonitoringAlertPolicyConditionsConditionAbsentTriggerOutputReference = exports.MonitoringAlertPolicyConditionsConditionAbsentAggregationsList = exports.MonitoringAlertPolicyConditionsConditionAbsentAggregationsOutputReference = exports.MonitoringAlertPolicyAlertStrategyOutputReference = exports.MonitoringAlertPolicyAlertStrategyNotificationRateLimitOutputReference = exports.MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyList = exports.MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyOutputReference = exports.MonitoringAlertPolicyCreationRecordList = exports.MonitoringAlertPolicyCreationRecordOutputReference = void 0;
exports.monitoringAlertPolicyCreationRecordToTerraform = monitoringAlertPolicyCreationRecordToTerraform;
exports.monitoringAlertPolicyCreationRecordToHclTerraform = monitoringAlertPolicyCreationRecordToHclTerraform;
exports.monitoringAlertPolicyAlertStrategyNotificationChannelStrategyToTerraform = monitoringAlertPolicyAlertStrategyNotificationChannelStrategyToTerraform;
exports.monitoringAlertPolicyAlertStrategyNotificationChannelStrategyToHclTerraform = monitoringAlertPolicyAlertStrategyNotificationChannelStrategyToHclTerraform;
exports.monitoringAlertPolicyAlertStrategyNotificationRateLimitToTerraform = monitoringAlertPolicyAlertStrategyNotificationRateLimitToTerraform;
exports.monitoringAlertPolicyAlertStrategyNotificationRateLimitToHclTerraform = monitoringAlertPolicyAlertStrategyNotificationRateLimitToHclTerraform;
exports.monitoringAlertPolicyAlertStrategyToTerraform = monitoringAlertPolicyAlertStrategyToTerraform;
exports.monitoringAlertPolicyAlertStrategyToHclTerraform = monitoringAlertPolicyAlertStrategyToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionAbsentAggregationsToTerraform = monitoringAlertPolicyConditionsConditionAbsentAggregationsToTerraform;
exports.monitoringAlertPolicyConditionsConditionAbsentAggregationsToHclTerraform = monitoringAlertPolicyConditionsConditionAbsentAggregationsToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionAbsentTriggerToTerraform = monitoringAlertPolicyConditionsConditionAbsentTriggerToTerraform;
exports.monitoringAlertPolicyConditionsConditionAbsentTriggerToHclTerraform = monitoringAlertPolicyConditionsConditionAbsentTriggerToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionAbsentToTerraform = monitoringAlertPolicyConditionsConditionAbsentToTerraform;
exports.monitoringAlertPolicyConditionsConditionAbsentToHclTerraform = monitoringAlertPolicyConditionsConditionAbsentToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionMatchedLogToTerraform = monitoringAlertPolicyConditionsConditionMatchedLogToTerraform;
exports.monitoringAlertPolicyConditionsConditionMatchedLogToHclTerraform = monitoringAlertPolicyConditionsConditionMatchedLogToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionMonitoringQueryLanguageTriggerToTerraform = monitoringAlertPolicyConditionsConditionMonitoringQueryLanguageTriggerToTerraform;
exports.monitoringAlertPolicyConditionsConditionMonitoringQueryLanguageTriggerToHclTerraform = monitoringAlertPolicyConditionsConditionMonitoringQueryLanguageTriggerToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionMonitoringQueryLanguageToTerraform = monitoringAlertPolicyConditionsConditionMonitoringQueryLanguageToTerraform;
exports.monitoringAlertPolicyConditionsConditionMonitoringQueryLanguageToHclTerraform = monitoringAlertPolicyConditionsConditionMonitoringQueryLanguageToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionPrometheusQueryLanguageToTerraform = monitoringAlertPolicyConditionsConditionPrometheusQueryLanguageToTerraform;
exports.monitoringAlertPolicyConditionsConditionPrometheusQueryLanguageToHclTerraform = monitoringAlertPolicyConditionsConditionPrometheusQueryLanguageToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlBooleanTestToTerraform = monitoringAlertPolicyConditionsConditionSqlBooleanTestToTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlBooleanTestToHclTerraform = monitoringAlertPolicyConditionsConditionSqlBooleanTestToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlDailyExecutionTimeToTerraform = monitoringAlertPolicyConditionsConditionSqlDailyExecutionTimeToTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlDailyExecutionTimeToHclTerraform = monitoringAlertPolicyConditionsConditionSqlDailyExecutionTimeToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlDailyToTerraform = monitoringAlertPolicyConditionsConditionSqlDailyToTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlDailyToHclTerraform = monitoringAlertPolicyConditionsConditionSqlDailyToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlHourlyToTerraform = monitoringAlertPolicyConditionsConditionSqlHourlyToTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlHourlyToHclTerraform = monitoringAlertPolicyConditionsConditionSqlHourlyToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlMinutesToTerraform = monitoringAlertPolicyConditionsConditionSqlMinutesToTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlMinutesToHclTerraform = monitoringAlertPolicyConditionsConditionSqlMinutesToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlRowCountTestToTerraform = monitoringAlertPolicyConditionsConditionSqlRowCountTestToTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlRowCountTestToHclTerraform = monitoringAlertPolicyConditionsConditionSqlRowCountTestToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlToTerraform = monitoringAlertPolicyConditionsConditionSqlToTerraform;
exports.monitoringAlertPolicyConditionsConditionSqlToHclTerraform = monitoringAlertPolicyConditionsConditionSqlToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdAggregationsToTerraform = monitoringAlertPolicyConditionsConditionThresholdAggregationsToTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdAggregationsToHclTerraform = monitoringAlertPolicyConditionsConditionThresholdAggregationsToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdDenominatorAggregationsToTerraform = monitoringAlertPolicyConditionsConditionThresholdDenominatorAggregationsToTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdDenominatorAggregationsToHclTerraform = monitoringAlertPolicyConditionsConditionThresholdDenominatorAggregationsToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdForecastOptionsToTerraform = monitoringAlertPolicyConditionsConditionThresholdForecastOptionsToTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdForecastOptionsToHclTerraform = monitoringAlertPolicyConditionsConditionThresholdForecastOptionsToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdTriggerToTerraform = monitoringAlertPolicyConditionsConditionThresholdTriggerToTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdTriggerToHclTerraform = monitoringAlertPolicyConditionsConditionThresholdTriggerToHclTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdToTerraform = monitoringAlertPolicyConditionsConditionThresholdToTerraform;
exports.monitoringAlertPolicyConditionsConditionThresholdToHclTerraform = monitoringAlertPolicyConditionsConditionThresholdToHclTerraform;
exports.monitoringAlertPolicyConditionsToTerraform = monitoringAlertPolicyConditionsToTerraform;
exports.monitoringAlertPolicyConditionsToHclTerraform = monitoringAlertPolicyConditionsToHclTerraform;
exports.monitoringAlertPolicyDocumentationLinksToTerraform = monitoringAlertPolicyDocumentationLinksToTerraform;
exports.monitoringAlertPolicyDocumentationLinksToHclTerraform = monitoringAlertPolicyDocumentationLinksToHclTerraform;
exports.monitoringAlertPolicyDocumentationToTerraform = monitoringAlertPolicyDocumentationToTerraform;
exports.monitoringAlertPolicyDocumentationToHclTerraform = monitoringAlertPolicyDocumentationToHclTerraform;
exports.monitoringAlertPolicyTimeoutsToTerraform = monitoringAlertPolicyTimeoutsToTerraform;
exports.monitoringAlertPolicyTimeoutsToHclTerraform = monitoringAlertPolicyTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function monitoringAlertPolicyCreationRecordToTerraform(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 {};
}
function monitoringAlertPolicyCreationRecordToHclTerraform(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 = {};
return attrs;
}
class MonitoringAlertPolicyCreationRecordOutputReference 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() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// mutate_time - computed: true, optional: false, required: false
get mutateTime() {
return this.getStringAttribute('mutate_time');
}
// mutated_by - computed: true, optional: false, required: false
get mutatedBy() {
return this.getStringAttribute('mutated_by');
}
}
exports.MonitoringAlertPolicyCreationRecordOutputReference = MonitoringAlertPolicyCreationRecordOutputReference;
_a = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyCreationRecordOutputReference[_a] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyCreationRecordOutputReference", version: "14.35.0" };
class MonitoringAlertPolicyCreationRecordList 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 MonitoringAlertPolicyCreationRecordOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MonitoringAlertPolicyCreationRecordList = MonitoringAlertPolicyCreationRecordList;
_b = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyCreationRecordList[_b] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyCreationRecordList", version: "14.35.0" };
function monitoringAlertPolicyAlertStrategyNotificationChannelStrategyToTerraform(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 {
notification_channel_names: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.notificationChannelNames),
renotify_interval: cdktf.stringToTerraform(struct.renotifyInterval),
};
}
function monitoringAlertPolicyAlertStrategyNotificationChannelStrategyToHclTerraform(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 = {
notification_channel_names: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.notificationChannelNames),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
renotify_interval: {
value: cdktf.stringToHclTerraform(struct.renotifyInterval),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyOutputReference 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._notificationChannelNames !== undefined) {
hasAnyValues = true;
internalValueResult.notificationChannelNames = this._notificationChannelNames;
}
if (this._renotifyInterval !== undefined) {
hasAnyValues = true;
internalValueResult.renotifyInterval = this._renotifyInterval;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._notificationChannelNames = undefined;
this._renotifyInterval = 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._notificationChannelNames = value.notificationChannelNames;
this._renotifyInterval = value.renotifyInterval;
}
}
get notificationChannelNames() {
return this.getListAttribute('notification_channel_names');
}
set notificationChannelNames(value) {
this._notificationChannelNames = value;
}
resetNotificationChannelNames() {
this._notificationChannelNames = undefined;
}
// Temporarily expose input value. Use with caution.
get notificationChannelNamesInput() {
return this._notificationChannelNames;
}
get renotifyInterval() {
return this.getStringAttribute('renotify_interval');
}
set renotifyInterval(value) {
this._renotifyInterval = value;
}
resetRenotifyInterval() {
this._renotifyInterval = undefined;
}
// Temporarily expose input value. Use with caution.
get renotifyIntervalInput() {
return this._renotifyInterval;
}
}
exports.MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyOutputReference = MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyOutputReference;
_c = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyOutputReference[_c] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyOutputReference", version: "14.35.0" };
class MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyList 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 MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyList = MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyList;
_d = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyList[_d] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyList", version: "14.35.0" };
function monitoringAlertPolicyAlertStrategyNotificationRateLimitToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
period: cdktf.stringToTerraform(struct.period),
};
}
function monitoringAlertPolicyAlertStrategyNotificationRateLimitToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
period: {
value: cdktf.stringToHclTerraform(struct.period),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringAlertPolicyAlertStrategyNotificationRateLimitOutputReference 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._period !== undefined) {
hasAnyValues = true;
internalValueResult.period = this._period;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._period = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._period = value.period;
}
}
get period() {
return this.getStringAttribute('period');
}
set period(value) {
this._period = value;
}
resetPeriod() {
this._period = undefined;
}
// Temporarily expose input value. Use with caution.
get periodInput() {
return this._period;
}
}
exports.MonitoringAlertPolicyAlertStrategyNotificationRateLimitOutputReference = MonitoringAlertPolicyAlertStrategyNotificationRateLimitOutputReference;
_e = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyAlertStrategyNotificationRateLimitOutputReference[_e] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyAlertStrategyNotificationRateLimitOutputReference", version: "14.35.0" };
function monitoringAlertPolicyAlertStrategyToTerraform(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 {
auto_close: cdktf.stringToTerraform(struct.autoClose),
notification_prompts: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.notificationPrompts),
notification_channel_strategy: cdktf.listMapper(monitoringAlertPolicyAlertStrategyNotificationChannelStrategyToTerraform, true)(struct.notificationChannelStrategy),
notification_rate_limit: monitoringAlertPolicyAlertStrategyNotificationRateLimitToTerraform(struct.notificationRateLimit),
};
}
function monitoringAlertPolicyAlertStrategyToHclTerraform(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 = {
auto_close: {
value: cdktf.stringToHclTerraform(struct.autoClose),
isBlock: false,
type: "simple",
storageClassType: "string",
},
notification_prompts: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.notificationPrompts),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
notification_channel_strategy: {
value: cdktf.listMapperHcl(monitoringAlertPolicyAlertStrategyNotificationChannelStrategyToHclTerraform, true)(struct.notificationChannelStrategy),
isBlock: true,
type: "list",
storageClassType: "MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyList",
},
notification_rate_limit: {
value: monitoringAlertPolicyAlertStrategyNotificationRateLimitToHclTerraform(struct.notificationRateLimit),
isBlock: true,
type: "list",
storageClassType: "MonitoringAlertPolicyAlertStrategyNotificationRateLimitList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringAlertPolicyAlertStrategyOutputReference 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;
// notification_channel_strategy - computed: false, optional: true, required: false
this._notificationChannelStrategy = new MonitoringAlertPolicyAlertStrategyNotificationChannelStrategyList(this, "notification_channel_strategy", false);
// notification_rate_limit - computed: false, optional: true, required: false
this._notificationRateLimit = new MonitoringAlertPolicyAlertStrategyNotificationRateLimitOutputReference(this, "notification_rate_limit");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._autoClose !== undefined) {
hasAnyValues = true;
internalValueResult.autoClose = this._autoClose;
}
if (this._notificationPrompts !== undefined) {
hasAnyValues = true;
internalValueResult.notificationPrompts = this._notificationPrompts;
}
if (this._notificationChannelStrategy?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.notificationChannelStrategy = this._notificationChannelStrategy?.internalValue;
}
if (this._notificationRateLimit?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.notificationRateLimit = this._notificationRateLimit?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._autoClose = undefined;
this._notificationPrompts = undefined;
this._notificationChannelStrategy.internalValue = undefined;
this._notificationRateLimit.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._autoClose = value.autoClose;
this._notificationPrompts = value.notificationPrompts;
this._notificationChannelStrategy.internalValue = value.notificationChannelStrategy;
this._notificationRateLimit.internalValue = value.notificationRateLimit;
}
}
get autoClose() {
return this.getStringAttribute('auto_close');
}
set autoClose(value) {
this._autoClose = value;
}
resetAutoClose() {
this._autoClose = undefined;
}
// Temporarily expose input value. Use with caution.
get autoCloseInput() {
return this._autoClose;
}
get notificationPrompts() {
return this.getListAttribute('notification_prompts');
}
set notificationPrompts(value) {
this._notificationPrompts = value;
}
resetNotificationPrompts() {
this._notificationPrompts = undefined;
}
// Temporarily expose input value. Use with caution.
get notificationPromptsInput() {
return this._notificationPrompts;
}
get notificationChannelStrategy() {
return this._notificationChannelStrategy;
}
putNotificationChannelStrategy(value) {
this._notificationChannelStrategy.internalValue = value;
}
resetNotificationChannelStrategy() {
this._notificationChannelStrategy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get notificationChannelStrategyInput() {
return this._notificationChannelStrategy.internalValue;
}
get notificationRateLimit() {
return this._notificationRateLimit;
}
putNotificationRateLimit(value) {
this._notificationRateLimit.internalValue = value;
}
resetNotificationRateLimit() {
this._notificationRateLimit.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get notificationRateLimitInput() {
return this._notificationRateLimit.internalValue;
}
}
exports.MonitoringAlertPolicyAlertStrategyOutputReference = MonitoringAlertPolicyAlertStrategyOutputReference;
_f = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyAlertStrategyOutputReference[_f] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyAlertStrategyOutputReference", version: "14.35.0" };
function monitoringAlertPolicyConditionsConditionAbsentAggregationsToTerraform(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 {
alignment_period: cdktf.stringToTerraform(struct.alignmentPeriod),
cross_series_reducer: cdktf.stringToTerraform(struct.crossSeriesReducer),
group_by_fields: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.groupByFields),
per_series_aligner: cdktf.stringToTerraform(struct.perSeriesAligner),
};
}
function monitoringAlertPolicyConditionsConditionAbsentAggregationsToHclTerraform(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 = {
alignment_period: {
value: cdktf.stringToHclTerraform(struct.alignmentPeriod),
isBlock: false,
type: "simple",
storageClassType: "string",
},
cross_series_reducer: {
value: cdktf.stringToHclTerraform(struct.crossSeriesReducer),
isBlock: false,
type: "simple",
storageClassType: "string",
},
group_by_fields: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.groupByFields),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
per_series_aligner: {
value: cdktf.stringToHclTerraform(struct.perSeriesAligner),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringAlertPolicyConditionsConditionAbsentAggregationsOutputReference 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._alignmentPeriod !== undefined) {
hasAnyValues = true;
internalValueResult.alignmentPeriod = this._alignmentPeriod;
}
if (this._crossSeriesReducer !== undefined) {
hasAnyValues = true;
internalValueResult.crossSeriesReducer = this._crossSeriesReducer;
}
if (this._groupByFields !== undefined) {
hasAnyValues = true;
internalValueResult.groupByFields = this._groupByFields;
}
if (this._perSeriesAligner !== undefined) {
hasAnyValues = true;
internalValueResult.perSeriesAligner = this._perSeriesAligner;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._alignmentPeriod = undefined;
this._crossSeriesReducer = undefined;
this._groupByFields = undefined;
this._perSeriesAligner = 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._alignmentPeriod = value.alignmentPeriod;
this._crossSeriesReducer = value.crossSeriesReducer;
this._groupByFields = value.groupByFields;
this._perSeriesAligner = value.perSeriesAligner;
}
}
get alignmentPeriod() {
return this.getStringAttribute('alignment_period');
}
set alignmentPeriod(value) {
this._alignmentPeriod = value;
}
resetAlignmentPeriod() {
this._alignmentPeriod = undefined;
}
// Temporarily expose input value. Use with caution.
get alignmentPeriodInput() {
return this._alignmentPeriod;
}
get crossSeriesReducer() {
return this.getStringAttribute('cross_series_reducer');
}
set crossSeriesReducer(value) {
this._crossSeriesReducer = value;
}
resetCrossSeriesReducer() {
this._crossSeriesReducer = undefined;
}
// Temporarily expose input value. Use with caution.
get crossSeriesReducerInput() {
return this._crossSeriesReducer;
}
get groupByFields() {
return this.getListAttribute('group_by_fields');
}
set groupByFields(value) {
this._groupByFields = value;
}
resetGroupByFields() {
this._groupByFields = undefined;
}
// Temporarily expose input value. Use with caution.
get groupByFieldsInput() {
return this._groupByFields;
}
get perSeriesAligner() {
return this.getStringAttribute('per_series_aligner');
}
set perSeriesAligner(value) {
this._perSeriesAligner = value;
}
resetPerSeriesAligner() {
this._perSeriesAligner = undefined;
}
// Temporarily expose input value. Use with caution.
get perSeriesAlignerInput() {
return this._perSeriesAligner;
}
}
exports.MonitoringAlertPolicyConditionsConditionAbsentAggregationsOutputReference = MonitoringAlertPolicyConditionsConditionAbsentAggregationsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyConditionsConditionAbsentAggregationsOutputReference[_g] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyConditionsConditionAbsentAggregationsOutputReference", version: "14.35.0" };
class MonitoringAlertPolicyConditionsConditionAbsentAggregationsList 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 MonitoringAlertPolicyConditionsConditionAbsentAggregationsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MonitoringAlertPolicyConditionsConditionAbsentAggregationsList = MonitoringAlertPolicyConditionsConditionAbsentAggregationsList;
_h = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyConditionsConditionAbsentAggregationsList[_h] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyConditionsConditionAbsentAggregationsList", version: "14.35.0" };
function monitoringAlertPolicyConditionsConditionAbsentTriggerToTerraform(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 {
count: cdktf.numberToTerraform(struct.count),
percent: cdktf.numberToTerraform(struct.percent),
};
}
function monitoringAlertPolicyConditionsConditionAbsentTriggerToHclTerraform(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 = {
count: {
value: cdktf.numberToHclTerraform(struct.count),
isBlock: false,
type: "simple",
storageClassType: "number",
},
percent: {
value: cdktf.numberToHclTerraform(struct.percent),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringAlertPolicyConditionsConditionAbsentTriggerOutputReference 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._count !== undefined) {
hasAnyValues = true;
internalValueResult.count = this._count;
}
if (this._percent !== undefined) {
hasAnyValues = true;
internalValueResult.percent = this._percent;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._count = undefined;
this._percent = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._count = value.count;
this._percent = value.percent;
}
}
get count() {
return this.getNumberAttribute('count');
}
set count(value) {
this._count = value;
}
resetCount() {
this._count = undefined;
}
// Temporarily expose input value. Use with caution.
get countInput() {
return this._count;
}
get percent() {
return this.getNumberAttribute('percent');
}
set percent(value) {
this._percent = value;
}
resetPercent() {
this._percent = undefined;
}
// Temporarily expose input value. Use with caution.
get percentInput() {
return this._percent;
}
}
exports.MonitoringAlertPolicyConditionsConditionAbsentTriggerOutputReference = MonitoringAlertPolicyConditionsConditionAbsentTriggerOutputReference;
_j = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyConditionsConditionAbsentTriggerOutputReference[_j] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyConditionsConditionAbsentTriggerOutputReference", version: "14.35.0" };
function monitoringAlertPolicyConditionsConditionAbsentToTerraform(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 {
duration: cdktf.stringToTerraform(struct.duration),
filter: cdktf.stringToTerraform(struct.filter),
aggregations: cdktf.listMapper(monitoringAlertPolicyConditionsConditionAbsentAggregationsToTerraform, true)(struct.aggregations),
trigger: monitoringAlertPolicyConditionsConditionAbsentTriggerToTerraform(struct.trigger),
};
}
function monitoringAlertPolicyConditionsConditionAbsentToHclTerraform(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 = {
duration: {
value: cdktf.stringToHclTerraform(struct.duration),
isBlock: false,
type: "simple",
storageClassType: "string",
},
filter: {
value: cdktf.stringToHclTerraform(struct.filter),
isBlock: false,
type: "simple",
storageClassType: "string",
},
aggregations: {
value: cdktf.listMapperHcl(monitoringAlertPolicyConditionsConditionAbsentAggregationsToHclTerraform, true)(struct.aggregations),
isBlock: true,
type: "list",
storageClassType: "MonitoringAlertPolicyConditionsConditionAbsentAggregationsList",
},
trigger: {
value: monitoringAlertPolicyConditionsConditionAbsentTriggerToHclTerraform(struct.trigger),
isBlock: true,
type: "list",
storageClassType: "MonitoringAlertPolicyConditionsConditionAbsentTriggerList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringAlertPolicyConditionsConditionAbsentOutputReference 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;
// aggregations - computed: false, optional: true, required: false
this._aggregations = new MonitoringAlertPolicyConditionsConditionAbsentAggregationsList(this, "aggregations", false);
// trigger - computed: false, optional: true, required: false
this._trigger = new MonitoringAlertPolicyConditionsConditionAbsentTriggerOutputReference(this, "trigger");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._duration !== undefined) {
hasAnyValues = true;
internalValueResult.duration = this._duration;
}
if (this._filter !== undefined) {
hasAnyValues = true;
internalValueResult.filter = this._filter;
}
if (this._aggregations?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.aggregations = this._aggregations?.internalValue;
}
if (this._trigger?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.trigger = this._trigger?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._duration = undefined;
this._filter = undefined;
this._aggregations.internalValue = undefined;
this._trigger.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._duration = value.duration;
this._filter = value.filter;
this._aggregations.internalValue = value.aggregations;
this._trigger.internalValue = value.trigger;
}
}
get duration() {
return this.getStringAttribute('duration');
}
set duration(value) {
this._duration = value;
}
// Temporarily expose input value. Use with caution.
get durationInput() {
return this._duration;
}
get filter() {
return this.getStringAttribute('filter');
}
set filter(value) {
this._filter = value;
}
resetFilter() {
this._filter = undefined;
}
// Temporarily expose input value. Use with caution.
get filterInput() {
return this._filter;
}
get aggregations() {
return this._aggregations;
}
putAggregations(value) {
this._aggregations.internalValue = value;
}
resetAggregations() {
this._aggregations.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get aggregationsInput() {
return this._aggregations.internalValue;
}
get trigger() {
return this._trigger;
}
putTrigger(value) {
this._trigger.internalValue = value;
}
resetTrigger() {
this._trigger.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get triggerInput() {
return this._trigger.internalValue;
}
}
exports.MonitoringAlertPolicyConditionsConditionAbsentOutputReference = MonitoringAlertPolicyConditionsConditionAbsentOutputReference;
_k = JSII_RTTI_SYMBOL_1;
MonitoringAlertPolicyConditionsConditionAbsentOutputReference[_k] = { fqn: "@cdktf/provider-google.monitoringAlertPolicy.MonitoringAlertPolicyConditionsConditionAbsentOutputReference", version: "14.35.0" };
function monitoringAlertPolicyConditionsConditionMatchedLogToTerraform(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 {
filter: cdktf.stringToTerraform(struct.filter),
label_extractors: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labelExtractors),
};
}
function monitoringAlertPolicyConditionsConditionMatchedLogToHclTerraform(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 = {
filter: {
value: cdktf.stringToHclTerraform(struct.filter),
isBlock: false,
type: "simple",
storageClassType: "string",
},
label_extractors: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.labelExtractors),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined