@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,108 lines (1,107 loc) • 404 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;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MonitoringSlo = exports.MonitoringSloWindowsBasedSliOutputReference = exports.MonitoringSloWindowsBasedSliMetricSumInRangeOutputReference = exports.MonitoringSloWindowsBasedSliMetricSumInRangeRangeOutputReference = exports.MonitoringSloWindowsBasedSliMetricMeanInRangeOutputReference = exports.MonitoringSloWindowsBasedSliMetricMeanInRangeRangeOutputReference = exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdOutputReference = exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceOutputReference = exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceGoodTotalRatioOutputReference = exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutOutputReference = exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutRangeOutputReference = exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceOutputReference = exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyOutputReference = exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityOutputReference = exports.MonitoringSloTimeoutsOutputReference = exports.MonitoringSloRequestBasedSliOutputReference = exports.MonitoringSloRequestBasedSliGoodTotalRatioOutputReference = exports.MonitoringSloRequestBasedSliDistributionCutOutputReference = exports.MonitoringSloRequestBasedSliDistributionCutRangeOutputReference = exports.MonitoringSloBasicSliOutputReference = exports.MonitoringSloBasicSliLatencyOutputReference = exports.MonitoringSloBasicSliAvailabilityOutputReference = void 0;
exports.monitoringSloBasicSliAvailabilityToTerraform = monitoringSloBasicSliAvailabilityToTerraform;
exports.monitoringSloBasicSliAvailabilityToHclTerraform = monitoringSloBasicSliAvailabilityToHclTerraform;
exports.monitoringSloBasicSliLatencyToTerraform = monitoringSloBasicSliLatencyToTerraform;
exports.monitoringSloBasicSliLatencyToHclTerraform = monitoringSloBasicSliLatencyToHclTerraform;
exports.monitoringSloBasicSliToTerraform = monitoringSloBasicSliToTerraform;
exports.monitoringSloBasicSliToHclTerraform = monitoringSloBasicSliToHclTerraform;
exports.monitoringSloRequestBasedSliDistributionCutRangeToTerraform = monitoringSloRequestBasedSliDistributionCutRangeToTerraform;
exports.monitoringSloRequestBasedSliDistributionCutRangeToHclTerraform = monitoringSloRequestBasedSliDistributionCutRangeToHclTerraform;
exports.monitoringSloRequestBasedSliDistributionCutToTerraform = monitoringSloRequestBasedSliDistributionCutToTerraform;
exports.monitoringSloRequestBasedSliDistributionCutToHclTerraform = monitoringSloRequestBasedSliDistributionCutToHclTerraform;
exports.monitoringSloRequestBasedSliGoodTotalRatioToTerraform = monitoringSloRequestBasedSliGoodTotalRatioToTerraform;
exports.monitoringSloRequestBasedSliGoodTotalRatioToHclTerraform = monitoringSloRequestBasedSliGoodTotalRatioToHclTerraform;
exports.monitoringSloRequestBasedSliToTerraform = monitoringSloRequestBasedSliToTerraform;
exports.monitoringSloRequestBasedSliToHclTerraform = monitoringSloRequestBasedSliToHclTerraform;
exports.monitoringSloTimeoutsToTerraform = monitoringSloTimeoutsToTerraform;
exports.monitoringSloTimeoutsToHclTerraform = monitoringSloTimeoutsToHclTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityToTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityToTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityToHclTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityToHclTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyToTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyToTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyToHclTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyToHclTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceToTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceToTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceToHclTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceToHclTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutRangeToTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutRangeToTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutRangeToHclTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutRangeToHclTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutToTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutToTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutToHclTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceDistributionCutToHclTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceGoodTotalRatioToTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceGoodTotalRatioToTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceGoodTotalRatioToHclTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceGoodTotalRatioToHclTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceToTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceToTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceToHclTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdPerformanceToHclTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdToTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdToTerraform;
exports.monitoringSloWindowsBasedSliGoodTotalRatioThresholdToHclTerraform = monitoringSloWindowsBasedSliGoodTotalRatioThresholdToHclTerraform;
exports.monitoringSloWindowsBasedSliMetricMeanInRangeRangeToTerraform = monitoringSloWindowsBasedSliMetricMeanInRangeRangeToTerraform;
exports.monitoringSloWindowsBasedSliMetricMeanInRangeRangeToHclTerraform = monitoringSloWindowsBasedSliMetricMeanInRangeRangeToHclTerraform;
exports.monitoringSloWindowsBasedSliMetricMeanInRangeToTerraform = monitoringSloWindowsBasedSliMetricMeanInRangeToTerraform;
exports.monitoringSloWindowsBasedSliMetricMeanInRangeToHclTerraform = monitoringSloWindowsBasedSliMetricMeanInRangeToHclTerraform;
exports.monitoringSloWindowsBasedSliMetricSumInRangeRangeToTerraform = monitoringSloWindowsBasedSliMetricSumInRangeRangeToTerraform;
exports.monitoringSloWindowsBasedSliMetricSumInRangeRangeToHclTerraform = monitoringSloWindowsBasedSliMetricSumInRangeRangeToHclTerraform;
exports.monitoringSloWindowsBasedSliMetricSumInRangeToTerraform = monitoringSloWindowsBasedSliMetricSumInRangeToTerraform;
exports.monitoringSloWindowsBasedSliMetricSumInRangeToHclTerraform = monitoringSloWindowsBasedSliMetricSumInRangeToHclTerraform;
exports.monitoringSloWindowsBasedSliToTerraform = monitoringSloWindowsBasedSliToTerraform;
exports.monitoringSloWindowsBasedSliToHclTerraform = monitoringSloWindowsBasedSliToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function monitoringSloBasicSliAvailabilityToTerraform(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 {
enabled: cdktf.booleanToTerraform(struct.enabled),
};
}
function monitoringSloBasicSliAvailabilityToHclTerraform(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 = {
enabled: {
value: cdktf.booleanToHclTerraform(struct.enabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringSloBasicSliAvailabilityOutputReference 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._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enabled = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enabled = value.enabled;
}
}
get enabled() {
return this.getBooleanAttribute('enabled');
}
set enabled(value) {
this._enabled = value;
}
resetEnabled() {
this._enabled = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledInput() {
return this._enabled;
}
}
exports.MonitoringSloBasicSliAvailabilityOutputReference = MonitoringSloBasicSliAvailabilityOutputReference;
_a = JSII_RTTI_SYMBOL_1;
MonitoringSloBasicSliAvailabilityOutputReference[_a] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloBasicSliAvailabilityOutputReference", version: "14.35.0" };
function monitoringSloBasicSliLatencyToTerraform(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 {
threshold: cdktf.stringToTerraform(struct.threshold),
};
}
function monitoringSloBasicSliLatencyToHclTerraform(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 = {
threshold: {
value: cdktf.stringToHclTerraform(struct.threshold),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringSloBasicSliLatencyOutputReference 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._threshold !== undefined) {
hasAnyValues = true;
internalValueResult.threshold = this._threshold;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._threshold = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._threshold = value.threshold;
}
}
get threshold() {
return this.getStringAttribute('threshold');
}
set threshold(value) {
this._threshold = value;
}
// Temporarily expose input value. Use with caution.
get thresholdInput() {
return this._threshold;
}
}
exports.MonitoringSloBasicSliLatencyOutputReference = MonitoringSloBasicSliLatencyOutputReference;
_b = JSII_RTTI_SYMBOL_1;
MonitoringSloBasicSliLatencyOutputReference[_b] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloBasicSliLatencyOutputReference", version: "14.35.0" };
function monitoringSloBasicSliToTerraform(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 {
location: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.location),
method: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.method),
version: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.version),
availability: monitoringSloBasicSliAvailabilityToTerraform(struct.availability),
latency: monitoringSloBasicSliLatencyToTerraform(struct.latency),
};
}
function monitoringSloBasicSliToHclTerraform(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 = {
location: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.location),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
method: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.method),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
version: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.version),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
availability: {
value: monitoringSloBasicSliAvailabilityToHclTerraform(struct.availability),
isBlock: true,
type: "list",
storageClassType: "MonitoringSloBasicSliAvailabilityList",
},
latency: {
value: monitoringSloBasicSliLatencyToHclTerraform(struct.latency),
isBlock: true,
type: "list",
storageClassType: "MonitoringSloBasicSliLatencyList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringSloBasicSliOutputReference 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;
// availability - computed: false, optional: true, required: false
this._availability = new MonitoringSloBasicSliAvailabilityOutputReference(this, "availability");
// latency - computed: false, optional: true, required: false
this._latency = new MonitoringSloBasicSliLatencyOutputReference(this, "latency");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._location !== undefined) {
hasAnyValues = true;
internalValueResult.location = this._location;
}
if (this._method !== undefined) {
hasAnyValues = true;
internalValueResult.method = this._method;
}
if (this._version !== undefined) {
hasAnyValues = true;
internalValueResult.version = this._version;
}
if (this._availability?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.availability = this._availability?.internalValue;
}
if (this._latency?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.latency = this._latency?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._location = undefined;
this._method = undefined;
this._version = undefined;
this._availability.internalValue = undefined;
this._latency.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._location = value.location;
this._method = value.method;
this._version = value.version;
this._availability.internalValue = value.availability;
this._latency.internalValue = value.latency;
}
}
get location() {
return cdktf.Fn.tolist(this.getListAttribute('location'));
}
set location(value) {
this._location = value;
}
resetLocation() {
this._location = undefined;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;
}
get method() {
return cdktf.Fn.tolist(this.getListAttribute('method'));
}
set method(value) {
this._method = value;
}
resetMethod() {
this._method = undefined;
}
// Temporarily expose input value. Use with caution.
get methodInput() {
return this._method;
}
get version() {
return cdktf.Fn.tolist(this.getListAttribute('version'));
}
set version(value) {
this._version = value;
}
resetVersion() {
this._version = undefined;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
get availability() {
return this._availability;
}
putAvailability(value) {
this._availability.internalValue = value;
}
resetAvailability() {
this._availability.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get availabilityInput() {
return this._availability.internalValue;
}
get latency() {
return this._latency;
}
putLatency(value) {
this._latency.internalValue = value;
}
resetLatency() {
this._latency.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get latencyInput() {
return this._latency.internalValue;
}
}
exports.MonitoringSloBasicSliOutputReference = MonitoringSloBasicSliOutputReference;
_c = JSII_RTTI_SYMBOL_1;
MonitoringSloBasicSliOutputReference[_c] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloBasicSliOutputReference", version: "14.35.0" };
function monitoringSloRequestBasedSliDistributionCutRangeToTerraform(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 {
max: cdktf.numberToTerraform(struct.max),
min: cdktf.numberToTerraform(struct.min),
};
}
function monitoringSloRequestBasedSliDistributionCutRangeToHclTerraform(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 = {
max: {
value: cdktf.numberToHclTerraform(struct.max),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min: {
value: cdktf.numberToHclTerraform(struct.min),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringSloRequestBasedSliDistributionCutRangeOutputReference 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._max !== undefined) {
hasAnyValues = true;
internalValueResult.max = this._max;
}
if (this._min !== undefined) {
hasAnyValues = true;
internalValueResult.min = this._min;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._max = undefined;
this._min = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._max = value.max;
this._min = value.min;
}
}
get max() {
return this.getNumberAttribute('max');
}
set max(value) {
this._max = value;
}
resetMax() {
this._max = undefined;
}
// Temporarily expose input value. Use with caution.
get maxInput() {
return this._max;
}
get min() {
return this.getNumberAttribute('min');
}
set min(value) {
this._min = value;
}
resetMin() {
this._min = undefined;
}
// Temporarily expose input value. Use with caution.
get minInput() {
return this._min;
}
}
exports.MonitoringSloRequestBasedSliDistributionCutRangeOutputReference = MonitoringSloRequestBasedSliDistributionCutRangeOutputReference;
_d = JSII_RTTI_SYMBOL_1;
MonitoringSloRequestBasedSliDistributionCutRangeOutputReference[_d] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloRequestBasedSliDistributionCutRangeOutputReference", version: "14.35.0" };
function monitoringSloRequestBasedSliDistributionCutToTerraform(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 {
distribution_filter: cdktf.stringToTerraform(struct.distributionFilter),
range: monitoringSloRequestBasedSliDistributionCutRangeToTerraform(struct.range),
};
}
function monitoringSloRequestBasedSliDistributionCutToHclTerraform(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 = {
distribution_filter: {
value: cdktf.stringToHclTerraform(struct.distributionFilter),
isBlock: false,
type: "simple",
storageClassType: "string",
},
range: {
value: monitoringSloRequestBasedSliDistributionCutRangeToHclTerraform(struct.range),
isBlock: true,
type: "list",
storageClassType: "MonitoringSloRequestBasedSliDistributionCutRangeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringSloRequestBasedSliDistributionCutOutputReference 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;
// range - computed: false, optional: false, required: true
this._range = new MonitoringSloRequestBasedSliDistributionCutRangeOutputReference(this, "range");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._distributionFilter !== undefined) {
hasAnyValues = true;
internalValueResult.distributionFilter = this._distributionFilter;
}
if (this._range?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.range = this._range?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._distributionFilter = undefined;
this._range.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._distributionFilter = value.distributionFilter;
this._range.internalValue = value.range;
}
}
get distributionFilter() {
return this.getStringAttribute('distribution_filter');
}
set distributionFilter(value) {
this._distributionFilter = value;
}
// Temporarily expose input value. Use with caution.
get distributionFilterInput() {
return this._distributionFilter;
}
get range() {
return this._range;
}
putRange(value) {
this._range.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get rangeInput() {
return this._range.internalValue;
}
}
exports.MonitoringSloRequestBasedSliDistributionCutOutputReference = MonitoringSloRequestBasedSliDistributionCutOutputReference;
_e = JSII_RTTI_SYMBOL_1;
MonitoringSloRequestBasedSliDistributionCutOutputReference[_e] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloRequestBasedSliDistributionCutOutputReference", version: "14.35.0" };
function monitoringSloRequestBasedSliGoodTotalRatioToTerraform(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 {
bad_service_filter: cdktf.stringToTerraform(struct.badServiceFilter),
good_service_filter: cdktf.stringToTerraform(struct.goodServiceFilter),
total_service_filter: cdktf.stringToTerraform(struct.totalServiceFilter),
};
}
function monitoringSloRequestBasedSliGoodTotalRatioToHclTerraform(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 = {
bad_service_filter: {
value: cdktf.stringToHclTerraform(struct.badServiceFilter),
isBlock: false,
type: "simple",
storageClassType: "string",
},
good_service_filter: {
value: cdktf.stringToHclTerraform(struct.goodServiceFilter),
isBlock: false,
type: "simple",
storageClassType: "string",
},
total_service_filter: {
value: cdktf.stringToHclTerraform(struct.totalServiceFilter),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringSloRequestBasedSliGoodTotalRatioOutputReference 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._badServiceFilter !== undefined) {
hasAnyValues = true;
internalValueResult.badServiceFilter = this._badServiceFilter;
}
if (this._goodServiceFilter !== undefined) {
hasAnyValues = true;
internalValueResult.goodServiceFilter = this._goodServiceFilter;
}
if (this._totalServiceFilter !== undefined) {
hasAnyValues = true;
internalValueResult.totalServiceFilter = this._totalServiceFilter;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._badServiceFilter = undefined;
this._goodServiceFilter = undefined;
this._totalServiceFilter = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._badServiceFilter = value.badServiceFilter;
this._goodServiceFilter = value.goodServiceFilter;
this._totalServiceFilter = value.totalServiceFilter;
}
}
get badServiceFilter() {
return this.getStringAttribute('bad_service_filter');
}
set badServiceFilter(value) {
this._badServiceFilter = value;
}
resetBadServiceFilter() {
this._badServiceFilter = undefined;
}
// Temporarily expose input value. Use with caution.
get badServiceFilterInput() {
return this._badServiceFilter;
}
get goodServiceFilter() {
return this.getStringAttribute('good_service_filter');
}
set goodServiceFilter(value) {
this._goodServiceFilter = value;
}
resetGoodServiceFilter() {
this._goodServiceFilter = undefined;
}
// Temporarily expose input value. Use with caution.
get goodServiceFilterInput() {
return this._goodServiceFilter;
}
get totalServiceFilter() {
return this.getStringAttribute('total_service_filter');
}
set totalServiceFilter(value) {
this._totalServiceFilter = value;
}
resetTotalServiceFilter() {
this._totalServiceFilter = undefined;
}
// Temporarily expose input value. Use with caution.
get totalServiceFilterInput() {
return this._totalServiceFilter;
}
}
exports.MonitoringSloRequestBasedSliGoodTotalRatioOutputReference = MonitoringSloRequestBasedSliGoodTotalRatioOutputReference;
_f = JSII_RTTI_SYMBOL_1;
MonitoringSloRequestBasedSliGoodTotalRatioOutputReference[_f] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloRequestBasedSliGoodTotalRatioOutputReference", version: "14.35.0" };
function monitoringSloRequestBasedSliToTerraform(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 {
distribution_cut: monitoringSloRequestBasedSliDistributionCutToTerraform(struct.distributionCut),
good_total_ratio: monitoringSloRequestBasedSliGoodTotalRatioToTerraform(struct.goodTotalRatio),
};
}
function monitoringSloRequestBasedSliToHclTerraform(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 = {
distribution_cut: {
value: monitoringSloRequestBasedSliDistributionCutToHclTerraform(struct.distributionCut),
isBlock: true,
type: "list",
storageClassType: "MonitoringSloRequestBasedSliDistributionCutList",
},
good_total_ratio: {
value: monitoringSloRequestBasedSliGoodTotalRatioToHclTerraform(struct.goodTotalRatio),
isBlock: true,
type: "list",
storageClassType: "MonitoringSloRequestBasedSliGoodTotalRatioList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringSloRequestBasedSliOutputReference 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;
// distribution_cut - computed: false, optional: true, required: false
this._distributionCut = new MonitoringSloRequestBasedSliDistributionCutOutputReference(this, "distribution_cut");
// good_total_ratio - computed: false, optional: true, required: false
this._goodTotalRatio = new MonitoringSloRequestBasedSliGoodTotalRatioOutputReference(this, "good_total_ratio");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._distributionCut?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.distributionCut = this._distributionCut?.internalValue;
}
if (this._goodTotalRatio?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.goodTotalRatio = this._goodTotalRatio?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._distributionCut.internalValue = undefined;
this._goodTotalRatio.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._distributionCut.internalValue = value.distributionCut;
this._goodTotalRatio.internalValue = value.goodTotalRatio;
}
}
get distributionCut() {
return this._distributionCut;
}
putDistributionCut(value) {
this._distributionCut.internalValue = value;
}
resetDistributionCut() {
this._distributionCut.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get distributionCutInput() {
return this._distributionCut.internalValue;
}
get goodTotalRatio() {
return this._goodTotalRatio;
}
putGoodTotalRatio(value) {
this._goodTotalRatio.internalValue = value;
}
resetGoodTotalRatio() {
this._goodTotalRatio.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get goodTotalRatioInput() {
return this._goodTotalRatio.internalValue;
}
}
exports.MonitoringSloRequestBasedSliOutputReference = MonitoringSloRequestBasedSliOutputReference;
_g = JSII_RTTI_SYMBOL_1;
MonitoringSloRequestBasedSliOutputReference[_g] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloRequestBasedSliOutputReference", version: "14.35.0" };
function monitoringSloTimeoutsToTerraform(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),
update: cdktf.stringToTerraform(struct.update),
};
}
function monitoringSloTimeoutsToHclTerraform(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",
},
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));
}
class MonitoringSloTimeoutsOutputReference 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._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._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._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 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.MonitoringSloTimeoutsOutputReference = MonitoringSloTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
MonitoringSloTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloTimeoutsOutputReference", version: "14.35.0" };
function monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityToTerraform(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 {
enabled: cdktf.booleanToTerraform(struct.enabled),
};
}
function monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityToHclTerraform(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 = {
enabled: {
value: cdktf.booleanToHclTerraform(struct.enabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityOutputReference 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._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enabled = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enabled = value.enabled;
}
}
get enabled() {
return this.getBooleanAttribute('enabled');
}
set enabled(value) {
this._enabled = value;
}
resetEnabled() {
this._enabled = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledInput() {
return this._enabled;
}
}
exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityOutputReference = MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityOutputReference;
_j = JSII_RTTI_SYMBOL_1;
MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityOutputReference[_j] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityOutputReference", version: "14.35.0" };
function monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyToTerraform(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 {
threshold: cdktf.stringToTerraform(struct.threshold),
};
}
function monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyToHclTerraform(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 = {
threshold: {
value: cdktf.stringToHclTerraform(struct.threshold),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyOutputReference 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._threshold !== undefined) {
hasAnyValues = true;
internalValueResult.threshold = this._threshold;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._threshold = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._threshold = value.threshold;
}
}
get threshold() {
return this.getStringAttribute('threshold');
}
set threshold(value) {
this._threshold = value;
}
// Temporarily expose input value. Use with caution.
get thresholdInput() {
return this._threshold;
}
}
exports.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyOutputReference = MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyOutputReference;
_k = JSII_RTTI_SYMBOL_1;
MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyOutputReference[_k] = { fqn: "@cdktf/provider-google.monitoringSlo.MonitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyOutputReference", version: "14.35.0" };
function monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceToTerraform(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 {
location: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.location),
method: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.method),
version: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.version),
availability: monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceAvailabilityToTerraform(struct.availability),
latency: monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceLatencyToTerraform(struct.latency),
};
}
function monitoringSloWindowsBasedSliGoodTotalRatioThresholdBasicSliPerformanceToHclTerraform(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 = {
location: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.location),
isBlock: false,